Skip to content

Commit

Permalink
Make grass hit fix configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Feb 10, 2024
1 parent 39400f0 commit f61aafd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/embeddedt/archaicfix/ArchaicFix.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public void preinit(FMLPreInitializationEvent event)
ReflectionHelper.setPrivateValue(Entity.class, null, 1, "field_70152_a", "nextEntityID");
ArchaicLogger.LOGGER.info("Fixed MC-111480");
}
MinecraftForge.EVENT_BUS.register(new LeftClickEventHandler());
if(ArchaicConfig.enableHitThroughGrassFix) {
MinecraftForge.EVENT_BUS.register(new LeftClickEventHandler());
}
helper = new FixHelper();
MinecraftForge.EVENT_BUS.register(helper);
FMLCommonHandler.instance().bus().register(helper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,8 @@ public class ArchaicConfig {
@Config.Comment("Add the Let's Encrypt root certificates to the default trust store.")
@Config.DefaultBoolean(false)
public static boolean enableLetsEncryptRoot;

@Config.Comment("Allow entities to be hit through grass, instead of breaking the grass plant")
@Config.DefaultBoolean(true)
public static boolean enableHitThroughGrassFix;
}

0 comments on commit f61aafd

Please sign in to comment.