Iron furnace burning particles & [TEXTURES] Iron Furnace textures
This commit is contained in:
parent
2221a303ad
commit
5f77e1b16f
7 changed files with 47 additions and 5 deletions
|
@ -2,14 +2,19 @@ package techreborn.blocks;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.EnumParticleTypes;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
|
@ -45,31 +50,65 @@ public class BlockIronFurnace extends BlockMachineBase implements IRotationTextu
|
||||||
items.add(new ItemStack(this));
|
items.add(new ItemStack(this));
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
@SuppressWarnings("incomplete-switch")
|
||||||
|
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
|
||||||
|
{
|
||||||
|
if (this.isActive(state))
|
||||||
|
{
|
||||||
|
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
||||||
|
double d0 = (double)pos.getX() + 0.5D;
|
||||||
|
double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
|
||||||
|
double d2 = (double)pos.getZ() + 0.5D;
|
||||||
|
double d3 = 0.52D;
|
||||||
|
double d4 = rand.nextDouble() * 0.6D - 0.3D;
|
||||||
|
|
||||||
|
switch (enumfacing)
|
||||||
|
{
|
||||||
|
case WEST:
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
break;
|
||||||
|
case EAST:
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
break;
|
||||||
|
case NORTH:
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
break;
|
||||||
|
case SOUTH:
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private final String prefix = "techreborn:blocks/machine/";
|
private final String prefix = "techreborn:blocks/machine/";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFrontOff() {
|
public String getFrontOff() {
|
||||||
return prefix + "alloy_furnace_front_off";
|
return prefix + "iron_furnace_front_off";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFrontOn() {
|
public String getFrontOn() {
|
||||||
return prefix + "alloy_furnace_front_on";
|
return prefix + "iron_furnace_front_on";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSide() {
|
public String getSide() {
|
||||||
return prefix + "alloy_furnace_side";
|
return prefix + "iron_furnace_side";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTop() {
|
public String getTop() {
|
||||||
return prefix + "alloy_furnace_top";
|
return prefix + "iron_furnace_top";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getBottom() {
|
public String getBottom() {
|
||||||
return prefix + "machine_bottom";
|
return prefix + "iron_furnace_bottom";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 442 B |
Binary file not shown.
After Width: | Height: | Size: 663 B |
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"animation": {}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 503 B |
Binary file not shown.
After Width: | Height: | Size: 441 B |
Loading…
Add table
Add a link
Reference in a new issue