mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
the creation of slop
This commit is contained in:
parent
6fff2b6195
commit
ec52959304
@ -20,6 +20,7 @@
|
||||
* Added recipe caching to the combinator funnel, meaning it no longer has to iterate over the entire recipe list all the time for compression/automation, this should improve performance by a fair bit
|
||||
* Diodes now use silicon nuggets instead of nether quartz
|
||||
* Aluminium wire's coloring is now consistent with the ingot
|
||||
* Nuclear explosions below a radius of 75 no longer have a gamma flash, therefore a high yield mini nuke should no longer be able to instakill someone wearing full euph armor
|
||||
|
||||
## Fixed
|
||||
* Fixed crash caused by PRISM updating unloaded worlds
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineOreSlopper;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineOreSlopper extends BlockDummyable {
|
||||
|
||||
@ -17,6 +20,7 @@ public class MachineOreSlopper extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineOreSlopper();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -32,6 +36,40 @@ public class MachineOreSlopper extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
this.bounding.clear();
|
||||
//Base
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.5, 0, -1.5, 3.5, 1, 1.5));
|
||||
//Slop bucket
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0.5, 1, -1.5, 3.5, 3.25, 1.5));
|
||||
//Shredder
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, 0.25, 3.25, -0.75));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, 0.75, 0.25, 3.25, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, -2, 3.25, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0, 1, -1.5, 0.25, 3.25, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-2, 1, -0.75, 0, 2, 0.75));
|
||||
//Outlet
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.25, 1, -1, -2.25, 3, 1));
|
||||
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3, y, z + dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 3, y, z - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX, y, z - rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 2 + rot.offsetX, y, z + dir.offsetZ * 2 + rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX, y, z + dir.offsetZ * 2 - rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 2 + rot.offsetX, y, z - dir.offsetZ * 2 + rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 2 - rot.offsetX, y, z - dir.offsetZ * 2 - rot.offsetZ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
||||
((EntityPlayer)player).triggerAchievement(MainRegistry.achManhattan);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10 && strength >= 75) {
|
||||
radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2);
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerOreSlopper extends Container {
|
||||
|
||||
@ -29,8 +30,8 @@ public class ContainerOreSlopper extends Container {
|
||||
this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 7, 134, 54));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 8, 152, 54));
|
||||
//Upgrades
|
||||
this.addSlotToContainer(new Slot(slopper, 0, 62, 72));
|
||||
this.addSlotToContainer(new Slot(slopper, 0, 80, 72));
|
||||
this.addSlotToContainer(new Slot(slopper, 9, 62, 72));
|
||||
this.addSlotToContainer(new Slot(slopper, 10, 80, 72));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
@ -42,6 +43,11 @@ public class ContainerOreSlopper extends Container {
|
||||
this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
|
||||
@ -494,6 +494,7 @@ public class Fluids {
|
||||
metaOrder.add(SEEDSLURRY);
|
||||
metaOrder.add(COLLOID);
|
||||
metaOrder.add(VITRIOL);
|
||||
metaOrder.add(SLOP);
|
||||
metaOrder.add(IONGEL);
|
||||
metaOrder.add(PEROXIDE);
|
||||
metaOrder.add(SULFURIC_ACID);
|
||||
|
||||
@ -23,12 +23,21 @@ public class GUIOreSlopper extends GuiInfoContainer {
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
slopper.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 18, 34, 52);
|
||||
slopper.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 18, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 18, 16, 52, slopper.power, slopper.maxPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
|
||||
String name = this.slopper.hasCustomInventoryName() ? this.slopper.getInventoryName() : I18n.format(this.slopper.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2 - 9, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@ -37,5 +46,17 @@ public class GUIOreSlopper extends GuiInfoContainer {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int) (slopper.progress * 35);
|
||||
drawTexturedModalRect(guiLeft + 62, guiTop + 52 - i, 176, 34 - i, 34, i);
|
||||
|
||||
int j = (int) (slopper.power * 52 / slopper.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 176, 86 - j, 16, j);
|
||||
|
||||
if(slopper.power >= slopper.consumption)
|
||||
drawTexturedModalRect(guiLeft + 12, guiTop + 4, 202, 34, 9, 12);
|
||||
|
||||
slopper.tanks[0].renderTank(guiLeft + 26, guiTop + 70, this.zLevel, 16, 52);
|
||||
slopper.tanks[1].renderTank(guiLeft + 116, guiTop + 70, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,10 +4,15 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.util.RenderDecoItem;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineOreSlopper;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -15,6 +20,8 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderOreSlopper extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
private RenderItem itemRenderer = new RenderDecoItem(this);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
@ -29,39 +36,66 @@ public class RenderOreSlopper extends TileEntitySpecialRenderer implements IItem
|
||||
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
TileEntityMachineOreSlopper slopper = (TileEntityMachineOreSlopper) tile;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.ore_slopper_tex);
|
||||
ResourceManager.ore_slopper.renderPart("Base");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
double slide = slopper.prevSlider + (slopper.slider - slopper.prevSlider) * interp;
|
||||
GL11.glTranslated(0, 0, slide * -3);
|
||||
ResourceManager.ore_slopper.renderPart("Slider");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
double extend = Math.sin(((tile.getWorldObj().getTotalWorldTime() + interp) * 0.1 % (Math.PI * 2))) * 0.625+ 0.625;
|
||||
double extend = (slopper.prevBucket + (slopper.bucket - slopper.prevBucket) * interp) * 1.5;
|
||||
GL11.glTranslated(0, -MathHelper.clamp_double(extend - 0.25, 0, 1.25), 0);
|
||||
ResourceManager.ore_slopper.renderPart("Hydraulics");
|
||||
GL11.glTranslated(0, -MathHelper.clamp_double(extend, 0, 1.25), 0);
|
||||
ResourceManager.ore_slopper.renderPart("Bucket");
|
||||
|
||||
if(slopper.animation == slopper.animation.LIFTING) {
|
||||
GL11.glTranslated(0.0625D, 4.3125D, 2D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-90, 1F, 0F, 0F);
|
||||
ItemStack stack = new ItemStack(ModItems.bedrock_ore, 1, 0);
|
||||
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
|
||||
item.getEntityItem().stackSize = 1;
|
||||
item.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScaled(1.75, 1.75, 1.75);
|
||||
itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
bindTexture(ResourceManager.ore_slopper_tex);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double speed = 10;
|
||||
double blades = slopper.prevBlades + (slopper.blades - slopper.prevBlades) * interp;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.375, 2.75, 0);
|
||||
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * speed, 0, 0, 1);
|
||||
GL11.glRotated(blades, 0, 0, 1);
|
||||
GL11.glTranslated(-0.375, -2.75, 0);
|
||||
ResourceManager.ore_slopper.renderPart("BladesLeft");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.375, 2.75, 0);
|
||||
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * -speed, 0, 0, 1);
|
||||
GL11.glRotated(-blades, 0, 0, 1);
|
||||
GL11.glTranslated(0.375, -2.75, 0);
|
||||
ResourceManager.ore_slopper.renderPart("BladesRight");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double fan = slopper.prevFan + (slopper.fan - slopper.prevFan) * interp;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.875, -1);
|
||||
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * -25, 1, 0, 0);
|
||||
GL11.glRotated(-fan, 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.875, 1);
|
||||
ResourceManager.ore_slopper.renderPart("Fan");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -91,6 +91,7 @@ public class TileMappings {
|
||||
put(TileEntityMachineExposureChamber.class, "tileentity_exposure_chamber");
|
||||
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
|
||||
put(TileEntityMachineExcavator.class, "tileentity_ntm_excavator");
|
||||
put(TileEntityMachineOreSlopper.class, "tileentity_ore_slopper");
|
||||
put(TileEntityFluidDuctSimple.class, "tileentity_universal_duct_simple");
|
||||
put(TileEntityFluidDuct.class, "tileentity_universal_duct");
|
||||
put(TileEntityMachineDrain.class, "tileentity_fluid_drain");
|
||||
|
||||
@ -1,32 +1,55 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerOreSlopper;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIOreSlopper;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.items.special.ItemBedrockOreBase;
|
||||
import com.hbm.items.special.ItemBedrockOreNew;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineOreSlopper extends TileEntityMachineBase implements IGUIProvider {
|
||||
public class TileEntityMachineOreSlopper extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver, IGUIProvider, IUpgradeInfoProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1_000_000;
|
||||
public static final long maxPower = 100_000;
|
||||
|
||||
public static final int waterUsedBase = 1_000;
|
||||
public int waterUsed = waterUsedBase;
|
||||
@ -41,9 +64,13 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
public float prevSlider;
|
||||
public float bucket;
|
||||
public float prevBucket;
|
||||
public float blades;
|
||||
public float prevBlades;
|
||||
public float fan;
|
||||
public float prevFan;
|
||||
public int delay;
|
||||
|
||||
public static FluidTank[] tanks;
|
||||
public FluidTank[] tanks;
|
||||
public double[] ores = new double[BedrockOreType.values().length];
|
||||
|
||||
public TileEntityMachineOreSlopper() {
|
||||
@ -65,6 +92,8 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
@ -73,11 +102,23 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
FluidType conversion = this.getFluidOutput(tanks[0].getTankType());
|
||||
if(conversion != null) tanks[1].setTankType(conversion);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
if(tanks[1].getFill() > 0) this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
this.processing = false;
|
||||
|
||||
UpgradeManager.eval(slots, 9, 10);
|
||||
int speed = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
|
||||
int efficiency = Math.min(UpgradeManager.getLevel(UpgradeType.EFFECT), 3);
|
||||
|
||||
this.consumption = this.consumptionBase + (this.consumptionBase * speed) / 2 + (this.consumptionBase * efficiency);
|
||||
|
||||
if(canSlop()) {
|
||||
this.power -= this.consumption;
|
||||
this.progress += 1F/200F;
|
||||
this.progress += 1F / (200 - speed * 50);
|
||||
this.processing = true;
|
||||
boolean markDirty = false;
|
||||
|
||||
@ -85,7 +126,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
progress -= 1F;
|
||||
|
||||
for(BedrockOreType type : BedrockOreType.values()) {
|
||||
ores[type.ordinal()] += ItemBedrockOreBase.getOreAmount(slots[2], type);
|
||||
ores[type.ordinal()] += (ItemBedrockOreBase.getOreAmount(slots[2], type) * (1D + efficiency * 0.1));
|
||||
}
|
||||
|
||||
this.decrStackSize(2, 1);
|
||||
@ -96,6 +137,22 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
|
||||
if(markDirty) this.markDirty();
|
||||
|
||||
List<Entity> entities = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord + 1, zCoord - 0.5, xCoord + 1.5, yCoord + 3, zCoord + 1.5).offset(dir.offsetX, 0, dir.offsetZ));
|
||||
|
||||
for(Entity e : entities) {
|
||||
e.attackEntityFrom(ModDamageSource.turbofan, 1000F);
|
||||
|
||||
if(!e.isEntityAlive() && e instanceof EntityLivingBase) {
|
||||
NBTTagCompound vdat = new NBTTagCompound();
|
||||
vdat.setString("type", "giblets");
|
||||
vdat.setInteger("ent", e.getEntityId());
|
||||
vdat.setInteger("cDiv", 5);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(vdat, e.posX, e.posY + e.height * 0.5, e.posZ), new TargetPoint(e.dimension, e.posX, e.posY + e.height * 0.5, e.posZ, 150));
|
||||
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
this.progress = 0;
|
||||
}
|
||||
@ -109,16 +166,46 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
for(int i = 3; i <= 8; i++) if(slots[i] == null) {
|
||||
slots[i] = output; ores[type.ordinal()] -= 1F; continue outer;
|
||||
}
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
|
||||
} else {
|
||||
|
||||
this.prevSlider = this.slider;
|
||||
this.prevBucket = this.bucket;
|
||||
this.prevBlades = this.blades;
|
||||
this.prevFan = this.fan;
|
||||
|
||||
if(this.processing) {
|
||||
|
||||
this.blades += 15F;
|
||||
this.fan += 35F;
|
||||
|
||||
if(blades >= 360) {
|
||||
blades -= 360;
|
||||
prevBlades -= 360;
|
||||
}
|
||||
|
||||
if(fan >= 360) {
|
||||
fan -= 360;
|
||||
prevFan -= 360;
|
||||
}
|
||||
|
||||
if(animation == animation.DUMPING && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 4, zCoord + 0.5) <= 50) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", "blockdust");
|
||||
data.setInteger("block", Block.getIdFromBlock(Blocks.iron_block));
|
||||
data.setDouble("posX", xCoord + 0.5 + dir.offsetX + worldObj.rand.nextGaussian() * 0.25);
|
||||
data.setDouble("posY", yCoord + 4.25);
|
||||
data.setDouble("posZ", zCoord + 0.5 + dir.offsetZ + worldObj.rand.nextGaussian() * 0.25);
|
||||
data.setDouble("mY", -0.2D);
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
|
||||
if(delay > 0) {
|
||||
delay--;
|
||||
return;
|
||||
@ -142,7 +229,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
}
|
||||
break;
|
||||
case MOVE_SHREDDER:
|
||||
this.slider += 1/60F;
|
||||
this.slider += 1/50F;
|
||||
if(slider >= 1F) {
|
||||
slider = 1F;
|
||||
animation = SlopperAnimation.DUMPING;
|
||||
@ -153,7 +240,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
animation = SlopperAnimation.MOVE_BUCKET;
|
||||
break;
|
||||
case MOVE_BUCKET:
|
||||
this.slider -= 1/60F;
|
||||
this.slider -= 1/50F;
|
||||
if(slider <= 0F) {
|
||||
animation = SlopperAnimation.LOWERING;
|
||||
delay = 10;
|
||||
@ -163,19 +250,76 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 4, yCoord, zCoord + dir.offsetZ * 4, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 4, yCoord, zCoord - dir.offsetZ * 4, dir.getOpposite()),
|
||||
new DirPos(xCoord + rot.offsetX * 2, yCoord, zCoord + rot.offsetZ * 2, rot),
|
||||
new DirPos(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 2, rot),
|
||||
new DirPos(xCoord + dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 2, rot.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 2, rot),
|
||||
new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 2, rot.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
return slot == 2 && stack.getItem() == ModItems.bedrock_ore_base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack stack, int j) {
|
||||
return i >= 3 && i <= 8;
|
||||
}
|
||||
|
||||
private static final int[] slot_access = new int[] {2, 3, 4, 5, 6, 7, 8};
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return slot_access;
|
||||
}
|
||||
|
||||
@Override public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeLong(power);
|
||||
buf.writeLong(consumption);
|
||||
buf.writeFloat(progress);
|
||||
buf.writeBoolean(processing);
|
||||
tanks[0].serialize(buf);
|
||||
tanks[1].serialize(buf);
|
||||
}
|
||||
|
||||
@Override public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.power = buf.readLong();
|
||||
this.consumption = buf.readLong();
|
||||
this.progress = buf.readFloat();
|
||||
this.processing = buf.readBoolean();
|
||||
tanks[0].deserialize(buf);
|
||||
tanks[1].deserialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getFloat("progress");
|
||||
tanks[0].readFromNBT(nbt, "water");
|
||||
tanks[1].readFromNBT(nbt, "slop");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setFloat("progress", progress);
|
||||
tanks[0].writeToNBT(nbt, "water");
|
||||
tanks[1].writeToNBT(nbt, "slop");
|
||||
}
|
||||
|
||||
public boolean canSlop() {
|
||||
@ -192,6 +336,39 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public long getPower() { return power; }
|
||||
@Override public void setPower(long power) { this.power = power; }
|
||||
@Override public long getMaxPower() { return maxPower; }
|
||||
|
||||
@Override public FluidTank[] getAllTanks() { return tanks; }
|
||||
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] {tanks[1]}; }
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {tanks[0]}; }
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 3,
|
||||
yCoord,
|
||||
zCoord - 3,
|
||||
xCoord + 4,
|
||||
yCoord + 7,
|
||||
zCoord + 4
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerOreSlopper(player.inventory, this);
|
||||
@ -202,4 +379,29 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIOreSlopper(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.EFFECT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_ore_slopper));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 25) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 50) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.EFFECT) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_EFFICIENCY, "+" + (level * 10) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 100) + "%"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel(UpgradeType type) {
|
||||
if(type == UpgradeType.SPEED) return 3;
|
||||
if(type == UpgradeType.EFFECT) return 3;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -369,6 +369,7 @@ container.machineITER=Kernfusionsreaktor
|
||||
container.machineLargeTurbine=Industrielle Dampfturbine
|
||||
container.machineLiquefactor=Verflüssiger
|
||||
container.machineMixer=Industrieller Mixer
|
||||
container.machineOreSlopper=B.E.M.
|
||||
container.machineRefinery=Ölraffinerie
|
||||
container.machineSelenium=Hochleistungs-Sternmotor
|
||||
container.machineShredder=Brecher
|
||||
@ -760,6 +761,7 @@ hbmfluid.salient=Saftiges Grün
|
||||
hbmfluid.sas3=Schrabidiumtrisulfat
|
||||
hbmfluid.schrabidic=Schrabidische Säure
|
||||
hbmfluid.seedslurry=Saatgemisch
|
||||
hbmfluid.slop=Erzpampe
|
||||
hbmfluid.smear=Industrieöl
|
||||
hbmfluid.smoke=Abgas
|
||||
hbmfluid.smoke_leaded=Bleiabgas
|
||||
@ -1292,6 +1294,7 @@ item.bedrock_ore.type.heavy.name=Schwermetall
|
||||
item.bedrock_ore.type.light.name=Leichtmetall
|
||||
item.bedrock_ore.type.nonmetal.name=Nichtmetall
|
||||
item.bedrock_ore.type.rare.name=Seltenerden
|
||||
item.bedrock_ore_base.name=Rohes Bedrockerz
|
||||
item.beta.name=Beta-Features
|
||||
item.big_sword.name=Großes Schwert
|
||||
item.billet_am_mix.name=Reaktorfähiges Americiumbillet
|
||||
@ -4306,6 +4309,7 @@ tile.machine_mixer.name=Industrieller Mixer
|
||||
tile.machine_nuke_furnace_off.name=Atombetriebener Ofen
|
||||
tile.machine_nuke_furnace_on.name=Atombetriebener Ofen
|
||||
tile.machine_orbus.name=Schwerer Magnetischer Lagerbehälter
|
||||
tile.machine_ore_slopper.name=Bedrockerzmaschine
|
||||
tile.machine_powerrtg.name=PT-Isotopenzelle
|
||||
tile.machine_press.name=Befeuerte Presse
|
||||
tile.machine_puf6_tank.name=Plutoniumhexafluorid-Tank
|
||||
|
||||
@ -770,6 +770,7 @@ container.machineITER=Fusion Reactor
|
||||
container.machineLargeTurbine=Industrial Steam Turbine
|
||||
container.machineLiquefactor=Liquefactor
|
||||
container.machineMixer=Industrial Mixer
|
||||
container.machineOreSlopper=B.E.P.
|
||||
container.machineRefinery=Oil Refinery
|
||||
container.machineSelenium=Radial Performance Engine
|
||||
container.machineShredder=Shredder
|
||||
@ -1460,6 +1461,7 @@ hbmfluid.salient=Salient Green
|
||||
hbmfluid.sas3=Schrabidium Trisulfide
|
||||
hbmfluid.schrabidic=Schrabidic Acid
|
||||
hbmfluid.seedslurry=Seeding Slurry
|
||||
hbmfluid.slop=Ore Slop
|
||||
hbmfluid.smear=Industrial Oil
|
||||
hbmfluid.smoke=Smoke
|
||||
hbmfluid.smoke_leaded=Leaded Smoke
|
||||
@ -2012,6 +2014,7 @@ item.bedrock_ore.type.heavy.name=Heavy Metal
|
||||
item.bedrock_ore.type.light.name=Light Metal
|
||||
item.bedrock_ore.type.nonmetal.name=Non-Metal
|
||||
item.bedrock_ore.type.rare.name=Rare Earth
|
||||
item.bedrock_ore_base.name=Raw Bedrock Ore
|
||||
item.beta.name=Beta Features
|
||||
item.big_sword.name=Great Sword
|
||||
item.billet_actinium.name=Actinium-227 Billet
|
||||
@ -5383,6 +5386,7 @@ tile.machine_mixer.name=Industrial Mixer
|
||||
tile.machine_nuke_furnace_off.name=Nuclear Furnace
|
||||
tile.machine_nuke_furnace_on.name=Nuclear Furnace
|
||||
tile.machine_orbus.name=Heavy Magnetic Storage Tank
|
||||
tile.machine_ore_slopper.name=Bedrock Ore Processor
|
||||
tile.machine_powerrtg.name=PT Isotope Cell
|
||||
tile.machine_press.name=Burner Press
|
||||
tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank
|
||||
|
||||
@ -3676,39 +3676,39 @@ vt 0.121951 0.512821
|
||||
vt 0.097561 0.692308
|
||||
vt 0.292683 0.692308
|
||||
vt 0.121951 0.692308
|
||||
vt 0.926829 0.897436
|
||||
vt 0.902439 1.000000
|
||||
vt 0.878049 1.000000
|
||||
vt 0.902439 0.897436
|
||||
vt 0.902439 1.000000
|
||||
vt 0.853659 1.000000
|
||||
vt 0.878049 0.897436
|
||||
vt 0.878049 1.000000
|
||||
vt 0.951219 0.897436
|
||||
vt 0.926829 1.000000
|
||||
vt 0.853659 1.000000
|
||||
vt 0.878049 0.897436
|
||||
vt 0.829268 1.000000
|
||||
vt 0.853659 0.897436
|
||||
vt 0.829268 1.000000
|
||||
vt 0.853659 0.897436
|
||||
vt 0.975610 0.897436
|
||||
vt 0.951219 1.000000
|
||||
vt 0.804878 1.000000
|
||||
vt 0.829268 0.897436
|
||||
vt 0.975610 1.000000
|
||||
vt 1.000000 0.897436
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.897436
|
||||
vt 0.975610 1.000000
|
||||
vt 0.829268 0.897436
|
||||
vt 0.804878 1.000000
|
||||
vt 0.804878 0.897436
|
||||
vt 0.829268 0.897436
|
||||
vt 0.975610 1.000000
|
||||
vt 1.000000 0.897436
|
||||
vt 1.000000 1.000000
|
||||
vt 0.951219 1.000000
|
||||
vt 0.975610 0.897436
|
||||
vt 0.951219 1.000000
|
||||
vt 0.975610 0.897436
|
||||
vt 0.853659 0.897436
|
||||
vt 0.829268 1.000000
|
||||
vt 0.926829 1.000000
|
||||
vt 0.951219 0.897436
|
||||
vt 0.878049 0.897436
|
||||
vt 0.853659 1.000000
|
||||
vt 0.926829 1.000000
|
||||
vt 0.951219 0.897436
|
||||
vt 0.902439 1.000000
|
||||
vt 0.926829 0.897436
|
||||
vt 0.878049 1.000000
|
||||
vt 0.926829 0.897436
|
||||
vt 0.902439 0.897436
|
||||
vt 0.274390 0.410256
|
||||
vt 0.246951 0.410256
|
||||
@ -3763,7 +3763,7 @@ vt 0.655488 0.487179
|
||||
vt 0.673781 0.487179
|
||||
vt 0.390244 0.692308
|
||||
vt 0.804878 0.897436
|
||||
vt 1.000000 1.000000
|
||||
vt 0.804878 0.897436
|
||||
vt 0.646341 0.487179
|
||||
vt 0.646341 0.487179
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 14 KiB |
Loading…
x
Reference in New Issue
Block a user