Skip to content

Commit

Permalink
fixed a crash, bonk, missing textures, centrifuge on a stick
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed May 25, 2020
1 parent 05611e7 commit 6647ca4
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 95 deletions.
1 change: 1 addition & 0 deletions assets/hbm/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,7 @@ item.cobalt_pickaxe.name=Kobaltspitzhacke
item.cobalt_axe.name=Kobaltaxt
item.cobalt_shovel.name=Kobaltschaufel
item.cobalt_hoe.name=Kobaltfeldhacke
item.centri_stick.name=Zentrifuge am Spieß

tile.red_cable.name=Rotes Kupferkabel

Expand Down
1 change: 1 addition & 0 deletions assets/hbm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,7 @@ item.cobalt_pickaxe.name=Cobalt Pickaxe
item.cobalt_axe.name=Cobalt Axe
item.cobalt_shovel.name=Cobalt Shovel
item.cobalt_hoe.name=Cobalt Hoe
item.centri_stick.name=Centrifuge on a Stick

tile.red_cable.name=Red Copper Cable

Expand Down
1 change: 1 addition & 0 deletions assets/hbm/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"weapon.teslaShoot": {"category": "player", "sounds": [{"name": "weapon/teslaShoot", "stream": false}]},
"weapon.flamerReload": {"category": "player", "sounds": [{"name": "weapon/flamerReload", "stream": false}]},
"weapon.stop": {"category": "player", "sounds": ["weapon/stop1", "weapon/stop2"]},
"weapon.bonk": {"category": "player", "sounds": [{"name": "weapon/bonk", "stream": false}]},

"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},
Expand Down
Binary file added assets/hbm/sounds/weapon/bonk.ogg
Binary file not shown.
Binary file added assets/hbm/textures/items/centri_stick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/models/tank_BALEFIRE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/models/tank_HYDROGEN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/models/tank_MERCURY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/models/tank_OXYGEN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/models/tank_XENON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions com/hbm/entity/missile/EntityBobmazon.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ public void onUpdate() {
EntityItem pack = new EntityItem(worldObj, posX, posY + 2, posZ, payload);
pack.motionX = 0;
pack.motionZ = 0;
if(!worldObj.spawnEntityInWorld(pack))
System.out.println("BBBBBBBBBBB");
} else {
System.out.println("AAAAAAAAAAAA");
worldObj.spawnEntityInWorld(pack);
}

this.setDead();
Expand Down
1 change: 0 additions & 1 deletion com/hbm/entity/missile/EntityMissileCustom.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ protected void entityInit() {
this.dataWatcher.addObject(8, Integer.valueOf(this.health));

if(template != null) {
System.out.println("yeah");
this.dataWatcher.addObject(9, Integer.valueOf(Item.getIdFromItem(template.warhead)));
this.dataWatcher.addObject(10, Integer.valueOf(Item.getIdFromItem(template.fuselage)));

Expand Down
6 changes: 1 addition & 5 deletions com/hbm/entity/missile/EntitySoyuz.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,11 @@ private void deployPayload() {
capsule.payload = this.payload;
capsule.soyuz = this.getSkin();
capsule.setPosition(targetX + 0.5, 600, targetZ + 0.5);
System.out.println(capsule.posX + " " + capsule.posZ);

IChunkProvider provider = worldObj.getChunkProvider();
provider.loadChunk(targetX >> 4, targetZ >> 4);

if(worldObj.spawnEntityInWorld(capsule))
System.out.println("Success!");
else
System.out.println("Crap.");
worldObj.spawnEntityInWorld(capsule);
}

this.setDead();
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/handler/ToolAbility.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.hbm.handler;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
Expand All @@ -17,7 +18,6 @@
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import scala.actors.threadpool.Arrays;

public abstract class ToolAbility {

Expand Down
114 changes: 60 additions & 54 deletions com/hbm/items/ModItems.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion com/hbm/items/special/ItemRadioactive.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void doRadiationDamage(Entity entity, float mod) {
if (entity instanceof EntityLivingBase) {

if(this.radiation > 0)
Library.applyRadData(entity, this.radiation / 20F);
Library.applyRadData(entity, this.radiation * mod / 20F);

if(this.fire)
entity.setFire(5);
Expand Down
10 changes: 8 additions & 2 deletions com/hbm/items/tool/ItemToolAbility.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public class ItemToolAbility extends ItemTool {
public static enum EnumToolType {

SWORD(
Sets.newHashSet(new Material[] { Material.plants, Material.vine, Material.coral, Material.leaves, Material.gourd }),
Sets.newHashSet(new Block[] { Blocks.web })
Sets.newHashSet(new Material[] { Material.plants, Material.vine, Material.coral, Material.leaves, Material.gourd , Material.web })
),
PICKAXE(
Sets.newHashSet(new Material[] { Material.iron, Material.anvil, Material.rock }),
Expand All @@ -62,8 +61,15 @@ public static enum EnumToolType {
SHOVEL(
Sets.newHashSet(new Material[] { Material.clay, Material.sand, Material.ground, Material.snow, Material.craftedSnow }),
Sets.newHashSet(new Block[] { Blocks.grass, Blocks.dirt, Blocks.sand, Blocks.gravel, Blocks.snow_layer, Blocks.snow, Blocks.clay, Blocks.farmland, Blocks.soul_sand, Blocks.mycelium })
),
MINER(
Sets.newHashSet(new Material[] { Material.iron, Material.anvil, Material.rock, Material.clay, Material.sand, Material.ground, Material.snow, Material.craftedSnow })
);

private EnumToolType(Set<Material> materials) {
this.materials = materials;
}

private EnumToolType(Set<Material> materials, Set<Block> blocks) {
this.materials = materials;
this.blocks = blocks;
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/items/tool/WeaponSpecial.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean hitEntity(ItemStack stack, EntityLivingBase entity, EntityLivingB
{
entity.setHealth(0.0F);
}
world.playSoundAtEntity(entity, "random.anvil_land", 3.0F, 0.1F);
world.playSoundAtEntity(entity, "hbm:weapon.bonk", 3.0F, 1.0F);
}

if(this == ModItems.bottle_opener) {
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/lib/RefStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3514)";
public static final String VERSION = "1.0.27 BETA (3515)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,7 @@ public static void reg2() {
GameRegistry.addRecipe(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ModItems.ingot_polymer, 'D', ModItems.ingot_dura_steel, 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
GameRegistry.addRecipe(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ModItems.ingot_polymer, 'D', ModItems.ingot_dura_steel, 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
GameRegistry.addRecipe(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ModItems.ingot_polymer, 'D', ModItems.ingot_dura_steel, 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.desh_sword, 1), new Object[] { "I", "I", "S", 'I', ModItems.ingot_desh, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.desh_pickaxe, 1), new Object[] { "III", " S ", " S ", 'I', ModItems.ingot_desh, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.desh_axe, 1), new Object[] { "II", "IS", " S", 'I', ModItems.ingot_desh, 'S', Items.stick });
Expand Down Expand Up @@ -1365,7 +1366,6 @@ public static void reg2() {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity, 1), new Object[] { " PI", "BBM", " PI", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_dual, 1), new Object[] { "BBM", " PI", "BBM", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_ammo, 8), new Object[] { "S", "C", "G", 'S', "plateSteel", 'C', "plateCopper", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.analyzer, 1), new Object[] { " S ", "SGS", " S ", 'S', "plateSteel", 'G', "paneGlassColorless" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.custom_fall, 1), new Object[] { "IIP", "CHW", "IIP", 'I', ModItems.plate_polymer, 'P', "plateSaturnite", 'C', ModItems.circuit_red_copper, 'H', ModItems.hull_small_steel, 'W', ModItems.coil_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.reactor_sensor, 1), new Object[] { "WPW", "CMC", "PPP", 'W', ModItems.wire_tungsten, 'P', "plateLead", 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.magnetron }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_controller, 1), new Object[] { "PGP", "ICI", "PRP", 'P', ModItems.plate_desh, 'G', "paneGlass", 'I', "ingotPolymer", 'R', "blockRedstone", 'C', ModItems.circuit_targeting_tier4 }));
Expand Down
36 changes: 18 additions & 18 deletions com/hbm/main/MainRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ public class MainRegistry
public static Logger logger;

//Tool Materials
public static ToolMaterial enumToolMaterialSchrabidium = EnumHelper.addToolMaterial("SCHRABIDIUM", 3, 10000, 50.0F, 100.0F, 200);
public static ToolMaterial enumToolMaterialHammer = EnumHelper.addToolMaterial("SCHRABIDIUMHAMMER", 3, 0, 50.0F, 999999996F, 200);
public static ToolMaterial enumToolMaterialChainsaw = EnumHelper.addToolMaterial("CHAINSAW", 3, 1500, 50.0F, 22.0F, 0);
public static ToolMaterial enumToolMaterialSteel = EnumHelper.addToolMaterial("HBM_STEEL", 2, 500, 7.5F, 2.0F, 10);
public static ToolMaterial enumToolMaterialTitanium = EnumHelper.addToolMaterial("HBM_TITANIUM", 3, 750, 9.0F, 2.5F, 15);
public static ToolMaterial enumToolMaterialAlloy= EnumHelper.addToolMaterial("HBM_ALLOY", 3, 2000, 15.0F, 5.0F, 5);
public static ToolMaterial enumToolMaterialCmb = EnumHelper.addToolMaterial("CMB", 3, 8500, 40.0F, 55F, 100);
public static ToolMaterial enumToolMaterialElec = EnumHelper.addToolMaterial("ELEC", 3, 0, 30.0F, 12.0F, 2);
public static ToolMaterial enumToolMaterialDesh = EnumHelper.addToolMaterial("DESH", 2, 0, 7.5F, 2.0F, 10);
public static ToolMaterial enumToolMaterialCobalt = EnumHelper.addToolMaterial("HBM_COBALT", 3, 750, 9.0F, 2.5F, 15);
public static ToolMaterial tMatSchrab = EnumHelper.addToolMaterial("SCHRABIDIUM", 3, 10000, 50.0F, 100.0F, 200);
public static ToolMaterial tMatHammmer = EnumHelper.addToolMaterial("SCHRABIDIUMHAMMER", 3, 0, 50.0F, 999999996F, 200);
public static ToolMaterial tMatChainsaw = EnumHelper.addToolMaterial("CHAINSAW", 3, 1500, 50.0F, 22.0F, 0);
public static ToolMaterial tMatSteel = EnumHelper.addToolMaterial("HBM_STEEL", 2, 500, 7.5F, 2.0F, 10);
public static ToolMaterial tMatTitan = EnumHelper.addToolMaterial("HBM_TITANIUM", 3, 750, 9.0F, 2.5F, 15);
public static ToolMaterial tMatAlloy= EnumHelper.addToolMaterial("HBM_ALLOY", 3, 2000, 15.0F, 5.0F, 5);
public static ToolMaterial tMatCMB = EnumHelper.addToolMaterial("HBM_CMB", 3, 8500, 40.0F, 55F, 100);
public static ToolMaterial tMatElec = EnumHelper.addToolMaterial("HBM_ELEC", 3, 0, 30.0F, 12.0F, 2);
public static ToolMaterial tMatDesh = EnumHelper.addToolMaterial("HBM_DESH", 2, 0, 7.5F, 2.0F, 10);
public static ToolMaterial tMatCobalt = EnumHelper.addToolMaterial("HBM_COBALT", 3, 750, 9.0F, 2.5F, 15);

public static ToolMaterial enumToolMaterialSaw = EnumHelper.addToolMaterial("SAW", 2, 750, 2.0F, 3.5F, 25);
public static ToolMaterial enumToolMaterialBat = EnumHelper.addToolMaterial("BAT", 0, 500, 1.5F, 3F, 25);
Expand Down Expand Up @@ -397,15 +397,15 @@ public void PreLoad(FMLPreInitializationEvent PreEvent)
aMatSecurity.customCraftingMaterial = ModItems.plate_kevlar;
aMatCobalt.customCraftingMaterial = ModItems.ingot_cobalt;
aMatStarmetal.customCraftingMaterial = ModItems.ingot_starmetal;
enumToolMaterialSchrabidium.setRepairItem(new ItemStack(ModItems.ingot_schrabidium));
enumToolMaterialHammer.setRepairItem(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium)));
enumToolMaterialChainsaw.setRepairItem(new ItemStack(ModItems.ingot_steel));
enumToolMaterialTitanium.setRepairItem(new ItemStack(ModItems.ingot_titanium));
enumToolMaterialSteel.setRepairItem(new ItemStack(ModItems.ingot_steel));
enumToolMaterialAlloy.setRepairItem(new ItemStack(ModItems.ingot_advanced_alloy));
enumToolMaterialCmb.setRepairItem(new ItemStack(ModItems.ingot_combine_steel));
tMatSchrab.setRepairItem(new ItemStack(ModItems.ingot_schrabidium));
tMatHammmer.setRepairItem(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium)));
tMatChainsaw.setRepairItem(new ItemStack(ModItems.ingot_steel));
tMatTitan.setRepairItem(new ItemStack(ModItems.ingot_titanium));
tMatSteel.setRepairItem(new ItemStack(ModItems.ingot_steel));
tMatAlloy.setRepairItem(new ItemStack(ModItems.ingot_advanced_alloy));
tMatCMB.setRepairItem(new ItemStack(ModItems.ingot_combine_steel));
enumToolMaterialBottleOpener.setRepairItem(new ItemStack(ModItems.plate_steel));
enumToolMaterialDesh.setRepairItem(new ItemStack(ModItems.ingot_desh));
tMatDesh.setRepairItem(new ItemStack(ModItems.ingot_desh));

NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GUIHandler());
GameRegistry.registerTileEntity(TileEntityTestBombAdvanced.class, "tilentity_testbombadvanced");
Expand Down
4 changes: 2 additions & 2 deletions com/hbm/main/ModEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public void worldTick(WorldTickEvent event) {
if(eRad > 2500)
entity.getEntityData().setFloat("hfr_radiation", 2500);

if(eRad >= 1000) {
if(eRad >= 1000 && !(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)) {
if(entity.attackEntityFrom(ModDamageSource.radiation, entity.getMaxHealth() * 100)) {
entity.getEntityData().setFloat("hfr_radiation", 0);

Expand All @@ -294,7 +294,7 @@ public void worldTick(WorldTickEvent event) {
//.attackEntityFrom ensures the recentlyHit var is set to enable drops.
//if the attack is canceled, then nothing will drop.
//that's what you get for trying to cheat death
entity.setHealth(0);
entity.setHealth(0);

} else if(eRad >= 800) {
if(event.world.rand.nextInt(300) == 0)
Expand Down
2 changes: 0 additions & 2 deletions com/hbm/tileentity/machine/TileEntityBarrel.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public void updateEntity() {
tank.unloadTank(4, 5, slots);
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);

System.out.println(tank.getMaxFill());

age++;
if(age >= 20)
age = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,6 @@ private void decay(int id) {
// itemstack in slots[id] has to contain ItemFuelRod item
private void onRunOut(int id) {

System.out.println("aaa");

Item item = slots[id].getItem();

if (item == ModItems.rod_uranium_fuel) {
Expand Down

0 comments on commit 6647ca4

Please sign in to comment.