generated from Legacy-Fabric/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fe734f
commit 313c4e5
Showing
10 changed files
with
192 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
mod-compat/src/main/java/fr/catcore/fabricatedforge/compat/asm/RemapAwareClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package fr.catcore.fabricatedforge.compat.asm; | ||
|
||
import io.github.fabriccompatibiltylayers.modremappingapi.api.MappingUtils; | ||
|
||
import java.lang.reflect.Field; | ||
import java.lang.reflect.Method; | ||
|
||
public class RemapAwareClass { | ||
public static Class<?> forName(String className) | ||
throws ClassNotFoundException { | ||
try { | ||
return Class.forName(className); | ||
} catch (ClassNotFoundException e) { | ||
className = MappingUtils.mapClass(className); | ||
|
||
return Class.forName(className); | ||
} | ||
} | ||
public static Class<?> forName(String className, boolean initialize, | ||
ClassLoader loader) | ||
throws ClassNotFoundException { | ||
try { | ||
return Class.forName(className, initialize, loader); | ||
} catch (ClassNotFoundException e) { | ||
className = MappingUtils.mapClass(className); | ||
|
||
return Class.forName(className, initialize, loader); | ||
} | ||
} | ||
|
||
public static Method getDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException { | ||
try { | ||
return clazz.getDeclaredMethod(name, parameterTypes); | ||
} catch (NoSuchMethodException e) { | ||
name = MappingUtils.mapMethod(clazz, name, parameterTypes).name; | ||
|
||
return clazz.getDeclaredMethod(name, parameterTypes); | ||
} | ||
} | ||
|
||
public static Field getDeclaredField(Class<?> clazz, String name) throws NoSuchFieldException { | ||
try { | ||
return clazz.getDeclaredField(name); | ||
} catch (NoSuchFieldException e) { | ||
name = MappingUtils.mapField(clazz, name).name; | ||
|
||
return clazz.getDeclaredField(name); | ||
} | ||
} | ||
|
||
public static Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException { | ||
final String originalName = name; | ||
try { | ||
return clazz.getMethod(name, parameterTypes); | ||
} catch (NoSuchMethodException e) { | ||
name = MappingUtils.mapMethod(clazz, name, parameterTypes).name; | ||
|
||
try { | ||
return clazz.getMethod(name, parameterTypes); | ||
} catch (NoSuchMethodException e1) { | ||
return getDeclaredMethod(clazz, originalName, parameterTypes); | ||
} | ||
} | ||
} | ||
|
||
public static Field getField(Class<?> clazz, String name) throws NoSuchFieldException, SecurityException { | ||
final String originalName = name; | ||
try { | ||
return clazz.getField(name); | ||
} catch (NoSuchFieldException e) { | ||
name = MappingUtils.mapField(clazz, name).name; | ||
|
||
try { | ||
return clazz.getField(name); | ||
} catch (NoSuchFieldException e1) { | ||
return getDeclaredField(clazz, originalName); | ||
} | ||
} | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
.../src/main/java/fr/catcore/fabricatedforge/compat/mixin/nei/FurnaceRecipeHandlerMixin.java
This file was deleted.
Oops, something went wrong.
28 changes: 1 addition & 27 deletions
28
mod-compat/src/main/resources/fabricated-forge-mods.accesswidener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,3 @@ | ||
accessWidener v2 named | ||
|
||
### NEI | ||
accessible field net/minecraft/client/gui/screen/ingame/HandledScreen field_1346 Lnet/minecraft/client/render/item/ItemRenderer; | ||
accessible field net/minecraft/client/gui/screen/ingame/HandledScreen backgroundWidth I | ||
accessible field net/minecraft/client/gui/screen/ingame/HandledScreen backgroundHeight I | ||
accessible field net/minecraft/client/gui/screen/ingame/HandledScreen x I | ||
accessible field net/minecraft/client/gui/screen/ingame/HandledScreen y I | ||
accessible method net/minecraft/client/gui/screen/ingame/HandledScreen getSlotAt (II)Lnet/minecraft/inventory/slot/Slot; | ||
extendable method net/minecraft/client/gui/screen/ingame/HandledScreen getSlotAt (II)Lnet/minecraft/inventory/slot/Slot; | ||
accessible method net/minecraft/client/gui/screen/ingame/HandledScreen onMouseClick (Lnet/minecraft/inventory/slot/Slot;III)V | ||
accessible method net/minecraft/client/gui/screen/ingame/HandledScreen drawSlot (Lnet/minecraft/inventory/slot/Slot;)V | ||
extendable method net/minecraft/client/gui/screen/ingame/HandledScreen drawSlot (Lnet/minecraft/inventory/slot/Slot;)V | ||
|
||
accessible field net/minecraft/client/class_469 connection Lnet/minecraft/network/Connection; | ||
accessible field net/minecraft/entity/EntityType CLASS_ID_MAP Ljava/util/Map; | ||
accessible field net/minecraft/client/gui/screen/Screen textRenderer Lnet/minecraft/client/font/TextRenderer; | ||
accessible field net/minecraft/client/gui/screen/Screen field_1229 Lnet/minecraft/client/Minecraft; | ||
accessible method net/minecraft/client/gui/DrawableHelper fillGradient (IIIIII)V | ||
accessible field net/minecraft/client/gui/DrawableHelper zOffset F | ||
accessible field net/minecraft/client/gui/screen/ingame/CreativeInventoryScreen selectedTab I | ||
accessible field net/minecraft/client/gui/screen/Screen buttons Ljava/util/List; | ||
accessible class net/minecraft/inventory/slot/class_1019 | ||
accessible method net/minecraft/inventory/slot/class_1019 <init> (Lnet/minecraft/screen/PlayerScreenHandler;Lnet/minecraft/inventory/Inventory;IIII)V | ||
|
||
accessible field net/minecraft/world/chunk/ServerChunkProvider chunks Ljava/util/List; | ||
accessible field net/minecraft/inventory/CraftingInventory stacks [Lnet/minecraft/item/ItemStack; | ||
accessible field net/minecraft/client/Minecraft ticker Lnet/minecraft/client/render/ClientTickTracker; | ||
accessible field net/minecraft/nbt/NbtCompound data Ljava/util/Map; | ||
accessible field net/minecraft/client/Minecraft ticker Lnet/minecraft/client/render/ClientTickTracker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.