Jump to content

RobinCirex

Members
  • Posts

    115
  • Joined

  • Last visited

Everything posted by RobinCirex

  1. Hey, I'm trying to mess around with chunks in the region files and I'm wondering if there is any good documentation on that. There are like 8 files in the [world]/region folder and I'm wondering what of them has what part of the world in it
  2. Hey guys, is there something like the FluidMotionEvent for 1.15.2? I can only find FluidPlaceEvent but I need to keep track of the water flowing
  3. Okay, I already fixed that, but there is one last question: How do I rotate the model the correct way?
  4. Okay, there is just one problem I'm having: How do I set the position for the model and what do I set as the position?
  5. yea, as you said, I think "cleanness" doesn't really matter for small mods lol
  6. Hey, I need a mod with custom wings and stuff for players. Does someone know a simple way to make those, because I have never done anything like that
  7. Just to clear everything up: I have already done it, as said before, here's my code https://github.com/RobinCirex/WaterNether It's not that clean but it works Water doesn't vaporize immediately, it only does when placed by a player, not when spawned. I had to overwrite a lot of things because the chunk generation has a lot of different classes and properties
  8. Oh, i didn't know overwriting blocks in the registry works. Can you tell me how? Pretty sure that'll help me in the future, thanks for that
  9. Hey I did that now and everything works, the only thing I don't know is how to change the "destination" of the nether portal. Do you know that?
  10. Hey, I want to replace all the lava in the nether with water when a world is generated. Does anyone have a clue how I could do that?
  11. Hey guys, I'm working on a mod with a water entity, that's supposed to spawn in the water. For some reason, it doesn't spawn when adding a SpawnListEntry. I can spawn it using the eggs or using /summon but it won't spawn naturally. Did they change anything about the spawnlist registry or something? Please help me Here's my code @SubscribeEvent public void registerEntityType(RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().register(AXOLOTL_ENTITY); event.getRegistry().register(GOLDEN_AXOLOTL_ENTITY); RenderingRegistry.registerEntityRenderingHandler(AXOLOTL_ENTITY, new AxolotlRender.RenderFactory()); RenderingRegistry.registerEntityRenderingHandler(GOLDEN_AXOLOTL_ENTITY, new GoldenAxolotlRender.RenderFactory()); registerEntityWorldSpawn(AXOLOTL_ENTITY, 1, Biomes.OCEAN, Biomes.WARM_OCEAN, Biomes.DEEP_WARM_OCEAN, Biomes.DEEP_OCEAN, Biomes.RIVER, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN); registerEntityWorldSpawn(GOLDEN_AXOLOTL_ENTITY, 2, Biomes.OCEAN, Biomes.WARM_OCEAN, Biomes.DEEP_WARM_OCEAN, Biomes.DEEP_OCEAN, Biomes.RIVER); } public static void registerEntityWorldSpawn(EntityType<?> entity, int weight, Biome... biomes) { for (Biome biome : biomes) { if (biome != null) { biome.getSpawns(entity.getClassification()).add(new SpawnListEntry(entity, weight, 1, 100)); } } }
  12. Oh, thank you.
  13. Hey, so in the latest version, they removed the "setCustomModelResourceLocation" method in "ModelLoader". Can someone tell me how to register the models instead? I can't find it anywhere and forge documentation says that the method still exists but it doesn't
  14. Hello, I'm making a mod with a custom entity at the moment but for some reason the event isn't called. Can someone tell me what I maybe did wrong? This is my main class: public AxolotlMod() { MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void registerEntitySpawnEggs(RegistryEvent.Register<Item> event) { event.getRegistry().register(AxolotlRegistry.AXOLOTL_ENTITY_EGG = AxolotlRegistry .registerEntitySpawnEgg(AxolotlRegistry.AXOLOTL_ENTITY, 0xf0f0f0, 0xdf51f5, "axolotl_entity_egg")); } @SubscribeEvent public void registerEntityType(RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().register(AxolotlRegistry.AXOLOTL_ENTITY); AxolotlRegistry.register(); RenderingRegistry.registerEntityRenderingHandler(AxolotlRegistry.AXOLOTL_ENTITY, new AxolotlRender.RenderFactory()); }
  15. oh... thank you
  16. Hey, I'm working on a serverside-only mod right now and I want to spawn particles. How do I spawn them so people on the server can see them, without having the mod installed?
  17. I already fixed it by using PlayerInteractEvent.RightClickItem Thank you though
  18. yea, I know. But it isn't called, only clientside
  19. oh, yea, sorry. I only had PlayerInteractEvent in there before, I tried it out with RightClickEmpty, then it wasn't fired at all. Looks like it is a client-side event. This was my actual code @SubscribeEvent public void onInteract(PlayerInteractEvent event) { if (event.getWorld() instanceof ServerWorld) { if (event.getSide() == LogicalSide.SERVER) { if (event.getHand() == Hand.MAIN_HAND) { if (event.getPlayer().getHeldItem(Hand.MAIN_HAND) != null) { ItemStack item = event.getPlayer().getHeldItem(Hand.MAIN_HAND); ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer(); String displayName = item.getDisplayName().getFormattedText(); if (item.getItem() == Items.PAPER) { if (HungerGames.getInstance().getMapManager().maps.contains(displayName)) { HungerGames.getInstance().getVoteManager().vote(displayName, player); } } else if (item.getItem() == Items.ANVIL) { boolean selecting = HungerGames.getInstance().getKitManager().kitSelecting.get(player); if (selecting) { HungerGames.getInstance().getVoteManager().addItems(player); HungerGames.getInstance().getTeamManager().addItems(player); HungerGames.getInstance().getKitManager().addItems(player); ChatUtil.sendMessage(player, HungerGames.getInstance().getMessageManager().messages .get("kitChosen").replaceAll("%kit%", displayName)); HungerGames.getInstance().getKitManager().chosenKits.put(player, displayName); } else { HungerGames.getInstance().getKitManager().addKitItems(player); } HungerGames.getInstance().getKitManager().kitSelecting.put(player, !selecting); } else if (item.getItem() == Items.BOOK) { if (HungerGames.getInstance().getMapManager().maps.contains(displayName)) { HungerGames.getInstance().getAdminManager().selectMap(displayName, player); } } } } } } }
  20. @SubscribeEvent public void onInteract(PlayerInteractEvent.RightClickEmpty event) { if (event.getWorld() instanceof ServerWorld) { if (event.getSide() == LogicalSide.SERVER) { if (event.getHand() == Hand.MAIN_HAND) { if (event.getPlayer().getHeldItem(Hand.MAIN_HAND) != null) { ItemStack item = event.getPlayer().getHeldItem(Hand.MAIN_HAND); ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer(); String displayName = item.getDisplayName().getFormattedText(); if (item.getItem() == Items.PAPER) { if (HungerGames.getInstance().getMapManager().maps.contains(displayName)) { HungerGames.getInstance().getVoteManager().vote(displayName, player); } } else if (item.getItem() == Items.ANVIL) { boolean selecting = HungerGames.getInstance().getKitManager().kitSelecting.get(player); if (selecting) { HungerGames.getInstance().getVoteManager().addItems(player); HungerGames.getInstance().getTeamManager().addItems(player); HungerGames.getInstance().getKitManager().addItems(player); ChatUtil.sendMessage(player, HungerGames.getInstance().getMessageManager().messages .get("kitChosen").replaceAll("%kit%", displayName)); HungerGames.getInstance().getKitManager().chosenKits.put(player, displayName); } else { HungerGames.getInstance().getKitManager().addKitItems(player); } HungerGames.getInstance().getKitManager().kitSelecting.put(player, !selecting); } else if (item.getItem() == Items.BOOK) { if (HungerGames.getInstance().getMapManager().maps.contains(displayName)) { HungerGames.getInstance().getAdminManager().selectMap(displayName, player); } } } } } } } This is the code. It gets executed once when looking in the air and twice when aiming on a block
  21. Because that's what the person I'm programing the mod for wants. He said the mod should be serverside only
  22. First: I don't have it on github, but I can do it if necessary Second: I'm just using a piece of paper to vote for a map. Third: I have a check if it's serverside It gets called twice when aiming on a block and I found out that there is PlayerInteractEvent.RightClickEmpty but that only works Clientside, though the mod is completely serverside
  23. Hey so I'm working on a Survival Games mod right now and I'm using the PlayerInteractEvent for some things. However, it is called multiple times and I have no clue why. It is only registered once but gets called more than once, when aiming on something that isn't air. Can someone help me please
×
×
  • Create New...

Important Information

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