Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/22/20 in all areas

  1. Why do you use a cube all json in your model files : tobacco_plant.json you needn't it as your blockstate only use the other model block. For th blockstate you need to put "age=7" instead of "age-7" see in wheat.json for example. Don't know if it will work...
    2 points
  2. Thanks for the compliments, im currently working on making the armor 3D while a 1.16 version for forge gets released then ill update the mod.
    1 point
  3. thank you it works very well
    1 point
  4. THANK YOU to those above who actually read my opening post and helped guide me in the right direction. Those who didn't read it, didn't post anything helpful, and basically said "git gud," you all must really be bored during the lockdown. I will check out that documentation on cadiboo. Even a cursory glance at it shows it will likely be very helpful.
    1 point
  5. You cannot spawn an entity on the client. If you want to execute a spawn, you have to send a packet to the server from the client and have that packet spawn the entity.
    1 point
  6. Thanks, however, I did already look at this and try a version. I probably would've done it this way if I was only doing this for a single item. The issue is that if I were doing the one item method, there would be no way to make the item act like the actual item to the same effect as the original since ItemStack#getItem when called in each method for let's say food would say: hey look, this CustomItem does not have a Food attached to it or something like that. This has to be able to change for all items. If I wanted to use this method above, I would need to override every single item that comes into the game and add that line of code which would be more or less the same issue when trying to override the ItemRenderer method. Also, if I were to do that, the ItemOverrideList#getModelWithOverrides seems to only be called if the item has custom properties which only applies to a few items within the game. I might be missing something, so I'll look into it more. But, I doubt it will work without overriding everything.
    1 point
  7. Hi The reason you should use @Override (it's optional) is so that, when Forge or minecraft updates and the signature for a method changes, your compiler tells you that there is a problem. eg public class ItemVariants extends Item { // what animation to use when the player holds the "use" button @Override public UseAction getUseAction(ItemStack stack) { return UseAction.DRINK; } } When minecraft is updated, and getUseAction(ItemStack stack) changes to getUseActionAnimationType(ItemStack stack), or changes to getUseAction(ItemStack stack, Hand whichHandUsing), then your compiler will give you an error. Otherwise your code will silently stop working because your item will now use the Item base method which is public UseAction getUseAction(ItemStack stack) { return stack.getItem().isFood() ? UseAction.EAT : UseAction.NONE; } This happens a lot and from bitter experience I can tell you that @Override can save you hours of pain and frustration. -TGG
    1 point
  8. This issue has to do with the fact of see through text vs normal text rendering. Normal text rendering prioritizes all 'special' models behind the text to unload since the text is technically a solid object. See through text prioritizes the normal text to render behind any 'special' models making them appear to cut off the text. You have the correct implementation of using a see through rendered text with a normal rendered text, there is just one tiny error. To render the background of the text, you have to set the color equal to a value higher than 0. 1056964608 on the second renderString renders the background of the text as normal instead of making it transparent. So, you appear with the rendering bug. The way to fix it is just to change it to: fontRenderer.renderString(text, offset, 0F, 553648127, false, matrix4f, impl, true, 1056964608, 15728640); fontRenderer.renderString(text, offset, 0F, -1, false, matrix4f, impl, false, 0, 15728640); This should solve your issue.
    1 point
  9. Howdy The problem is that there is only one instance of your DungInfuserBlock block, not one for each placed block. If you try and store information about each world block in your DungInfuserBlock, it can only store one at a time. (The DungInfuserBlock is a "flyweight" object - google Design Pattern Flyweight for more info). You should use a TileEntity instead, to store information about each placed block. The vanilla CampfireBlock (with CampfireTileEntity) does this, for example. There is also an example of this in the following tutorial project: https://github.com/TheGreyGhost/MinecraftByExample/tree/master see mbe20. -TGG
    1 point
  10. FMLPaths.GAMEDIR.get().resolve(FMLConfig.defaultConfigPath()); should allow you to get the default config path. This returns a Path object.
    1 point
×
×
  • Create New...

Important Information

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