mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #1409 from 70000hp/tiny-beb-pr
Slag tap Improvements, Channel speedup, and caster fixes
This commit is contained in:
commit
6f91612282
@ -128,10 +128,10 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
||||
Block b = world.getBlock(x + dir.offsetX, y, z + dir.offsetZ);
|
||||
int meta = world.getBlockMetadata(x + dir.offsetX, y, z + dir.offsetZ);
|
||||
|
||||
if(b == ModBlocks.foundry_outlet && meta == dir.ordinal())
|
||||
if((b == ModBlocks.foundry_outlet || b == ModBlocks.foundry_slagtap) && meta == dir.ordinal())
|
||||
return true;
|
||||
|
||||
return b == ModBlocks.foundry_channel || b == ModBlocks.foundry_mold || b == ModBlocks.foundry_slagtap;
|
||||
return b == ModBlocks.foundry_channel || b == ModBlocks.foundry_mold;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@ -28,8 +28,5 @@ public class FoundrySlagtap extends FoundryOutlet {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityFoundrySlagtap();
|
||||
}
|
||||
|
||||
@Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { return false; }
|
||||
@Override public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { return false; }
|
||||
@Override public void printHook(Pre event, World world, int x, int y, int z) { }
|
||||
|
||||
}
|
||||
|
||||
@ -186,8 +186,7 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce
|
||||
if(cast.slots[0] == null) {
|
||||
text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast"));
|
||||
} else if(cast.slots[0].getItem() == ModItems.mold) {
|
||||
ItemMold.Mold mold = ((ItemMold) cast.slots[0].getItem()).getMold(cast.slots[0]);
|
||||
text.add(EnumChatFormatting.BLUE + mold.getTitle());
|
||||
text.add(EnumChatFormatting.BLUE + cast.getInstalledMold().getTitle());
|
||||
}
|
||||
}
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text);
|
||||
|
||||
@ -110,7 +110,7 @@ public class TileEntityFoundryChannel extends TileEntityFoundryBase {
|
||||
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
return MaterialShapes.INGOT.q(1);
|
||||
return MaterialShapes.INGOT.q(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -17,10 +17,13 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityFoundrySlagtap extends TileEntity implements ICrucibleAcceptor {
|
||||
public class TileEntityFoundrySlagtap extends TileEntityFoundryOutlet implements ICrucibleAcceptor {
|
||||
|
||||
@Override
|
||||
public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) {
|
||||
if(filter != null && (filter != stack.material ^ invertFilter)) return false;
|
||||
if(isClosed()) return false;
|
||||
if(side != ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite()) return false;
|
||||
|
||||
Vec3 start = Vec3.createVectorHelper(x + 0.5, y - 0.125, z + 0.5);
|
||||
Vec3 end = Vec3.createVectorHelper(x + 0.5, y + 0.125 - 15, z + 0.5);
|
||||
|
||||
@ -192,7 +192,8 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
@Override
|
||||
public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
if(this.type != null && this.type != stack.material) return false;
|
||||
return !(this.amount >= this.getCapacity() || getInstalledMold() == null);
|
||||
int limit = this.getInstalledMold() != null ? this.getInstalledMold().getCost() * 9 : this.getCapacity();
|
||||
return !(this.amount >= limit || getInstalledMold() == null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -211,7 +212,22 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Mats.MaterialStack standardAdd(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
this.type = stack.material;
|
||||
int limit = this.getInstalledMold() != null ? this.getInstalledMold().getCost() * 9 : this.getCapacity();
|
||||
if(stack.amount + this.amount <= limit) {
|
||||
this.amount += stack.amount;
|
||||
return null;
|
||||
}
|
||||
|
||||
int required = limit - this.amount;
|
||||
this.amount = limit;
|
||||
|
||||
stack.amount -= required;
|
||||
|
||||
return stack;
|
||||
}
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { steam };
|
||||
@ -266,11 +282,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
|
||||
if(i == 0) {
|
||||
return stack.getItem() == ModItems.mold;
|
||||
}
|
||||
|
||||
if(i == 0) return stack.getItem() == ModItems.mold;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user