Merge pull request #1302 from 70000hp/aaaaaaaaaaa

Fixing the caster duping bug
This commit is contained in:
HbmMods 2024-01-19 11:15:23 +01:00 committed by GitHub
commit 7a36248002
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,15 +63,14 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
this.lastAmount = this.amount;
}
if(this.amount >= this.getCapacity()) {
// In case of overfill problems, spit out the excess as scrap
if(amount > getCapacity()) {
ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount));
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap);
worldObj.spawnEntityInWorld(item);
}
this.amount = this.getCapacity();
if (this.amount >= this.getCapacity()) {
//In case of overfill problems, spit out the excess as scrap
if (amount > getCapacity()) {
ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, Math.max(amount - getCapacity(), 0)));
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap);
worldObj.spawnEntityInWorld(item);
}
this.amount = this.getCapacity();
}
if(this.amount == 0) {