Skip to content

Instantly share code, notes, and snippets.

@hjongh hjongh/Mainnnn.java
Created Jul 26, 2016

Embed
What would you like to do?
public class Main {
public static final String MODID = "betterbow";
public static final String MODNAME = "BetterBow";
public static final String VERSION = "1.0.0";
@SidedProxy(clientSide="com.hjongh.betterbow.ClientProxy", serverSide="com.hjongh.betterbow.ServerProxy")
public static CommonProxy proxy;
@Instance
public static Main instance = new Main();
//reflection for access inGround of arrow
public static Field inGround;
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
try {
inGround = EntityArrow.class.
getDeclaredField("inGround");
} catch (NoSuchFieldException e1) {
try {
inGround = EntityArrow.class.getDeclaredField("field_70254_i");
} catch (NoSuchFieldException e2) {
} catch (SecurityException e2) {
}
} catch (SecurityException e1) {
}
inGround.setAccessible(true);
proxy.preInit(e);
}
@EventHandler
public void init(FMLInitializationEvent e) {
proxy.init(e);
}
@EventHandler
public void postInit(FMLPostInitializationEvent e) {
proxy.postInit(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.