Fixed Solar Neutron Activator not rendering in inventory, fixed Solar Neutron Activator replacing blocks
This commit is contained in:
parent
6ec5a0a2fe
commit
61735a27aa
3 changed files with 9 additions and 9 deletions
|
@ -349,6 +349,7 @@ public class ClientProxy extends CommonProxy
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.EnergyCube), handler);
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.EnergyCube), handler);
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock), handler);
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock), handler);
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), handler);
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), handler);
|
||||||
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), handler);
|
||||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.Robit, handler);
|
MinecraftForgeClient.registerItemRenderer(MekanismItems.Robit, handler);
|
||||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.WalkieTalkie, handler);
|
MinecraftForgeClient.registerItemRenderer(MekanismItems.WalkieTalkie, handler);
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.GasTank), handler);
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.GasTank), handler);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import mekanism.common.multipart.TransmitterType;
|
import mekanism.common.multipart.TransmitterType;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
@ -15,8 +14,6 @@ public final class ItemAttacher
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
attachable.add(new ItemStack(Blocks.lever));
|
attachable.add(new ItemStack(Blocks.lever));
|
||||||
attachable.add(new ItemStack(Blocks.redstone_torch));
|
|
||||||
attachable.add(new ItemStack(Blocks.torch));
|
|
||||||
|
|
||||||
for(TransmitterType type : TransmitterType.values())
|
for(TransmitterType type : TransmitterType.values())
|
||||||
{
|
{
|
||||||
|
|
|
@ -262,19 +262,21 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||||
{
|
{
|
||||||
Block b = world.getBlock(xPos, yPos, zPos);
|
Block b = world.getBlock(xPos, yPos, zPos);
|
||||||
|
|
||||||
if(yPos > 255)
|
if(yPos > 255 || !b.isReplaceable(world, xPos, yPos, zPos))
|
||||||
{
|
{
|
||||||
place = false;
|
place = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!b.isAir(world, xPos, yPos, zPos) && !b.isReplaceable(world, xPos, yPos, zPos))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(type == MachineType.SOLAR_NEUTRON_ACTIVATOR)
|
||||||
|
{
|
||||||
|
if(y+1 > 255 || !world.getBlock(x, y+1, z).isReplaceable(world, x, y+1, z))
|
||||||
|
{
|
||||||
|
place = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(place && super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
|
if(place && super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue