sarydactl Posted June 20, 2014 Share Posted June 20, 2014 I'm trying to make it so that the world both rains and snows in certain biomes. The only problem with this is that the snow doesn't disappear after the snow storms, making everything look like a taiga after it snows once. How do I make the snow block check conditions other than nearby light sources to see if it can decay? I'm looking through vanilla to see where the decay class is, but I can't find it for the life of me. EDIT1: Okay, I have this code going on: package com.REMINISC3.chronocube; import net.minecraft.block.Block; import net.minecraft.block.BlockSnow; import net.minecraft.init.Blocks; import net.minecraft.world.World; public class SnowMan extends BlockSnow { private boolean func_150155_m(World test, int i, int j, int k) { if (test.canLightningStrikeAt(i, j, k)) { test.setBlockToAir(i, j, k); return false; } else return true; } } The goal is that when it rains, snow slabs disappear. Unfortunately, it's being ignored. How do I tell the game to apply this to snow slabs? I am apparently unable to override anything in the base class. Quote Link to comment Share on other sites More sharing options...
TheGreyGhost Posted June 20, 2014 Share Posted June 20, 2014 Hi I think you have four choices 1) use ASM + Reflection to modify the BlockSnow base class (tricky) 2) add your own snow generation to the world tick, placing your own BlockSnow instead of vanilla. see WorldServer.func_147456_g() this.theProfiler.endStartSection("iceandsnow"); 3) add your own snow destruction code to the world tick (each tick, check a few blocks at the 'precipitation height' to see if they are snow), and melt them if they are. 4) use your own WorldProvider and override eg canSnowAt() with something that changes depending on whether you want snow to form or to melt. I would personally try (4) first. It looks like the most straightforward to me. -TGG Quote Link to comment Share on other sites More sharing options...
sarydactl Posted June 20, 2014 Author Share Posted June 20, 2014 Thanks much for responding! I think the most straightforward/convenient would actually be #3. However, I have a somewhat noobish question. Where would I call for the snow destruction code? Just from the main modclass, or...? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.