generated from tilera/1710mod
parent
2c06c8a55a
commit
fd630ae091
|
@ -19,7 +19,6 @@ import mffs.tileentity.TileEntityForceField;
|
|||
import micdoodle8.mods.galacticraft.api.block.IPartialSealableBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -46,7 +45,7 @@ public class BlockForceField
|
|||
super("forceField", Material.glass);
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(999.0f);
|
||||
this.setCreativeTab((CreativeTabs) null);
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,13 +5,13 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
|||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mffs.ModularForceFieldSystem;
|
||||
import mffs.tileentity.TileEntityForceField;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderForceField implements ISimpleBlockRenderingHandler {
|
||||
|
@ -37,6 +37,23 @@ public class RenderForceField implements ISimpleBlockRenderingHandler {
|
|||
final int modelId,
|
||||
final RenderBlocks renderer
|
||||
) {
|
||||
boolean shouldRender = false;
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (block.shouldSideBeRendered(
|
||||
iBlockAccess,
|
||||
x + dir.offsetX,
|
||||
y + dir.offsetY,
|
||||
z + dir.offsetZ,
|
||||
iBlockAccess.getBlockMetadata(x, y, z)
|
||||
)) {
|
||||
shouldRender = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!shouldRender)
|
||||
return false;
|
||||
|
||||
int renderType = 0;
|
||||
final TileEntity tileEntity = iBlockAccess.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof TileEntityForceField) {
|
||||
|
@ -48,9 +65,7 @@ public class RenderForceField implements ISimpleBlockRenderingHandler {
|
|||
}
|
||||
}
|
||||
}
|
||||
ModularForceFieldSystem.LOGGER.fine(
|
||||
"Render block: " + block.getUnlocalizedName()
|
||||
);
|
||||
|
||||
if (renderType >= 0) {
|
||||
switch (renderType) {
|
||||
case 4: {
|
||||
|
|
Loading…
Reference in New Issue