mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Channel and caster tweaks
This commit is contained in:
parent
5fd71bdca4
commit
21495449e0
@ -128,10 +128,10 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
Block b = world.getBlock(x + dir.offsetX, y, z + dir.offsetZ);
|
Block b = world.getBlock(x + dir.offsetX, y, z + dir.offsetZ);
|
||||||
int meta = world.getBlockMetadata(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 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();
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|||||||
@ -186,8 +186,7 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce
|
|||||||
if(cast.slots[0] == null) {
|
if(cast.slots[0] == null) {
|
||||||
text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast"));
|
text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast"));
|
||||||
} else if(cast.slots[0].getItem() == ModItems.mold) {
|
} else if(cast.slots[0].getItem() == ModItems.mold) {
|
||||||
ItemMold.Mold mold = ((ItemMold) cast.slots[0].getItem()).getMold(cast.slots[0]);
|
text.add(EnumChatFormatting.BLUE + cast.getInstalledMold().getTitle());
|
||||||
text.add(EnumChatFormatting.BLUE + mold.getTitle());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text);
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text);
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public class TileEntityFoundryChannel extends TileEntityFoundryBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCapacity() {
|
public int getCapacity() {
|
||||||
return MaterialShapes.INGOT.q(1);
|
return MaterialShapes.INGOT.q(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -192,7 +192,8 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
|||||||
@Override
|
@Override
|
||||||
public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) {
|
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;
|
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
|
@Override
|
||||||
@ -211,7 +212,22 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
|||||||
this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
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
|
@Override
|
||||||
public FluidTank[] getSendingTanks() {
|
public FluidTank[] getSendingTanks() {
|
||||||
return new FluidTank[] { steam };
|
return new FluidTank[] { steam };
|
||||||
@ -266,11 +282,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user