mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
even more flixes
This commit is contained in:
parent
9f758c49bc
commit
f7baf332cb
@ -17,12 +17,16 @@
|
||||
* New server configs
|
||||
* `CRATE_OPEN_HELD` can toggle whether crates can be opened when held
|
||||
* `CRATE_KEEP_CONTENTS` can toggle whether crates keep their contents when broken
|
||||
* `ITEM_HAZARD_DROP_TICKRATE` can change the time between ticks for dropped item hazard checks (gunpowder, lithium), default is 2, lowest is 1
|
||||
* Duds now have multiple variants
|
||||
* Dismantling different variants yields different drops
|
||||
* Magnetic extraction can no longer be performed
|
||||
* `isItemBlacklisted` on the item hazard checks now employs caching instead of doing a full ore dictionary lookup for every single check, this should make it marginally more performant
|
||||
|
||||
## Fixed
|
||||
* Fixed RoR controller having the wrong recipe
|
||||
* Either fixed the crate dupe/voiding issues or made them even worse
|
||||
* Fixed skeletons and pedestals allowing blocks to be placed inside the player
|
||||
* Fixed artillery shells not playing the explosion animation when directly impacting entities
|
||||
* Fixed artillery shells not playing the explosion animation when directly impacting entities
|
||||
* Fixed bauxite and malachite vein toggles being on backwards
|
||||
* Fixed penumatic tube order settings not saving
|
||||
@ -19,6 +19,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Boolean> TAINT_TRAILS = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> CRATE_OPEN_HELD = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
||||
@ -30,6 +31,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("TAINT_TRAILS", TAINT_TRAILS);
|
||||
configMap.put("CRATE_OPEN_HELD", CRATE_OPEN_HELD);
|
||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -80,15 +80,18 @@ public class HazardSystem {
|
||||
|
||||
public static boolean isItemBlacklisted(ItemStack stack) {
|
||||
|
||||
if(stackBlacklist.contains(new ComparableStack(stack).makeSingular()))
|
||||
ComparableStack comp = new ComparableStack(stack).makeSingular();
|
||||
if(stackBlacklist.contains(comp))
|
||||
return true;
|
||||
|
||||
int[] ids = OreDictionary.getOreIDs(stack);
|
||||
for(int id : ids) {
|
||||
String name = OreDictionary.getOreName(id);
|
||||
|
||||
if(dictBlacklist.contains(name))
|
||||
if(dictBlacklist.contains(name)) {
|
||||
stackBlacklist.add(comp); // caching!
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@ -890,8 +890,8 @@ public class MainRegistry {
|
||||
if(WorldConfig.enableSulfurCave) new OreCave(ModBlocks.stone_resource, 0).setThreshold(1.5D).setRangeMult(20).setYLevel(30).setMaxRange(20).withFluid(ModBlocks.sulfuric_acid_block); //sulfur
|
||||
if(WorldConfig.enableAsbestosCave) new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
|
||||
if(WorldConfig.enableHematite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.HEMATITE.ordinal()).setScaleH(0.04D).setScaleV(0.25D).setThreshold(230);
|
||||
if(WorldConfig.enableMalachite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
|
||||
if(WorldConfig.enableBauxite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.1D).setScaleV(0.15D).setThreshold(275);
|
||||
if(WorldConfig.enableBauxite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
|
||||
if(WorldConfig.enableMalachite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.1D).setScaleV(0.15D).setThreshold(275);
|
||||
//new BiomeCave().setThreshold(1.5D).setRangeMult(20).setYLevel(40).setMaxRange(20);
|
||||
//new OreLayer(Blocks.coal_ore, 0.2F).setThreshold(4).setRangeMult(3).setYLevel(70);
|
||||
BedrockOre.init();
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.blocks.generic.BlockAshes;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.config.ServerConfig;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.ai.EntityAIFireGun;
|
||||
import com.hbm.entity.mob.EntityCreeperTainted;
|
||||
@ -655,14 +656,18 @@ public class ModEventHandler {
|
||||
|
||||
if(event.phase == Phase.END) {
|
||||
|
||||
List loadedEntityList = new ArrayList();
|
||||
loadedEntityList.addAll(event.world.loadedEntityList); // ConcurrentModificationException my balls
|
||||
int tickrate = Math.max(1, ServerConfig.ITEM_HAZARD_DROP_TICKRATE.get());
|
||||
|
||||
for(Object e : loadedEntityList) {
|
||||
|
||||
if(e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
HazardSystem.updateDroppedItem(item);
|
||||
if(event.world.getTotalWorldTime() % tickrate == 0) {
|
||||
List loadedEntityList = new ArrayList();
|
||||
loadedEntityList.addAll(event.world.loadedEntityList); // ConcurrentModificationException my balls
|
||||
|
||||
for(Object e : loadedEntityList) {
|
||||
|
||||
if(e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
HazardSystem.updateDroppedItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -227,6 +227,9 @@ public class TileEntityPneumoTube extends TileEntityMachineBase implements IGUIP
|
||||
this.compair.readFromNBT(nbt, "tank");
|
||||
this.pattern.readFromNBT(nbt);
|
||||
|
||||
this.sendOrder = nbt.getByte("sendOrder");
|
||||
this.receiveOrder = nbt.getByte("receiveOrder");
|
||||
|
||||
this.whitelist = nbt.getBoolean("whitelist");
|
||||
this.redstone = nbt.getBoolean("redstone");
|
||||
}
|
||||
@ -239,6 +242,9 @@ public class TileEntityPneumoTube extends TileEntityMachineBase implements IGUIP
|
||||
this.compair.writeToNBT(nbt, "tank");
|
||||
this.pattern.writeToNBT(nbt);
|
||||
|
||||
nbt.setByte("sendOrder", sendOrder);
|
||||
nbt.setByte("receiveOrder", receiveOrder);
|
||||
|
||||
nbt.setBoolean("whitelist", whitelist);
|
||||
nbt.setBoolean("redstone", redstone);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user