mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Compare commits
2 Commits
7d635bfc0d
...
5f72290510
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f72290510 | ||
|
|
d1593aecb9 |
@ -225,14 +225,14 @@ public class ModBlocks {
|
||||
public static Block block_foam;
|
||||
public static Block block_coke;
|
||||
public static Block block_graphite;
|
||||
public static Block block_graphite_drilled;
|
||||
public static Block block_graphite_fuel;
|
||||
public static Block block_graphite_plutonium;
|
||||
public static Block block_graphite_rod;
|
||||
public static Block block_graphite_source;
|
||||
public static Block block_graphite_lithium;
|
||||
public static Block block_graphite_tritium;
|
||||
public static Block block_graphite_detector;
|
||||
@Deprecated public static Block block_graphite_drilled;
|
||||
@Deprecated public static Block block_graphite_fuel;
|
||||
@Deprecated public static Block block_graphite_plutonium;
|
||||
@Deprecated public static Block block_graphite_rod;
|
||||
@Deprecated public static Block block_graphite_source;
|
||||
@Deprecated public static Block block_graphite_lithium;
|
||||
@Deprecated public static Block block_graphite_tritium;
|
||||
@Deprecated public static Block block_graphite_detector;
|
||||
public static Block block_boron;
|
||||
public static Block block_lanthanium;
|
||||
public static Block block_ra226;
|
||||
@ -853,6 +853,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block pile_brick;
|
||||
public static Block pile_block;
|
||||
public static Block pile_device;
|
||||
|
||||
public static Block pwr_fuel;
|
||||
public static Block pwr_control;
|
||||
@ -1962,8 +1963,9 @@ public class ModBlocks {
|
||||
custom_machine = new BlockCustomMachine().setBlockName("custom_machine").setCreativeTab(MainRegistry.machineTab).setLightLevel(1F).setHardness(5.0F).setResistance(10.0F);
|
||||
cm_anchor = new BlockCMAnchor().setBlockName("custom_machine_anchor").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
pile_brick = new BlockPileBrick().setBlockName("pile_brick").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pile_brick");
|
||||
pile_block = new BlockPile().setBlockName("pile_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pile_block");
|
||||
pile_brick = new BlockPileBrick().setBlockName("pile_brick").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pile_brick");
|
||||
pile_device = new BlockPileDevice().setBlockName("pile_device").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
pile_block = new BlockPile().setBlockName("pile_block").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pile_block");
|
||||
|
||||
pwr_fuel = new BlockPillarPWR(Material.iron, RefStrings.MODID + ":pwr_fuel_top").setBlockName("pwr_fuel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_fuel_side");
|
||||
pwr_control = new BlockPillarPWR(Material.iron, RefStrings.MODID + ":pwr_control_top").setBlockName("pwr_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_control_side");
|
||||
@ -3326,6 +3328,7 @@ public class ModBlocks {
|
||||
|
||||
//Chicago Pile
|
||||
register(pile_brick);
|
||||
register(pile_device);
|
||||
register(pile_block);
|
||||
|
||||
//PWR
|
||||
|
||||
@ -46,6 +46,12 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
public static final int META_CONTROL = 7;
|
||||
/** Edge of our pile "cube" to prevent channels from being drilled there */
|
||||
public static final int META_EDGE = 8;
|
||||
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver rec;
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver recTop;
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver recChanIn;
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver recChanOut;
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver recCon;
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon iconTop;
|
||||
|
||||
@ -60,20 +66,24 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
@Override public int getRenderType() { return CT.renderID; }
|
||||
@Override public Item getItemDropped(int i, Random rand, int j) { return null; }
|
||||
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver rec;
|
||||
@SideOnly(Side.CLIENT) public CTStitchReceiver recTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
this.iconTop = reg.registerIcon(RefStrings.MODID + ":pile_block_top");
|
||||
|
||||
this.rec = IBlockCT.primeReceiver(reg, this.blockIcon.getIconName(), this.blockIcon);
|
||||
this.recTop = IBlockCT.primeReceiver(reg, this.iconTop.getIconName(), this.iconTop);
|
||||
this.recChanIn = IBlockCT.primeReceiver(reg, "pile_block_input", this.blockIcon);
|
||||
this.recChanOut = IBlockCT.primeReceiver(reg, "pile_block_output", this.blockIcon);
|
||||
this.recCon = IBlockCT.primeReceiver(reg, "pile_block_control_top", this.iconTop);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon[] getFragments(IBlockAccess world, int x, int y, int z, int side) {
|
||||
if(side == 0 || side == 1) return recTop.fragCache;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(side == 0 || side == 1) return meta == META_CONTROL ? recCon.fragCache : recTop.fragCache;
|
||||
if(meta == META_FUEL_IN || meta == META_AIR_IN) return recChanIn.fragCache;
|
||||
if(meta == META_FUEL_OUT || meta == META_AIR_OUT) return recChanOut.fragCache;
|
||||
return rec.fragCache;
|
||||
}
|
||||
|
||||
@ -101,7 +111,14 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
if(tool == tool.HAND_DRILL) {
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPileCore || world.getBlockMetadata(x, y, z) == META_CORE) {
|
||||
MachinePWRController.sendError(world, x, y, z, "Cannot intersect core", player);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(tile instanceof TileEntityPileBaseMK2) {
|
||||
TileEntityPileCore core = ((TileEntityPileBaseMK2) tile).getCore();
|
||||
if(core != null) {
|
||||
@ -109,6 +126,7 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
return core.drillChannel(x, y, z, dir, player);
|
||||
}
|
||||
}
|
||||
|
||||
MachinePWRController.sendError(world, x, y, z, "No core found", player);
|
||||
}
|
||||
|
||||
|
||||
@ -127,12 +127,12 @@ public class BlockPileBrick extends Block implements IToolable {
|
||||
world.setBlock(iX, iY, iZ, ModBlocks.pile_block, BlockPile.META_CORE, 3);
|
||||
TileEntityPileCore core = (TileEntityPileCore) world.getTileEntity(iX, iY, iZ);
|
||||
core.orientation = PileOrientation.getOrientation(dir);
|
||||
core.setupSize(posHeight + negHeight + 1, left + right + 1, depth + 1);
|
||||
} else {
|
||||
world.setBlock(iX, iY, iZ, ModBlocks.pile_block, BlockPile.META_DUMMY, 3);
|
||||
boolean isEdge = h == -negHeight || h == posHeight || v == -left || v == right || d == 0 || d == depth;
|
||||
world.setBlock(iX, iY, iZ, ModBlocks.pile_block, isEdge ? BlockPile.META_EDGE : BlockPile.META_DUMMY, 3);
|
||||
TileEntityPileBaseMK2 pile = (TileEntityPileBaseMK2) world.getTileEntity(iX, iY, iZ);
|
||||
pile.coreX = x;
|
||||
pile.coreY = y;
|
||||
pile.coreZ = z;
|
||||
pile.setCore(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
package com.hbm.blocks.machine.pile;
|
||||
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileControl;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileLoader;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileVent;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPileDevice extends BlockContainer {
|
||||
|
||||
public static final int ITEM_META_LOADER = 0;
|
||||
public static final int ITEM_META_VENT = 1;
|
||||
public static final int ITEM_META_CONTROL = 2;
|
||||
|
||||
public static final int BLOCK_META_LOADER = 0;
|
||||
public static final int BLOCK_META_VENT = 4;
|
||||
public static final int BLOCK_META_CONTROL = 8;
|
||||
|
||||
public BlockPileDevice() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta == BLOCK_META_LOADER) return new TileEntityPileLoader();
|
||||
if(meta == BLOCK_META_VENT) return new TileEntityPileVent();
|
||||
if(meta == BLOCK_META_CONTROL) return new TileEntityPileControl();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return -1; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float fx, float fy, float fz, int meta) {
|
||||
int metaOffset = itemMetaToBlockMeta(meta);
|
||||
// side is reduced by 2 because UP and DOWN (0 and 1) aren't relevant
|
||||
// therefore, all item metas (device subtypes) are neatly packed into 4 metas each
|
||||
side = MathHelper.clamp_int(side - 2, 0, 3);
|
||||
return metaOffset + side;
|
||||
}
|
||||
|
||||
public static int itemMetaToBlockMeta(int meta) {
|
||||
if(meta >= ITEM_META_CONTROL) return BLOCK_META_CONTROL;
|
||||
if(meta == ITEM_META_VENT) return BLOCK_META_VENT;
|
||||
return BLOCK_META_LOADER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
if(meta >= BLOCK_META_CONTROL) return ITEM_META_CONTROL;
|
||||
if(meta >= BLOCK_META_VENT) return ITEM_META_VENT;
|
||||
return ITEM_META_LOADER;
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.gui.GUIDiode;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
@ -17,6 +18,7 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -61,6 +63,17 @@ public class CableDiode extends BlockContainer implements IEnergyConnectorBlock,
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float fX, float fY, float fZ) {
|
||||
|
||||
if(!player.isSneaking() && world.isRemote) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||
return true;
|
||||
|
||||
@ -222,19 +222,12 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
|
||||
ItemStack armor = player.inventory.armorInventory[i];
|
||||
|
||||
if(armor == null || !(armor.getItem() instanceof ArmorFSB))
|
||||
return false;
|
||||
|
||||
if(((ArmorFSB) armor.getItem()).getArmorMaterial() != chestplate.getArmorMaterial())
|
||||
return false;
|
||||
|
||||
if(!((ArmorFSB) armor.getItem()).isArmorEnabled(armor))
|
||||
return false;
|
||||
if(armor == null || !(armor.getItem() instanceof ArmorFSB)) return false;
|
||||
if(((ArmorFSB) armor.getItem()).getArmorMaterial() != chestplate.getArmorMaterial()) return false;
|
||||
if(!((ArmorFSB) armor.getItem()).isArmorEnabled(armor)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -251,16 +244,11 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
|
||||
ItemStack armor = player.inventory.armorInventory[i];
|
||||
|
||||
if(armor == null || !(armor.getItem() instanceof ArmorFSB))
|
||||
return false;
|
||||
|
||||
if(((ArmorFSB) armor.getItem()).getArmorMaterial() != chestplate.getArmorMaterial())
|
||||
return false;
|
||||
if(armor == null || !(armor.getItem() instanceof ArmorFSB)) return false;
|
||||
if(((ArmorFSB) armor.getItem()).getArmorMaterial() != chestplate.getArmorMaterial()) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ public class ModDamageSource extends DamageSource {
|
||||
public static DamageSource vacuum = (new DamageSource("vacuum")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource overdose = (new DamageSource("overdose")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource microwave = (new DamageSource("microwave")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource nitan = (new DamageSource("nitan")).setDamageIsAbsolute().setDamageBypassesArmor().setDamageAllowedInCreativeMode();;
|
||||
|
||||
public static final String s_bullet = "revolverBullet";
|
||||
public static final String s_emplacer = "chopperBullet";
|
||||
|
||||
@ -391,6 +391,9 @@ public class TileMappings {
|
||||
|
||||
put(TileEntityPileCore.class, "tileentity_pile_core");
|
||||
put(TileEntityPileBaseMK2.class, "tileentity_pile_block");
|
||||
put(TileEntityPileLoader.class, "tileentity_pile_loader");
|
||||
put(TileEntityPileVent.class, "tileentity_pile_vent");
|
||||
put(TileEntityPileControl.class, "tileentity_pile_control");
|
||||
}
|
||||
|
||||
private static void putRBMK() {
|
||||
@ -510,10 +513,6 @@ public class TileMappings {
|
||||
private static void put(Class<? extends TileEntity> clazz, String... names) {
|
||||
map.put(clazz, names);
|
||||
|
||||
/*if((IFluidSource.class.isAssignableFrom(clazz) || IFluidAcceptor.class.isAssignableFrom(clazz)) && !IFluidConnector.class.isAssignableFrom(clazz)) {
|
||||
LoggingUtil.errorWithHighlight(clazz.getCanonicalName() + " implements the old interfaces but not IFluidConnector!");
|
||||
}*/
|
||||
|
||||
if(IConfigurableMachine.class.isAssignableFrom(clazz)) {
|
||||
configurables.add((Class<? extends IConfigurableMachine>) clazz);
|
||||
}
|
||||
|
||||
@ -14,6 +14,13 @@ public class TileEntityPileBaseMK2 extends TileEntityTickingBase {
|
||||
public int coreY = -999;
|
||||
public int coreZ;
|
||||
|
||||
public TileEntityPileBaseMK2 setCore(int x, int y, int z) {
|
||||
this.coreX = x;
|
||||
this.coreY = y;
|
||||
this.coreZ = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.hbm.tileentity.machine.pile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityPileControl extends TileEntity {
|
||||
|
||||
}
|
||||
@ -11,11 +11,27 @@ import com.hbm.tileentity.TileEntityTickingBase;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@NotableComments
|
||||
public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
|
||||
/*
|
||||
* ____,__,___
|
||||
* |\ I, I, \
|
||||
* | \ I I \
|
||||
* -- \___________\
|
||||
* |--| |
|
||||
* -- | U U U |
|
||||
* \--| X |
|
||||
* \ | U U U |
|
||||
* \|___________|
|
||||
*
|
||||
* BEHOLD
|
||||
* THE CUBE
|
||||
*/
|
||||
|
||||
/**
|
||||
* Orientation is kind of important now. The "direction" the pile is facing in is now decided
|
||||
* by the side the core is on, i.e. the side it was assembled from. Any channel that goes along
|
||||
@ -32,6 +48,55 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
public List<PileChannel> ventilationChannels = new ArrayList();
|
||||
public List<PileChannel> controlChannels = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
height = nbt.getInteger("height");
|
||||
width = nbt.getInteger("width");
|
||||
depth = nbt.getInteger("depth");
|
||||
|
||||
int fuelCount = nbt.getByte("fc");
|
||||
int ventCount = nbt.getByte("vc");
|
||||
int contCount = nbt.getByte("cc");
|
||||
|
||||
fuelChannels.clear();
|
||||
ventilationChannels.clear();
|
||||
controlChannels.clear();
|
||||
|
||||
for(int i = 0; i < fuelCount; i++) fuelChannels.add(readChannelFromNBT(nbt, "f" + i));
|
||||
for(int i = 0; i < ventCount; i++) ventilationChannels.add(readChannelFromNBT(nbt, "v" + i));
|
||||
for(int i = 0; i < contCount; i++) controlChannels.add(readChannelFromNBT(nbt, "c" + i));
|
||||
}
|
||||
|
||||
public PileChannel getFuelChannel(int x, int y, int z) { return getChannel(x, y, z, fuelChannels); }
|
||||
public PileChannel getVentilationChannel(int x, int y, int z) { return getChannel(x, y, z, ventilationChannels); }
|
||||
public PileChannel getControlChannel(int x, int y, int z) { return getChannel(x, y, z, controlChannels); }
|
||||
|
||||
public PileChannel getChannel(int x, int y, int z, List<PileChannel> list) {
|
||||
for(PileChannel channel : list) if(channel.entry.compare(x, y, z)) return channel;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("height", height);
|
||||
nbt.setInteger("width", width);
|
||||
nbt.setInteger("depth", depth);
|
||||
|
||||
int fuelCount = fuelChannels.size();
|
||||
int ventCount = ventilationChannels.size();
|
||||
int contCount = controlChannels.size();
|
||||
|
||||
nbt.setByte("fc", (byte) fuelCount);
|
||||
nbt.setByte("vc", (byte) ventCount);
|
||||
nbt.setByte("cc", (byte) contCount);
|
||||
|
||||
for(int i = 0; i < fuelCount; i++) fuelChannels.get(i).writeChannelToNBT(nbt, "f" + i);
|
||||
for(int i = 0; i < ventCount; i++) ventilationChannels.get(i).writeChannelToNBT(nbt, "v" + i);
|
||||
for(int i = 0; i < contCount; i++) controlChannels.get(i).writeChannelToNBT(nbt, "c" + i);
|
||||
}
|
||||
|
||||
public TileEntityPileCore setupSize(int h, int w, int d) {
|
||||
this.height = h;
|
||||
this.width = w;
|
||||
@ -131,6 +196,21 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
this.type = type;
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
public void writeChannelToNBT(NBTTagCompound nbt, String name) {
|
||||
nbt.setInteger(name + "_x", entry.getX());
|
||||
nbt.setInteger(name + "_y", entry.getY());
|
||||
nbt.setInteger(name + "_z", entry.getZ());
|
||||
nbt.setByte(name + "_d", (byte) entry.getDir().ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public PileChannel readChannelFromNBT(NBTTagCompound nbt, String name) {
|
||||
int x = nbt.getInteger(name + "_x");
|
||||
int y = nbt.getInteger(name + "_y");
|
||||
int z = nbt.getInteger(name + "_z");
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(nbt.getByte(name + "_d"));
|
||||
return new PileChannel(x, y, z, dir);
|
||||
}
|
||||
|
||||
public static enum PileChannelType {
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.hbm.tileentity.machine.pile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityPileLoader extends TileEntity {
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.hbm.tileentity.machine.pile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityPileVent extends TileEntity {
|
||||
|
||||
}
|
||||
@ -419,7 +419,11 @@ public class DamageResistanceHandler {
|
||||
LASER,
|
||||
MICROWAVE,
|
||||
SUBATOMIC,
|
||||
OTHER
|
||||
OTHER;
|
||||
|
||||
public boolean isApplicable(String name) {
|
||||
return name.toLowerCase(Locale.US).equals(this.name().toLowerCase(Locale.US));
|
||||
}
|
||||
}
|
||||
|
||||
public static void setup(float dt, float dr) {
|
||||
@ -471,11 +475,11 @@ public class DamageResistanceHandler {
|
||||
if(source.isExplosion()) return CATEGORY_EXPLOSION;
|
||||
if(source.isFireDamage()) return CATEGORY_FIRE;
|
||||
if(source.isProjectile()) return CATEGORY_PHYSICAL;
|
||||
if(source.damageType.toLowerCase(Locale.US).equals(DamageClass.LASER.name().toLowerCase(Locale.US))) return CATEGORY_ENERGY;
|
||||
if(source.damageType.toLowerCase(Locale.US).equals(DamageClass.PLASMA.name().toLowerCase(Locale.US))) return CATEGORY_ENERGY;
|
||||
if(source.damageType.toLowerCase(Locale.US).equals(DamageClass.MICROWAVE.name().toLowerCase(Locale.US))) return CATEGORY_ENERGY;
|
||||
if(source.damageType.toLowerCase(Locale.US).equals(DamageClass.SUBATOMIC.name().toLowerCase(Locale.US))) return CATEGORY_ENERGY;
|
||||
if(source.damageType.toLowerCase(Locale.US).equals(DamageClass.ELECTRIC.name().toLowerCase(Locale.US))) return CATEGORY_ENERGY;
|
||||
if(DamageClass.LASER.isApplicable(source.damageType)) return CATEGORY_ENERGY;
|
||||
if(DamageClass.PLASMA.isApplicable(source.damageType)) return CATEGORY_ENERGY;
|
||||
if(DamageClass.MICROWAVE.isApplicable(source.damageType)) return CATEGORY_ENERGY;
|
||||
if(DamageClass.SUBATOMIC.isApplicable(source.damageType)) return CATEGORY_ENERGY;
|
||||
if(DamageClass.ELECTRIC.isApplicable(source.damageType)) return CATEGORY_ENERGY;
|
||||
if(source == DamageSource.cactus) return CATEGORY_PHYSICAL;
|
||||
if(source == ModDamageSource.spikes) return CATEGORY_PHYSICAL;
|
||||
if(source == ModDamageSource.electricity) return CATEGORY_ENERGY;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user