post merge fixes, radar-launchable custom missiles, more stuff

This commit is contained in:
Boblet 2023-11-27 16:00:19 +01:00
parent f84696714a
commit 8fac493947
11 changed files with 1152 additions and 1140 deletions

View File

@ -1,52 +1,12 @@
## Added
* Nitra
* Dropped by the painsaw ability when killing a mob
* Can be used to quickly craft standard ammo types in the 2x2 crafting grid
* 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
* Doors!
* Your favorites from 1.12, the 7 remaining doors have finally been ported
* Thanks to KoblizekXD for biting the bullet
## Changed
* Light oil and cracked light oil can now be reformed into large quantities of aromatic hydrocarbons a well as some reformate gas
* The painsaw ability no longer drops ammo and syringes, instead it drops nitra
* Radars have been completely rewritten
* 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
* Reduced the blast resistance of the large doors from absurdly high to still very but not quite as high
* Custom missiles are now launchable using the radar
* NTM's structures should no longer spawn in dimensions besides the overworld. Ores will still generate, assuming the config option is set.
## Fixed
* Fixed thorium bedrock ore using the wrong ore dict key, making it unable to be processed via centrifuge or acidizer
* 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
* Fixed ancient bug where custom missiles launched using the launch table would not use the accuracy calculation and always be pin-point accurate

View File

@ -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_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");
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_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(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");
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(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(200.0F).setResistance(20000.0F).setCreativeTab(MainRegistry.machineTab);
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(100.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
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(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(10000.0F).setCreativeTab(MainRegistry.machineTab);
water_door = new BlockDoorGeneric(Material.iron, DoorDecl.WATER_DOOR).setBlockName("water_door").setHardness(50.0F).setResistance(500.0F).setCreativeTab(MainRegistry.machineTab);
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");
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");
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");
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");
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_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");
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");
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");
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");
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");

View File

@ -123,7 +123,7 @@ public class CompactLauncher extends BlockContainer implements IMultiblock, IBom
TileEntityCompactLauncher entity = (TileEntityCompactLauncher) world.getTileEntity(x, y, z);
if(entity.canLaunch()) {
entity.launch();
entity.launchFromDesignator();
return BombReturnCode.LAUNCHED;
}

View File

@ -163,7 +163,7 @@ public class LaunchTable extends BlockContainer implements IMultiblock, IBomb {
TileEntityLaunchTable entity = (TileEntityLaunchTable) world.getTileEntity(x, y, z);
if(entity.canLaunch()) {
entity.launch();
entity.launchFromDesignator();
return BombReturnCode.LAUNCHED;
}

View File

@ -5,7 +5,6 @@ import com.hbm.tileentity.bomb.TileEntityLaunchPad;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;

View File

@ -236,7 +236,7 @@ public class HbmWorldGen implements IWorldGenerator {
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) {
int x = i + rand.nextInt(16) + 8;
@ -670,7 +670,7 @@ public class HbmWorldGen implements IWorldGenerator {
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
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) {

View File

@ -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));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@ import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.TEMissileMultipartPacket;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IRadarCommandReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.fauxpointtwelve.DirPos;
@ -47,7 +48,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
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[];
@ -207,7 +208,7 @@ public class TileEntityCompactLauncher extends TileEntityLoadedBase implements I
for(int z = -1; z <= 1; z++) {
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
launch();
launchFromDesignator();
break outer;
}
}
@ -268,14 +269,31 @@ public class TileEntityCompactLauncher extends TileEntityLoadedBase implements I
return false;
}
public void launch() {
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
@Override
public boolean sendCommandEntity(Entity target) {
return sendCommandPosition((int) Math.floor(target.posX), yCoord, (int) Math.floor(target.posX));
}
@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 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"));
float c = (Float)chip.attributes[0];
float f = 1.0F;

View File

@ -25,6 +25,7 @@ import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.TEMissileMultipartPacket;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IRadarCommandReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
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.network.SimpleComponent;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@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[];
@ -216,7 +220,7 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
for(int z = -4; z <= 4; z++) {
if(worldObj.isBlockIndirectlyGettingPowered(xCoord + x, yCoord, zCoord + z) && canLaunch()) {
launch();
launchFromDesignator();
break outer;
}
}
@ -262,15 +266,47 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
return false;
}
public void launch() {
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.missileTakeOff", 10.0F, 1.0F);
@Override
public boolean sendCommandEntity(Entity target) {
return sendCommandPosition((int) Math.floor(target.posX), yCoord, (int) Math.floor(target.posX));
}
@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 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);
subtractFuel();

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB