Readded Armbot

This commit is contained in:
Calclavia 2014-01-11 18:31:58 +08:00
parent a31b12ba30
commit f3f6d7858b
33 changed files with 114 additions and 96 deletions

View file

@ -94,7 +94,7 @@ public class Electrical
public static Block blockAdvancedFurnace, blockMachinePart, blockGrinderWheel, blockPurifier; public static Block blockAdvancedFurnace, blockMachinePart, blockGrinderWheel, blockPurifier;
// Transport // Transport
public static Block blockEMContractor; public static Block blockEMLevitator;
public static Block blockArmbot; public static Block blockArmbot;
public static Item itemDisk; public static Item itemDisk;
@ -111,10 +111,9 @@ public class Electrical
itemTransformer = contentRegistry.createItem(ItemTransformer.class); itemTransformer = contentRegistry.createItem(ItemTransformer.class);
blockTesla = contentRegistry.createTile(BlockTesla.class, TileTesla.class); blockTesla = contentRegistry.createTile(BlockTesla.class, TileTesla.class);
blockBattery = contentRegistry.createTile(BlockBattery.class, TileBattery.class); blockBattery = contentRegistry.createTile(BlockBattery.class, TileBattery.class);
blockEMContractor = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class);
// Transport // Transport
blockEMContractor = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class); blockEMLevitator = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class);
blockArmbot = contentRegistry.createTile(BlockArmbot.class, TileArmbot.class); blockArmbot = contentRegistry.createTile(BlockArmbot.class, TileArmbot.class);
// Machines // Machines

View file

@ -13,7 +13,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import resonantinduction.core.ResonantInduction; import resonantinduction.core.ResonantInduction;
import resonantinduction.core.prefab.block.BlockRI; import resonantinduction.core.prefab.block.BlockRI;
import resonantinduction.mechanical.render.MechanicalBlockRenderingHandler; import resonantinduction.electrical.render.ElectricalBlockRenderingHandler;
import calclavia.lib.content.IExtraInfo.IExtraBlockInfo; import calclavia.lib.content.IExtraInfo.IExtraBlockInfo;
import calclavia.lib.multiblock.link.IBlockActivate; import calclavia.lib.multiblock.link.IBlockActivate;
import calclavia.lib.multiblock.link.IMultiBlock; import calclavia.lib.multiblock.link.IMultiBlock;
@ -109,7 +109,7 @@ public class BlockArmbot extends BlockRI implements IExtraBlockInfo
@Override @Override
public int getRenderType() public int getRenderType()
{ {
return MechanicalBlockRenderingHandler.ID; return ElectricalBlockRenderingHandler.ID;
} }
@Override @Override

View file

@ -25,7 +25,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class RenderArmbot extends TileEntitySpecialRenderer public class RenderArmbot extends TileEntitySpecialRenderer
{ {
public static final ModelArmbot MODEL = new ModelArmbot(); public static final ModelArmbot MODEL = new ModelArmbot();
public static final String TEXTURE = "armbot.png"; public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "armbot.png");
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
@ -46,8 +46,8 @@ public class RenderArmbot extends TileEntitySpecialRenderer
} }
} }
} }
ResourceLocation name = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + TEXTURE);
bindTexture(name); bindTexture(TEXTURE);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

View file

@ -15,6 +15,8 @@ import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import resonantinduction.electrical.armbot.BlockArmbot;
import resonantinduction.electrical.armbot.RenderArmbot;
import resonantinduction.electrical.battery.BlockBattery; import resonantinduction.electrical.battery.BlockBattery;
import resonantinduction.electrical.battery.RenderBattery; import resonantinduction.electrical.battery.RenderBattery;
import resonantinduction.electrical.generator.solar.BlockSolarPanel; import resonantinduction.electrical.generator.solar.BlockSolarPanel;
@ -77,6 +79,14 @@ public class ElectricalBlockRenderingHandler implements ISimpleBlockRenderingHan
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
RenderSolarPanel.MODEL.render(0.0625F); RenderSolarPanel.MODEL.render(0.0625F);
} }
else if (block instanceof BlockArmbot)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderArmbot.TEXTURE);
GL11.glTranslatef(0.0F, 0.7F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f);
GL11.glScalef(0.8f, 0.8f, 0.8f);
RenderArmbot.MODEL.render(0.0625F, 0, 0);
}
} }
@Override @Override

View file

@ -241,18 +241,22 @@ public class BlockConveyorBelt extends BlockRI
@Override @Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{ {
TileConveyorBelt tileEntity = (TileConveyorBelt) world.getBlockTileEntity(x, y, z); TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
if (tileEntity.IgnoreList.contains(entity))
if (tileEntity instanceof TileConveyorBelt)
{
TileConveyorBelt tile = (TileConveyorBelt) tileEntity;
if (tile.IgnoreList.contains(entity))
{ {
return; return;
} }
if (tileEntity.isFunctioning() && !world.isBlockIndirectlyGettingPowered(x, y, z)) if (tile.isFunctioning() && !world.isBlockIndirectlyGettingPowered(x, y, z))
{ {
float acceleration = tileEntity.acceleration; float acceleration = tile.acceleration;
float maxSpeed = tileEntity.maxSpeed; float maxSpeed = tile.maxSpeed;
SlantType slantType = tileEntity.getSlant(); SlantType slantType = tile.getSlant();
ForgeDirection direction = tileEntity.getDirection(); ForgeDirection direction = tile.getDirection();
if (entity instanceof EntityLiving) if (entity instanceof EntityLiving)
{ {
@ -320,7 +324,7 @@ public class BlockConveyorBelt extends BlockRI
((EntityItem) entity).delayBeforeCanPickup = 20; ((EntityItem) entity).delayBeforeCanPickup = 20;
entity.onGround = false; entity.onGround = false;
} }
}
} }
} }

View file

@ -65,7 +65,11 @@ public class BlockGrinderWheel extends BlockRotatableBase implements ITileEntity
@Override @Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{ {
TileGrinderWheel tile = (TileGrinderWheel) world.getBlockTileEntity(x, y, z); TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
if (tileEntity instanceof TileGrinderWheel)
{
TileGrinderWheel tile = (TileGrinderWheel) tileEntity;
if (tile.canWork()) if (tile.canWork())
{ {
@ -101,6 +105,7 @@ public class BlockGrinderWheel extends BlockRotatableBase implements ITileEntity
entity.isAirBorne = true; entity.isAirBorne = true;
} }
} }
}
@Override @Override
public boolean isOpaqueCube() public boolean isOpaqueCube()

View file

@ -48,6 +48,7 @@ tile.resonantinduction\:grindingWheel.name=Grinder Wheel
tile.resonantinduction\:purifier.name=Purifier Rotor tile.resonantinduction\:purifier.name=Purifier Rotor
tile.resonantinduction\:filter.name=Filter tile.resonantinduction\:filter.name=Filter
tile.resonantinduction\:solarPanel.name=Solar Panel tile.resonantinduction\:solarPanel.name=Solar Panel
tile.resonantinduction\:armbot.name=Armbot
## Items ## Items
item.resonantinduction\:quantumEntangler.name=Quantum Entangler item.resonantinduction\:quantumEntangler.name=Quantum Entangler
@ -132,7 +133,6 @@ tile.DMHopper.0.name = [WIP]Hopper 2.0
tile.imprinter.name=Imprinter tile.imprinter.name=Imprinter
tile.encoder.name=[WIP]Encoder tile.encoder.name=[WIP]Encoder
tile.detector.name=Detector tile.detector.name=Detector
tile.armbot.name=[WIP]Armbot
tile.craneController.name=Crane Controller tile.craneController.name=Crane Controller
tile.craneFrame.name=Crane Frame tile.craneFrame.name=Crane Frame
tile.manipulator.name=Manipulator tile.manipulator.name=Manipulator

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB