fusion reactor work, balls-o-tron progress
@ -1,4 +1,4 @@
|
||||
package api.hbm.energy;
|
||||
package api.hbm.entity;
|
||||
|
||||
public interface IRadarDetectable {
|
||||
|
||||
@ -296,9 +296,10 @@ hbmfluid.reclaimed=Wiederaufbetreitetes Industrieöl
|
||||
hbmfluid.sas3=Schrabidiumtrisulfat
|
||||
hbmfluid.smear=Industrieöl
|
||||
hbmfluid.steam=Dampf
|
||||
hbmfluid.superhotsteam=Superverdichteter Steam
|
||||
hbmfluid.superhotsteam=Superverdichteter Dampf
|
||||
hbmfluid.tritium=Tritium
|
||||
hbmfluid.uf6=Uranhexafluorid
|
||||
hbmfluid.ultrahotsteam=Ultraverdichteter Dampf
|
||||
hbmfluid.water=Wasser
|
||||
hbmfluid.watz=Giftiger Schlamm
|
||||
hbmfluid.xenon=Xenongas
|
||||
@ -792,6 +793,9 @@ item.detonator_multi.name=Mehrfach-Fernzünder
|
||||
item.door_bunker.name=Bunkertür
|
||||
item.door_metal.name=Metalltür
|
||||
item.door_office.name=Bürotür
|
||||
item.drax.name=Terra-Bohrer
|
||||
item.drax_mk2.name=Gehärteter Terra-Bohrer
|
||||
item.drax_mk3.name=Schrabidischer Terra-Bohrer
|
||||
item.drill_titanium.name=Titanbohrer
|
||||
item.ducttape.name=Klebeband
|
||||
item.dust.name=Staub
|
||||
@ -2317,6 +2321,7 @@ tile.steel_poles.name=Stahlmasten
|
||||
tile.steel_roof.name=Flaches Stachldach
|
||||
tile.steel_scaffold.name=Stahlgerüst
|
||||
tile.steel_wall.name=Stahlwand
|
||||
tile.struct_iter_core.name=Fusionsreaktor-Kernkomponente
|
||||
tile.struct_launcher.name=Startrampe-Komponentenblock
|
||||
tile.struct_launcher_core.name=Kompaktrampe-Kernkomponente
|
||||
tile.struct_launcher_core_large.name=Startrampe-Kernkomponente
|
||||
@ -2363,6 +2368,7 @@ tile.watz_hatch.name=Watzreaktorzugriffsluke
|
||||
tile.yellow_barrel.name=Radioaktives Fass
|
||||
|
||||
tool.ability.cnetrifuge=Auto-Zentrifuge
|
||||
tool.ability.crystallizer=Auto-Kristallisierer
|
||||
tool.ability.hammer=AoE
|
||||
tool.ability.luck=Glück
|
||||
tool.ability.recursion=Erzadern-Miner
|
||||
|
||||
@ -299,6 +299,7 @@ hbmfluid.steam=Steam
|
||||
hbmfluid.superhotsteam=Super Dense Steam
|
||||
hbmfluid.tritium=Tritium
|
||||
hbmfluid.uf6=Uranium Hexafluoride
|
||||
hbmfluid.ultrahotsteam=Ultra Dense Steam
|
||||
hbmfluid.water=Water
|
||||
hbmfluid.watz=Poisonous Mud
|
||||
hbmfluid.xenon=Xenon Gas
|
||||
@ -793,6 +794,9 @@ item.door_bunker.name=Bunker Door
|
||||
item.door_metal.name=Metal Door
|
||||
item.door_office.name=Office Door
|
||||
item.drill_titanium.name=Titanium Drill
|
||||
item.drax.name=Terra Drill
|
||||
item.drax_mk2.name=Hardened Terra Drill
|
||||
item.drax_mk3.name=Schrabidic Terra Drill
|
||||
item.ducttape.name=Duct Tape
|
||||
item.dust.name=Dust
|
||||
item.dynosphere_base.name=Blank Dynosphere
|
||||
@ -2317,6 +2321,7 @@ tile.steel_poles.name=Steel Pole
|
||||
tile.steel_roof.name=Flat Steel Roof
|
||||
tile.steel_scaffold.name=Steel Scaffold
|
||||
tile.steel_wall.name=Steel Wall
|
||||
tile.struct_iter_core.name=Fusion Reactor Core Component
|
||||
tile.struct_launcher.name=Launch Pad Component Block
|
||||
tile.struct_launcher_core.name=Compact Launcher Core Component
|
||||
tile.struct_launcher_core_large.name=Launch Table Core Component
|
||||
@ -2363,6 +2368,7 @@ tile.watz_hatch.name=Watz Reactor Access Hatch
|
||||
tile.yellow_barrel.name=Radioactive Barrel
|
||||
|
||||
tool.ability.centrifuge=Auto-Centrifuge
|
||||
tool.ability.crystallizer=Auto-Crystallizer
|
||||
tool.ability.hammer=AoE
|
||||
tool.ability.luck=Fortune
|
||||
tool.ability.recursion=Vein Miner
|
||||
|
||||
BIN
src/main/java/assets/hbm/textures/blocks/iter.png
Normal file
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/java/assets/hbm/textures/items/chernobylsign.png
Normal file
|
After Width: | Height: | Size: 203 B |
|
After Width: | Height: | Size: 272 B |
BIN
src/main/java/assets/hbm/textures/items/fusion_shield_desh.png
Normal file
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 239 B |
BIN
src/main/java/assets/hbm/textures/items/powder_chlorophyte.png
Normal file
|
After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 3.4 KiB |
@ -495,7 +495,7 @@ public class ModBlocks {
|
||||
public static final int guiID_fusion_multiblock = 27;
|
||||
|
||||
public static Block iter;
|
||||
public static final int guiID_iter = 27;
|
||||
public static final int guiID_iter = 98;
|
||||
public static Block plasma_heater;
|
||||
public static final int guiID_plasma_heater = 27;
|
||||
|
||||
|
||||
@ -1,11 +1,21 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityITER;
|
||||
import com.hbm.tileentity.machine.TileEntityITERStruct;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineITER extends BlockDummyable {
|
||||
|
||||
@ -15,17 +25,190 @@ public class MachineITER extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityITER();
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityITER();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 7, 7, 7, 7};
|
||||
//because we'll implement our own gnarly behavior here
|
||||
return new int[] { 0, 0, 0, 0, 0, 0 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
TileEntityITER entity = (TileEntityITER) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_iter, world, pos[0], pos[1], pos[2]);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int height = 2;
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
|
||||
if(!(player instanceof EntityPlayer))
|
||||
return;
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
EntityPlayer pl = (EntityPlayer) player;
|
||||
|
||||
int o = getOffset();
|
||||
|
||||
ForgeDirection dir = ForgeDirection.NORTH;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
dir = ForgeDirection.getOrientation(2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
dir = ForgeDirection.getOrientation(5);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
dir = ForgeDirection.getOrientation(3);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
dir = ForgeDirection.getOrientation(4);
|
||||
}
|
||||
|
||||
dir = dir.getOpposite();
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
if(!checkRequirement(world, x, y, z, dir, o)) {
|
||||
|
||||
if(!pl.capabilities.isCreativeMode) {
|
||||
ItemStack stack = pl.inventory.mainInventory[pl.inventory.currentItem];
|
||||
Item item = Item.getItemFromBlock(this);
|
||||
|
||||
if(stack == null) {
|
||||
pl.inventory.mainInventory[pl.inventory.currentItem] = new ItemStack(this);
|
||||
} else {
|
||||
if(stack.getItem() != item || stack.stackSize == stack.getMaxStackSize()) {
|
||||
pl.inventory.addItemStackToInventory(new ItemStack(this));
|
||||
} else {
|
||||
pl.getHeldItem().stackSize++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
pl.getHeldItem().stackSize--;
|
||||
|
||||
world.setBlock(x + dir.offsetX * o , y + dir.offsetY * o + height, z + dir.offsetZ * o, this, dir.ordinal() + offset, 3);
|
||||
this.safeRem = true;
|
||||
fillSpace(world, x, y, z, dir, o);
|
||||
this.safeRem = false;
|
||||
world.scheduleBlockUpdate(x, y, z, this, 1);
|
||||
world.scheduleBlockUpdate(x, y, z, this, 2);
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
z = z + dir.offsetZ * o;
|
||||
|
||||
int[][][] layout = TileEntityITERStruct.collisionMask;
|
||||
|
||||
for(int iy = 0; iy < 5; iy++) {
|
||||
|
||||
int l = iy > 2 ? 4 - iy : iy;
|
||||
int[][] layer = layout[l];
|
||||
|
||||
for(int ix = 0; ix < layer.length; ix++) {
|
||||
|
||||
for(int iz = 0; iz < layer.length; iz++) {
|
||||
|
||||
int ex = ix - layer.length / 2;
|
||||
int ez = iz - layer.length / 2;
|
||||
|
||||
if(ex == 0 && y == 2 && ez == 0)
|
||||
continue;
|
||||
|
||||
if(!world.getBlock(x + ex, y + iy, z + ez).canPlaceBlockAt(world, x + ex, y + iy, z + ez)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
z = z + dir.offsetZ * o;
|
||||
|
||||
int[][][] layout = TileEntityITERStruct.collisionMask;
|
||||
|
||||
for(int iy = 0; iy < 5; iy++) {
|
||||
|
||||
int l = iy > 2 ? 4 - iy : iy;
|
||||
int[][] layer = layout[l];
|
||||
|
||||
for(int ix = 0; ix < layer.length; ix++) {
|
||||
|
||||
for(int iz = 0; iz < layer[0].length; iz++) {
|
||||
|
||||
int ex = ix - layer.length / 2;
|
||||
int ez = iz - layer.length / 2;
|
||||
|
||||
int meta = 0;
|
||||
|
||||
if(iy < 2) {
|
||||
meta = ForgeDirection.DOWN.ordinal();
|
||||
} else if(iy > 2) {
|
||||
meta = ForgeDirection.UP.ordinal();
|
||||
} else if(ex < 0) {
|
||||
meta = ForgeDirection.WEST.ordinal();
|
||||
} else if(ex > 0) {
|
||||
meta = ForgeDirection.EAST.ordinal();
|
||||
} else if(ez < 0) {
|
||||
meta = ForgeDirection.NORTH.ordinal();
|
||||
} else if(ez > 0) {
|
||||
meta = ForgeDirection.SOUTH.ordinal();
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(layout[l][ix][iz] > 0)
|
||||
world.setBlock(x + ex, y + iy, z + ez, this, meta, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 8;
|
||||
return 7;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@ -10,7 +10,7 @@ import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.entity.effect.EntityEMPBlast;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.entity.logic.EntityEMP;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@ -1,36 +1,54 @@
|
||||
package com.hbm.entity.mob.sodtekhnologiyah;
|
||||
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityBallsOTronBase extends EntityWormBase {
|
||||
public abstract class EntityBallsOTronBase extends EntityWormBase {
|
||||
|
||||
public int attackCounter = 0;
|
||||
|
||||
protected final IEntitySelector selector = new IEntitySelector() {
|
||||
|
||||
@Override
|
||||
public boolean isEntityApplicable(Entity ent) {
|
||||
|
||||
if(ent instanceof EntityWormBase && ((EntityWormBase)ent).getUniqueWormID() == EntityBallsOTronBase.this.getUniqueWormID())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
public EntityBallsOTronBase(World world) {
|
||||
super(world);
|
||||
this.setSize(2.0F, 2.0F);
|
||||
this.isImmuneToFire = true;
|
||||
this.isAirBorne = true;
|
||||
this.noClip = true;
|
||||
this.renderDistanceWeight = 15.0D;
|
||||
this.dragInAir = 0.995F;
|
||||
this.dragInGround = 0.98F;
|
||||
this.knockbackDivider = 1.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeadID() {
|
||||
return 0;
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(5000.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPartID() {
|
||||
return 0;
|
||||
}
|
||||
protected boolean isAIEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsHead() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPartID(int id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeadID(int id) {
|
||||
|
||||
}
|
||||
|
||||
protected boolean canDespawn() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.mob.sodtekhnologiyah;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.world.World;
|
||||
@ -21,4 +22,9 @@ public class EntityBallsOTronHead extends EntityBallsOTronBase implements IBossD
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttackStrength(Entity target) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,19 @@
|
||||
package com.hbm.entity.mob.sodtekhnologiyah;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityBallsOTronSegment extends EntityBallsOTronBase {
|
||||
|
||||
private WormMovementBody movement = new WormMovementBody(this);
|
||||
|
||||
public EntityBallsOTronSegment(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttackStrength(Entity target) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ public abstract class EntityWormBase extends EntityBurrowing {
|
||||
protected double maxSpeed;
|
||||
protected double fallSpeed;
|
||||
protected double rangeForParts;
|
||||
protected EntityWormBase followed;
|
||||
protected EntityLivingBase followed;
|
||||
protected int surfaceY;
|
||||
private int uniqueWormID;
|
||||
private int partID;
|
||||
|
||||
@ -1,5 +1,66 @@
|
||||
package com.hbm.entity.mob.sodtekhnologiyah;
|
||||
|
||||
public class WormMovementBody {
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class WormMovementBody {
|
||||
private EntityWormBase user;
|
||||
|
||||
public WormMovementBody(EntityWormBase par1) {
|
||||
this.user = par1;
|
||||
}
|
||||
|
||||
protected void updateMovement() {
|
||||
double var9 = 128.0D;
|
||||
if((this.user.targetedEntity != null) && (this.user.targetedEntity.getDistanceSqToEntity(this.user) < var9 * var9)) {
|
||||
this.user.waypointX = this.user.targetedEntity.posX;
|
||||
this.user.waypointY = this.user.targetedEntity.posY;
|
||||
this.user.waypointZ = this.user.targetedEntity.posZ;
|
||||
}
|
||||
if(((this.user.ticksExisted % 60 == 0) || (this.user.ticksExisted == 1))
|
||||
&& ((this.user.targetedEntity == null) || (this.user.followed == null))) {
|
||||
findEntityToFollow(this.user.worldObj.selectEntitiesWithinAABB(EntityLiving.class,
|
||||
this.user.boundingBox.expand(this.user.rangeForParts, this.user.rangeForParts, this.user.rangeForParts),
|
||||
EntityWormBase.wormSelector));
|
||||
}
|
||||
double var1 = this.user.waypointX - this.user.posX;
|
||||
double var3 = this.user.waypointY - this.user.posY;
|
||||
double var5 = this.user.waypointZ - this.user.posZ;
|
||||
double var7 = var1 * var1 + var3 * var3 + var5 * var5;
|
||||
|
||||
var7 = MathHelper.sqrt_double(var7);
|
||||
if(this.user.targetedEntity != null) {
|
||||
this.user.faceEntity(this.user.targetedEntity, 180.0F, 180.0F);
|
||||
}
|
||||
this.user.bodySpeed = Math.max(0.0D, Math.min(var7 - this.user.segmentDistance, this.user.maxBodySpeed));
|
||||
if(var7 < this.user.segmentDistance * 0.895D) {
|
||||
this.user.motionX *= 0.8D;
|
||||
this.user.motionY *= 0.8D;
|
||||
this.user.motionZ *= 0.8D;
|
||||
} else {
|
||||
this.user.motionX = (var1 / var7 * this.user.bodySpeed);
|
||||
this.user.motionY = (var3 / var7 * this.user.bodySpeed);
|
||||
this.user.motionZ = (var5 / var7 * this.user.bodySpeed);
|
||||
}
|
||||
}
|
||||
|
||||
protected void findEntityToFollow(List<EntityWormBase> par1List) {
|
||||
for(EntityWormBase var3 : par1List) {
|
||||
if(var3.getUniqueWormID() == this.user.getUniqueWormID()) {
|
||||
if(var3.getIsHead()) {
|
||||
if(this.user.getPartID() == 0) {
|
||||
this.user.targetedEntity = ((Entity) var3);
|
||||
}
|
||||
this.user.followed = ((EntityLivingBase) var3);
|
||||
} else if(var3.getPartID() == this.user.getPartID() - 1) {
|
||||
this.user.targetedEntity = ((Entity) var3);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.user.didCheck = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ public class FluidTypeHandler {
|
||||
STEAM (0xe5e5e5, 9, 2, 1, 3, 0, 0, EnumSymbol.NONE, "hbmfluid.steam", true, false, false),
|
||||
HOTSTEAM (0xE7D6D6, 1, 1, 2, 4, 0, 0, EnumSymbol.NONE, "hbmfluid.hotsteam", true, false, false),
|
||||
SUPERHOTSTEAM (0xE7B7B7, 2, 1, 2, 4, 0, 0, EnumSymbol.NONE, "hbmfluid.superhotsteam", true, false, false),
|
||||
ULTRAHOTSTEAM (0xE39393, 13, 1, 2, 4, 0, 0, EnumSymbol.NONE, "hbmfluid.ultrahotsteam", true, false, false),
|
||||
COOLANT (0xd8fcff, 2, 1, 1, 1, 0, 0, EnumSymbol.NONE, "hbmfluid.coolant"),
|
||||
|
||||
LAVA (0xFF3300, 3, 1, 1, 4, 0, 0, EnumSymbol.NOWATER, "hbmfluid.lava", true, false, false),
|
||||
|
||||
@ -878,6 +878,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_iter:
|
||||
{
|
||||
if(entity instanceof TileEntityITER)
|
||||
{
|
||||
return new ContainerITER(player.inventory, (TileEntityITER) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//NON-TE CONTAINERS
|
||||
@ -1755,6 +1764,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_iter:
|
||||
{
|
||||
if(entity instanceof TileEntityITER)
|
||||
{
|
||||
return new GUIITER(player.inventory, (TileEntityITER) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//ITEM GUIS
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.inventory.CentrifugeRecipes;
|
||||
import com.hbm.inventory.CrystallizerRecipes;
|
||||
import com.hbm.inventory.ShredderRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.IItemAbility;
|
||||
@ -30,6 +31,7 @@ public abstract class ToolAbility {
|
||||
public abstract void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, IItemAbility tool);
|
||||
public abstract String getName();
|
||||
public abstract String getFullName();
|
||||
public abstract String getExtension();
|
||||
|
||||
public static class RecursionAbility extends ToolAbility {
|
||||
|
||||
@ -125,7 +127,12 @@ public abstract class ToolAbility {
|
||||
|
||||
@Override
|
||||
public String getFullName() {
|
||||
return I18n.format(getName()) + " (" + radius + ")";
|
||||
return I18n.format(getName()) + getExtension();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return " (" + radius + ")";
|
||||
}
|
||||
|
||||
}
|
||||
@ -161,7 +168,12 @@ public abstract class ToolAbility {
|
||||
|
||||
@Override
|
||||
public String getFullName() {
|
||||
return I18n.format(getName()) + " (" + range + ")";
|
||||
return I18n.format(getName()) + getExtension();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return " (" + range + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,6 +205,11 @@ public abstract class ToolAbility {
|
||||
public String getFullName() {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static class LuckAbility extends ToolAbility {
|
||||
@ -227,7 +244,12 @@ public abstract class ToolAbility {
|
||||
|
||||
@Override
|
||||
public String getFullName() {
|
||||
return I18n.format(getName()) + " (" + luck + ")";
|
||||
return I18n.format(getName()) + getExtension();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return " (" + luck + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,6 +280,11 @@ public abstract class ToolAbility {
|
||||
public String getFullName() {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static class ShredderAbility extends ToolAbility {
|
||||
@ -287,6 +314,11 @@ public abstract class ToolAbility {
|
||||
public String getFullName() {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static class CentrifugeAbility extends ToolAbility {
|
||||
@ -311,6 +343,11 @@ public abstract class ToolAbility {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "tool.ability.centrifuge";
|
||||
@ -321,4 +358,38 @@ public abstract class ToolAbility {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static class CrystallizerAbility extends ToolAbility {
|
||||
|
||||
@Override
|
||||
public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, IItemAbility tool) {
|
||||
|
||||
//a band-aid on a gaping wound
|
||||
if(block == Blocks.lit_redstone_ore)
|
||||
block = Blocks.redstone_ore;
|
||||
|
||||
ItemStack stack = new ItemStack(block, 1, meta);
|
||||
ItemStack result = CrystallizerRecipes.getOutput(stack);
|
||||
|
||||
if(result != null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, result.copy()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtension() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "tool.ability.crystallizer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFullName() {
|
||||
return I18n.format(getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
82
src/main/java/com/hbm/inventory/container/ContainerITER.java
Normal file
@ -0,0 +1,82 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityITER;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerITER extends Container {
|
||||
|
||||
private TileEntityITER iter;
|
||||
|
||||
public ContainerITER(InventoryPlayer invPlayer, TileEntityITER tedf) {
|
||||
|
||||
iter = tedf;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 107, 108));
|
||||
//Breeder In
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 18));
|
||||
//Breeder Out
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 62, 18));
|
||||
//Plasma Shield
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 98, 18));
|
||||
//Byproduct
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 134, 18));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return iter.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
79
src/main/java/com/hbm/inventory/gui/GUIITER.java
Normal file
@ -0,0 +1,79 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerITER;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityITER;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIITER extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_fusion_multiblock.png");
|
||||
private TileEntityITER iter;
|
||||
|
||||
public GUIITER(InventoryPlayer invPlayer, TileEntityITER laser) {
|
||||
super(new ContainerITER(invPlayer, laser));
|
||||
this.iter = laser;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 71, guiTop + 108, 34, 16, iter.power, iter.maxPower);
|
||||
|
||||
iter.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 54, 16, 52); //Water
|
||||
iter.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 54, 16, 52); //Steam
|
||||
iter.plasma.renderTankInfo(this, mouseX, mouseY, guiLeft + 71, guiTop + 54, 52, 52); //Plasma
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 52 <= x && guiLeft + 52 + 18 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) {
|
||||
|
||||
//toggle the magnets
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(iter.xCoord, iter.yCoord, iter.zCoord, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.iter.hasCustomInventoryName() ? this.iter.getInventoryName() : I18n.format(this.iter.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
//TODO: progress bars and button
|
||||
|
||||
for(int t = 0; t < 2; t++) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(iter.tanks[t].getSheet());
|
||||
iter.tanks[t].renderTank(this, guiLeft + 26 + 108 * t, guiTop + 106, iter.tanks[t].getTankType().textureX() * FluidTank.x, iter.tanks[t].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(iter.plasma.getSheet());
|
||||
iter.plasma.renderTank(this, guiLeft + 71, guiTop + 88, iter.plasma.getTankType().textureX() * FluidTank.x, iter.plasma.getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
iter.plasma.renderTank(this, guiLeft + 71 + 16, guiTop + 88, iter.plasma.getTankType().textureX() * FluidTank.x, iter.plasma.getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
iter.plasma.renderTank(this, guiLeft + 71 + 32, guiTop + 88, iter.plasma.getTankType().textureX() * FluidTank.x, iter.plasma.getTankType().textureY() * FluidTank.y, 2, 52);
|
||||
}
|
||||
}
|
||||
@ -1642,6 +1642,8 @@ public class ModItems {
|
||||
public static Item smashing_hammer;
|
||||
public static Item centri_stick;
|
||||
public static Item drax;
|
||||
public static Item drax_mk2;
|
||||
public static Item drax_mk3;
|
||||
|
||||
public static Item matchstick;
|
||||
public static Item balefire_and_steel;
|
||||
@ -3727,11 +3729,33 @@ public class ModItems {
|
||||
smashing_hammer = new ItemToolAbility(12F, -0.1, MainRegistry.tMatSteel, EnumToolType.MINER)
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility()).setMaxDamage(2500).setUnlocalizedName("smashing_hammer").setTextureName(RefStrings.MODID + ":smashing_hammer");
|
||||
drax = new ItemToolAbilityPower(15F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 500000000, 100000, 5000)
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.addBreakAbility(new ToolAbility.LuckAbility(2))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("drax").setTextureName(RefStrings.MODID + ":drax");
|
||||
drax_mk2 = new ItemToolAbilityPower(20F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 1000000000, 250000, 7500)
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.addBreakAbility(new ToolAbility.CentrifugeAbility())
|
||||
.addBreakAbility(new ToolAbility.LuckAbility(3))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(3))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5)).setUnlocalizedName("drax").setTextureName(RefStrings.MODID + ":drax");
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(7)).setUnlocalizedName("drax_mk2").setTextureName(RefStrings.MODID + ":drax_mk2");
|
||||
drax_mk3 = new ItemToolAbilityPower(20F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 2500000000L, 500000, 10000)
|
||||
.addBreakAbility(new ToolAbility.SmelterAbility())
|
||||
.addBreakAbility(new ToolAbility.ShredderAbility())
|
||||
.addBreakAbility(new ToolAbility.CentrifugeAbility())
|
||||
.addBreakAbility(new ToolAbility.CrystallizerAbility())
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.LuckAbility(4))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(1))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(3))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(4))
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(9)).setUnlocalizedName("drax_mk3").setTextureName(RefStrings.MODID + ":drax_mk3");
|
||||
|
||||
mask_of_infamy = new MaskOfInfamy(ArmorMaterial.IRON, 8, 0).setUnlocalizedName("mask_of_infamy").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_of_infamy");
|
||||
|
||||
@ -5422,6 +5446,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(smashing_hammer, smashing_hammer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(centri_stick, centri_stick.getUnlocalizedName());
|
||||
GameRegistry.registerItem(drax, drax.getUnlocalizedName());
|
||||
GameRegistry.registerItem(drax_mk2, drax_mk2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(drax_mk3, drax_mk3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(matchstick, matchstick.getUnlocalizedName());
|
||||
GameRegistry.registerItem(balefire_and_steel, balefire_and_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crowbar, crowbar.getUnlocalizedName());
|
||||
|
||||
@ -294,7 +294,7 @@ public class ItemToolAbility extends ItemTool implements IItemAbility {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentText("[Enabled ")
|
||||
.appendSibling(new ChatComponentTranslation(getCurrentAbility(stack).getName(), new Object[0]))
|
||||
.appendSibling(new ChatComponentText("]")));
|
||||
.appendSibling(new ChatComponentText(getCurrentAbility(stack).getExtension() + "]")));
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText("[Tool ability deactivated]"));
|
||||
}
|
||||
|
||||
@ -170,6 +170,8 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITERStruct.class, new RenderITERMultiblock());
|
||||
//ITER
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
||||
//doors
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
|
||||
|
||||
@ -1210,6 +1210,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_plate, 1), new Object[] { "ECE", "EEE", "EEE", 'E', ModItems.ingot_starmetal, 'C', ModItems.cobalt_plate });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_legs, 1), new Object[] { "EEE", "ECE", "E E", 'E', ModItems.ingot_starmetal, 'C', ModItems.cobalt_legs });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_boots, 1), new Object[] { "E E", "ECE", 'E', ModItems.ingot_starmetal, 'C', ModItems.cobalt_boots });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.drax, 1), new Object[] { "BCF", "DDM", "BCC", 'B', ModItems.blades_advanced_alloy, 'C', "ingotCobalt", 'F', ItemBattery.getFullBattery(ModItems.fusion_core), 'D', "ingotDesh", 'M', ModItems.motor }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_boost, 1), new Object[] { "PTP", "SLS", "W W", 'P', "plateSteel", 'T', ModItems.tank_steel, 'S', ModItems.pipes_steel, 'L', Items.leather, 'W', ModItems.thruster_small }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_fly, 1), new Object[] { "PTP", "SLS", "W W", 'P', "plateSteel", 'T', ModItems.cap_aluminium, 'S', ModItems.pipes_steel, 'L', ModItems.jetpack_boost, 'W', ModItems.thruster_small }));
|
||||
|
||||
@ -60,7 +60,7 @@ public class ItemRenderShim implements IItemRenderer {
|
||||
GL11.glTranslatef(0.45F, -0.3F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.stopsign || item.getItem() == ModItems.sopsign) {
|
||||
if(item.getItem() == ModItems.stopsign || item.getItem() == ModItems.sopsign || item.getItem() == ModItems.chernobylsign) {
|
||||
GL11.glRotatef(45.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(0.35F, 0.35F, 0.35F);
|
||||
GL11.glTranslatef(2.0F, -2.0F, 0.0F);
|
||||
|
||||
71
src/main/java/com/hbm/render/tileentity/RenderITER.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityITER;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderITER extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y - 2, (float)z + 0.5F);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.iter_glass);
|
||||
ResourceManager.iter.renderPart("Windows");
|
||||
bindTexture(ResourceManager.iter_motor);
|
||||
ResourceManager.iter.renderPart("Motors");
|
||||
bindTexture(ResourceManager.iter_rails);
|
||||
ResourceManager.iter.renderPart("Rails");
|
||||
bindTexture(ResourceManager.iter_toroidal);
|
||||
ResourceManager.iter.renderPart("Toroidal");
|
||||
bindTexture(ResourceManager.iter_torus);
|
||||
ResourceManager.iter.renderPart("Torus");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(System.currentTimeMillis() / 5D % 360, 0, 1, 0);
|
||||
bindTexture(ResourceManager.iter_solenoid);
|
||||
ResourceManager.iter.renderPart("Solenoid");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(System.currentTimeMillis() / 50D % 360, 0, 1, 0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
int color = ((TileEntityITER)te).plasma.getTankType().getColor();
|
||||
|
||||
int r = ((color & 0xFF0000) >> 16) / 2;
|
||||
int g = ((color & 0xFF00) >> 8) / 2;
|
||||
int b = (color & 0xFF) / 2;
|
||||
|
||||
GL11.glColor3b((byte) r, (byte) g, (byte) b);
|
||||
|
||||
bindTexture(ResourceManager.iter_plasma);
|
||||
ResourceManager.iter.renderPart("Plasma");
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -27,32 +27,6 @@ public class RenderITERMultiblock extends TileEntitySpecialRenderer {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
/*GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.iter_glass);
|
||||
ResourceManager.iter.renderPart("Windows");
|
||||
bindTexture(ResourceManager.iter_motor);
|
||||
ResourceManager.iter.renderPart("Motors");
|
||||
bindTexture(ResourceManager.iter_rails);
|
||||
ResourceManager.iter.renderPart("Rails");
|
||||
bindTexture(ResourceManager.iter_toroidal);
|
||||
ResourceManager.iter.renderPart("Toroidal");
|
||||
bindTexture(ResourceManager.iter_torus);
|
||||
ResourceManager.iter.renderPart("Torus");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(System.currentTimeMillis() / 5D % 360, 0, 1, 0);
|
||||
bindTexture(ResourceManager.iter_solenoid);
|
||||
ResourceManager.iter.renderPart("Solenoid");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(System.currentTimeMillis() / 50D % 360, 0, 1, 0);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
bindTexture(ResourceManager.iter_plasma);
|
||||
ResourceManager.iter.renderPart("Plasma");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();*/
|
||||
|
||||
ResourceLocation magnet = IconUtil.getTextureFromBlockAndSide(ModBlocks.fusion_conductor, 2);
|
||||
ResourceLocation solenoid = IconUtil.getTextureFromBlockAndSide(ModBlocks.fusion_center, 2);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
@ -7,109 +8,166 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityITER extends TileEntityMachineBase implements IConsumer, IFluidAcceptor, IFluidSource {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000000;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
public FluidTank plasma;
|
||||
|
||||
public TileEntityITER() {
|
||||
super(1);
|
||||
// TODO Auto-generated constructor stub
|
||||
super(5);
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(FluidType.WATER, 128000, 0);
|
||||
tanks[1] = new FluidTank(FluidType.ULTRAHOTSTEAM, 128000, 0);
|
||||
plasma = new FluidTank(FluidType.PLASMA_DT, 16000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineITER";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
age++;
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if (age == 9 || age == 19)
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
this.power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else if (type.name().equals(tanks[2].getTankType().name()))
|
||||
return tanks[2].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
fillFluid(xCoord, yCoord - 3, zCoord, getTact(), type);
|
||||
fillFluid(xCoord, yCoord + 3, zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
// TODO Auto-generated method stub
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
// TODO Auto-generated method stub
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
// TODO Auto-generated method stub
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord + 0.5 - 8,
|
||||
yCoord + 0.5 - 3,
|
||||
zCoord + 0.5 - 8,
|
||||
xCoord + 0.5 + 8,
|
||||
yCoord + 0.5 + 3,
|
||||
zCoord + 0.5 + 8
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +1,19 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineITER;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityITERStruct extends TileEntity {
|
||||
|
||||
public static int[][][] layout = new int[][][] {
|
||||
public static final int[][][] layout = new int[][][] {
|
||||
|
||||
new int[][] {
|
||||
new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
@ -62,6 +68,61 @@ public class TileEntityITERStruct extends TileEntity {
|
||||
}
|
||||
};
|
||||
|
||||
public static final int[][][] collisionMask = new int[][][] {
|
||||
|
||||
new int[][] {
|
||||
new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
new int[] {0,0,0,0,0,1,1,1,1,1,0,0,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,1,1,0,0,0,0,0,1,1,0,0,0},
|
||||
new int[] {0,0,1,1,0,0,0,0,0,0,0,1,1,0,0},
|
||||
new int[] {0,1,1,0,0,0,0,0,0,0,0,0,1,1,0},
|
||||
new int[] {0,1,1,0,0,0,0,0,0,0,0,0,1,1,0},
|
||||
new int[] {0,1,1,0,0,0,0,3,0,0,0,0,1,1,0},
|
||||
new int[] {0,1,1,0,0,0,0,0,0,0,0,0,1,1,0},
|
||||
new int[] {0,1,1,0,0,0,0,0,0,0,0,0,1,1,0},
|
||||
new int[] {0,0,1,1,0,0,0,0,0,0,0,1,1,0,0},
|
||||
new int[] {0,0,0,1,1,0,0,0,0,0,1,1,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,0,0,1,1,1,1,1,0,0,0,0,0},
|
||||
new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
},
|
||||
new int[][] {
|
||||
new int[] {0,0,0,0,0,0,1,1,1,0,0,0,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||
new int[] {0,0,1,1,1,1,1,1,1,1,1,1,1,0,0},
|
||||
new int[] {0,1,1,1,1,0,2,2,2,0,1,1,1,1,0},
|
||||
new int[] {0,1,1,1,0,2,0,0,0,2,0,1,1,1,0},
|
||||
new int[] {1,1,1,1,2,0,0,0,0,0,2,1,1,1,1},
|
||||
new int[] {1,1,1,1,2,0,0,3,0,0,2,1,1,1,1},
|
||||
new int[] {1,1,1,1,2,0,0,0,0,0,2,1,1,1,1},
|
||||
new int[] {0,1,1,1,0,2,0,0,0,2,0,1,1,1,0},
|
||||
new int[] {0,1,1,1,1,0,2,2,2,0,1,1,1,1,0},
|
||||
new int[] {0,0,1,1,1,1,1,1,1,1,1,1,1,0,0},
|
||||
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,0,0,0,1,1,1,0,0,0,0,0,0}
|
||||
},
|
||||
new int[][] {
|
||||
new int[] {0,0,0,0,0,0,1,1,1,0,0,0,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||
new int[] {0,0,1,1,1,1,1,1,1,1,1,1,1,0,0},
|
||||
new int[] {0,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
|
||||
new int[] {0,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
|
||||
new int[] {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
|
||||
new int[] {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
|
||||
new int[] {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
|
||||
new int[] {0,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
|
||||
new int[] {0,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
|
||||
new int[] {0,0,1,1,1,1,1,1,1,1,1,1,1,0,0},
|
||||
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||
new int[] {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0},
|
||||
new int[] {0,0,0,0,0,0,1,1,1,0,0,0,0,0,0}
|
||||
}
|
||||
};
|
||||
|
||||
int age;
|
||||
|
||||
@Override
|
||||
@ -76,6 +137,40 @@ public class TileEntityITERStruct extends TileEntity {
|
||||
return;
|
||||
|
||||
age = 0;
|
||||
|
||||
for(int y = 0; y < 5; y++) {
|
||||
for(int x = 0; x < layout[0].length; x++) {
|
||||
for(int z = 0; z < layout[0][0].length; z++) {
|
||||
|
||||
int ly = y > 2 ? 4 - y : y;
|
||||
|
||||
int width = 7;
|
||||
|
||||
if(x == width && y == 0 && z == width)
|
||||
continue;
|
||||
|
||||
int b = layout[ly][x][z];
|
||||
Block block = worldObj.getBlock(xCoord + x - width, yCoord + y, zCoord + z - width);
|
||||
|
||||
switch(b) {
|
||||
case 1: if(block != ModBlocks.fusion_conductor) { return; } break;
|
||||
case 2: if(block != ModBlocks.fusion_center) { return; } break;
|
||||
case 3: if(block != ModBlocks.fusion_motor) { return; } break;
|
||||
case 4: if(block != ModBlocks.reinforced_glass) { return; } break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = -2; x <= 2; x++)
|
||||
for(int y = 1; y <= 3; y++)
|
||||
for(int z = -2; z <= 2; z++)
|
||||
worldObj.setBlockToAir(xCoord + x, yCoord + y, zCoord + z);
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
worldObj.setBlock(xCoord, yCoord + 2, zCoord, ModBlocks.iter, 12, 3);
|
||||
((MachineITER)ModBlocks.iter).fillSpace(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UNKNOWN, 0);
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -279,7 +279,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
if(b == ModBlocks.oil_pipe)
|
||||
continue;
|
||||
|
||||
if(b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) {
|
||||
if((b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) && !(b == ModBlocks.ore_oil || b == ModBlocks.ore_oil_empty)) {
|
||||
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
||||
|
||||
//Code 2: The drilling ended
|
||||
@ -287,7 +287,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
warning = 2;
|
||||
break;
|
||||
|
||||
} else if((b == ModBlocks.ore_oil || b == ModBlocks.ore_oil_empty) && this.tanks[0].getFill() < this.tanks[0].getMaxFill() && this.tanks[1].getFill() < this.tanks[1].getMaxFill()) {
|
||||
} else if(this.tanks[0].getFill() < this.tanks[0].getMaxFill() && this.tanks[1].getFill() < this.tanks[1].getMaxFill()) {
|
||||
if(succ(this.xCoord, i, this.zCoord)) {
|
||||
|
||||
this.tanks[0].setFill(this.tanks[0].getFill() + 500);
|
||||
|
||||
@ -282,7 +282,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
||||
if(b == ModBlocks.oil_pipe)
|
||||
continue;
|
||||
|
||||
if(b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) {
|
||||
if((b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) && !(b == ModBlocks.ore_oil || b == ModBlocks.ore_oil_empty)) {
|
||||
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
||||
|
||||
//Code 2: The drilling ended
|
||||
@ -290,7 +290,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
||||
warning = 2;
|
||||
break;
|
||||
|
||||
} else if((b == ModBlocks.ore_oil || b == ModBlocks.ore_oil_empty) && this.tanks[0].getFill() < this.tanks[0].getMaxFill() && this.tanks[1].getFill() < this.tanks[1].getMaxFill()) {
|
||||
} else if(this.tanks[0].getFill() < this.tanks[0].getMaxFill() && this.tanks[1].getFill() < this.tanks[1].getMaxFill()) {
|
||||
if(succ(this.xCoord, i, this.zCoord)) {
|
||||
|
||||
this.tanks[0].setFill(this.tanks[0].getFill() + 650);
|
||||
|
||||
@ -8,8 +8,8 @@ import com.hbm.interfaces.Untested;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable;
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||