Add breaking particle effects.
This commit is contained in:
parent
e8a75ed2ff
commit
56ff149fdf
2 changed files with 39 additions and 1 deletions
|
@ -46,6 +46,7 @@ public class RenderPartWire
|
||||||
public static final Map<String, CCModel> models;
|
public static final Map<String, CCModel> models;
|
||||||
public static Icon wireIcon;
|
public static Icon wireIcon;
|
||||||
public static Icon insulationIcon;
|
public static Icon insulationIcon;
|
||||||
|
public static Icon breakIcon;
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
|
@ -160,6 +161,7 @@ public class RenderPartWire
|
||||||
{
|
{
|
||||||
wireIcon = iconReg.registerIcon("resonantinduction:models/wire");
|
wireIcon = iconReg.registerIcon("resonantinduction:models/wire");
|
||||||
insulationIcon = iconReg.registerIcon("resonantinduction:models/insulation" + (ResonantInduction.LO_FI_INSULATION ? "tiny" : ""));
|
insulationIcon = iconReg.registerIcon("resonantinduction:models/insulation" + (ResonantInduction.LO_FI_INSULATION ? "tiny" : ""));
|
||||||
|
breakIcon = iconReg.registerIcon("resonantinduction:wire");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderStatic(PartWire wire)
|
public void renderStatic(PartWire wire)
|
||||||
|
|
|
@ -19,6 +19,7 @@ import resonantinduction.wire.IWireMaterial;
|
||||||
import resonantinduction.wire.TileEntityWire;
|
import resonantinduction.wire.TileEntityWire;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockColored;
|
import net.minecraft.block.BlockColored;
|
||||||
|
import net.minecraft.client.particle.EffectRenderer;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -28,6 +29,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityFurnace;
|
import net.minecraft.tileentity.TileEntityFurnace;
|
||||||
import net.minecraft.util.ChatMessageComponent;
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
|
@ -49,6 +51,8 @@ import codechicken.lib.render.RenderUtils;
|
||||||
import codechicken.lib.vec.Cuboid6;
|
import codechicken.lib.vec.Cuboid6;
|
||||||
import codechicken.lib.vec.Translation;
|
import codechicken.lib.vec.Translation;
|
||||||
import codechicken.microblock.IHollowConnect;
|
import codechicken.microblock.IHollowConnect;
|
||||||
|
import codechicken.multipart.IconHitEffects;
|
||||||
|
import codechicken.multipart.JIconHitEffects;
|
||||||
import codechicken.multipart.JNormalOcclusion;
|
import codechicken.multipart.JNormalOcclusion;
|
||||||
import codechicken.multipart.NormalOcclusionTest;
|
import codechicken.multipart.NormalOcclusionTest;
|
||||||
import codechicken.multipart.PartMap;
|
import codechicken.multipart.PartMap;
|
||||||
|
@ -60,7 +64,7 @@ import codechicken.multipart.handler.MultipartProxy;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class PartWire extends PartUniversalConductor implements TSlottedPart, JNormalOcclusion, IHollowConnect, IInsulatedMaterial
|
public class PartWire extends PartUniversalConductor implements TSlottedPart, JNormalOcclusion, IHollowConnect, JIconHitEffects, IInsulatedMaterial
|
||||||
{
|
{
|
||||||
public static final int DEFAULT_COLOR = 16;
|
public static final int DEFAULT_COLOR = 16;
|
||||||
public int dyeID = DEFAULT_COLOR;
|
public int dyeID = DEFAULT_COLOR;
|
||||||
|
@ -455,4 +459,36 @@ public class PartWire extends PartUniversalConductor implements TSlottedPart, JN
|
||||||
{
|
{
|
||||||
setInsulated(true);
|
setInsulated(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Cuboid6 getBounds()
|
||||||
|
{
|
||||||
|
return new Cuboid6(0.375, 0.375, 0.375, 0.625, 0.625, 0.625);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Icon getBreakingIcon(Object subPart, int side)
|
||||||
|
{
|
||||||
|
return RenderPartWire.breakIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Icon getBrokenIcon(int side)
|
||||||
|
{
|
||||||
|
return RenderPartWire.breakIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addHitEffects(MovingObjectPosition hit, EffectRenderer effectRenderer)
|
||||||
|
{
|
||||||
|
IconHitEffects.addHitEffects(this, hit, effectRenderer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addDestroyEffects(EffectRenderer effectRenderer)
|
||||||
|
{
|
||||||
|
IconHitEffects.addDestroyEffects(this, effectRenderer, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue