mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 23:33:08 +00:00
add config option for single use cardbox #79
This commit is contained in:
4 files changed
+14
-7
No files matched your search
@@ -2,6 +2,7 @@ package mekanism.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.MekanismConfig;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.item.ItemBlockCardboardBox;
|
||||
@@ -105,15 +106,16 @@ public class BlockCardboardBox extends BlockContainer
|
||||
data.block.onBlockPlacedBy(world, x, y, z, entityplayer, new ItemStack(data.block, 1, data.meta));
|
||||
data.block.onPostBlockPlaced(world, x, y, z, data.meta);
|
||||
}
|
||||
|
||||
// float motion = 0.7F;
|
||||
// double motionX = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
// double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
// double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
if(!MekanismConfig.general.enableSingleUseCardboxes) {
|
||||
float motion = 0.7F;
|
||||
double motionX = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
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, itemStack);
|
||||
EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, itemStack);
|
||||
|
||||
// world.spawnEntityInWorld(entityItem);
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user