Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/30/18 in all areas

  1. I think even I can help here so I will try so basically to make everything simpler for you First you want a registry_handler which registers the items through Forge( no not the textures just the item "unlocalizedname" and "registryName") and it should look something similar to this @EventBusSubscriber public class RegistryHandler { @SubscribeEvent //for @SubscribeEvent you would have to register your class BUT because of the @EventbusSubscriber you don't have to if i am correct public static void registerItemsasdasd(Register<Item> event) { final Item[] items = { new ItemBasic("BasicStar","basic_star_item"), //the item that you are making (you have the same class in your git so this should be ok }; event.getRegistry().registerAll(items); //this will use the register to tell the game that this thing even exceists } } Then if you registered your items you need some way to tell that you want a model or picture or whatever for your item so you do this @EventBusSubscriber(Side.CLIENT) public class ModelRegistryHandler { @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { registerModel(TutorialItems.BASIC_STAR_ITEM); //here comes the problem. You need a reference for your item(basically you could use just a "registryName" without getting the item reference but you will need later anyways } private static void registerModel(Item item) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } To get your item reference one way is to do this: @ObjectHolder(MainModpls.MODID) public class TutorialItems { public static final Item BASIC_STAR_ITEM = null; //This will just simply look through items thats in the namespace of MainModpls.MODID and if it finds a match it fills the value of your variable in more easier way: you I constructed the basicItem with the registryName=basic_star_item(small letters and theese things _ ) and if it finds that name here with CAPITALS then it sets the value } To be honest if you implement theese things it should work just be aware from here for the "picture" of your item it will look for a .json file in: assets.yourMODID.models.item.registryNameofyouritem.json json contains this: { "parent": "item/generated", "textures": { "layer0": "yourMODID:items/name_of_the_picture_without_the_.png_at_the_and" } } and it looks for the picture which is .png here: assets.yourMODID.textures.items.yourpicture.png YES ITEMS NOT ITEM AND IN MODELS YES ITEM NOT ITEMS I hope from here you can decode what jumps to where and what happens cause I am sure nobody will give a more detailed explanation here
    1 point
  2. Minecraft thinks your block is not see-through and doesn't bother to render the surrounding blocks. To change this you have to tell minecraft your block is not opaque. Just add this method: public boolean isOpaqueCube(IBlockState state) { return false; }
    1 point
  3. https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/init/ModItems.java#L100 This happens because minecraft's code is obfuscated, meaning that the names of the fields in the deobfuscated(dev) version don't match the names in the build version. Use ReflectionHelper/ObfuscationReflectionHelper's methods. You must provide an SRG name of the field/method to those methods(if you are using ReflectionHelper then you must also provide the dev name). You can get the SRG name using mcpbot or you can find it on your pc in your gradle caches. Unrelated to the issue but still issues with your code: https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/init/ModItems.java#L28 Don't ever use static initializers they can and will cause numerous issues. Instantinate your stuff directly in the appropriate registry event. ItemBase is an antipattern, there is already an ItemBase, it's called Item. https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/init/ModItems.java#L60 https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/init/ModItems.java#L146 You can't do this, since the method will be stripped away on the physical server. You might crash with a JVM error as a result because the method referenced in the code is no longer there. If you need to perform a side-specific operation use a proxy. https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/init/ModItems.java#L103 Don't just catch exceptions, scream that they are there and continue as if nothing happened. If an exception like this occured you should crash the game. https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/proxy/CommonProxy.java A CommonProxy makes no sense. Proxies exist to separate sided-only code. If your code is common it goes anywhere else but your proxy. This makes even less sense. Your common proxy can't be your server proxy. A server proxy either provides NOOP implementations for client-only methods or utilizes code that would crash the physical client. Common code is neither. https://github.com/Cookiehook/Minecraft-Liquid-Enchanting/blob/MC-1.12.2/src/main/java/com/cookiehook/liquidenchanting/util/IHasModel.java IHasModel is stupid. All items need models, no exceptions and nothing about model registration requires access to private/protected data. Register your models directly in the ModelRegistryEvent.
    1 point
  4. I believe we as the users are grateful for the work that the developers do. Without them I don't believe that we'd be able to enjoy Minecraft in such a huge way as we do now. Many of us do not have the talent or even the attention span to do what they do. I made this account just to say thank you to the developers of this amazing tool. Thank you!
    1 point
×
×
  • Create New...

Important Information

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