-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
You would need to create your custom edible sugar item and register it in place of the vanilla sugar
-
It seems to me that you did not import the package where CountRangeConfig is
-
My entity that will be spawns in nether burn in fire
Beethoven92 replied to OrcaWorld's topic in Modder Support
Take a look at how vanilla handles entities that are immune to fire in the EntityType class...see how the blaze entity is registered -
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
-
You also need to chain the setRequiresTool() method when creating the block properties in your RubyBlock class
-
And this is exactly something that capability system can solve...for example capabilities can be used to implement player thirst mechanics, mana levels etc...
-
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
-
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
-
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
-
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
-
[1.15.2]How to make a blockstate for changing texture of block
Beethoven92 replied to Megaton_216_'s topic in Modder Support
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. -
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
-
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
-
[1.15.2] Is there any open source mod that I can learn from?
Beethoven92 replied to LeiteDesnatado's topic in Modder Support
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 -
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.
-
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.
-
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; }
-
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
-
Use Minecraft#getTextureManager()#bindTexture(Your texture resource location)
-
Which class handles the rendering of a tooltip?
Beethoven92 replied to Tavi007's topic in Modder Support
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 -
Which class handles the rendering of a tooltip?
Beethoven92 replied to Tavi007's topic in Modder Support
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 -
Which problem? Have you tried to write down some code?
-
[1.16.3] How to create armor piece with IForgeItem?
Beethoven92 replied to ThatGuyDavid's topic in Modder Support
If you want to create a wearable piece of armor you need to extend ArmorItem