Jump to content

xXJamie_Xx

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by xXJamie_Xx

  1. I've tried if (event.getHarvester() == null) { return; } but it still returns the error. EDIT: Moved it to before my initial IF statement and it appears to be working, thanks for the support, very much appreciated.
  2. It shouldn't do anything different but not sure how to do that?
  3. I'm using the HarvestDropsEvent to change the drops of cobblestone and gravel when using any of my mods hammers. Strangely, the game crashes when joining a world with "NullPointerException", heres the full report: https://pastebin.com/Hq6HSZG4 Heres my EventHandler class: https://pastebin.com/pLj27sKj Thanks!
  4. Solved. (wooden_hammer.json was incorrect)
  5. I followed Shadowfacts tutorial to create a mod in 1.12.2 but my item is not textured in game. I believe it is seeing the model json as previously it looked like a 3D block with the unlocalized name on the side, but now it looks like a 2D item with just the purple and black tiles. My project setup looks like this: WaterBlockUtils.java (main class) ModItems.java ItemBase.java CommonProxy.java ClientProxy.java wooden_hammer.json
  6. Hi there, Me and a friend have been experiencing this issue for a while now and cannot find a solution that fixes it. We are trying to connect to a server running on a virtual server that I am hosting. It is running a selection of mods that I have compiled into a private modpack for us to play. We are now stuck with the issue of trying to connect to the server. I have ensured that the server is running all of the correct mods and such but when we try to join we get the message "Timed Out" and then in the console it says: Thanks for all the help!
  7. ModBlocks.java: package com.xXJamie_Xx.myTweaks.init; import com.xXJamie_Xx.myTweaks.blocks.Blockhouse; import com.xXJamie_Xx.myTweaks.blocks.BlocktownCentre; import com.xXJamie_Xx.myTweaks.items.ItemScroll; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModBlocks { //Passive/Economical Buildings public static Block townCentre; public static Block house; public static Block farm; public static Block market; public static Block mine; //Aggressive/Military Buildings public static Block barracks; public static Block stable; public static Block artilleryFoundry; public static void init() { townCentre = new BlocktownCentre(); house = new Blockhouse(); } public static void register() { registerBlock(townCentre); registerBlock(house); } private static void registerBlock(Block block) { //GameRegistry.register(townCentre); ItemBlock itemtowncentre = new ItemBlock(townCentre); itemtowncentre.setRegistryName(block.getRegistryName()); GameRegistry.register(itemtowncentre); //GameRegistry.register(house); ItemBlock itemhouse = new ItemBlock(house); itemhouse.setRegistryName(block.getRegistryName()); GameRegistry.register(itemhouse); } public static void registerRenders() { registerRender(townCentre); registerRender(house); } private static void registerRender(Block block) { } } Crash Report: https://pastebin.com/yJPwrsE8
  8. It may be different but from first glance it looks very similar at least. https://pastebin.com/7J2LvPFD
  9. I see. So I commented out these lines: //GameRegistry.register(townCentre); //GameRegistry.register(house); But the game crashes still. (with the same error)
  10. Yeah, to register both blocks.
  11. No. I only use this line once: private static void registerBlock(Block block) {
  12. So you are saying that there is 2 of these: GameRegistry.register(townCentre); //COUGH #1 ItemBlock itemtowncentre = new ItemBlock(townCentre); itemtowncentre.setRegistryName(townCentre.getRegistryName()); GameRegistry.register(itemtowncentre); GameRegistry.register(townCentre); //COUGH #2 ItemBlock itemtowncentre = new ItemBlock(house); itemtowncentre.setRegistryName(house.getRegistryName()); GameRegistry.register(itemtowncentre); Yet I only see one.
  13. Excuse my lack of knowledge (I'm fairly new to modding), I can't see the issue here.
  14. I am getting a crash report from my own mod in my dev environment. It's saying something about the fact that I have registered the same block twice, but I can clearly see that it is two different blocks in my code. Github project: https://github.com/xXJamieXx/myTweaks Crash report: https://pastebin.com/ayq8Aifp
  15. https://www.youtube.com/playlist?list=PLDhiRTZ_vnoUSS_7D78_lmVLw35dQ9asn
  16. Wow. Thanks, that fixed everything
  17. https://github.com/xXJamieXx/myTweaks
  18. How do I upload my code?
  19. After moving my ModelLoader code, the texture for my old item that used to work, now doesn't work. Do I need to reference this in my ModBlocks.java and ModItems.java files? Latest Log: https://pastebin.com/yaQSSftv
  20. Also, how would I go about, doing the same with items? (btw, the texture still does not work in my hand or in my inventory)
  21. Sorry! The error I have is with the code I'm using. public void preInit() { ModItems.registerRenders(); ModBlocks.registerRenders(); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } But, on the longest line, it's saying that "block" cannot be resolved & also cannot be resolved to a variable.
  22. So I moved it to the preInit. Now what? I still have an error.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.