mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
post merge fixes, radar-launchable custom missiles, more stuff
This commit is contained in:
parent
f84696714a
commit
8fac493947
54
changelog
54
changelog
@ -1,52 +1,12 @@
|
|||||||
## Added
|
## Added
|
||||||
* Nitra
|
* Doors!
|
||||||
* Dropped by the painsaw ability when killing a mob
|
* Your favorites from 1.12, the 7 remaining doors have finally been ported
|
||||||
* Can be used to quickly craft standard ammo types in the 2x2 crafting grid
|
* Thanks to KoblizekXD for biting the bullet
|
||||||
* Can also refill empty syringes, making stimpaks
|
|
||||||
* Latex
|
|
||||||
* Can be made from dandelions or from pressing jungle wood
|
|
||||||
* Replaces insulator in many recipes where electrical insulation that is potentially made from brick doesn't make sense, like rubber gas masks, jackets, tools and so on
|
|
||||||
* Latex is interchangable with rubber in all recipes where it's used, but not the other way round
|
|
||||||
* The old insulator is now mainly used for electrical and heat insulation as well as PWR rods
|
|
||||||
* Radar screen
|
|
||||||
* Radars can be linked to one radar screen, which will display all detected blips
|
|
||||||
* Right-clicking the radar screen will open the GUI of the radar that it is linked to
|
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Light oil and cracked light oil can now be reformed into large quantities of aromatic hydrocarbons a well as some reformate gas
|
* Reduced the blast resistance of the large doors from absurdly high to still very but not quite as high
|
||||||
* The painsaw ability no longer drops ammo and syringes, instead it drops nitra
|
* Custom missiles are now launchable using the radar
|
||||||
* Radars have been completely rewritten
|
* NTM's structures should no longer spawn in dimensions besides the overworld. Ores will still generate, assuming the config option is set.
|
||||||
* Dots will now move smoothly across the screen, instead of jittering and being bound to the pixel grid
|
|
||||||
* Radars no longer use CPU-intensive full scans of the map, instead of using an optimized search for nearby scannable entities
|
|
||||||
* There's now a dedicated toggle for detecting artillery shells
|
|
||||||
* Radars now have a local area map that can be enabled
|
|
||||||
* The map scans up to 100 points per tick, the display can show 40,000 points
|
|
||||||
* The map will scan loaded chunks instantly, unloaded chunks have a limit 10 chunkloads per tick to prevent excessive lag. Chunks that have not yet been generated yet will show up as black spots, and will never be loaded
|
|
||||||
* The chunk load limit as well as whether chunks should be generated can be adjusted in the machine config file
|
|
||||||
* The map will show terrain height between Y:50 and Y:128, anything outside that range is truncated
|
|
||||||
* Radars now have a second GUI which allows the use of a battery, as well as linking the radar to other machines
|
|
||||||
* By using the number keys, the radar can now launch missiles, ABMs or artillery at the current aimed at position
|
|
||||||
* Radars can be linked to one additional radar screen which shows part of the radar's GUI in-world
|
|
||||||
* The turbofan's afterburner now adds a 33% efficiency bonus for every level. This means that instead of the efficiency remaining constant between levels, a tier 3 upgrade will yield double efficiency.
|
|
||||||
* Reduced the flarestack's base energy efficiency
|
|
||||||
* Trenchmaster armor is now unbreakable
|
|
||||||
* The arc welder recipe for advanced circuits now uses simple insulator instead of gold dust
|
|
||||||
* The arc welder recipes for enhanced and advanced circuits now use only 100mB of fluid instead of 250mB
|
|
||||||
* Completely rewrote the missile base code, missiles now accelerate smoothly instead of in increments and use interpolated movement, making them less jittery
|
|
||||||
* Missiles now have a slightly higher top-speed
|
|
||||||
* Remodeled tier 1, 2 and 3 missiles as well as the anti-ballistic missile
|
|
||||||
* Anti-ballistic missiles now use predictive targeting as well as a heightened sensor range of 1,000 blocks (instead of 500) which should make them a lot more effective
|
|
||||||
* Anti-ballistic missiles accelerate 4x faster than normal missiles and have a 50% higher top-speed
|
|
||||||
* Anti-ballistic missiles can now load their own chunks, allowing them to get to far away incoming missiles without getting stuck
|
|
||||||
* PWRs that have recently been close to unloaded chunks now have a 40 tick timeframe where they are "frozen", only trying to connect to a fluid network but not doing any fission, this should reduce the amount of meltdowns caused by chunkloading
|
|
||||||
* Glyphid hive blocks now have some color variance
|
|
||||||
* Glpyhid spawners now have a unique texture
|
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed thorium bedrock ore using the wrong ore dict key, making it unable to be processed via centrifuge or acidizer
|
* Fixed ancient bug where custom missiles launched using the launch table would not use the accuracy calculation and always be pin-point accurate
|
||||||
* Fixed custom machine NEI slots going out of bounds after the third slot
|
|
||||||
* Fixed bismuth billets not being oredicted, making BFB PWR rods uncraftable
|
|
||||||
* Fixed missile chunkloading having rounding issues, sometimes causing them to get stuck in unloaded chunks while crossing chunk borders
|
|
||||||
* Fixed drones not being listed in the creative tabs
|
|
||||||
* Fixed pre-defined fluid duct items not being being able to be placed where replacable blocks are, eg. water
|
|
||||||
* Fixed horrible gamebreaking bug where the reinforced glass pane has too much blast resistance
|
|
||||||
@ -2144,20 +2144,19 @@ public class ModBlocks {
|
|||||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||||
|
|
||||||
vault_door = new VaultDoor(Material.iron).setBlockName("vault_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
vault_door = new VaultDoor(Material.iron).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||||
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
||||||
|
|
||||||
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(150.0F).setResistance(7500.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(10.0F).setResistance(750.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
||||||
|
fire_door = new BlockDoorGeneric(Material.iron, DoorDecl.FIRE_DOOR).setBlockName("fire_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fire_door");
|
||||||
fire_door = new BlockDoorGeneric(Material.iron, DoorDecl.FIRE_DOOR).setBlockName("fire_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fire_door");
|
transition_seal = new BlockDoorGeneric(Material.iron, DoorDecl.TRANSITION_SEAL).setBlockName("transition_seal").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":transition_seal");
|
||||||
transition_seal = new BlockDoorGeneric(Material.iron, DoorDecl.TRANSITION_SEAL).setBlockName("transition_seal").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":transition_seal");
|
secure_access_door = new BlockDoorGeneric(Material.iron, DoorDecl.SECURE_ACCESS_DOOR).setBlockName("secure_access_door").setHardness(20.0F).setResistance(2_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
secure_access_door = new BlockDoorGeneric(Material.iron, DoorDecl.SECURE_ACCESS_DOOR).setBlockName("secure_access_door").setHardness(200.0F).setResistance(20000.0F).setCreativeTab(MainRegistry.machineTab);
|
large_vehicle_door = new BlockDoorGeneric(Material.iron, DoorDecl.LARGE_VEHICLE_DOOR).setBlockName("large_vehicle_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
large_vehicle_door = new BlockDoorGeneric(Material.iron, DoorDecl.LARGE_VEHICLE_DOOR).setBlockName("large_vehicle_door").setHardness(100.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
qe_containment = new BlockDoorGeneric(Material.iron, DoorDecl.QE_CONTAINMENT).setBlockName("qe_containment").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
qe_containment = new BlockDoorGeneric(Material.iron, DoorDecl.QE_CONTAINMENT).setBlockName("qe_containment").setHardness(100.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
qe_sliding_door = new BlockDoorGeneric(Material.iron, DoorDecl.QE_SLIDING).setBlockName("qe_sliding_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
qe_sliding_door = new BlockDoorGeneric(Material.iron, DoorDecl.QE_SLIDING).setBlockName("qe_sliding_door").setHardness(100.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
round_airlock_door = new BlockDoorGeneric(Material.iron, DoorDecl.ROUND_AIRLOCK_DOOR).setBlockName("round_airlock_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
round_airlock_door = new BlockDoorGeneric(Material.iron, DoorDecl.ROUND_AIRLOCK_DOOR).setBlockName("round_airlock_door").setHardness(100.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
sliding_seal_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDING_SEAL_DOOR).setBlockName("sliding_seal_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
sliding_seal_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDING_SEAL_DOOR).setBlockName("sliding_seal_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
water_door = new BlockDoorGeneric(Material.iron, DoorDecl.WATER_DOOR).setBlockName("water_door").setHardness(5.0F).setResistance(50.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
water_door = new BlockDoorGeneric(Material.iron, DoorDecl.WATER_DOOR).setBlockName("water_door").setHardness(50.0F).setResistance(500.0F).setCreativeTab(MainRegistry.machineTab);
|
|
||||||
|
|
||||||
door_metal = new BlockModDoor(Material.iron).setBlockName("door_metal").setHardness(5.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":door_metal");
|
door_metal = new BlockModDoor(Material.iron).setBlockName("door_metal").setHardness(5.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":door_metal");
|
||||||
door_office = new BlockModDoor(Material.iron).setBlockName("door_office").setHardness(10.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":door_office");
|
door_office = new BlockModDoor(Material.iron).setBlockName("door_office").setHardness(10.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":door_office");
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public class CompactLauncher extends BlockContainer implements IMultiblock, IBom
|
|||||||
TileEntityCompactLauncher entity = (TileEntityCompactLauncher) world.getTileEntity(x, y, z);
|
TileEntityCompactLauncher entity = (TileEntityCompactLauncher) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(entity.canLaunch()) {
|
if(entity.canLaunch()) {
|
||||||
entity.launch();
|
entity.launchFromDesignator();
|
||||||
return BombReturnCode.LAUNCHED;
|
return BombReturnCode.LAUNCHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ public class LaunchTable extends BlockContainer implements IMultiblock, IBomb {
|
|||||||
TileEntityLaunchTable entity = (TileEntityLaunchTable) world.getTileEntity(x, y, z);
|
TileEntityLaunchTable entity = (TileEntityLaunchTable) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(entity.canLaunch()) {
|
if(entity.canLaunch()) {
|
||||||
entity.launch();
|
entity.launchFromDesignator();
|
||||||
return BombReturnCode.LAUNCHED;
|
return BombReturnCode.LAUNCHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.ICrafting;
|
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|||||||
@ -236,7 +236,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
enableDungeons = provider.hasDungeons;
|
enableDungeons = provider.hasDungeons;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GeneralConfig.enableDungeons && world.provider.isSurfaceWorld() && enableDungeons) {
|
if(GeneralConfig.enableDungeons && world.provider.dimensionId == 0 && enableDungeons) {
|
||||||
|
|
||||||
if(MobConfig.enableHives && rand.nextInt(MobConfig.hiveSpawn) == 0) {
|
if(MobConfig.enableHives && rand.nextInt(MobConfig.hiveSpawn) == 0) {
|
||||||
int x = i + rand.nextInt(16) + 8;
|
int x = i + rand.nextInt(16) + 8;
|
||||||
@ -670,7 +670,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
int x = i + rand.nextInt(16);
|
int x = i + rand.nextInt(16);
|
||||||
int z = j + rand.nextInt(16);
|
int z = j + rand.nextInt(16);
|
||||||
int y = world.getHeightValue(x, z) - rand.nextInt(10);
|
int y = world.getHeightValue(x, z) - rand.nextInt(10);
|
||||||
(new Meteorite()).generate(world, rand, x, y, z, false, false, false);
|
if(y > 1) (new Meteorite()).generate(world, rand, x, y, z, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GeneralConfig.enableNITAN) {
|
if (GeneralConfig.enableNITAN) {
|
||||||
|
|||||||
@ -2062,4 +2062,3 @@ public class ClientProxy extends ServerProxy {
|
|||||||
Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSoundRecord(new ResourceLocation(sound), volume, pitch, (float) x, (float) y, (float) z));
|
Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSoundRecord(new ResourceLocation(sound), volume, pitch, (float) x, (float) y, (float) z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,13 +5,11 @@ import com.hbm.animloader.Animation;
|
|||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
import com.hbm.render.loader.WavefrontObjDisplayList;
|
import com.hbm.render.loader.WavefrontObjDisplayList;
|
||||||
import com.hbm.sound.MovingSoundPlayerLoop;
|
|
||||||
import com.hbm.util.BobMathUtil;
|
import com.hbm.util.BobMathUtil;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.event.sound.SoundEvent;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public abstract class DoorDecl {
|
public abstract class DoorDecl {
|
||||||
@ -31,7 +29,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if (!partName.equals("base")) {
|
if(!partName.equals("base")) {
|
||||||
set(trans, 0, 3.5F * getNormTime(openTicks), 0);
|
set(trans, 0, 3.5F * getNormTime(openTicks), 0);
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
@ -57,14 +55,14 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges() {
|
public int[][] getDoorOpenRanges() {
|
||||||
//3 is tall
|
// 3 is tall
|
||||||
//4 is wide
|
// 4 is wide
|
||||||
return new int[][]{{-9, 2, 0, 20, 20, 1}};
|
return new int[][] { { -9, 2, 0, 20, 20, 1 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[]{23, 0, 0, 0, 13, 12};
|
return new int[] { 23, 0, 0, 0, 13, 12 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -122,7 +120,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if (!partName.equals("frame")) {
|
if(!partName.equals("frame")) {
|
||||||
set(trans, 0, 3 * getNormTime(openTicks), 0);
|
set(trans, 0, 3 * getNormTime(openTicks), 0);
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
@ -138,7 +136,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0, -1, 0, 3.0001}};
|
return new double[][] { { 0, -1, 0, 3.0001 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -148,25 +146,25 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges() {
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{-1, 0, 0, 3, 4, 1}};
|
return new int[][] { { -1, 0, 0, 3, 4, 1 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[]{2, 0, 0, 0, 2, 1};
|
return new int[] { 2, 0, 0, 0, 2, 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if (!open)
|
if(!open)
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||||
if (z == 1) {
|
if(z == 1) {
|
||||||
return AxisAlignedBB.getBoundingBox(0.5, 0, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0.5, 0, 0, 1, 1, 1);
|
||||||
} else if (z == -2) {
|
} else if(z == -2) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.5, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.5, 1, 1);
|
||||||
} else if (y > 1) {
|
} else if(y > 1) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0.75, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0.75, 0, 1, 1, 1);
|
||||||
} else if (y == 0) {
|
} else if(y == 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.1, 1);
|
||||||
} else {
|
} else {
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
@ -187,6 +185,7 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
|
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
return "hbm:door.sliding_door_opened";
|
return "hbm:door.sliding_door_opened";
|
||||||
@ -221,10 +220,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{
|
return new double[][] { { -1, 0, 0, 3.50001 }, { 1, 0, 0, 3.50001 } };
|
||||||
{-1, 0, 0, 3.50001},
|
|
||||||
{1, 0, 0, 3.50001}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -234,20 +230,20 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges() {
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{-2, 0, 0, 4, 5, 1}};
|
return new int[][] { { -2, 0, 0, 4, 5, 1 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[]{3, 0, 0, 0, 3, 3};
|
return new int[] { 3, 0, 0, 0, 3, 3 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if (open) {
|
if(open) {
|
||||||
if (y == 3) {
|
if(y == 3) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||||
} else if (y == 0) {
|
} else if(y == 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.08, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.08, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,11 +263,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(int skinIndex, String partName) {
|
public ResourceLocation getTextureForPart(int skinIndex, String partName) {
|
||||||
return new ResourceLocation[] {
|
return new ResourceLocation[] { ResourceManager.sliding_blast_door_tex, ResourceManager.sliding_blast_door_variant1_tex, ResourceManager.sliding_blast_door_variant2_tex }[skinIndex];
|
||||||
ResourceManager.sliding_blast_door_tex,
|
|
||||||
ResourceManager.sliding_blast_door_variant1_tex,
|
|
||||||
ResourceManager.sliding_blast_door_variant2_tex
|
|
||||||
}[skinIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -290,7 +282,7 @@ public abstract class DoorDecl {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl SLIDING_SEAL_DOOR = new DoorDecl(){
|
public static final DoorDecl SLIDING_SEAL_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
@ -302,14 +294,14 @@ public abstract class DoorDecl {
|
|||||||
return "hbm:door.sliding_seal_open";
|
return "hbm:door.sliding_seal_open";
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if(partName.startsWith("door")){
|
if(partName.startsWith("door")) {
|
||||||
set(trans, 0, 0, Library.smoothstep(getNormTime(openTicks), 0, 1));
|
set(trans, 0, 0, Library.smoothstep(getNormTime(openTicks), 0, 1));
|
||||||
} else {
|
} else {
|
||||||
set(trans, 0, 0, 0);
|
set(trans, 0, 0, 0);
|
||||||
@ -319,7 +311,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0, 0, -1, 0.5001}};
|
return new double[][] { { 0, 0, -1, 0.5001 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -335,28 +327,28 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(open){
|
if(open) {
|
||||||
if(y == 0)
|
if(y == 0)
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 1-0.25, 1, 0.125, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.25, 1, 0.125, 1);
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
} else {
|
} else {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 1-0.25, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.25, 1, 1, 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{0, 0, 0, 1, 2, 2}};
|
return new int[][] { { 0, 0, 0, 1, 2, 2 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions(){
|
public int[] getDimensions() {
|
||||||
return new int[]{1, 0, 0, 0, 0, 0};
|
return new int[] { 1, 0, 0, 0, 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.sliding_seal_door_tex;
|
return ResourceManager.sliding_seal_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,12 +359,12 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.sliding_seal_door;
|
return ResourceManager.sliding_seal_door;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl SECURE_ACCESS_DOOR = new DoorDecl(){
|
public static final DoorDecl SECURE_ACCESS_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCloseSoundLoop() {
|
public String getCloseSoundLoop() {
|
||||||
@ -395,15 +387,15 @@ public abstract class DoorDecl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if(!partName.equals("base")){
|
if(!partName.equals("base")) {
|
||||||
set(trans, 0, 3.5F*getNormTime(openTicks), 0);
|
set(trans, 0, 3.5F * getNormTime(openTicks), 0);
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
}
|
}
|
||||||
@ -418,7 +410,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0, -1, 0, 5}};
|
return new double[][] { { 0, -1, 0, 5 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -427,26 +419,26 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{-2, 1, 0, 4, 5, 1}};
|
return new int[][] { { -2, 1, 0, 4, 5, 1 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions(){
|
public int[] getDimensions() {
|
||||||
return new int[]{4, 0, 0, 0, 2, 2};
|
return new int[] { 4, 0, 0, 0, 2, 2 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(!open){
|
if(!open) {
|
||||||
if(y > 0){
|
if(y > 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.375, 1, 1, 0.625);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0.375, 1, 1, 0.625);
|
||||||
}
|
}
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||||
}
|
}
|
||||||
if(y == 1) {
|
if(y == 1) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.0625, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.0625, 1);
|
||||||
} else if(y == 4){
|
} else if(y == 4) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0.15, 1, 1, 0.85);
|
return AxisAlignedBB.getBoundingBox(0, 0.5, 0.15, 1, 1, 0.85);
|
||||||
} else {
|
} else {
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
@ -455,7 +447,7 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.secure_access_door_tex;
|
return ResourceManager.secure_access_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,12 +458,12 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.secure_access_door;
|
return ResourceManager.secure_access_door;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl ROUND_AIRLOCK_DOOR = new DoorDecl(){
|
public static final DoorDecl ROUND_AIRLOCK_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
@ -483,17 +475,17 @@ public abstract class DoorDecl {
|
|||||||
return "hbm:door.garage_move";
|
return "hbm:door.garage_move";
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if("doorLeft".equals(partName)){
|
if("doorLeft".equals(partName)) {
|
||||||
set(trans, 0, 0, 1.5F*getNormTime(openTicks));
|
set(trans, 0, 0, 1.5F * getNormTime(openTicks));
|
||||||
} else if("doorRight".equals(partName)){
|
} else if("doorRight".equals(partName)) {
|
||||||
set(trans, 0, 0, -1.5F*getNormTime(openTicks));
|
set(trans, 0, 0, -1.5F * getNormTime(openTicks));
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
}
|
}
|
||||||
@ -508,20 +500,20 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0.0, 0.0, 1.0, 2.0001}, {0.0, 0.0, -1.0, 2.0001}};
|
return new double[][] { { 0.0, 0.0, 1.0, 2.0001 }, { 0.0, 0.0, -1.0, 2.0001 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(!open)
|
if(!open)
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
if(z == 1){
|
if(z == 1) {
|
||||||
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||||
} else if(z == -2){
|
} else if(z == -2) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||||
} else if(y == 3){
|
} else if(y == 3) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||||
} else if(y == 0){
|
} else if(y == 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.0625, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.0625, 1);
|
||||||
}
|
}
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
@ -533,18 +525,18 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{0, 0, 0, -2, 4, 2}, {0, 0, 0, 3, 4, 2}};
|
return new int[][] { { 0, 0, 0, -2, 4, 2 }, { 0, 0, 0, 3, 4, 2 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[]{3, 0, 0, 0, 2, 1};
|
return new int[] { 3, 0, 0, 0, 2, 1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.round_airlock_door_tex;
|
return ResourceManager.round_airlock_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -555,37 +547,39 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.round_airlock_door;
|
return ResourceManager.round_airlock_door;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl QE_SLIDING = new DoorDecl(){
|
public static final DoorDecl QE_SLIDING = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
return "hbm:door.qe_sliding_opened";
|
return "hbm:door.qe_sliding_opened";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCloseSoundEnd() {
|
public String getCloseSoundEnd() {
|
||||||
return "hbm:door.qe_sliding_shut";
|
return "hbm:door.qe_sliding_shut";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundLoop() {
|
public String getOpenSoundLoop() {
|
||||||
return "hbm:door.qe_sliding_opening";
|
return "hbm:door.qe_sliding_opening";
|
||||||
};
|
};
|
||||||
|
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if(partName.startsWith("left")){
|
if(partName.startsWith("left")) {
|
||||||
set(trans, 0, 0, 1*getNormTime(openTicks));
|
set(trans, 0, 0, 1 * getNormTime(openTicks));
|
||||||
} else {
|
} else {
|
||||||
set(trans, 0, 0, -1*getNormTime(openTicks));
|
set(trans, 0, 0, -1 * getNormTime(openTicks));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -602,30 +596,30 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(open){
|
if(open) {
|
||||||
if(z == 0){
|
if(z == 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(1-0.125, 0, 1-0.125, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(1 - 0.125, 0, 1 - 0.125, 1, 1, 1);
|
||||||
} else {
|
} else {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 1-0.125, 0.125, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.125, 0.125, 1, 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 1-0.125, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.125, 1, 1, 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{0, 0, 0, 2, 2, 2}};
|
return new int[][] { { 0, 0, 0, 2, 2, 2 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions(){
|
public int[] getDimensions() {
|
||||||
return new int[]{1, 0, 0, 0, 1, 0};
|
return new int[] { 1, 0, 0, 0, 1, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.qe_sliding_door_tex;
|
return ResourceManager.qe_sliding_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,33 +630,34 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.qe_sliding_door;
|
return ResourceManager.qe_sliding_door;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl QE_CONTAINMENT = new DoorDecl(){
|
public static final DoorDecl QE_CONTAINMENT = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
return "hbm:door.wgh_stop";
|
return "hbm:door.wgh_stop";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundLoop() {
|
public String getOpenSoundLoop() {
|
||||||
return "hbm:door.wgh_start";
|
return "hbm:door.wgh_start";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if(!partName.equals("frame")){
|
if(!partName.equals("frame")) {
|
||||||
set(trans, 0, 3*getNormTime(openTicks), 0);
|
set(trans, 0, 3 * getNormTime(openTicks), 0);
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
}
|
}
|
||||||
@ -677,7 +672,7 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0, -1, 0, 3.0001}};
|
return new double[][] { { 0, -1, 0, 3.0001 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -686,13 +681,13 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{-1, 0, 0, 3, 3, 1}};
|
return new int[][] { { -1, 0, 0, 3, 3, 1 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions(){
|
public int[] getDimensions() {
|
||||||
return new int[]{2, 0, 0, 0, 1, 1};
|
return new int[] { 2, 0, 0, 0, 1, 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -708,7 +703,7 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
if(partName.equals("decal"))
|
if(partName.equals("decal"))
|
||||||
return ResourceManager.qe_containment_decal;
|
return ResourceManager.qe_containment_decal;
|
||||||
return ResourceManager.qe_containment_tex;
|
return ResourceManager.qe_containment_tex;
|
||||||
@ -721,45 +716,49 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.qe_containment;
|
return ResourceManager.qe_containment;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl WATER_DOOR = new DoorDecl(){
|
public static final DoorDecl WATER_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundEnd() {
|
public String getOpenSoundEnd() {
|
||||||
return "hbm:door.wgh_big_stop";
|
return "hbm:door.wgh_big_stop";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundLoop() {
|
public String getOpenSoundLoop() {
|
||||||
return "hbm:door.wgh_big_start";
|
return "hbm:door.wgh_big_start";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOpenSoundStart() {
|
public String getOpenSoundStart() {
|
||||||
return "hbm:door.door.lever";
|
return "hbm:door.door.lever";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCloseSoundStart() {
|
public String getCloseSoundStart() {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCloseSoundEnd() {
|
public String getCloseSoundEnd() {
|
||||||
return "hbm:door.door.lever";
|
return "hbm:door.door.lever";
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if("bolt".equals(partName)){
|
if("bolt".equals(partName)) {
|
||||||
set(trans, 0, 0, 0.4F*Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1));
|
set(trans, 0, 0, 0.4F * Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1));
|
||||||
} else {
|
} else {
|
||||||
set(trans, 0, 0, 0);
|
set(trans, 0, 0, 0);
|
||||||
}
|
}
|
||||||
@ -767,20 +766,20 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void doOffsetTransform(){
|
public void doOffsetTransform() {
|
||||||
GL11.glTranslated(0.375, 0, 0);
|
GL11.glTranslated(0.375, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getOrigin(String partName, float[] orig) {
|
public void getOrigin(String partName, float[] orig) {
|
||||||
if("door".equals(partName) || "bolt".equals(partName)){
|
if("door".equals(partName) || "bolt".equals(partName)) {
|
||||||
set(orig, 0.125F, 1.5F, 1.18F);
|
set(orig, 0.125F, 1.5F, 1.18F);
|
||||||
return;
|
return;
|
||||||
} else if("spinny_upper".equals(partName)){
|
} else if("spinny_upper".equals(partName)) {
|
||||||
set(orig, 0.041499F, 2.43569F, -0.587849F);
|
set(orig, 0.041499F, 2.43569F, -0.587849F);
|
||||||
return;
|
return;
|
||||||
} else if("spinny_lower".equals(partName)){
|
} else if("spinny_lower".equals(partName)) {
|
||||||
set(orig, 0.041499F, 0.571054F, -0.587849F);
|
set(orig, 0.041499F, 0.571054F, -0.587849F);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -790,11 +789,11 @@ public abstract class DoorDecl {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getRotation(String partName, float openTicks, float[] rot) {
|
public void getRotation(String partName, float openTicks, float[] rot) {
|
||||||
if(partName.startsWith("spinny")){
|
if(partName.startsWith("spinny")) {
|
||||||
set(rot, Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1)*360, 0, 0);
|
set(rot, Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1) * 360, 0, 0);
|
||||||
return;
|
return;
|
||||||
} else if("door".equals(partName) || "bolt".equals(partName)){
|
} else if("door".equals(partName) || "bolt".equals(partName)) {
|
||||||
set(rot, 0, Library.smoothstep(getNormTime(openTicks, 30, 60), 0, 1)*-134, 0);
|
set(rot, 0, Library.smoothstep(getNormTime(openTicks, 30, 60), 0, 1) * -134, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.getRotation(partName, openTicks, rot);
|
super.getRotation(partName, openTicks, rot);
|
||||||
@ -810,17 +809,17 @@ public abstract class DoorDecl {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String[] getChildren(String partName) {
|
public String[] getChildren(String partName) {
|
||||||
if("door".equals(partName))
|
if("door".equals(partName))
|
||||||
return new String[]{"spinny_lower", "spinny_upper"};
|
return new String[] { "spinny_lower", "spinny_upper" };
|
||||||
return super.getChildren(partName);
|
return super.getChildren(partName);
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(!open){
|
if(!open) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 1, 1);
|
||||||
} else if(y > 1) {
|
} else if(y > 1) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0.85, 0.75, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0.85, 0.75, 1, 1, 1);
|
||||||
} else if(y == 0){
|
} else if(y == 0) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 0.15, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 0.15, 1);
|
||||||
}
|
}
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
@ -832,8 +831,8 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{1, 0, 0, -3, 3, 2}};
|
return new int[][] { { 1, 0, 0, -3, 3, 2 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getDoorRangeOpenTime(int ticks, int idx) {
|
public float getDoorRangeOpenTime(int ticks, int idx) {
|
||||||
@ -841,13 +840,13 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions(){
|
public int[] getDimensions() {
|
||||||
return new int[]{2, 0, 0, 0, 1, 1};
|
return new int[] { 2, 0, 0, 0, 1, 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.water_door_tex;
|
return ResourceManager.water_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,21 +857,21 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.water_door;
|
return ResourceManager.water_door;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl LARGE_VEHICLE_DOOR = new DoorDecl(){
|
public static final DoorDecl LARGE_VEHICLE_DOOR = new DoorDecl() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
||||||
if("doorLeft".equals(partName)){
|
if("doorLeft".equals(partName)) {
|
||||||
set(trans, 0, 0, 3*getNormTime(openTicks));
|
set(trans, 0, 0, 3 * getNormTime(openTicks));
|
||||||
} else if("doorRight".equals(partName)){
|
} else if("doorRight".equals(partName)) {
|
||||||
set(trans, 0, 0, -3*getNormTime(openTicks));
|
set(trans, 0, 0, -3 * getNormTime(openTicks));
|
||||||
} else {
|
} else {
|
||||||
super.getTranslation(partName, openTicks, child, trans);
|
super.getTranslation(partName, openTicks, child, trans);
|
||||||
}
|
}
|
||||||
@ -888,23 +887,23 @@ public abstract class DoorDecl {
|
|||||||
return "hbm:door.garage_move";
|
return "hbm:door.garage_move";
|
||||||
};
|
};
|
||||||
|
|
||||||
public float getSoundVolume(){
|
public float getSoundVolume() {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{{0.0, 0.0, 1.0, 3.50001}, {0.0, 0.0, -1.0, 3.50001}};
|
return new double[][] { { 0.0, 0.0, 1.0, 3.50001 }, { 0.0, 0.0, -1.0, 3.50001 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open) {
|
||||||
if(!open)
|
if(!open)
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
if(z == 3){
|
if(z == 3) {
|
||||||
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||||
} else if(z == -3){
|
} else if(z == -3) {
|
||||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||||
}
|
}
|
||||||
return super.getBlockBound(x, y, z, open);
|
return super.getBlockBound(x, y, z, open);
|
||||||
@ -916,18 +915,18 @@ public abstract class DoorDecl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[][] getDoorOpenRanges(){
|
public int[][] getDoorOpenRanges() {
|
||||||
return new int[][]{{0, 0, 0, -4, 6, 2}, {0, 0, 0, 4, 6, 2}};
|
return new int[][] { { 0, 0, 0, -4, 6, 2 }, { 0, 0, 0, 4, 6, 2 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[]{5, 0, 0, 0, 3, 3};
|
return new int[] { 5, 0, 0, 0, 3, 3 };
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public ResourceLocation getTextureForPart(String partName){
|
public ResourceLocation getTextureForPart(String partName) {
|
||||||
return ResourceManager.large_vehicle_door_tex;
|
return ResourceManager.large_vehicle_door_tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -938,13 +937,15 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public WavefrontObjDisplayList getModel(){
|
public WavefrontObjDisplayList getModel() {
|
||||||
return ResourceManager.large_vehicle_door;
|
return ResourceManager.large_vehicle_door;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Format: x, y, z, tangent amount 1 (how long the door would be if it moved up), tangent amount 2 (door places blocks in this direction), axis (0-x, 1-y, 2-z)
|
// Format: x, y, z, tangent amount 1 (how long the door would be if it moved
|
||||||
|
// up), tangent amount 2 (door places blocks in this direction), axis (0-x,
|
||||||
|
// 1-y, 2-z)
|
||||||
public abstract int[][] getDoorOpenRanges();
|
public abstract int[][] getDoorOpenRanges();
|
||||||
|
|
||||||
public abstract int[] getDimensions();
|
public abstract int[] getDimensions();
|
||||||
@ -1014,7 +1015,7 @@ public abstract class DoorDecl {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] nothing = new String[]{};
|
private static final String[] nothing = new String[] {};
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String[] getChildren(String partName) {
|
public String[] getChildren(String partName) {
|
||||||
@ -1023,7 +1024,7 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public double[][] getClippingPlanes() {
|
public double[][] getClippingPlanes() {
|
||||||
return new double[][]{};
|
return new double[][] {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@ -1042,7 +1043,7 @@ public abstract class DoorDecl {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Hack
|
// Hack
|
||||||
public String getSoundLoop2() {
|
public String getSoundLoop2() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import com.hbm.packet.AuxGaugePacket;
|
|||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEMissileMultipartPacket;
|
import com.hbm.packet.TEMissileMultipartPacket;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ import net.minecraft.util.Vec3;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityCompactLauncher extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IFluidAcceptor, IEnergyUser, IFluidStandardReceiver, IGUIProvider {
|
public class TileEntityCompactLauncher extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IFluidAcceptor, IEnergyUser, IFluidStandardReceiver, IGUIProvider, IRadarCommandReceiver {
|
||||||
|
|
||||||
private ItemStack slots[];
|
private ItemStack slots[];
|
||||||
|
|
||||||
@ -207,7 +208,7 @@ public class TileEntityCompactLauncher extends TileEntityLoadedBase implements I
|
|||||||
for(int z = -1; z <= 1; z++) {
|
for(int z = -1; z <= 1; z++) {
|
||||||
|
|
||||||
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
|
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
|
||||||
launch();
|
launchFromDesignator();
|
||||||
break outer;
|
break outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -269,13 +270,30 @@ public class TileEntityCompactLauncher extends TileEntityLoadedBase implements I
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launch() {
|
@Override
|
||||||
|
public boolean sendCommandEntity(Entity target) {
|
||||||
|
return sendCommandPosition((int) Math.floor(target.posX), yCoord, (int) Math.floor(target.posX));
|
||||||
|
}
|
||||||
|
|
||||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
|
@Override
|
||||||
|
public boolean sendCommandPosition(int x, int y, int z) {
|
||||||
|
if(!canLaunch()) return false;
|
||||||
|
this.launchTo(x, z);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void launchFromDesignator() {
|
||||||
|
|
||||||
int tX = slots[1].stackTagCompound.getInteger("xCoord");
|
int tX = slots[1].stackTagCompound.getInteger("xCoord");
|
||||||
int tZ = slots[1].stackTagCompound.getInteger("zCoord");
|
int tZ = slots[1].stackTagCompound.getInteger("zCoord");
|
||||||
|
|
||||||
|
this.launchTo(tX, tZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void launchTo(int tX, int tZ) {
|
||||||
|
|
||||||
|
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
|
||||||
|
|
||||||
ItemMissile chip = (ItemMissile) Item.getItemById(ItemCustomMissile.readFromNBT(slots[0], "chip"));
|
ItemMissile chip = (ItemMissile) Item.getItemById(ItemCustomMissile.readFromNBT(slots[0], "chip"));
|
||||||
float c = (Float)chip.attributes[0];
|
float c = (Float)chip.attributes[0];
|
||||||
float f = 1.0F;
|
float f = 1.0F;
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.hbm.packet.AuxGaugePacket;
|
|||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEMissileMultipartPacket;
|
import com.hbm.packet.TEMissileMultipartPacket;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
|
|
||||||
import api.hbm.energy.IEnergyUser;
|
import api.hbm.energy.IEnergyUser;
|
||||||
@ -39,19 +40,22 @@ import li.cil.oc.api.machine.Callback;
|
|||||||
import li.cil.oc.api.machine.Context;
|
import li.cil.oc.api.machine.Context;
|
||||||
import li.cil.oc.api.network.SimpleComponent;
|
import li.cil.oc.api.network.SimpleComponent;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISidedInventory, IEnergyUser, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, SimpleComponent {
|
public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISidedInventory, IEnergyUser, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, SimpleComponent, IRadarCommandReceiver {
|
||||||
|
|
||||||
private ItemStack slots[];
|
private ItemStack slots[];
|
||||||
|
|
||||||
@ -216,7 +220,7 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
|
|||||||
for(int z = -4; z <= 4; z++) {
|
for(int z = -4; z <= 4; z++) {
|
||||||
|
|
||||||
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
|
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
|
||||||
launch();
|
launchFromDesignator();
|
||||||
break outer;
|
break outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,14 +267,46 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launch() {
|
@Override
|
||||||
|
public boolean sendCommandEntity(Entity target) {
|
||||||
|
return sendCommandPosition((int) Math.floor(target.posX), yCoord, (int) Math.floor(target.posX));
|
||||||
|
}
|
||||||
|
|
||||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
|
@Override
|
||||||
|
public boolean sendCommandPosition(int x, int y, int z) {
|
||||||
|
if(!canLaunch()) return false;
|
||||||
|
this.launchTo(x, z);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void launchFromDesignator() {
|
||||||
|
|
||||||
int tX = slots[1].stackTagCompound.getInteger("xCoord");
|
int tX = slots[1].stackTagCompound.getInteger("xCoord");
|
||||||
int tZ = slots[1].stackTagCompound.getInteger("zCoord");
|
int tZ = slots[1].stackTagCompound.getInteger("zCoord");
|
||||||
|
|
||||||
EntityMissileCustom missile = new EntityMissileCustom(worldObj, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, tX, tZ, getStruct(slots[0]));
|
this.launchTo(tX, tZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void launchTo(int tX, int tZ) {
|
||||||
|
|
||||||
|
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
|
||||||
|
|
||||||
|
ItemMissile chip = (ItemMissile) Item.getItemById(ItemCustomMissile.readFromNBT(slots[0], "chip"));
|
||||||
|
float c = (Float)chip.attributes[0];
|
||||||
|
float f = 1.0F;
|
||||||
|
|
||||||
|
if(getStruct(slots[0]).fins != null) {
|
||||||
|
ItemMissile fins = (ItemMissile) Item.getItemById(ItemCustomMissile.readFromNBT(slots[0], "stability"));
|
||||||
|
f = (Float) fins.attributes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
Vec3 target = Vec3.createVectorHelper(xCoord - tX, 0, zCoord - tZ);
|
||||||
|
target.xCoord *= c * f;
|
||||||
|
target.zCoord *= c * f;
|
||||||
|
|
||||||
|
target.rotateAroundY(worldObj.rand.nextFloat() * 360);
|
||||||
|
|
||||||
|
EntityMissileCustom missile = new EntityMissileCustom(worldObj, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, tX + (int)target.xCoord, tZ + (int)target.zCoord, getStruct(slots[0]));
|
||||||
worldObj.spawnEntityInWorld(missile);
|
worldObj.spawnEntityInWorld(missile);
|
||||||
|
|
||||||
subtractFuel();
|
subtractFuel();
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Loading…
x
Reference in New Issue
Block a user