mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #1302 from 70000hp/aaaaaaaaaaa
Fixing the caster duping bug
This commit is contained in:
commit
7a36248002
@ -63,15 +63,14 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
|||||||
this.lastAmount = this.amount;
|
this.lastAmount = this.amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.amount >= this.getCapacity()) {
|
if (this.amount >= this.getCapacity()) {
|
||||||
// In case of overfill problems, spit out the excess as scrap
|
//In case of overfill problems, spit out the excess as scrap
|
||||||
if(amount > getCapacity()) {
|
if (amount > getCapacity()) {
|
||||||
ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount));
|
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);
|
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap);
|
||||||
worldObj.spawnEntityInWorld(item);
|
worldObj.spawnEntityInWorld(item);
|
||||||
}
|
}
|
||||||
this.amount = this.getCapacity();
|
this.amount = this.getCapacity();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.amount == 0) {
|
if(this.amount == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user