Jump to content

gottsch

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by gottsch

  1. Solved. I had to updated to ctx.enqueueWork(() -> // make sure it's only executed on the physical client DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> processMessage(ctx, message)) ); instead of ctx.enqueueWork(() -> processMessage(ctx, message)); (Not sure why though as this hasn't been a problem in prior versions of MC/Forge)
  2. Thanks for the quick reply. It is my mod that is causing the issue (the only mod i'm testing). I've traced it down to handling the message received on the client. This line is failing: Optional<Level> clientWorld = LogicalSidedProvider.CLIENTWORLD.get(sideReceived); where sideReceived = LogicalSide.CLIENT And i want to reiterate this only happens on the 1st attempt to load the world after launching Minecraft. Everything works fine when attempting to load the world again.
  3. I'm porting a mod from 1.18.2 to 1.19.2 and I'm forced exited on first world load (single-player) with this error: And then I'm prompted with the "Return to Server list" screen. I can then load the world (2nd attempt) without any problems. Any help would be appreciated, Thanks.
  4. Thanks ChampionAsh. That was my assumption on how it would work. Maybe it is the term "resolved" that could use more explaining. I did some more testing: 1. exploring my immediate area. 2. save and exit. 3. load world repeat steps 2 and 3. There are a set of chunks a distance away from me that generate on every load. If I get closer to them and save, exit and reload, then they won't generate. Does minecraft pre-generate non-visible chunks and then resolve them when they come within the render distance (thus being re-generated if they never were in render distance)?
  5. HI. I've added a custom test Feature, which adds a block to the surface. What i'm noticing is that the Feature generation is running every time a chunk loads. Isn't it only supposed to run once on chunk generation? Thanks
  6. It is relevant because I was attempting to make this as simple for the end-user as possible - ie no extra steps (downloading extra files, jar digging, creating from scratch, etc). This had worked in 1.12.2 when you made a call to LootTableList.register() to register your loot tables. But it appears I won't be able to do this in the manner I hoped. Thank you for your replies.
  7. I had to go another route - I had to add another json file that explicitly listed the path to the resources and then was able to use FileUtils.copyInputStreamToFile(Objects.requireNonNull(mymod.class.getClassLoader().getResourceAsStream(resourcePath.toString())),
  8. Its not really that I need to perform actions dynamically, but I'm trying expose the mod's custom loot tables to the user so they can customize more easily without having to dig through the jar file to see the original loot tables.
  9. My mod adds datapack data (custom loot tables) on load if they don't already exist. I am currently doing this during the WorldEvent.Load event, so that I can get the world save name. However, the WorldEvent.Load event fires AFTER datapack data is loaded, so the new files are not loaded when the world is loaded for the first time. Is there a different event or a better place where I can add the datapack data? Thanks
  10. Hello. I'm updating my mod from 1.12.2 to 1.15.2. However, I am having issues accessing files in my mod jar (I copy some directories/files to the file system so the user can modify/configure). I used to be able to use MyClass.class.getResource("...") to get the URL to the resource, which I could later use to generate a FileSystem and walk all the file in a directory. However, in 1.15.2, the URL returned is no longer in the same format - it is like "modjar://[...path]". The path to the actual jar file is no longer available. Can anyone help on how to get access to files within the mod jar? Thanks, gottsch
  11. Thank you for your quick response, but I haven't worked with matrices (for transformations) for a long time and rendering is my least favorite thing. Any examples you could point me at?
  12. I was wondering if you can rotate a part of an entity model around 2 separate rotation points? Say I have a box and I want to rotate it around (a, b, c) on the y-axis, but then need to rotate it around (x, y, z) on the x-axis. It seems you can use box.setRotationPoint() and box.rotateAngleX/Y/Z but this will only work against the one point. Ex. Minecraft Chest: The lid and latch both have the same rotation point so when they are rotated on the x-axis they rotate to the proper positions. But say I wanted to rotate the latch on the y-axis first but at a point much closer to the latch so it's rotating "in place".
  13. I have the exact same issue and can't figure it out. I didn't have this issue with 1.8. Did you happen to solve this yet?
  14. Thanks, that did the trick. The weird thing is I had manually constructed an array with most of all the biomes but that didn't seem to work, so I removed it altogether because I thought if not provided, the default would be all biomes. Looking at the code - obviously not - doh! Don't know what I screwed up before, but this works. Thanks again.
  15. I originally was using a non-global ID, however, that didn't seem to work. Since each mod has it's own ID space, then the code I was using wasn't incorrect, just simply unnecessary, and shouldn't be causing any issues. I'll update it regardless as it doesn't make sense to keep (both the id selection and the helper method), but it doesn't solve the underlying issue.
  16. Sorry, I forgot to add my method: @SuppressWarnings("unchecked") private void registerModEntityWithEgg(@SuppressWarnings("rawtypes") Class entityClass, String entityName, int mobId, int primary, int secondary) { EntityRegistry.registerModEntity(entityClass, entityName, mobId, Mobs.instance, 80, 3, false); EntityRegistry.registerEgg(entityClass, primary, secondary); } I'm using the ID generated in the calling method. I didn't see a method that doesn't take an ID.
  17. Hello, I have a custom mod which, I have registered the renderer, egg and entity for natural spawning, however, I have yet to see it actually spawn. I have it set in the same way as a vanilla mob (zombie). (The egg and renderer works, just not natural spawn). @EventHandler public void init(FMLInitializationEvent event) { // get next available id int mobId = 0; do { mobId++; } while(EntityList.getClassFromID(mobId) != null); registerModEntityWithEgg(GhoulEntity.class, "Ghoul", mobId, 0x3F5505, 0x4E6414); // register entities for natural spawn EntityRegistry.addSpawn(GhoulEntity.class, 100, 4, 4, EnumCreatureType.MONSTER); // register renderers proxy.registerRenderers(); }
  18. Nevermind, I got it. Another one of my libraries wasn't be picked up for some reason. I'm not sure why that would cause the error I was getting but it is fixed now.
  19. Hi, I'm using the latest Forge for my mod and everything compiles correctly. However, when I attempt to do a simple World.getBlockState(BlockPos) call, I get the error: Caused by: java.lang.NoSuchMethodError: net.minecraft.world.World.getBlockState(Lnet/minecraft/util/BlockPos;)Lnet/minecraft/block/state/IBlockState; ... I am running the same Forge version client as well. Any help is appreciated.
  20. Thanks, but that doesn't really solve the issue. This just uses the EnchantmentHelper class which all based on the Enchantment index.
  21. Hi, I was wondering if there is an EnchantmentRegistry type class that you could get an enchantment by it's name ex. enchantmentRegistry.getByName("minecraft:protection") ? I've been poking around the Enchantment.class, but it only has the enchantsList array. Thanks,
  22. I'm getting this error when running my mod on a dedicated server (b1287): http://pastebin.com/aXkYp0Yp The stacktrace that pertains to my code: ... Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft at com.someguyssoftware.metals.Metals.registerItemRenderers(Metals.java:362) at com.someguyssoftware.metals.Metals.init(Metals.java:272) ... is pointing to the line of code where I register the item render for the custom tab: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(metalsTabItem, 0, new ModelResourceLocation(modid + ":" + MetalsProperties.metalsTabId, "inventory")); Tab code: metalsTabItem = new MetalsTabItem().setUnlocalizedName(MetalsProperties.metalsTabId); metalsTab = new CreativeTabs(CreativeTabs.getNextID(), MetalsProperties.metalsTabId) { @SideOnly(Side.CLIENT) public Item getTabIconItem() { return metalsTabItem; } }; Would the @SideOnly be causing issues for the server? I though this was the proper way for delcaring tab icons.
×
×
  • Create New...

Important Information

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