Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Ok your mod isn't being loaded. You need to right click on the forge project Build Path->Configure Build Path->Order and Export->Select All->Apply and Close
  2. Is your mod loading check the mods list on the main menu.
  3. Put a System.out.println in your registry method to see if it is called.
  4. What you have is what I meant. Is there anything in the console. Make the string lower case here aka "amethyst" new ModItem("Amethyst");
  5. You need to call ModItems.init at the beginning of this.
  6. Yes do ModelLoader.setCustomModelLocation(item, 0, new ModelResourceLocation(item.getRegistryName()); inside the for loop.
  7. EasyRegistry.registerOther(new ContainerType<>(SifterContainer::new), new ResourceLocation(HarderOres.MODID,"sifter")); Instead of new ContainerType<?> do IForgeContainerType.create(SifterContainer::new) And then in your SifterContainer have a constructor with a PacketBuffer parameter. I think it gets passed in there. And then you can send whatever info you want to the container.
  8. Yeah I linked him my old tutorial for 1.10 that I had started.
  9. This is definitely the case. I forgot that 1.10 didn't have the Registry events yet. So therefore its mostly useless.
  10. I'm not sure do you have your code on your github so I can look.
  11. 1.14.4 I updated when it first came out. ContainerTypes are a registry.
  12. I can confirm that they work in the latest version of forge 1.14. So you may want to update. There might be some behind the scenes magic with registering the ContainerType you should use IForgeContainerType.create
  13. Gonna check this now. Yeah the way it is kinda seems weird to me, but I figured it out. So you need an INamedContainerProvider which can have a constructor. To open a gui you use one of the NetworkHooks.openGui which has three options all of which take in a ServerPlayer and a INamedContainerProvider. One takes in a BlockPos and another takes in a Consumer<PacketBuffer>. And there is this example on the github.
  14. You can't do this. This is against the Java syntax.
  15. You should have a ModelRegistryEvent and you need to do it there.
  16. Override them. That's a different issue. Do you have a item model file for it? Do you register the models for it.
  17. Your register methods need to be static.
  18. You highlight it and it should give you the option to quote the selection.
  19. You could look at these I made these 2 years ago for 1.10. Not much of the basic stuff changed between 1.10 and 1.12. It's the idea of composition over inheritance. You don't need to make a new class for each Block. You can just do new Block(Material.ROCK).setUnlocalizedName("modid:name").setRegistryName("modid:name").setCreativeTab(CreativeTabs.BUILDING_BLOCKS); But in your case you can make a class for your ores. Like vanilla's BlockOre class. Block is the class and the # means that the following thing after it requires a field of the class type. IE Blocks.DIAMOND_ORE.getItem(...) instead of Block.getItem(...). Go to the BlockOre class. Which you can find by typing BlockOre and ctrl+left clicking on the name. Or by looking in the forge source file in the eclipse file explorer. Then find the methods with the names I gave you.
  20. Ok first thing after looking over your code I have determined that it isn't a good tutorial. So I don't recommend you keep using it. Remove this entirely from your workspace. And instead replace wherever you have <variable>.registerModels(); With Main.proxy.registerItemRenderer(item, 0, "inventory"); If you have any custom item models later do that manually. This is also bad remove it. Also if you have an ItemBase remove that too. The math for fortune is in BlockOre#quantityDroppedWithBonus this is also the method you should use to apply fortune. The method to use is Block#getExpDrop and once again you can find an example in BlockOre#getExpDrop
  21. That is caused because Items are registered before EntityTypes. This is probably a bug and you'll want to report it here. For now it is probably better to get rid of the ObjectHolders on EntityType fields and initialize them in the Item registry event then register them in the EntityType registry event. public static EntityType<?> RED; public static void registerSpawnEggs(Register<Item> event) { RED = ... event.getRegistry().registerAll( new SpawnEggItem(...) ); } public static void registerEntityTypes(Register<EntityType<?>> event) { event.getRegistry().registerAll( RED, ... ); This is obvious psuedocode, but what you should do until that is addressed.
×
×
  • Create New...

Important Information

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