Jump to content

Adversarius13293

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Adversarius13293

  1. I still can't find a solution. For now I can only get my villager through breeding other villagers
  2. I created a new VillagerProfession with its name, texture, and zombie texture, and I registered it at the VillagerRegistry. Then I also created a career for the profession. Randomly spawning my villager by using the normal villager spawn egg works just fine. I thought by defining the zombie villager texture, everything for the corresponding zombie villager would also work. But I cant spawn the zombie villager by zombie spawn eggs, and also can not convert my villager into zombie villager. They just turn into normal zombies. I dug a bit through the source code, and I am kind of confused how this should even work. There is a method EntityZombie.setZombieType(ZombieType) , but marked as deprecated. This method calls VillagerRegistry.onSetProfession(EntityZombie, ZombieType, int) which is not deprecated. But for custom villager types it then seems to call EntityZombie.setVillagerType(VillagerProfession). Then there is this EntityZombie.setVillagerType(VillagerProfession) which is not deprecated, and calls VillagerRegistry.onSetProfession(EntityZombie, VillagerProfession) which is marked as deprecated again. But the onSetProfession method only works for vanilla types. So, how do I get my ZombieVillager spawn naturally, and also convert correctly from villager to ZombieVillager (and reverse)?
  3. Okay, thank you. Then I will just change the profession of zombies and villagers in the EntityJoinWorldEvent. This seems to work just fine. And this way I have more control over what to to with already created villagers, like removing the old trades.
  4. Thank you for this two possible ways, that worked. Now I tried to apply the same principle on my villager with the VillagerRegistry. But this doesn't seem to be as 'easy' as the crafting recipes First I registered a new profession and created a new career object to add the villager to the game. Later on I tried to remove my object from VillagerRegistry.instance().getRegistry().getEntries(), but this doesn't seem to have an effect.
  5. Yeah, but how do I "modify the clients" recipes, when modifying means removing some recipes? Because the recipes where already added in singleplayer or from a previous connected server.
  6. My mod adds new crafting recipes on the init event, by adding them to the GameRegistry. But it is only doing it, if they are enabled in the config, which I already loaded in the preInit event. But this now makes problems when playing on a dedicated server, as soon as the configs are different. I have read about syncing the important config options via packets. Lets just assume I would already know how to do this. How can I then disable or enable my crafting recipes on the client without restarting minecraft? And then reverting it to the clients config after disconnecting from the server?
  7. Okay, I finally found a way to manipulate the bonus chest button: I am extending the GuiCreateWorld class and use reflection (ReflectionHelper) to access the private variables and methods. And to acess the parent screen in my EventHandler I just have to use Minecraft.getMinecraft().currentScreen
  8. I have created my own world type, and when clicking Create New World --> More World Options I can pick my world type. But I want to turn the bonus chest button ON for my world type by default. I located the class GuiCreateWorld as the important one. But if I extend this class, I have no access to all the private attributes, and also cant override just everything 1:1 with copied attributes and methods, because I have no access to the super methods that get called. I also cant copy the class and extend GuiScreen for being able to call the super methods. Because WorldTypes.onCustomizeButton() (which is called inside the GuiCreateWorld class) needs a GuiCreateWorld object. Any ideas or even a different/preferable way of doing this? Edit: And I have planned to use the GuiOpenEvent to replace the original GuiCreateWorld with my version. But I need the parent screen for it to work (to get back when pressing cancel). Which I cant access from the event... So this is another part where I could need some ideas.
  9. Okay, this way it works. Still different than in vanilla, but I think that is a different topic i guess.
  10. If I try the tallgrass/double flower/sugar cane mechanic in creative in my forge build, it doesnt work. On the vanilla client it works, meaning the block then floats. Is this a bug, intended, or just me?
  11. Like I already wrote in my first post, I also tried exactly this, and sadly it doesnt work. But since it seems I should do this in world generation, and also have some other changes that would fit in there, i will try to create my own world generation. I will probably be back later with a new thread, but thank you all so far.
  12. Even the tall grass method in creative doesnt work for me on the forge build... Changing the block state directly in the chunks doesnt work for me either. I dont have(when placing it) and I dont want the gravel as an entity, so I dont think the gravityVelocity can help me. What I want to do more precisely: In the DecorateBiomeEvent.Post replace all Netherrack with air (works). And replace all Soul Sand with Gravel. This way I will have more floating Gravel islands generated than by just removing Netherrack.
  13. BlockFalling.fallInstantly = false; Doesn't seem to change anything. Tried it with sand, and also with gravel (which is only an instance of the simple Block class)
  14. I want to create floating gravel islands, and broke my problem down to this: I want to place a floating block of gravel. But it always starts falling immediately. world.setBlockState(pos, Blocks.GRAVEL.getDefaultState(), 2) Sadly this method doesn't work. I can place floating lava this way without updating, but not gravel (or sand/anvils). I even tried to place a solid block below the gravel before placing the gravel, and then remove the supporting block right after. But the gravel still starts falling down. Is there a way to create floating gravel, just like it still generates in the nether while normal world generation?
×
×
  • Create New...

Important Information

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