Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/01/17 in all areas

  1. Mainly because it's better to be more strict then it is to be lenient. Combined with trying to make it clear to modders that different block states are different blocks. {A concept that Mojang is trying to force in code for a long time} Its more 'We want it to always refresh, but vanilla breaks that sometimes, so special case vanilla'
    1 point
  2. If you want your worldgen to only occure in a specific biome you can compare it to your biome object directly. Biomes, like blocks and items are singletons. BiomeDictionary is good if you want your ore to generate in 'similar' biomes (ex.: if you are adding a generic salt ore and want it to generate on beaches it might be a good idea to use BiomeDictionary::areBiomesSimilar to also generate in beach biomes from other mods)
    1 point
  3. Well, if you've never set the NBT then it's never going to be equal to the condition you're checking for. It won't set itself to the exact text you want unless you tell it to. You're also using the == operator which checks for object identity. So unless you are checking references to the exact same object, they will return false even if they seem to be the same. Instead you should use equals or an equivalent method to check for matching content.
    1 point
  4. Well, your IDE told you what arguments you need to provide. RenderItem can be obtained at Minecraft::getRenderItem(). To obtain a RenderManager you need to properly register your renderer using RenderingRegistry::registerEntityRenderingHandler(Class, IRenderFactory). IRenderFactory::createRenderFor has RenderManager as an argument.
    1 point
  5. https://github.com/blahblahbal/Blah-s-Minecraft-Mod/blob/Structure-fix/src/main/java/blahblahbal/blahmod/world/BlahWorldGen2.java#L53 Why are you comparing strings? There is a BiomeDictionary class for biome checking. Why is everything about your code always stringly typed? https://github.com/blahblahbal/Blah-s-Minecraft-Mod/blob/Structure-fix/src/main/java/blahblahbal/blahmod/world/BlahWorldGen2.java#L61 You are not multiplying chunkX and Z by 16. Yes, WorldGenMinable indeed wants block coordinates and not chunk coordinates. https://github.com/blahblahbal/Blah-s-Minecraft-Mod/blob/Structure-fix/src/main/java/blahblahbal/blahmod/world/BlahWorldGen.java#L68 Why are you even holding dimension ID in an array if you are always comparing with the first element and never with the rest of the array? Why are you even iterating over that array then? Did you mean to type int dimID = dimensions[i]; ?
    1 point
  6. I still don't get why the default behavior is "oh, it's not vanilla, that means it always refreshes!"
    1 point
  7. Just don't fall into the mistake of overriding shouldRefresh to simply return false (never regenerate). There are situations when a TE should be cleaned up (e.g. when the new block type isn't the one the TE class supports), so make sure yours is well behaved.
    1 point
  8. You should add the button once in an override of GuiScreen#initGui, after calling the super method. You're currently adding a new button every frame. Override GuiScreen#actionPerformed to perform an action when the button is pressed. When clicked, the button should send a packet to the server that hires the villager after checking that the player is allowed to do so, e.g. they're within range and there are enough emeralds in the inventory. GUIs only exist on the client, the game state needs to be controlled by the server.
    1 point
×
×
  • Create New...

Important Information

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