Skip to content

Commit cd94534

Browse files
committed
Forgot to update this method name in the Forge version
Reflection is no longer needed, the method is now public
1 parent 7cb1e6a commit cd94534

File tree

1 file changed

+2
-17
lines changed
  • platforms/forge/src/main/java/com/khorn/terraincontrol/forge

1 file changed

+2
-17
lines changed

platforms/forge/src/main/java/com/khorn/terraincontrol/forge/TCPlugin.java

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,8 @@ public void load(FMLInitializationEvent event)
5656
worldType = new TCWorldType("TerrainControl");
5757

5858
// Register village and rare building starts
59-
try
60-
{
61-
Method registerStructure = null;
62-
try
63-
{
64-
registerStructure = MapGenStructureIO.class.getMethod("b", Class.class, String.class);
65-
} catch (Exception e)
66-
{
67-
registerStructure = MapGenStructureIO.class.getMethod("func_143034_b", Class.class, String.class);
68-
}
69-
registerStructure.invoke(null, RareBuildingStart.class, StructureNames.RARE_BUILDING);
70-
registerStructure.invoke(null, VillageStart.class, StructureNames.VILLAGE);
71-
} catch (Exception e)
72-
{
73-
TerrainControl.log(Level.SEVERE, "Failed to register structures");
74-
TerrainControl.printStackTrace(Level.SEVERE, e);
75-
}
59+
MapGenStructureIO.registerStructure(RareBuildingStart.class, StructureNames.RARE_BUILDING);
60+
MapGenStructureIO.registerStructure(VillageStart.class, StructureNames.VILLAGE);
7661

7762
// Register listening channel for listening to received configs.
7863
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)

0 commit comments

Comments
 (0)