Jump to content

EDIT/UPDATE1: How to edit vanilla snow slab?


Recommended Posts

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.




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.

Link to comment
Share on other sites



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.



Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

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