Jump to content

Beethoven92

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Beethoven92

  1. You would need to create your custom edible sugar item and register it in place of the vanilla sugar
  2. The DarkUtilities mod seems to be requiring two other mods, which are missing in your mod list: https://www.curseforge.com/minecraft/mc-mods/dark-utilities
  3. It seems to me that you did not import the package where CountRangeConfig is
  4. Take a look at how vanilla handles entities that are immune to fire in the EntityType class...see how the blaze entity is registered
  5. You are using outdated mappings, update your mappings or use the func_235861_h_() method (which has been mapped to setRequiresTool in more recent mappings) instead of setRequiresTool
  6. You also need to chain the setRequiresTool() method when creating the block properties in your RubyBlock class
  7. And this is exactly something that capability system can solve...for example capabilities can be used to implement player thirst mechanics, mana levels etc...
  8. It seems to me that you are registering your block items multiple times (as poopoodice already guessed), in your event handler onRegisterItems and in your ItemInit class. Choose one of the two registration methods
  9. Trying to explore and understand forge/minecraft concepts and code without knowing java is pure madness...trying to learn java by doing stuff that, at the beginning, makes almost no sense even to experienced Java programmers is even more madness
  10. You may want to take a look at this example here: https://wiki.mcjty.eu/modding/index.php?title=Render_Block_TESR_/_OBJ-1.12 Its for 1.12 but the idea is still valid in the most recent versions...you can see it is rendering different parts of an OBJ model, one that is static and one that is rotating around the Y axis. As for the culling problem, if your block is not a full cube, you have to tell that to the game, otherwise it will still consider it as a full cube and it will not render the faces of adiacent block because it thinks they cannot be seen. So you have to set an appropriate voxel shape for your block. You can look at other vanilla non full-cube blocks to see how they are handled
  11. There could be an alternative, but its for 1.16+. Its not really likely you will find every mod you like to be existing on every minecarft version..sometimes you have to adapt (or make the mod yourself) https://www.curseforge.com/minecraft/mc-mods/total-darkness
  12. Have you tried looking at vanilla blocks that have similar behaviour? For example the redstone lamp, that change its texture based on its state (lit = false/true), or the respawn anchor (1.16) that has 5 possible different states depending on its charge. Keep in mind that the number of states a block can assume is limited. For anything that could exceed that limit you will need a tile entity.
  13. What ChampionAsh said plus, vanilla minecraft is probably the best place to look how certain things are done. Whatever thing you are implementing, before doing anything else just think: does vanilla minecraft already has something similar to what i am trying to achieve? If the answer is yes you are very lucky, because you already have a very good starting point...then reading and understanding the code, and finally trying to adapt it to your needs is the next step. You can also find help in other people mods if vanilla doesn't have something similar to the feature you want to add
  14. Look here to see different examples of tile entity renderers: https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-working/src/main/java/minecraftbyexample/mbe21_tileentityrenderer Here is an outdated (1.12) example that does what you want to do, so maybe you can get inspiration from: https://wiki.mcjty.eu/modding/index.php?title=Render_Block_TESR_/_OBJ-1.12 To answer your questions: 1 - Yes, the examples i linked do that (though the second example loads an OBJ model) 2 - If you want to just display an item on top of your block, i think you just need to store an ItemStack in your tile entity...it really depends on how you want to interact with the block (for example right click on the block puts/takes the item) or if it needs more complicate behaviour
  15. Well, have you tried looking around? Go on curseforge and search for mods that adds the things you want (you can filter your research to find mods that are biome related for example). If then they happen to be open source just go and take a look at the code. Quark, for example, is a good open source mod that implements lot of different things...Biomes o' Plenty and Traverse if you are interested in biomes..also you could find those rather simple mods helpful: https://wiki.minecraftabnormals.com/Main_Page
  16. You just have to cancel the spawn of all farm animal entities, no matter where, handling the apposite event (or, perhaps, directly removing the animals from the every biome's spawn list?) . Then you would let your custom jigsaw pieces generate in villages, and have the farm animals generate with them.
  17. Have you considered looking into the jigsaw structure generation system? You know that when a village generates some entities are spawned with it...farm animals, cats, iron golem. I have personally never tried to mess with the jigsaw but probably there is a way to add new jigsaw pieces to the villages pool and making those pieces spawn entities.
  18. Make sure you are in survival mode when testing the item durability...also i believe there are some lines in your code that are redundant and not necessary, for example: this check if(!player.abilities.isCreativeMode) and this override @Override public boolean showDurabilityBar(ItemStack item) { if(item.getDamage() != 0) return true; return false; }
  19. Minecraft.getInstance().ingameGUI.blit methods are still a thing
  20. You have to bind the texture before creating the vertices. Also if you want to apply a texture you need to give texture informations to your vertices. You can use DefaultVertexFormats.POSITION_TEX
  21. Use Minecraft#getTextureManager()#bindTexture(Your texture resource location)
  22. Its a lot better if you actually try to understand the code before copying it, because you will avoid so many head aches when you have to modify it later
  23. Thats why i said to subscribe to Post or Pre, it depends on what you want to achieve...usually you use the Post event to add elements to the hud while leaving vanilla stuff untouched. So if i understand correctly you want to render some information on the screen in a fixed position, and you want them to render in the same graphic style as the tooltip in containers, right? Then apply the code that renders tooltips in your event handler...to do so look at how the tooltips are rendered in the method Screen#renderTooltip, as said before
  24. Which problem? Have you tried to write down some code?
  25. If you want to create a wearable piece of armor you need to extend ArmorItem
×
×
  • Create New...

Important Information

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