-
Posts
47 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
NorthWestWind's Achievements
Tree Puncher (2/8)
1
Reputation
-
I have these lines of code in my custom TileEntityRenderer: public void render(MyTileEntity tile, float partialTicks, MatrixStack matrix, IRenderTypeBuffer buffer, int light, int overlay) { ItemStack stack = tile.getWantingItem(); if (!stack.isEmpty()) { matrix.pushPose(); matrix.translate(0.5D, 1.6D, 0.5D); matrix.scale(0.9f, 0.9f, 0.9f); matrix.mulPose(Vector3f.YP.rotationDegrees(degrees++ / 2)); renderItem(stack, matrix, buffer, light); matrix.popPose(); } } private void renderItem(ItemStack stack, MatrixStack matrix, IRenderTypeBuffer bufferIn, int combinedLightIn) { Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemCameraTransforms.TransformType.FIXED, combinedLightIn, OverlayTexture.NO_OVERLAY, matrix, bufferIn); } The `tile.getWantingItem()` creates an ItemStack from Item. The code above renders the item on top of the block, rotating, but very dark. However, I also have another TileEntityRenderer that renders item correctly, with lights, and the same code except the `tile.getWantingItem()` part. It instead gets ItemStack from its inventory. I think the problem might be the creation of ItemStack, but I don't really know. Can anyone tell me how to fix this?
-
I actually tried FogColors before FogDensity. Still no luck.
-
[1.16.5] Mod cannot run after build
NorthWestWind replied to NorthWestWind's topic in Modder Support
I found the problem. It turns out to be an external library I declared in build.gradle. When I removed the dependency and compile, the mod finally runs in client. -
[1.16.5] Mod cannot run after build
NorthWestWind replied to NorthWestWind's topic in Modder Support
I'm still trying to fix it. I duped my project and now trying to run/compile with minimal modification. -
[1.16.5] Mod cannot run after build
NorthWestWind replied to NorthWestWind's topic in Modder Support
I just went to search for more and I came across this Although it is for 1.8, I'm suspecting this is causing the issue. -
I make my mod with IntelliJ and runClient didn't tell me any issue. However, after I build the mod using gradlew build and run it on Forge 36.1.0, it cannot load into world with the mod as it says datapack error. I looked at the log, and the error originates from RecipeManager.fromJson and it's an AbstractMethodError. I noticed that it is about my recipe serializer, so I tried a lot of stuff with it. It runs well on IntelliJ without any error or datapack warning, but when it comes to a Forge profile (36.1.0), it just emits error when loading into worlds, including world creation. I have no idea what's going on, but here are the things I'm going to try, Use an updated version of Forge (in Minecraft launcher) Run in another clean profile (Just tried both. They failed.)
-
[Solved] [1.16.5] Custom World Type Nether
NorthWestWind replied to NorthWestWind's topic in Modder Support
After looking around a little more, I found the way to use custom chunk generator in the nether. It turns out ForgeWorldType.IChunkGeneratorFactory has a method like this (Note: I'm using official mappings): default DimensionGeneratorSettings createSettings(DynamicRegistries dynamicRegistries, long seed, boolean generateStructures, boolean bonusChest, String generatorSettings) { Registry<Biome> biomeRegistry = dynamicRegistries.registryOrThrow(Registry.BIOME_REGISTRY); Registry<DimensionType> dimensionTypeRegistry = dynamicRegistries.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY); Registry<DimensionSettings> dimensionSettingsRegistry = dynamicRegistries.registryOrThrow(Registry.NOISE_GENERATOR_SETTINGS_REGISTRY); return new DimensionGeneratorSettings(seed, generateStructures, bonusChest, DimensionGeneratorSettings.withOverworld(dimensionTypeRegistry, DimensionType.defaultDimensions(dimensionTypeRegistry, biomeRegistry, dimensionSettingsRegistry, seed), createChunkGenerator(biomeRegistry, dimensionSettingsRegistry, seed, generatorSettings))); } DimensionType.defaultDimensions actually handles the nether and end chunk generators. So, what I did was copy their entire method, which originally looks like this: private static ChunkGenerator defaultEndGenerator(Registry < Biome > p_242717_0_, Registry < DimensionSettings > p_242717_1_, long p_242717_2_) { return new NoiseChunkGenerator(new EndBiomeProvider(p_242717_0_, p_242717_2_), p_242717_2_, () - > { return p_242717_1_.getOrThrow(DimensionSettings.END); }); } private static ChunkGenerator defaultNetherGenerator(Registry < Biome > p_242720_0_, Registry < DimensionSettings > p_242720_1_, long p_242720_2_) { return new NoiseChunkGenerator(NetherBiomeProvider.Preset.NETHER.biomeSource(p_242720_0_, p_242720_2_), p_242720_2_, () - > { return p_242720_1_.getOrThrow(DimensionSettings.NETHER); }); } public static SimpleRegistry < Dimension > defaultDimensions(Registry < DimensionType > p_242718_0_, Registry < Biome > p_242718_1_, Registry < DimensionSettings > p_242718_2_, long p_242718_3_) { SimpleRegistry < Dimension > simpleregistry = new SimpleRegistry < > (Registry.LEVEL_STEM_REGISTRY, Lifecycle.experimental()); simpleregistry.register(Dimension.NETHER, new Dimension(() - > { return p_242718_0_.getOrThrow(NETHER_LOCATION); }, defaultNetherGenerator(p_242718_1_, p_242718_2_, p_242718_3_)), Lifecycle.stable()); simpleregistry.register(Dimension.END, new Dimension(() - > { return p_242718_0_.getOrThrow(END_LOCATION); }, defaultEndGenerator(p_242718_1_, p_242718_2_, p_242718_3_)), Lifecycle.stable()); return simpleregistry; } And changed simpleregistry.register(Dimension.NETHER, new Dimension(() - > { return p_242718_0_.getOrThrow(NETHER_LOCATION); }, defaultNetherGenerator(p_242718_1_, p_242718_2_, p_242718_3_)), Lifecycle.stable()); into simpleregistry.register(Dimension.NETHER, new Dimension(() -> dimensionTypes.getOrThrow(DimensionType.NETHER_LOCATION), new SkyblockNetherChunkGenerator(NetherBiomeProvider.Preset.NETHER.biomeSource(biomeRegistry, seed), seed, () -> settings.getOrThrow(DimensionSettings.NETHER))), Lifecycle.stable()); Now I have full control about how the nether generates. -
[Solved] [1.16.5] Custom World Type Nether
NorthWestWind replied to NorthWestWind's topic in Modder Support
Thank you for giving me examples, will definitely try it very soon. And by "remove all other terrains", I mean I want nether biomes to generate on islands, like in the end (but smaller). Also about the DimensionSettings thing, I would actually like to override the chunk generator of the nether instead so I can take full control about the nether generation. Is there any way to achieve this? -
[Solved] [1.16.5] Custom World Type Nether
NorthWestWind replied to NorthWestWind's topic in Modder Support
I want to make the nether only generates features like fortresses, bastions but not bones, and remove all other terrains and the bedrock roof while still keeping the biomes and lava. The problem is that I don't even know how I can edit them. -
[Solved] [1.16.5] Custom World Type Nether
NorthWestWind replied to NorthWestWind's topic in Modder Support
The latter. My world type generates a Skyblock world with overworld biome provider and custom chunk generator that generates nothing except the island. -
I have created a custom world type extending ForgeWorldType. It shows up in the create world screen, and it generates properly. However, I would like to override the nether generation. How can I do that?
-
Here's my current code: @SubscribeEvent public static void renderFogDensity(final EntityViewRenderEvent.FogDensity event) { PlayerEntity player = Minecraft.getInstance().player; if (player == null) return; event.setCanceled(true); event.setDensity(0); RenderSystem.fogMode(GlStateManager.FogMode.EXP2); } Tested with/without fogMode, setting density between 0-1 and the bottom half of the sky is still black (when 0). When set to 1, I can't see a thing.
-
Cancelled it: @SubscribeEvent public static void renderFogDensity(final EntityViewRenderEvent.FogDensity event) { PlayerEntity player = Minecraft.getInstance().player; if (player == null) return; event.setCanceled(true); } And it didn't disappear
-
When going under y63 or something, the bottom half of the sky turns black. Is there a way to disable that?
-
[1.16.5] How do I create an empty dimension?
NorthWestWind replied to NorthWestWind's topic in Modder Support
Thank you. I think this may actually help me to find out what to do.