Skip to content

Commit

Permalink
* experience changer block is only in development environment active
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Pöche committed Jul 4, 2017
1 parent da0f7ec commit de207b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/com/trontheim/expstore/ExperienceStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public void preinit(FMLPreInitializationEvent event)
BlockExpStore expStoreBlock = new BlockExpStore();
GameRegistry.registerBlock(expStoreBlock, "expStoreBlock");

BlockExpChanger expChangerBlock = new BlockExpChanger();
GameRegistry.registerBlock(expChangerBlock, "expChangerBlock");

TileEntity.addMapping(TileEntityExpStore.class, MODID + ":TileEntityExpStore");
RenderingRegistry.registerBlockHandler(RenderBlockExpStore.instance());

Expand All @@ -55,7 +52,12 @@ public void preinit(FMLPreInitializationEvent event)
// GameRegistry.addShapelessRecipe(new ItemStack(Blocks.hopper), new ItemStack(Blocks.dirt), new ItemStack(Blocks.dirt), new ItemStack(Blocks.dirt), new ItemStack(Blocks.dirt));

GameRegistry.addRecipe(new ItemStack(expStoreBlock), "ogo", "gGg", "ogo", 'o', Blocks.obsidian, 'g', Items.gold_ingot, 'G', Blocks.glass);
GameRegistry.addRecipe(new ItemStack(expChangerBlock), "ogo", "gGg", "ogo", 'o', Blocks.obsidian, 'g', Blocks.gold_block, 'G', Blocks.glass);

if(isDevelopmentEnvironment()) {
BlockExpChanger expChangerBlock = new BlockExpChanger();
GameRegistry.registerBlock(expChangerBlock, "expChangerBlock");
GameRegistry.addRecipe(new ItemStack(expChangerBlock), "ogo", "gGg", "ogo", 'o', Blocks.obsidian, 'g', Blocks.gold_block, 'G', Blocks.glass);
}
}

@EventHandler
Expand Down

0 comments on commit de207b3

Please sign in to comment.