diff --git a/src/main/java/resonantinduction/electrical/Electrical.java b/src/main/java/resonantinduction/electrical/Electrical.java index 6d50cd8df..57e0fc9c2 100644 --- a/src/main/java/resonantinduction/electrical/Electrical.java +++ b/src/main/java/resonantinduction/electrical/Electrical.java @@ -94,7 +94,7 @@ public class Electrical public static Block blockAdvancedFurnace, blockMachinePart, blockGrinderWheel, blockPurifier; // Transport - public static Block blockEMContractor; + public static Block blockEMLevitator; public static Block blockArmbot; public static Item itemDisk; @@ -111,10 +111,9 @@ public class Electrical itemTransformer = contentRegistry.createItem(ItemTransformer.class); blockTesla = contentRegistry.createTile(BlockTesla.class, TileTesla.class); blockBattery = contentRegistry.createTile(BlockBattery.class, TileBattery.class); - blockEMContractor = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class); // Transport - blockEMContractor = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class); + blockEMLevitator = contentRegistry.createTile(BlockLevitator.class, TileLevitator.class); blockArmbot = contentRegistry.createTile(BlockArmbot.class, TileArmbot.class); // Machines diff --git a/src/main/java/resonantinduction/electrical/armbot/BlockArmbot.java b/src/main/java/resonantinduction/electrical/armbot/BlockArmbot.java index 9f584ee11..fd2771a39 100644 --- a/src/main/java/resonantinduction/electrical/armbot/BlockArmbot.java +++ b/src/main/java/resonantinduction/electrical/armbot/BlockArmbot.java @@ -13,7 +13,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.Configuration; import resonantinduction.core.ResonantInduction; 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.multiblock.link.IBlockActivate; import calclavia.lib.multiblock.link.IMultiBlock; @@ -109,7 +109,7 @@ public class BlockArmbot extends BlockRI implements IExtraBlockInfo @Override public int getRenderType() { - return MechanicalBlockRenderingHandler.ID; + return ElectricalBlockRenderingHandler.ID; } @Override diff --git a/src/main/java/resonantinduction/electrical/armbot/RenderArmbot.java b/src/main/java/resonantinduction/electrical/armbot/RenderArmbot.java index 0bfba54a0..bb82c08e1 100644 --- a/src/main/java/resonantinduction/electrical/armbot/RenderArmbot.java +++ b/src/main/java/resonantinduction/electrical/armbot/RenderArmbot.java @@ -25,7 +25,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderArmbot extends TileEntitySpecialRenderer { 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 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.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); diff --git a/src/main/java/resonantinduction/electrical/render/ElectricalBlockRenderingHandler.java b/src/main/java/resonantinduction/electrical/render/ElectricalBlockRenderingHandler.java index cb9a186e0..e22233498 100644 --- a/src/main/java/resonantinduction/electrical/render/ElectricalBlockRenderingHandler.java +++ b/src/main/java/resonantinduction/electrical/render/ElectricalBlockRenderingHandler.java @@ -15,6 +15,8 @@ import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; +import resonantinduction.electrical.armbot.BlockArmbot; +import resonantinduction.electrical.armbot.RenderArmbot; import resonantinduction.electrical.battery.BlockBattery; import resonantinduction.electrical.battery.RenderBattery; import resonantinduction.electrical.generator.solar.BlockSolarPanel; @@ -77,6 +79,14 @@ public class ElectricalBlockRenderingHandler implements ISimpleBlockRenderingHan GL11.glRotatef(180f, 0f, 0f, 1f); 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 diff --git a/src/main/java/resonantinduction/mechanical/belt/BlockConveyorBelt.java b/src/main/java/resonantinduction/mechanical/belt/BlockConveyorBelt.java index f0b76d763..2cf3a7ae9 100644 --- a/src/main/java/resonantinduction/mechanical/belt/BlockConveyorBelt.java +++ b/src/main/java/resonantinduction/mechanical/belt/BlockConveyorBelt.java @@ -241,86 +241,90 @@ public class BlockConveyorBelt extends BlockRI @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { - TileConveyorBelt tileEntity = (TileConveyorBelt) world.getBlockTileEntity(x, y, z); - if (tileEntity.IgnoreList.contains(entity)) + TileEntity tileEntity = world.getBlockTileEntity(x, y, z); + + if (tileEntity instanceof TileConveyorBelt) { - return; - } - if (tileEntity.isFunctioning() && !world.isBlockIndirectlyGettingPowered(x, y, z)) - { - float acceleration = tileEntity.acceleration; - float maxSpeed = tileEntity.maxSpeed; - - SlantType slantType = tileEntity.getSlant(); - ForgeDirection direction = tileEntity.getDirection(); - - if (entity instanceof EntityLiving) + TileConveyorBelt tile = (TileConveyorBelt) tileEntity; + if (tile.IgnoreList.contains(entity)) { - acceleration *= 5; - maxSpeed *= 10; + return; } - if (slantType == SlantType.UP) + if (tile.isFunctioning() && !world.isBlockIndirectlyGettingPowered(x, y, z)) { - if (entity.motionY < 0.2) + float acceleration = tile.acceleration; + float maxSpeed = tile.maxSpeed; + + SlantType slantType = tile.getSlant(); + ForgeDirection direction = tile.getDirection(); + + if (entity instanceof EntityLiving) { - entity.addVelocity(0, 0.2, 0); + acceleration *= 5; + maxSpeed *= 10; } - } - else if (slantType == SlantType.DOWN) - { - if (entity.motionY > -0.1) + if (slantType == SlantType.UP) { - entity.addVelocity(0, -0.1, 0); + if (entity.motionY < 0.2) + { + entity.addVelocity(0, 0.2, 0); + } } - } - // Move the entity based on the conveyor belt's direction. - entity.addVelocity(direction.offsetX * acceleration, 0, direction.offsetZ * acceleration); - - if (direction.offsetX != 0 && Math.abs(entity.motionX) > maxSpeed) - { - entity.motionX = direction.offsetX * maxSpeed; - entity.motionZ = 0; - } - - if (direction.offsetZ != 0 && Math.abs(entity.motionZ) > maxSpeed) - { - entity.motionZ = direction.offsetZ * maxSpeed; - entity.motionX = 0; - } - - entity.motionY += 0.0125f; - - if (entity instanceof EntityItem) - { - if (direction.offsetX != 0) + else if (slantType == SlantType.DOWN) { - double difference = (z + 0.5) - entity.posZ; - entity.motionZ += difference * 0.1; - // entity.posZ = z + 0.5; + if (entity.motionY > -0.1) + { + entity.addVelocity(0, -0.1, 0); + } } - else if (direction.offsetZ != 0) + // Move the entity based on the conveyor belt's direction. + entity.addVelocity(direction.offsetX * acceleration, 0, direction.offsetZ * acceleration); + + if (direction.offsetX != 0 && Math.abs(entity.motionX) > maxSpeed) { - double difference = (x + 0.5) - entity.posX; - entity.motionX += difference * 0.1; - // /entity.posX = x + 0.5; + entity.motionX = direction.offsetX * maxSpeed; + entity.motionZ = 0; } - ((EntityItem) entity).age++; - - boolean foundSneaking = false; - for (EntityPlayer player : (List) world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1))) + if (direction.offsetZ != 0 && Math.abs(entity.motionZ) > maxSpeed) { - if (player.isSneaking()) - foundSneaking = true; + entity.motionZ = direction.offsetZ * maxSpeed; + entity.motionX = 0; } - if (foundSneaking) - ((EntityItem) entity).delayBeforeCanPickup = 0; - else - ((EntityItem) entity).delayBeforeCanPickup = 20; - entity.onGround = false; - } + entity.motionY += 0.0125f; + if (entity instanceof EntityItem) + { + if (direction.offsetX != 0) + { + double difference = (z + 0.5) - entity.posZ; + entity.motionZ += difference * 0.1; + // entity.posZ = z + 0.5; + } + else if (direction.offsetZ != 0) + { + double difference = (x + 0.5) - entity.posX; + entity.motionX += difference * 0.1; + // /entity.posX = x + 0.5; + } + + ((EntityItem) entity).age++; + + boolean foundSneaking = false; + for (EntityPlayer player : (List) world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1))) + { + if (player.isSneaking()) + foundSneaking = true; + } + + if (foundSneaking) + ((EntityItem) entity).delayBeforeCanPickup = 0; + else + ((EntityItem) entity).delayBeforeCanPickup = 20; + entity.onGround = false; + } + } } } diff --git a/src/main/java/resonantinduction/mechanical/grinder/BlockGrinderWheel.java b/src/main/java/resonantinduction/mechanical/grinder/BlockGrinderWheel.java index 6b6cb16a4..e60e993cc 100644 --- a/src/main/java/resonantinduction/mechanical/grinder/BlockGrinderWheel.java +++ b/src/main/java/resonantinduction/mechanical/grinder/BlockGrinderWheel.java @@ -65,40 +65,45 @@ public class BlockGrinderWheel extends BlockRotatableBase implements ITileEntity @Override 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 (tile.canWork()) + if (tileEntity instanceof TileGrinderWheel) { - if (entity instanceof EntityItem) - { - if (tile.canGrind(((EntityItem) entity).getEntityItem())) - { - if (tile.grindingItem == null) - { - tile.grindingItem = (EntityItem) entity; - } + TileGrinderWheel tile = (TileGrinderWheel) tileEntity; - if (!TileGrinderWheel.getTimer().containsKey(entity)) + if (tile.canWork()) + { + if (entity instanceof EntityItem) + { + if (tile.canGrind(((EntityItem) entity).getEntityItem())) { - TileGrinderWheel.getTimer().put((EntityItem) entity, TileGrinderWheel.DEFAULT_TIME); + if (tile.grindingItem == null) + { + tile.grindingItem = (EntityItem) entity; + } + + if (!TileGrinderWheel.getTimer().containsKey(entity)) + { + TileGrinderWheel.getTimer().put((EntityItem) entity, TileGrinderWheel.DEFAULT_TIME); + } + } + else + { + entity.setPosition(entity.posX, entity.posY - 1.2, entity.posZ); } } else { - entity.setPosition(entity.posX, entity.posY - 1.2, entity.posZ); + entity.attackEntityFrom(DamageSource.cactus, 2); } - } - else - { - entity.attackEntityFrom(DamageSource.cactus, 2); - } - // Move entity based on the direction of the block. - ForgeDirection dir = this.getDirection(world, x, y, z); - entity.motionX += dir.offsetX * 0.1; - entity.motionZ += dir.offsetZ * 0.1; - entity.motionY += 0.1; - entity.isAirBorne = true; + // Move entity based on the direction of the block. + ForgeDirection dir = this.getDirection(world, x, y, z); + entity.motionX += dir.offsetX * 0.1; + entity.motionZ += dir.offsetZ * 0.1; + entity.motionY += 0.1; + entity.isAirBorne = true; + } } } diff --git a/src/main/resources/assets/resonantinduction/languages/en_US.properties b/src/main/resources/assets/resonantinduction/languages/en_US.properties index 94d57a530..e1205435b 100644 --- a/src/main/resources/assets/resonantinduction/languages/en_US.properties +++ b/src/main/resources/assets/resonantinduction/languages/en_US.properties @@ -48,6 +48,7 @@ tile.resonantinduction\:grindingWheel.name=Grinder Wheel tile.resonantinduction\:purifier.name=Purifier Rotor tile.resonantinduction\:filter.name=Filter tile.resonantinduction\:solarPanel.name=Solar Panel +tile.resonantinduction\:armbot.name=Armbot ## Items item.resonantinduction\:quantumEntangler.name=Quantum Entangler @@ -132,7 +133,6 @@ tile.DMHopper.0.name = [WIP]Hopper 2.0 tile.imprinter.name=Imprinter tile.encoder.name=[WIP]Encoder tile.detector.name=Detector -tile.armbot.name=[WIP]Armbot tile.craneController.name=Crane Controller tile.craneFrame.name=Crane Frame tile.manipulator.name=Manipulator diff --git a/src/main/resources/assets/resonantinduction/textures/models/armbot.png b/src/main/resources/assets/resonantinduction/models/armbot.png similarity index 100% rename from src/main/resources/assets/resonantinduction/textures/models/armbot.png rename to src/main/resources/assets/resonantinduction/models/armbot.png diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Bat.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Bat.png deleted file mode 100644 index b217933b2..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Bat.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Blank.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Blank.png deleted file mode 100644 index f1077e1c1..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Blank.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Blaze.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Blaze.png deleted file mode 100644 index 0ddbd1f0e..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Blaze.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Cavespider.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Cavespider.png deleted file mode 100644 index 0384de0e4..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Cavespider.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Chicken.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Chicken.png deleted file mode 100644 index 591ca8377..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Chicken.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Cow.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Cow.png deleted file mode 100644 index 005280eea..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Cow.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Creeper.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Creeper.png deleted file mode 100644 index cb2d2a287..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Creeper.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Enderman.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Enderman.png deleted file mode 100644 index aa3177ce0..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Enderman.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Ghast.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Ghast.png deleted file mode 100644 index 1365c9468..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Ghast.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Horse.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Horse.png deleted file mode 100644 index 86d65c164..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Horse.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Magmacube.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Magmacube.png deleted file mode 100644 index 901bdfddd..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Magmacube.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Ocelot.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Ocelot.png deleted file mode 100644 index 5e67d48c8..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Ocelot.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Pig.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Pig.png deleted file mode 100644 index b1c2e4ef2..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Pig.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Pigzombie.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Pigzombie.png deleted file mode 100644 index df91881d6..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Pigzombie.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Sheep.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Sheep.png deleted file mode 100644 index 678a16256..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Sheep.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Silverfish.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Silverfish.png deleted file mode 100644 index 3d249bc6a..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Silverfish.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Skeleton.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Skeleton.png deleted file mode 100644 index 7f323c764..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Skeleton.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Skelid.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Skelid.png deleted file mode 100644 index 7f323c764..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Skelid.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Slime.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Slime.png deleted file mode 100644 index ae3d80e0c..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Slime.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Spider.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Spider.png deleted file mode 100644 index 4514c5028..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Spider.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Squid.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Squid.png deleted file mode 100644 index 4e21ce711..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Squid.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Villager.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Villager.png deleted file mode 100644 index 9e87ef360..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Villager.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Witch.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Witch.png deleted file mode 100644 index 51f66291c..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Witch.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Wolf.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Wolf.png deleted file mode 100644 index ad8ae0851..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Wolf.png and /dev/null differ diff --git a/src/main/resources/assets/resonantinduction/textures/items/dna/Zombie.png b/src/main/resources/assets/resonantinduction/textures/items/dna/Zombie.png deleted file mode 100644 index 645d9a68a..000000000 Binary files a/src/main/resources/assets/resonantinduction/textures/items/dna/Zombie.png and /dev/null differ