This commit is contained in:
Boblet 2025-04-22 16:28:53 +02:00
parent 334cffe04e
commit 89f4da4ab4
69 changed files with 5082 additions and 5317 deletions

View File

@ -13,6 +13,12 @@
* The rare small lab structures have been removed and replaced with a new lighthouse
* ReaSim connectors will no longer function if ReaSim boilers are disabled
* Updated the placed geiger counter model
* Updated random gear on hostile mobs, there's now more variety in what armor/weapons mobs can have
* Removed the cryo cannon. It was the last true weapon to use the NT system and may return later
* Mines will no longer trigger from all ambient creatures (originally just bats) and water creatures
* Mines can no longer be triggered if a non-air block is above them
* Moved the cooling tower particle toggle from `hbm.cfg` to the client config, named `COOLING_TOWER_PARTICLES`
* Updated HSS textures
## Fixed
* Fixed fatal gamebreaking hard drive corrupting issue where taurun leggings were misspelled

View File

@ -13,12 +13,10 @@ import com.hbm.util.Vec3NT;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class DungeonSpawner extends BlockContainer {

View File

@ -25,8 +25,6 @@ public class BombConfig {
public static int falloutRange = 100;
public static int fDelay = 4;
public static int limitExplosionLifespan = 0;
public static int rain = 0;
public static int cont = 0;
public static boolean chunkloading = true;
public static void loadFromConfig(Configuration config) {
@ -94,13 +92,6 @@ public class BombConfig {
Property falloutDelayProp = config.get(CATEGORY_NUKE, "6.04_falloutDelay", 4);
falloutDelayProp.comment = "How many ticks to wait for the next fallout chunk computation";
fDelay = falloutDelayProp.getInt();
Property radRain = config.get(CATEGORY_NUKE, "6.05_falloutRainDuration", 0);
radRain.comment = "Duration of the thunderstorm after fallout in ticks (only large explosions)";
rain = radRain.getInt();
Property rainCont = config.get(CATEGORY_NUKE, "6.06_falloutRainRadiation", 0);
rainCont.comment = "Radiation in 100th RADs created by fallout rain";
cont = rainCont.getInt();
chunkloading = CommonConfig.createConfigBool(config, CATEGORY_NUKE, "6.XX_enableChunkLoading", "Allows all types of procedural explosions to keep the central chunk loaded.", true);
}

View File

@ -31,6 +31,7 @@ public class ClientConfig extends RunningConfig {
public static ConfigWrapper<Boolean> NUKE_HUD_SHAKE = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> RENDER_REEDS = new ConfigWrapper(!Compat.isModLoaded(Compat.MOD_ANG));
public static ConfigWrapper<Boolean> NEI_HIDE_SECRETS = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> COOLING_TOWER_PARTICLES = new ConfigWrapper(true);
private static void initDefaults() {
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
@ -51,6 +52,7 @@ public class ClientConfig extends RunningConfig {
configMap.put("NUKE_HUD_SHAKE", NUKE_HUD_SHAKE);
configMap.put("RENDER_REEDS", RENDER_REEDS);
configMap.put("NEI_HIDE_SECRETS", NEI_HIDE_SECRETS);
configMap.put("COOLING_TOWER_PARTICLES", COOLING_TOWER_PARTICLES);
}
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */

View File

@ -36,7 +36,6 @@ public class GeneralConfig {
public static boolean enableFluidContainerCompat = true;
public static boolean enableMOTD = true;
public static boolean enableGuideBook = true;
public static boolean enableSteamParticles = true;
public static boolean enableSoundExtension = true;
public static boolean enableMekanismChanges = true;
public static int normalSoundChannels = 200;
@ -110,7 +109,6 @@ public class GeneralConfig {
enableFluidContainerCompat = config.get(CATEGORY_GENERAL, "1.35_enableFluidContainerCompat", true, "If enabled, fluid containers will be oredicted and interchangable in recipes with other mods' containers, as well as TrainCraft's diesel being considered a valid diesel canister.").getBoolean(true);
enableMOTD = config.get(CATEGORY_GENERAL, "1.36_enableMOTD", true, "If enabled, shows the 'Loaded mod!' chat message as well as update notifications when joining a world").getBoolean(true);
enableGuideBook = config.get(CATEGORY_GENERAL, "1.37_enableGuideBook", true, "If enabled, gives players the guide book when joining the world for the first time").getBoolean(true);
enableSteamParticles = config.get(CATEGORY_GENERAL, "1.38_enableSteamParticles", true, "If disabled, auxiliary cooling towers and large cooling towers will not emit steam particles when in use.").getBoolean(true);
enableSoundExtension = config.get(CATEGORY_GENERAL, "1.39_enableSoundExtension", true, "If enabled, will change the limit for how many sounds can play at once.").getBoolean(true);
enableMekanismChanges = config.get(CATEGORY_GENERAL, "1.40_enableMekanismChanges", true, "If enabled, will change some of Mekanism's recipes.").getBoolean(true);
normalSoundChannels = CommonConfig.createConfigInt(config, CATEGORY_GENERAL, "1.41_normalSoundChannels",

View File

@ -86,6 +86,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_minigun, 1), new Object[] { "BMG", "BRE", "BGM", 'B', ANY_RESISTANTALLOY.lightBarrel(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip(), 'R', ANY_RESISTANTALLOY.heavyReceiver(), 'E', ModItems.motor_desh });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_missile_launcher, 1), new Object[] { " CM", "BBB", "G ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', WEAPONSTEEL.mechanism(), 'B', ANY_RESISTANTALLOY.heavyBarrel(), 'G', ANY_PLASTIC.grip() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_tesla_cannon, 1), new Object[] { "CCC", "BRB", "MGE", 'C', ModItems.coil_advanced_alloy, 'B', ANY_RESISTANTALLOY.heavyBarrel(), 'R', ANY_RESISTANTALLOY.heavyReceiver(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip(), 'E', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_laser_pistol, 1), new Object[] { "CRM", "GG ", 'C', ModItems.crystal_redstone, 'R', BIGMT.lightReceiver(), 'M', BIGMT.mechanism(), 'G', ANY_HARDPLASTIC.grip() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stg77, 1), new Object[] { " D ", "BRS", "GGM", 'D', DictFrame.fromOne(ModItems.weapon_mod_special, EnumModSpecial.SCOPE), 'B', BIGMT.lightBarrel(), 'R', BIGMT.lightReceiver(), 'S', ANY_HARDPLASTIC.stock(), 'G', ANY_HARDPLASTIC.grip(), 'M', BIGMT.mechanism() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "PPP", "BSR", "G M", 'P', BIGMT.plate(), 'B', BIGMT.heavyBarrel(), 'S', BIGMT.shell(), 'R', BIGMT.heavyReceiver(), 'G', ANY_HARDPLASTIC.grip(), 'M', BIGMT.mechanism() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_tau, 1), new Object[] { " RD", "CTT", "GMS", 'D', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'C', CU.pipe(), 'T', ModItems.coil_advanced_torus, 'G', ANY_HARDPLASTIC.grip(), 'R', BIGMT.lightReceiver(), 'M', BIGMT.mechanism(), 'S', ANY_HARDPLASTIC.stock() });

View File

@ -7,7 +7,6 @@ import com.hbm.config.FalloutConfigJSON.FalloutEntry;
import com.hbm.config.WorldConfig;
import com.hbm.entity.item.EntityFallingBlockNT;
import com.hbm.entity.logic.EntityExplosionChunkloading;
import com.hbm.saveddata.AuxSavedData;
import com.hbm.world.WorldUtil;
import com.hbm.world.biome.BiomeGenCraterBase;
@ -19,7 +18,6 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.storage.WorldInfo;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.*;
@ -107,17 +105,6 @@ public class EntityFalloutRain extends EntityExplosionChunkloading {
}
tickDelay--;
if(this.isDead) {
if(BombConfig.rain > 0 && getScale() > 150) {
WorldInfo info = worldObj.getWorldInfo();
info.setRaining(true);
info.setThundering(true);
info.setRainTime(BombConfig.rain);
info.setThunderTime(BombConfig.rain);
AuxSavedData.setThunder(worldObj, BombConfig.rain);
}
}
}
}

View File

@ -13,8 +13,6 @@ public class BulletConfigSyncingUtil {
public static int TEST_CONFIG = i++;
public static int CRYO_NORMAL = i++;
public static int FEXT_NORMAL = i++;
public static int FEXT_FOAM = i++;
public static int FEXT_SAND = i++;
@ -35,8 +33,6 @@ public class BulletConfigSyncingUtil {
public static void loadConfigsForSync() {
configSet.put(CRYO_NORMAL, GunEnergyFactory.getCryoConfig());
configSet.put(FEXT_NORMAL, GunEnergyFactory.getFextConfig());
configSet.put(FEXT_FOAM, GunEnergyFactory.getFextFoamConfig());
configSet.put(FEXT_SAND, GunEnergyFactory.getFextSandConfig());

View File

@ -4,10 +4,12 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.hbm.config.BombConfig;
import com.hbm.config.GeneralConfig;
import com.hbm.config.RadiationConfig;
import com.hbm.config.WorldConfig;
import com.hbm.entity.mob.EntityCreeperNuclear;
import com.hbm.entity.mob.EntityDuck;
import com.hbm.entity.mob.EntityQuackos;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.extprop.HbmPlayerProps;
@ -26,7 +28,6 @@ import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.packet.toclient.ExtPropPacket;
import com.hbm.particle.helper.FlameCreator;
import com.hbm.potion.HbmPotion;
import com.hbm.saveddata.AuxSavedData;
import com.hbm.util.ArmorRegistry;
import com.hbm.util.ArmorUtil;
import com.hbm.util.ContaminationUtil;
@ -41,6 +42,11 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
@ -119,7 +125,8 @@ public class EntityEffectHandler {
handleContamination(entity);
handleContagion(entity);
handleRadiation(entity);
handleRadiationEffect(entity);
handleRadiationFX(entity);
handleDigamma(entity);
handleLungDisease(entity);
handleOil(entity);
@ -137,37 +144,18 @@ public class EntityEffectHandler {
HbmPlayerProps props = HbmPlayerProps.getData(player);
if(props.isOnLadder) {
float f5 = 0.15F;
double climbSpeed = 0.15;
if(player.motionX < (double) (-f5)) {
player.motionX = (double) (-f5);
}
if(player.motionX > (double) f5) {
player.motionX = (double) f5;
}
if(player.motionZ < (double) (-f5)) {
player.motionZ = (double) (-f5);
}
if(player.motionZ > (double) f5) {
player.motionZ = (double) f5;
}
if(player.motionX < -climbSpeed) player.motionX = -climbSpeed;
if(player.motionX > climbSpeed) player.motionX = climbSpeed;
if(player.motionZ < -climbSpeed) player.motionZ = -climbSpeed;
if(player.motionZ > climbSpeed) player.motionZ = climbSpeed;
player.fallDistance = 0.0F;
if(player.motionY < -0.15D) {
player.motionY = -0.15D;
}
if(player.isSneaking() && player.motionY < 0.0D) {
player.motionY = 0.0D;
}
if(player.isCollidedHorizontally) {
player.motionY = 0.2D;
}
if(player.motionY < -climbSpeed) player.motionY = -climbSpeed;
if(player.isSneaking() && player.motionY < 0.0D) player.motionY = 0.0D;
if(player.isCollidedHorizontally) player.motionY = 0.2D;
props.isOnLadder = false;
@ -185,24 +173,106 @@ public class EntityEffectHandler {
for(ContaminationEffect con : contamination) {
ContaminationUtil.contaminate(entity, HazardType.RADIATION, con.ignoreArmor ? ContaminationType.RAD_BYPASS : ContaminationType.CREATIVE, con.getRad());
con.time--;
if(con.time <= 0)
rem.add(con);
if(con.time <= 0) rem.add(con);
}
contamination.removeAll(rem);
}
private static void handleRadiation(EntityLivingBase entity) {
/** Handles entity transformation via radiation and applied potion effects */
private static void handleRadiationEffect(EntityLivingBase entity) {
if(entity.isDead) return;
if(entity.worldObj.isRemote) return;
if(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode) return;
World world = entity.worldObj;
float eRad = HbmLivingProps.getRadiation(entity);
/// TRANSFORMATIONS ///
if(entity.getClass().equals(EntityCreeper.class) && eRad >= 200 && entity.getHealth() > 0) {
if(world.rand.nextInt(3) == 0) {
EntityCreeperNuclear creep = new EntityCreeperNuclear(world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
world.spawnEntityInWorld(creep);
entity.setDead();
} else {
entity.attackEntityFrom(ModDamageSource.radiation, 100F);
}
return;
} else if(entity instanceof EntityCow && !(entity instanceof EntityMooshroom) && eRad >= 50) {
EntityMooshroom cow = new EntityMooshroom(world);
cow.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
world.spawnEntityInWorld(cow);
entity.setDead();
return;
} else if(entity instanceof EntityVillager && eRad >= 500) {
EntityZombie zomb = new EntityZombie(world);
zomb.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
world.spawnEntityInWorld(zomb);
entity.setDead();
return;
} else if(entity.getClass().equals(EntityDuck.class) && eRad >= 200) {
EntityQuackos quacc = new EntityQuackos(world);
quacc.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
world.spawnEntityInWorld(quacc);
entity.setDead();
return;
}
if(eRad < 200 || ContaminationUtil.isRadImmune(entity)) return;
if(eRad > 2500) HbmLivingProps.setRadiation(entity, 2500);
/// EFFECTS ///
if(eRad >= 1000) {
entity.attackEntityFrom(ModDamageSource.radiation, 1000F);
HbmLivingProps.setRadiation(entity, 0);
if(entity.getHealth() > 0) {
entity.setHealth(0);
entity.onDeath(ModDamageSource.radiation);
}
if(entity instanceof EntityPlayer) ((EntityPlayer) entity).triggerAchievement(MainRegistry.achRadDeath);
} else if(eRad >= 800) {
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 2));
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 10 * 20, 2));
if(world.rand.nextInt(500) == 0) entity.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 2));
if(world.rand.nextInt(700) == 0) entity.addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 20, 1));
} else if(eRad >= 600) {
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 2));
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 10 * 20, 2));
if(world.rand.nextInt(500) == 0) entity.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 1));
} else if(eRad >= 400) {
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(world.rand.nextInt(500) == 0) entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5 * 20, 0));
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 1));
} else if(eRad >= 200) {
if(world.rand.nextInt(300) == 0) entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
if(world.rand.nextInt(500) == 0) entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 0));
if(entity instanceof EntityPlayer) ((EntityPlayer) entity).triggerAchievement(MainRegistry.achRadPoison);
}
}
/** Handles contamination from the chunk, the dimension as well as particle effects related to radiation sickness */
private static void handleRadiationFX(EntityLivingBase entity) {
World world = entity.worldObj;
if(!world.isRemote) {
if(ContaminationUtil.isRadImmune(entity))
return;
if(ContaminationUtil.isRadImmune(entity)) return;
int ix = (int)MathHelper.floor_double(entity.posX);
int iy = (int)MathHelper.floor_double(entity.posY);
@ -213,16 +283,9 @@ public class EntityEffectHandler {
if(world.provider.isHellWorld && RadiationConfig.hellRad > 0 && rad < RadiationConfig.hellRad)
rad = (float) RadiationConfig.hellRad;
if(rad > 0) {
ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, rad / 20F);
}
if(rad > 0) ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, rad / 20F);
if(entity.worldObj.isRaining() && BombConfig.cont > 0 && AuxSavedData.getThunder(entity.worldObj) > 0 && entity.worldObj.canBlockSeeTheSky(ix, iy, iz)) {
ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, BombConfig.cont * 0.0005F);
}
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)
return;
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode) return;
Random rand = new Random(entity.getEntityId());
@ -649,19 +712,16 @@ public class EntityEffectHandler {
}
int dashCount = armorDashCount + armorModDashCount;
boolean dashActivated = props.getKeyPressed(EnumKeybind.DASH);
if(dashCount * 30 < props.getStamina())
props.setStamina(dashCount * 30);
if(dashCount * 30 < props.getStamina()) props.setStamina(dashCount * 30);
if(dashCount > 0) {
int perDash = 30;
props.setDashCount(dashCount);
int stamina = props.getStamina();
props.setDashCount(dashCount);
if(props.getDashCooldown() <= 0) {
@ -674,8 +734,7 @@ public class EntityEffectHandler {
int forward = (int) Math.signum(player.moveForward);
int strafe = (int) Math.signum(player.moveStrafing);
if(forward == 0 && strafe == 0)
forward = 1;
if(forward == 0 && strafe == 0) forward = 1;
player.addVelocity(lookingIn.xCoord * forward + strafeVec.xCoord * strafe, 0, lookingIn.zCoord * forward + strafeVec.zCoord * strafe);
player.motionY = 0;
@ -694,7 +753,6 @@ public class EntityEffectHandler {
stamina++;
if(stamina % perDash == perDash-1) {
player.playSound("hbm:item.techBoop", 1.0F, (1.0F + ((1F/12F)*(stamina/perDash))));
stamina++;
}
@ -702,7 +760,6 @@ public class EntityEffectHandler {
props.setStamina(stamina);
}
}
}

View File

@ -56,30 +56,6 @@ public class GunEnergyFactory {
return config;
}
public static GunConfiguration getCryoCannonConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 1;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.firingDuration = 0;
config.ammoCap = 1_000;
config.durability = 10_000;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCLE;
config.name = "Cryo Cannon";
config.manufacturer = EnumGunManufacturer.DRG;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.CRYO_NORMAL);
return config;
}
public static BulletConfiguration getFextConfig() {
@ -335,15 +311,6 @@ public class GunEnergyFactory {
return bullet;
}
public static BulletConfiguration getCryoConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = new ComparableStack(ModItems.gun_cryolator_ammo);
bullet.ammoCount = 100;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
return bullet;
}
public static BulletConfiguration getTurbineConfig() {

View File

@ -138,7 +138,7 @@ public class Mats {
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setAutogen(DUSTTINY, BOLT, WIRE, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, GRIP).m();
public static final NTMMaterial MAT_MINGRADE = makeSmeltable(_AS + 1, MINGRADE, 0xFFBA7D, 0xAF1700, 0xE44C0F).setAutogen(WIRE, DUST, BLOCK).m();
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setAutogen(WIRE, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setAutogen(BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x82A59C, 0x06281E, 0x42665C).setAutogen(BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setAutogen(DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, STOCK, GRIP).m();
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setAutogen(CASTPLATE, HEAVYBARREL, HEAVYRECEIVER).m();

View File

@ -1435,8 +1435,6 @@ public class ModItems {
public static Item gun_b92;
public static Item gun_b92_ammo;
public static Item gun_cryocannon;
public static Item gun_cryolator_ammo;
public static Item gun_fireext;
public static Item gun_debug;
@ -1480,6 +1478,7 @@ public class ModItems {
public static Item gun_minigun_lacunae;
public static Item gun_missile_launcher;
public static Item gun_tesla_cannon;
public static Item gun_laser_pistol;
public static Item gun_stg77;
public static Item gun_tau;
public static Item gun_fatman;
@ -3824,8 +3823,6 @@ public class ModItems {
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt");
gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92");
gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo");
gun_cryocannon = new ItemCryoCannon(GunEnergyFactory.getCryoCannonConfig()).setUnlocalizedName("gun_cryocannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
gun_fireext = new ItemGunBase(GunEnergyFactory.getExtConfig()).setUnlocalizedName("gun_fireext").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fireext");
ToolMaterial matCrucible = EnumHelper.addToolMaterial("CRUCIBLE", 10, 3, 50.0F, 100.0F, 0);
@ -6420,7 +6417,6 @@ public class ModItems {
//Guns
GameRegistry.registerItem(gun_b92, gun_b92.getUnlocalizedName());
GameRegistry.registerItem(gun_cryocannon, gun_cryocannon.getUnlocalizedName());
GameRegistry.registerItem(gun_fireext, gun_fireext.getUnlocalizedName());
GameRegistry.registerItem(crucible, crucible.getUnlocalizedName());
@ -6465,6 +6461,7 @@ public class ModItems {
GameRegistry.registerItem(gun_minigun_lacunae, gun_minigun_lacunae.getUnlocalizedName());
GameRegistry.registerItem(gun_missile_launcher, gun_missile_launcher.getUnlocalizedName());
GameRegistry.registerItem(gun_tesla_cannon, gun_tesla_cannon.getUnlocalizedName());
GameRegistry.registerItem(gun_laser_pistol, gun_laser_pistol.getUnlocalizedName());
GameRegistry.registerItem(gun_stg77, gun_stg77.getUnlocalizedName());
GameRegistry.registerItem(gun_tau, gun_tau.getUnlocalizedName());
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
@ -6489,7 +6486,6 @@ public class ModItems {
//Ammo
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_cryolator_ammo, gun_cryolator_ammo.getUnlocalizedName());
GameRegistry.registerItem(ammo_fireext, ammo_fireext.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell, ammo_shell.getUnlocalizedName());

View File

@ -7,6 +7,7 @@ import com.google.common.collect.Multimap;
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.projectile.EntityExplosiveBeam;
import com.hbm.interfaces.Spaghetti;
import com.hbm.main.MainRegistry;
import net.minecraft.entity.Entity;
@ -23,6 +24,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
@Spaghetti("destroy this class")
public class GunB92 extends Item {
Random rand = new Random();
@ -264,19 +266,6 @@ public class GunB92 extends Item {
return rad * 5;
}
public static float getOffsetFromAnim(ItemStack stack) {
float i = getAnim(stack);
if (i < 10)
return 0;
i -= 10;
if (i < 10)
return i / 10;
else
return 2 - (i / 10);
}
public static float getTransFromAnim(ItemStack stack) {
float i = getAnim(stack);

View File

@ -1,118 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.entity.projectile.EntityChemical;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class ItemCryoCannon extends ItemGunBase {
public ItemCryoCannon(GunConfiguration config) {
super(config);
}
@Override
protected void fire(ItemStack stack, World world, EntityPlayer player) {
if(getPressure(stack) >= 1000) return;
if(getTurbine(stack) < 100) return;
BulletConfiguration config = null;
if(mainConfig.reloadType == GunConfiguration.RELOAD_NONE) {
config = getBeltCfg(player, stack, true);
} else {
config = BulletConfigSyncingUtil.pullConfig(mainConfig.config.get(getMagType(stack)));
}
int bullets = config.bulletsMin;
for(int k = 0; k < mainConfig.roundsPerCycle; k++) {
if(!hasAmmo(stack, player, true))
break;
if(config.bulletsMax > config.bulletsMin)
bullets += world.rand.nextInt(config.bulletsMax - config.bulletsMin);
for(int i = 0; i < bullets; i++) {
spawnProjectile(world, player, stack, BulletConfigSyncingUtil.getKey(config));
}
if(player instanceof EntityPlayerMP)
PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.CYCLE.ordinal()), (EntityPlayerMP) player);
useUpAmmo(player, stack, true);
player.inventoryContainer.detectAndSendChanges();
int wear = (int) Math.ceil(config.wear / (1F + EnchantmentHelper.getEnchantmentLevel(Enchantment.unbreaking.effectId, stack)));
setItemWear(stack, getItemWear(stack) + wear);
}
world.playSoundAtEntity(player, mainConfig.firingSound, mainConfig.firingVolume, mainConfig.firingPitch);
if(mainConfig.ejector != null && !mainConfig.ejector.getAfterReload())
queueCasing(player, mainConfig.ejector, config, stack);
}
@Override
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
EntityChemical chem = new EntityChemical(world, player, 0, 0, 0);
chem.setFluid(Fluids.OXYGEN);
world.spawnEntityInWorld(chem);
int pressure = getPressure(stack);
pressure += 5;
pressure = MathHelper.clamp_int(pressure, 0, 1000);
setPressure(stack, pressure);
}
@Override
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
int turbine = getTurbine(stack);
int pressure = getPressure(stack);
if(getIsMouseDown(stack)) {
turbine += 10;
} else {
turbine -= 5;
pressure -= 5;
}
turbine = MathHelper.clamp_int(turbine, 0, 100);
pressure = MathHelper.clamp_int(pressure, 0, 1000);
setTurbine(stack, turbine);
setPressure(stack, pressure);
super.updateServer(stack, world, player, slot, isCurrentItem);
}
public static void setTurbine(ItemStack stack, int i) {
writeNBT(stack, "turbine", i);
}
public static int getTurbine(ItemStack stack) {
return readNBT(stack, "turbine");
}
public static void setPressure(ItemStack stack, int i) {
writeNBT(stack, "pressure", i);
}
public static int getPressure(ItemStack stack) {
return readNBT(stack, "pressure");
}
}

View File

@ -77,6 +77,7 @@ public class GunFactoryClient {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_minigun_lacunae, new ItemRenderMinigun(ResourceManager.minigun_lacunae_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_missile_launcher, new ItemRenderMissileLauncher());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tesla_cannon, new ItemRenderTeslaCannon());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_laser_pistol, new ItemRenderLaserPistol(ResourceManager.laser_pistol_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stg77, new ItemRenderSTG77());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tau, new ItemRenderTau());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan());

View File

@ -979,6 +979,14 @@ public class Orchestras {
}
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_LASER_PISTOL = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_STG77 = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;

View File

@ -142,6 +142,17 @@ public class XFactoryEnergy {
.anim(LAMBDA_TESLA_ANIMS).orchestra(Orchestras.ORCHESTRA_TESLA)
).setUnlocalizedName("gun_tesla_cannon");
ModItems.gun_laser_pistol = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).scopeTexture(scope_luna)
.rec(new Receiver(0)
.dmg(50F).delay(8).spread(1F).spreadHipfire(2.5F).reload(44).jam(36).sound("hbm:weapon.fire.laser", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 30).addConfigs(energy_las, energy_las_overcharge, energy_las_ir))
.offset(0.75, -0.0625 * 1.5, -0.1875)
.setupStandardFire().recoil(LAMBDA_RECOIL_ENERGY))
.setupStandardConfiguration()
.anim(LAMBDA_LASER_PISTOL).orchestra(Orchestras.ORCHESTRA_LASER_PISTOL)
).setUnlocalizedName("gun_laser_pistol");
ModItems.gun_lasrifle = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).scopeTexture(scope_luna)
.rec(new Receiver(0)
@ -175,6 +186,10 @@ public class XFactoryEnergy {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASER_PISTOL = (stack, type) -> {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASRIFLE = (stack, type) -> {
int amount = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) {

View File

@ -543,7 +543,6 @@ public class ClientProxy extends ServerProxy {
//guns
MinecraftForgeClient.registerItemRenderer(ModItems.gun_b92, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fireext, new ItemRenderFireExt());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryocannon, new ItemRenderWeaponCryoCannon());
MinecraftForgeClient.registerItemRenderer(ModItems.detonator_laser, new ItemRenderDetonatorLaser());
//multitool
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());

View File

@ -1678,6 +1678,8 @@ public class MainRegistry {
ignoreMappings.add("hbm:tile.machine_nuke_furnace_off");
ignoreMappings.add("hbm:tile.machine_nuke_furnace_on");
ignoreMappings.add("hbm:item.singularity_micro");
ignoreMappings.add("hbm:item.gun_cryocannon");
ignoreMappings.add("hbm:item.gun_cryolator_ammo");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -22,6 +22,7 @@ import com.hbm.handler.BossSpawnHandler;
import com.hbm.handler.EntityEffectHandler;
import com.hbm.hazard.HazardSystem;
import com.hbm.interfaces.IBomb;
import com.hbm.interfaces.Spaghetti;
import com.hbm.handler.HTTPHandler;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.neutron.NeutronNodeWorld;
@ -33,7 +34,6 @@ import com.hbm.items.ModItems;
import com.hbm.items.armor.*;
import com.hbm.items.food.ItemConserve.EnumFoodType;
import com.hbm.items.tool.ItemGuideBook.BookType;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.factory.XFactory12ga;
@ -44,7 +44,6 @@ import com.hbm.packet.toclient.PermaSyncPacket;
import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.particle.helper.BlackPowderCreator;
import com.hbm.potion.HbmPotion;
import com.hbm.saveddata.AuxSavedData;
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
import com.hbm.tileentity.machine.rbmk.RBMKDials;
import com.hbm.tileentity.network.RTTYSystem;
@ -67,8 +66,6 @@ import net.minecraft.block.Block;
import net.minecraft.command.CommandGameRule;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
@ -78,9 +75,6 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.event.ClickEvent;
@ -98,7 +92,6 @@ import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.CommandEvent;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.EntityEvent;
@ -122,6 +115,7 @@ import org.apache.logging.log4j.Level;
import java.lang.reflect.Field;
import java.util.*;
@Spaghetti("fuck")
public class ModEventHandler {
private static Random rand = new Random();
@ -351,19 +345,17 @@ public class ModEventHandler {
EntityLivingBase entity = event.entityLiving;
World world = event.world;
if (!MobConfig.enableMobGear || entity.isChild() || world.isRemote) {
return;
}
if(!MobConfig.enableMobGear || entity.isChild() || world.isRemote) return;
Map<Integer, List<WeightedRandomObject>> slotPools = new HashMap<>();
if (entity instanceof EntityZombie) {
if (world.rand.nextFloat() < 0.005F) { // full hazmat zombine
if(entity instanceof EntityZombie) {
if(world.rand.nextFloat() < 0.005F) { // full hazmat zombine
equipFullSet(entity, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots);
return;
}
if (world.rand.nextFloat() < 0.005F) { // full security zombine
if(world.rand.nextFloat() < 0.005F) { // full security zombine
equipFullSet(entity, ModItems.security_helmet, ModItems.security_plate, ModItems.security_legs, ModItems.security_boots);
return;
}
@ -393,7 +385,8 @@ public class ModEventHandler {
{ModItems.alloy_axe, 5}, {ModItems.titanium_sword, 8}, {ModItems.lead_gavel, 4},
{ModItems.wrench, 20}, {ModItems.cobalt_decorated_sword, 2}, {ModItems.detonator_de, 1}
}));
} else if (entity instanceof EntitySkeleton) {
} else if(entity instanceof EntitySkeleton) {
float soot = PollutionHandler.getPollution(entity.worldObj,
MathHelper.floor_double(event.x), MathHelper.floor_double(event.y), MathHelper.floor_double(event.z), PollutionType.SOOT); //uhfgfg
@ -419,6 +412,7 @@ public class ModEventHandler {
ItemStack bowReplacement = getSkelegun(soot, world.rand);
slotPools.put(0, createSlotPool(50, bowReplacement != null ? new Object[][]{{bowReplacement, 1}} : new Object[][]{}));
}
assignItemsToEntity(entity, slotPools);
}
@ -645,7 +639,6 @@ public class ModEventHandler {
@SubscribeEvent
public void worldTick(WorldTickEvent event) {
/// RADIATION STUFF START ///
if(event.world != null && !event.world.isRemote) {
if(reference != null) {
@ -660,149 +653,16 @@ public class ModEventHandler {
}*/
}
int thunder = AuxSavedData.getThunder(event.world);
if(event.phase == Phase.END) {
if(thunder > 0)
AuxSavedData.setThunder(event.world, thunder - 1);
if(!event.world.loadedEntityList.isEmpty()) {
List<Object> oList = new ArrayList<Object>();
oList.addAll(event.world.loadedEntityList);
/**
* REMOVE THIS V V V
*/
for(Object e : oList) {
if(e instanceof EntityLivingBase) {
//effect for radiation
EntityLivingBase entity = (EntityLivingBase) e;
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)
continue;
float eRad = HbmLivingProps.getRadiation(entity);
if(entity.getClass().equals(EntityCreeper.class) && eRad >= 200 && entity.getHealth() > 0) {
if(event.world.rand.nextInt(3) == 0 ) {
EntityCreeperNuclear creep = new EntityCreeperNuclear(event.world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
if(!entity.isDead)
if(!event.world.isRemote)
event.world.spawnEntityInWorld(creep);
entity.setDead();
} else {
entity.attackEntityFrom(ModDamageSource.radiation, 100F);
}
continue;
} else if(entity instanceof EntityCow && !(entity instanceof EntityMooshroom) && eRad >= 50) {
EntityMooshroom creep = new EntityMooshroom(event.world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
if(!entity.isDead)
if(!event.world.isRemote)
event.world.spawnEntityInWorld(creep);
entity.setDead();
continue;
} else if(entity instanceof EntityVillager && eRad >= 500) {
EntityZombie creep = new EntityZombie(event.world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
if(!entity.isDead)
if(!event.world.isRemote)
event.world.spawnEntityInWorld(creep);
entity.setDead();
continue;
} else if(entity.getClass().equals(EntityDuck.class) && eRad >= 200) {
EntityQuackos quacc = new EntityQuackos(event.world);
quacc.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
if(!entity.isDead && !event.world.isRemote)
event.world.spawnEntityInWorld(quacc);
entity.setDead();
continue;
}
if(eRad < 200 || ContaminationUtil.isRadImmune(entity))
continue;
if(eRad > 2500)
HbmLivingProps.setRadiation(entity, 2500);
if(eRad >= 1000) {
entity.attackEntityFrom(ModDamageSource.radiation, 1000F);
HbmLivingProps.setRadiation(entity, 0);
if(entity.getHealth() > 0) {
entity.setHealth(0);
entity.onDeath(ModDamageSource.radiation);
}
if(entity instanceof EntityPlayer)
((EntityPlayer)entity).triggerAchievement(MainRegistry.achRadDeath);
} else if(eRad >= 800) {
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 2));
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 10 * 20, 2));
if(event.world.rand.nextInt(500) == 0)
entity.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 2));
if(event.world.rand.nextInt(700) == 0)
entity.addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 20, 1));
} else if(eRad >= 600) {
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 2));
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 10 * 20, 2));
if(event.world.rand.nextInt(500) == 0)
entity.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 1));
} else if(eRad >= 400) {
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 30, 0));
if(event.world.rand.nextInt(500) == 0)
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5 * 20, 0));
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 1));
} else if(eRad >= 200) {
if(event.world.rand.nextInt(300) == 0)
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
if(event.world.rand.nextInt(500) == 0)
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 5 * 20, 0));
if(entity instanceof EntityPlayer)
((EntityPlayer)entity).triggerAchievement(MainRegistry.achRadPoison);
}
}
for(Object e : event.world.loadedEntityList) {
if(e instanceof EntityItem) {
EntityItem item = (EntityItem) e;
HazardSystem.updateDroppedItem(item);
}
}
/**
* REMOVE THIS ^ ^ ^
*/
}
/// RADIATION STUFF END ///
if(event.phase == Phase.END) {
EntityRailCarBase.updateMotion(event.world);
}
}
@ -1170,17 +1030,6 @@ public class ModEventHandler {
/// PU RADIATION END ///
/*if(player instanceof EntityPlayerMP) {
int x = (int) Math.floor(player.posX);
int y = (int) Math.floor(player.posY - 0.01);
int z = (int) Math.floor(player.posZ);
if(player.worldObj.getTileEntity(x, y, z) instanceof IEnergyConductor) {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(((IEnergyConductor) player.worldObj.getTileEntity(x, y, z)).getPowerNet() + ""), (EntityPlayerMP) player);
}
}*/
/// NEW ITEM SYS START ///
HazardSystem.updatePlayerInventory(player);
/// NEW ITEM SYS END ///
@ -1200,52 +1049,6 @@ public class ModEventHandler {
player.worldObj.spawnParticle("townaura", player.posX + vec.xCoord, player.posY + 1 + vec.yCoord, player.posZ + vec.zCoord, 0.0, 0.0, 0.0);
}
}
// OREDBG
/*if(!event.player.worldObj.isRemote) {
for(BedrockOreType type : BedrockOreType.values()) {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(StatCollector.translateToLocalFormatted("item.bedrock_ore.type." + type.suffix + ".name") + ": " + ((int) (ItemBedrockOreBase.getOreLevel((int) Math.floor(player.posX), (int) Math.floor(player.posZ), type) * 100) / 100D), 777 + type.ordinal()), (EntityPlayerMP) player);
}
}*/
// PRISMDBG
/*if(!event.player.worldObj.isRemote) {
ChunkRadiationHandlerPRISM prism = (ChunkRadiationHandlerPRISM) ChunkRadiationManager.proxy;
RadPerWorld perWorld = prism.perWorld.get(player.worldObj);
if(perWorld != null) {
SubChunk[] chunk = perWorld.radiation.get(new ChunkCoordIntPair(((int) Math.floor(player.posX)) >> 4, ((int) Math.floor(player.posZ)) >> 4));
if(chunk != null) {
int y = ((int) Math.floor(player.posY)) >> 4;
if(y >= 0 && y <= 15) {
SubChunk sub = chunk[y];
if(sub != null) {
float xSum = 0, ySum = 0, zSum = 0;
for(int i = 0; i < 16; i++) {
xSum += sub.xResist[i]; ySum += sub.yResist[i]; zSum += sub.zResist[i];
}
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "FREE SPACE", 1), (EntityPlayerMP) player);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "FREE SPACE", 2), (EntityPlayerMP) player);
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "" + sub.checksum + " - " + ((int) sub.radiation) + "RAD/s - " + sub.needsRebuild
+ " - " + (int) xSum+ " - " + (int) ySum + " - " + (int) zSum, 3), (EntityPlayerMP) player);
} else {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "SUB IS NULL", 1), (EntityPlayerMP) player);
}
} else {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "OUTSIDE OF WORLD", 1), (EntityPlayerMP) player);
}
} else {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "CHUNK IS NULL", 1), (EntityPlayerMP) player);
}
} else {
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "PERWORLD IS NULL", 1), (EntityPlayerMP) player);
}
}*/
}
@SubscribeEvent
@ -1253,11 +1056,13 @@ public class ModEventHandler {
if(event.phase == Phase.START) {
// do other shit I guess?
// Redstone over Radio
RTTYSystem.updateBroadcastQueue();
// Logistics drone network
RequestNetwork.updateEntries();
// Radar entry handling
TileEntityMachineRadarNT.updateSystem();
//Nodespace.updateNodespace();
// Networks! All of them!
UniNodespace.updateNodespace();
}
@ -1501,30 +1306,6 @@ public class ModEventHandler {
}
}
@SubscribeEvent
public void anvilUpdateEvent(AnvilUpdateEvent event) {
if(event.left.getItem() instanceof ItemGunBase && event.right.getItem() == Items.enchanted_book) {
event.output = event.left.copy();
Map mapright = EnchantmentHelper.getEnchantments(event.right);
Iterator itr = mapright.keySet().iterator();
while(itr.hasNext()) {
int i = ((Integer) itr.next()).intValue();
int j = ((Integer) mapright.get(Integer.valueOf(i))).intValue();
Enchantment e = Enchantment.enchantmentsList[i];
EnchantmentUtil.removeEnchantment(event.output, e);
EnchantmentUtil.addEnchantment(event.output, e, j);
}
event.cost = 10;
}
}
@SubscribeEvent
public void onFoodEaten(PlayerUseItemEvent.Finish event) {
@ -1546,8 +1327,6 @@ public class ModEventHandler {
Entity entity = event.entity;
Entity[] parts = entity.getParts();
//MainRegistry.logger.error("Trying to spawn entity " + entity.getClass().getCanonicalName());
if(parts != null) {
for(int i = 0; i < parts.length; i++) {

View File

@ -875,6 +875,7 @@ public class ResourceManager {
public static final IModelCustom minigun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/minigun.obj")).asVBO();
public static final IModelCustom missile_launcher = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/missile_launcher.obj")).asVBO();
public static final IModelCustom tesla_cannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tesla_cannon.obj")).asVBO();
public static final IModelCustom laser_pistol = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/laser_pistol.obj")).asVBO();
public static final IModelCustom stg77 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/stg77.obj")).asVBO();
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj")).asVBO();
public static final IModelCustom fatman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/fatman.obj")).asVBO();
@ -993,6 +994,8 @@ public class ResourceManager {
public static final ResourceLocation minigun_lacunae_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/minigun_lacunae.png");
public static final ResourceLocation missile_launcher_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/missile_launcher.png");
public static final ResourceLocation tesla_cannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tesla_cannon.png");
public static final ResourceLocation laser_pistol_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_pistol.png");
public static final ResourceLocation laser_pistol_pew_pew_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_pistol_pew_pew.png");
public static final ResourceLocation stg77_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/stg77.png");
public static final ResourceLocation tau_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tau.png");
public static final ResourceLocation fatman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman.png");

View File

@ -1,118 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemCryoCannon;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponCryoCannon implements IItemRenderer {
public static final ResourceLocation[] fill_tex = new ResourceLocation[15];
public static final ResourceLocation[] pressure_tex = new ResourceLocation[12];
public static final ResourceLocation[] turbine_tex = new ResourceLocation[9];
public ItemRenderWeaponCryoCannon() {
for(int i = 0; i < fill_tex.length; i++) fill_tex[i] = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon/fill_" + i + ".png");
for(int i = 0; i < pressure_tex.length; i++) pressure_tex[i] = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon/pressure_" + i + ".png");
for(int i = 0; i < turbine_tex.length; i++) turbine_tex[i] = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon/turbine_" + i + ".png");
}
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.cryocannon_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.25D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1, 0, -0.3);
GL11.glRotated(80, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
ItemGunBase gun = (ItemGunBase) item.getItem();
ResourceManager.cryocannon.renderPart("Gun");
ResourceManager.cryocannon.renderPart("Rotor");
Minecraft.getMinecraft().renderEngine.bindTexture(fill_tex[MathHelper.clamp_int(ItemGunBase.getMag(item) * fill_tex.length / gun.mainConfig.ammoCap, 0, fill_tex.length - 1)]);
ResourceManager.cryocannon.renderPart("Fuel");
Minecraft.getMinecraft().renderEngine.bindTexture(turbine_tex[MathHelper.clamp_int(turbine_tex.length - 1 - ItemCryoCannon.getTurbine(item) * turbine_tex.length / 100, 0, turbine_tex.length - 1)]);
ResourceManager.cryocannon.renderPart("Spin");
Minecraft.getMinecraft().renderEngine.bindTexture(pressure_tex[MathHelper.clamp_int(ItemCryoCannon.getPressure(item) * pressure_tex.length / 1000, 0, pressure_tex.length - 1)]);
ResourceManager.cryocannon.renderPart("Pressure");
break;
case EQUIPPED:
double scale = 0.5D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.75F, -2.5F, 3.5F);
break;
case ENTITY:
double s1 = 0.25D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslated(0, 0, 3);
break;
case INVENTORY:
double s = 2.5D;
GL11.glTranslated(1, 6, 0);
GL11.glRotated(-135, 0, 0, 1);
GL11.glRotated(-90, 0, 1, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
}
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) ResourceManager.cryocannon.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -0,0 +1,92 @@
package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class ItemRenderLaserPistol extends ItemRenderWeaponBase {
public ResourceLocation texture;
public ItemRenderLaserPistol(ResourceLocation texture) {
this.texture = texture;
}
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
@Override
public float getViewFOV(ItemStack stack, float fov) {
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
return fov * (1 - aimingProgress * 0.33F);
}
@Override
public void setupFirstPerson(ItemStack stack) {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.75F * offset, -2F * offset, 2.75F * offset,
0, -10 / 8D, 1.25);
}
@Override
public void renderFirstPerson(ItemStack stack) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
double scale = 0.375D;
GL11.glScaled(scale, scale, scale);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.laser_pistol.renderPart("Gun");
ResourceManager.laser_pistol.renderPart("Latch");
GL11.glShadeModel(GL11.GL_FLAT);
}
@Override
public void setupThirdPerson(ItemStack stack) {
super.setupThirdPerson(stack);
double scale = 1.75D;
GL11.glScaled(scale, scale, scale);
GL11.glTranslated(0, -3, 4);
}
@Override
public void setupInv(ItemStack stack) {
super.setupInv(stack);
double scale = 1.75D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(25, 1, 0, 0);
GL11.glRotated(45, 0, 1, 0);
GL11.glTranslated(0, -0.5, 0);
}
@Override
public void setupModTable(ItemStack stack) {
double scale = -10D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, -0.5, 0);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
ResourceManager.laser_pistol.renderPart("Gun");
ResourceManager.laser_pistol.renderPart("Latch");
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -1,126 +0,0 @@
package com.hbm.saveddata;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
public class AuxSavedData extends WorldSavedData {
public List<DataPair> data = new ArrayList();
public AuxSavedData(String p_i2141_1_) {
super(p_i2141_1_);
}
public AuxSavedData()
{
super("hbmauxdata");
this.markDirty();
}
static class DataPair {
String key = "";
int value;
public DataPair() { }
public DataPair(String s, int i) {
key = s;
value = i;
}
void readFromNBT(NBTTagCompound nbt, int i) {
this.key = nbt.getString("aux_key_" + i);
this.value = nbt.getInteger("aux_val_" + i);
}
void writeToNBT(NBTTagCompound nbt, int i) {
nbt.setString("aux_key_" + i, key);
nbt.setInteger("aux_val_" + i, value);
}
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
int count = nbt.getInteger("dCount");
for(int i = 0; i < count; i++) {
DataPair struct = new DataPair();
struct.readFromNBT(nbt, i);
data.add(struct);
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
nbt.setInteger("dCount", data.size());
for(int i = 0; i < data.size(); i++) {
data.get(i).writeToNBT(nbt, i);
}
}
public static AuxSavedData getData(World worldObj) {
AuxSavedData data = (AuxSavedData)worldObj.perWorldStorage.loadData(AuxSavedData.class, "hbmauxdata");
if(data == null) {
worldObj.perWorldStorage.setData("hbmauxdata", new AuxSavedData());
data = (AuxSavedData)worldObj.perWorldStorage.loadData(AuxSavedData.class, "hbmauxdata");
}
return data;
}
public static void setThunder(World world, int dura) {
AuxSavedData data = getData(world);
if(data.data == null) {
data.data = new ArrayList();
data.data.add(new DataPair("thunder", dura));
} else {
DataPair thunder = null;
for(DataPair pair : data.data) {
if(pair.key.equals("thunder")) {
thunder = pair;
break;
}
}
if(thunder == null) {
data.data.add(new DataPair("thunder", dura));
} else {
thunder.value = dura;
}
}
data.markDirty();
}
public static int getThunder(World world) {
AuxSavedData data = getData(world);
if(data == null)
return 0;
for(DataPair pair : data.data) {
if(pair.key.equals("thunder")) {
return pair.value;
}
}
return 0;
}
}

View File

@ -1,51 +0,0 @@
package com.hbm.saveddata;
import java.util.Arrays;
import net.minecraft.nbt.NBTTagCompound;
public class BroadcastSaveStructure {
public int broadcastID;
public BroadcastType broadcastType;
public int posX;
public int posZ;
public BroadcastSaveStructure() { }
public BroadcastSaveStructure(int id, BroadcastType type) {
broadcastID = id;
broadcastType = type;
}
public enum BroadcastType {
DEMO;
public static BroadcastType getEnum(int i) {
if(i < BroadcastType.values().length)
return BroadcastType.values()[i];
else
return BroadcastType.DEMO;
}
public int getID() {
return Arrays.asList(BroadcastType.values()).indexOf(this);
}
}
public void readFromNBT(NBTTagCompound nbt, int index) {
broadcastID = nbt.getInteger("bc_" + index + "_id");
broadcastType = BroadcastType.getEnum(nbt.getInteger("bc_" + index + "_type"));
posX = nbt.getInteger("bc_" + index + "_x");
posZ = nbt.getInteger("bc_" + index + "_z");
}
public void writeToNBT(NBTTagCompound nbt, int index) {
nbt.setInteger("bc_" + index + "_id", broadcastID);
nbt.setInteger("bc_" + index + "_type", broadcastType.getID());
nbt.setInteger("bc_" + index + "_x", posX);
nbt.setInteger("bc_" + index + "_z", posZ);
}
}

View File

@ -1,60 +0,0 @@
package com.hbm.saveddata;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.WorldSavedData;
public class BroadcastSavedData extends WorldSavedData {
public int bcCount;
public List<BroadcastSaveStructure> broadcasts = new ArrayList();
public BroadcastSavedData(String p_i2141_1_) {
super(p_i2141_1_);
}
public BroadcastSavedData()
{
super("broadcasts");
this.markDirty();
}
public boolean isIdTaken(int id) {
return getBroadcastFromId(id) != null;
}
public BroadcastSaveStructure getBroadcastFromId(int id) {
for(BroadcastSaveStructure bc : broadcasts)
if(bc.broadcastID == id)
return bc;
return null;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
bcCount = nbt.getInteger("bcCount");
for(int i = 0; i < bcCount; i++) {
BroadcastSaveStructure struct = new BroadcastSaveStructure();
struct.readFromNBT(nbt, i);
broadcasts.add(struct);
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
nbt.setInteger("bcCount", broadcasts.size());
for(int i = 0; i < broadcasts.size(); i++) {
broadcasts.get(i).writeToNBT(nbt, i);
}
}
}

View File

@ -8,8 +8,9 @@ import com.hbm.main.MainRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@ -39,26 +40,30 @@ public class TileEntityLandmine extends TileEntity {
height *= 2;
}
@SuppressWarnings("unchecked")
List<Object> list = worldObj.getEntitiesWithinAABBExcludingEntity(null,
AxisAlignedBB.getBoundingBox(xCoord - range, yCoord - height, zCoord - range, xCoord + range + 1, yCoord + height, zCoord + range + 1));
if(!worldObj.getBlock(xCoord, yCoord + 1, zCoord).isAir(worldObj, xCoord, yCoord + 1, zCoord)) return;
List<Entity> list = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(xCoord - range, yCoord - height, zCoord - range, xCoord + range + 1, yCoord + height, zCoord + range + 1));
for(Object o : list) {
if(o instanceof EntityBat) continue;
for(Entity entity : list) {
if(entity.isCreatureType(EnumCreatureType.waterCreature, false)) continue;
if(entity.isCreatureType(EnumCreatureType.ambient, false)) continue;
if(waitingForPlayer) {
// This mine has been generated by worldgen and is ignoring mobs until a player is close enough
// This is to prevent worldgen mines from detonating well before they become gameplay relevant
if(o instanceof EntityPlayer) {
if(entity instanceof EntityPlayer) {
waitingForPlayer = false;
return;
}
} else {
if(o instanceof EntityLivingBase) {
if(entity instanceof EntityLivingBase) {
if(isPrimed) {
//the explosion is part of the mine block so that the IBomb interface works, i remember now
landmine.explode(worldObj, xCoord, yCoord, zCoord);
if(o instanceof EntityPlayer) ((EntityPlayer) o).addStat(MainRegistry.statMines, 1);
if(entity instanceof EntityPlayer) ((EntityPlayer) entity).addStat(MainRegistry.statMines, 1);
}
return;

View File

@ -4,7 +4,7 @@ import java.io.IOException;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.config.GeneralConfig;
import com.hbm.config.ClientConfig;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
@ -53,7 +53,7 @@ public class TileEntityTowerLarge extends TileEntityCondenser {
if(worldObj.isRemote) {
if(GeneralConfig.enableSteamParticles && (this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 4 == 0)) {
if(ClientConfig.COOLING_TOWER_PARTICLES.get() && (this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 4 == 0)) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "tower");
data.setFloat("lift", 0.5F);

View File

@ -4,7 +4,7 @@ import java.io.IOException;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.config.GeneralConfig;
import com.hbm.config.ClientConfig;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
@ -53,7 +53,7 @@ public class TileEntityTowerSmall extends TileEntityCondenser {
if(worldObj.isRemote) {
if(GeneralConfig.enableSteamParticles && (this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 2 == 0)) {
if(ClientConfig.COOLING_TOWER_PARTICLES.get() && (this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 2 == 0)) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "tower");
data.setFloat("lift", 1F);

View File

@ -12,10 +12,18 @@ import com.hbm.util.fauxpointtwelve.DirPos;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
/**
* Unified Nodespace, a Nodespace for all applications.
* "Nodespace" is an invisible "dimension" where nodes exist, a node is basically the "soul" of a tile entity with networking capabilities.
* Instead of tile entities having to find each other which is costly and assumes the tiles are loaded, tiles simply create nodes at their
* respective position in nodespace, the nodespace itself handles stuff like connections which can also happen in unloaded chunks.
* A node is so to say the "soul" of a tile entity which can act independent of its "body".
* @author hbm
*/
public class UniNodespace {
public static HashMap<World, UniNodeWorld> worlds = new HashMap();
public static Set<NodeNet> activeNodeNets = new HashSet<>();
public static Set<NodeNet> activeNodeNets = new HashSet();
public static GenNode getNode(World world, int x, int y, int z, INetworkProvider type) {
UniNodeWorld nodeWorld = worlds.get(world);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 B

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 352 B