Added property to prevent world damage by flamethrowers & lasers
This commit is contained in:
parent
909e80ff77
commit
6a25667b20
5 changed files with 13 additions and 4 deletions
|
@ -50,6 +50,7 @@ public class MekanismConfig
|
|||
public static boolean prefilledPortableTanks;
|
||||
public static double armoredJetpackDamageRatio;
|
||||
public static int armoredJetpackDamageMax;
|
||||
public static boolean aestheticWorldDamage;
|
||||
}
|
||||
|
||||
public static class client
|
||||
|
|
|
@ -253,6 +253,7 @@ public class CommonProxy
|
|||
general.prefilledPortableTanks = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "PrefilledPortableTanks", true).getBoolean();
|
||||
general.armoredJetpackDamageRatio = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ArmoredJetpackDamageRatio", 0.8).getDouble();
|
||||
general.armoredJetpackDamageMax = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ArmoredJepackDamageMax", 115).getInt();
|
||||
general.aestheticWorldDamage = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AestheticWorldDamage", true).getBoolean();
|
||||
|
||||
general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
|
||||
general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();
|
||||
|
|
|
@ -71,6 +71,11 @@ public class LaserManager
|
|||
|
||||
public static List<ItemStack> breakBlock(Coord4D blockCoord, boolean dropAtBlock, World world)
|
||||
{
|
||||
if(!general.aestheticWorldDamage)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ItemStack> ret = null;
|
||||
Block blockHit = blockCoord.getBlock(world);
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
package mekanism.common.entity;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.api.util.StackUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -24,8 +26,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
{
|
||||
public static final int LIFESPAN = 80;
|
||||
|
@ -184,7 +184,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
|||
|
||||
Coord4D sideCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId).getFromSide(ForgeDirection.getOrientation(mop.sideHit));
|
||||
|
||||
if(!fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj)))
|
||||
if(general.aestheticWorldDamage && !fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj)))
|
||||
{
|
||||
if(!smeltBlock(new Coord4D(mop.blockX, mop.blockY, mop.blockZ)))
|
||||
{
|
||||
|
|
|
@ -56,6 +56,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
dataStream.writeBoolean(general.blacklistRF);
|
||||
dataStream.writeDouble(general.armoredJetpackDamageRatio);
|
||||
dataStream.writeInt(general.armoredJetpackDamageMax);
|
||||
dataStream.writeBoolean(general.aestheticWorldDamage);
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
@ -127,6 +128,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
general.blacklistRF = dataStream.readBoolean();
|
||||
general.armoredJetpackDamageRatio = dataStream.readDouble();
|
||||
general.armoredJetpackDamageMax = dataStream.readInt();
|
||||
general.aestheticWorldDamage = dataStream.readBoolean();
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue