mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
A few fixes, need to fix an output issue
This commit is contained in:
1 parent
5747c9f904
commit
af4c1c6cd7
10 files changed
+157
-69
No files matched your search
@@ -7,6 +7,8 @@ import java.util.Random;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.client.ClientProxy;
|
||||
import mekanism.client.render.MekanismRenderer.ICustomBlockIcon;
|
||||
import mekanism.common.CTMData;
|
||||
@@ -913,6 +915,14 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
((ItemBlockBasic)ret.getItem()).setTier(ret, tileEntity.tier.getBaseTier());
|
||||
}
|
||||
}
|
||||
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileEntity instanceof IStrictEnergyStorage)
|
||||
{
|
||||
IEnergizedItem energizedItem = (IEnergizedItem)ret.getItem();
|
||||
energizedItem.setEnergy(ret, ((IStrictEnergyStorage)tileEntity).getEnergy());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -934,7 +944,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, getPickBlock(null, world, x, y, z));
|
||||
EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, getPickBlock(null, world, x, y, z, player));
|
||||
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
@@ -944,7 +954,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
|
||||
public ItemStack dismantleBlock(World world, int x, int y, int z, boolean returnBlock)
|
||||
{
|
||||
ItemStack itemStack = getPickBlock(null, world, x, y, z);
|
||||
ItemStack itemStack = getPickBlock(null, world, x, y, z, null);
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
|
||||
Reference in new issue
Block a user