
Everything posted by Kokkie
-
How to get other mod's tool material?
Do you mean as in you are making an expansion for Thermal Foundation which requires the user to have it installed, or do you mean having the same properties?
-
[1.10.2] [unsolved] How do i make a static line between 2 points?
Where do you need this for?
-
Items Not Collectible / Add Pause
Also, you should use breakBlock(), which is called if the block is replaced by another block (could be air, but also another block) instead of onBlockDestroyedByExplosion() and onBlockDestroyedByPlayer().
-
[1.12] Recipes Not Working
Maybe this will help:
-
[1.12] Recipe registry
Okay, thanks! Actually, they aren't working D: For my code etc. go to my github. https://github.com/KokkieBeer/Auto-Miner/tree/master/src/main/resources/assets/am/recipes
-
[1.12] Recipe registry
Okay, so how about smelting recipes?
-
[1.12] Recipe registry
So, I don't need any registry events or anything?
-
[1.12] Recipe registry
I've found ShapedRecipes.deserialize(JsonObject), should I use this?
-
[1.12] Recipe registry
How can I use json files with the event?
-
[1.12] Recipe registry
How can I use json?
-
[1.12] Recipe registry
So I need to make classes that implement IRecipe to use the new system?
-
[1.12] Recipe registry
Just noticed that :D. Is the event in newer versions of Forge? (I have 14.21.0.2321) Also, the wrench recipe now works :D.
-
[1.12] Recipe registry
Removed it, didn't work.
-
[1.12] Recipe registry
Also, go here for code. https://github.com/KokkieBeer/Auto-Miner
-
[1.12] Recipe registry
When I remove the recipe for the wrench, it works, but I set the registry name for the wrench... Also, it seems like the items aren't registered properly yet. They don't show up in the tab and I can't give them to me using /give...
- [1.12] Recipe registry
-
[1.12] Recipe registry
Where can I find which item it is?
-
[1.12] Recipe registry
How can I set that condition?
-
[1.12] Recipe registry
I fixed the problem there, but it seems like the lambda nullpointer didn't go away, but the code didn't get far enough to reach a lambda... So, please help. I can't find what causes it because the console doesn't give any information...
-
[1.11.2] Custom Block Model Not Rendering
You also forgot a : here.
-
[1.11.2] Custom Block Model Not Rendering
You added one : too much.
-
[1.12] Recipe registry
When the code reaches the while loop it freezes the game and opens the debug perspective telling me something about the while loop...
-
[1.12] Recipe registry
It seems to have gone away... But now it's stuck on the while loop in here... if (recipeComponents[i] instanceof String[]) { String[] astring = (String[]) ((String[]) recipeComponents[i++]); for (int s3 = 0; s3 < astring.length; s3++) { String s2 = astring[s3]; ++k; j = s2.length(); s = s + s2; } } else { while (recipeComponents[i] instanceof String) { String s1 = (String) recipeComponents[i++]; ++k; j = s1.length(); s = s + s1; } }
-
[1.12] Recipe registry
Everything registers fine (I think) but I, again, get the lambda nullpointer, why does this happen?
-
[1.12] Recipe registry
I no longer get any errors, but the items and blocks aren't registered. The events aren't fired... Main. @Mod(modid = Reference.ID, name = Reference.NAME, version = Reference.VERSION, acceptedMinecraftVersions = "[" + Reference.MC_VERSION + "]") public class AutoMiner { @Instance public static AutoMiner INSTANCE = new AutoMiner(); @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.COMMON_PROXY) public static IProxy PROXY; @EventHandler public static void preInit(FMLPreInitializationEvent event) { PROXY.registerEntities(); PROXY.registerRecipes(); PROXY.setTitle("Minecraft - " + Reference.MC_VERSION + " AutoMiner - " + Reference.VERSION); } @EventHandler public static void init(FMLInitializationEvent event) { } @EventHandler public static void postInit(FMLPostInitializationEvent event) { } } IProxy. public interface IProxy { void setTitle(String title); void registerEntities(); void registerRecipes(); } CommonProxy. public class CommonProxy implements IProxy { @Override public void setTitle(String title) { } @Override public void registerEntities() { GameRegistry.registerTileEntity(TileEntityAutoMiner.class, "AutoMiner"); } @Override public void registerRecipes() { AMUtils.addShapedRecipe("wrench", new ItemStack(AMItems.WRENCH), "S S", "SSS", " S ", 'S', AMItems.STEEL_INGOT); AMUtils.addShapedRecipe("auto_miner", new ItemStack(AMBlocks.AUTO_MINER), "SSS", "SPS", "SSS", 'S', AMItems.STEEL_INGOT, 'P', Items.IRON_PICKAXE); } } ClientProxy. public class ClientProxy implements IProxy { @Override public void setTitle(String title) { Display.setTitle(title); } @Override public void registerEntities() { } @Override public void registerRecipes() { } } Blocks. public class AMBlocks { public static final Block STEEL_BLOCK = new Block(Material.IRON).setCreativeTab(AMTabs.AM_TAB).setHardness(8.0F) .setResistance(15.0F).setRegistryName("steel_block").setUnlocalizedName("steel_block"); public static final Block AUTO_MINER = new BlockAutoMiner().setCreativeTab(AMTabs.AM_TAB).setHardness(7.0F) .setResistance(20.0F).setRegistryName("auto_miner").setUnlocalizedName("auto_miner"); public static final Block[] BLOCKS = new Block[] { STEEL_BLOCK, AUTO_MINER }; } Items. public class AMItems { public static final Item STEEL_INGOT = new Item().setCreativeTab(AMTabs.AM_TAB).setRegistryName("steel_ingot") .setUnlocalizedName("steel_ingot"); public static final Item WRENCH = new Item().setCreativeTab(AMTabs.AM_TAB).setMaxDamage(128).setMaxStackSize(1) .setRegistryName("wrench").setUnlocalizedName("wrench"); public static final Item[] ITEMS = new Item[] { STEEL_INGOT, WRENCH }; } Client Handler. @Mod.EventBusSubscriber(modid = Reference.ID, value = Side.CLIENT) public class AMClientHandler { @SubscribeEvent public void registerModels(ModelRegistryEvent event) { for (int i = 0; i < AMBlocks.BLOCKS.length; i++) { Block block = AMBlocks.BLOCKS[i]; ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } for (int i = 0; i < AMItems.ITEMS.length; i++) { Item item = AMItems.ITEMS[i]; ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } } Common Handler. @Mod.EventBusSubscriber(modid = Reference.ID, value = Side.SERVER) public class AMCommonHandler { @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { AMBlocks.STEEL_BLOCK.setHarvestLevel("pickaxe", 2); AMBlocks.AUTO_MINER.setHarvestLevel("pickaxe", 1); event.getRegistry().registerAll(AMBlocks.BLOCKS); } @SubscribeEvent public void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(AMItems.ITEMS); for (int i = 0; i < AMBlocks.BLOCKS.length; i++) { Block block = AMBlocks.BLOCKS[i]; event.getRegistry().register(new ItemBlock(block).setRegistryName(block.getRegistryName()) .setUnlocalizedName(block.getUnlocalizedName())); } } }
IPS spam blocked by CleanTalk.