f37812be3e
I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
36 lines
1021 B
Java
36 lines
1021 B
Java
package electroblob.wizardry.client.particle;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
|
import net.minecraftforge.fml.common.Mod;
|
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
//@SideOnly(Side.CLIENT)
|
|
@Mod.EventBusSubscriber(Side.CLIENT)
|
|
public class ParticleIce extends ParticleWizardry {
|
|
|
|
private static final ResourceLocation[] TEXTURES = generateTextures("ice", 8);
|
|
|
|
public ParticleIce(World world, double x, double y, double z){
|
|
|
|
super(world, x, y, z, TEXTURES[world.rand.nextInt(TEXTURES.length)]);
|
|
|
|
this.canCollide = true;
|
|
|
|
// Defaults
|
|
this.setRBGColorF(1, 1, 1);
|
|
this.particleScale *= 0.75f;
|
|
this.setGravity(true);
|
|
this.shaded = false;
|
|
}
|
|
|
|
@SubscribeEvent
|
|
public static void onTextureStitchEvent(TextureStitchEvent.Pre event){
|
|
for(ResourceLocation texture : TEXTURES){
|
|
event.getMap().registerSprite(texture);
|
|
}
|
|
}
|
|
}
|