Skip to content

Commit

Permalink
Sat SMP fix, missile textures, crafting recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Aug 4, 2018
1 parent 4094199 commit 41623ce
Show file tree
Hide file tree
Showing 21 changed files with 130 additions and 11 deletions.
7 changes: 5 additions & 2 deletions assets/hbm/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,9 @@ item.missile_exo.name=Exothermische Rakete
item.missile_doomsday.name=Doomsday Rakete
item.missile_taint.name=Verdorbene Rakete
item.missile_micro.name=Mikro-Atomrakete
item.missile_bhole.name=Schwarzes-Loch-Rakete
item.missile_schrabidium.name=Schrabidiumrakete
item.missile_emp.name=EMP-Rakete

item.missile_carrier.name=HTR-01 Trägerrakete
item.sat_mapper.name=Oberflächen-Abtastungssatellit
Expand Down Expand Up @@ -1531,14 +1534,14 @@ item.bottle2_korl.name=Korl
item.bottle2_fritz.name=Fritz-Kola
item.bottle2_korl_special.name=Das erste Korl
item.bottle2_fritz_special.name=Die erste Fritz-Kola
item.bottle2_sunset.name=Sunset Saraparilla
item.bottle2_sunset.name=Sunset Sarsaparilla
item.chocolate_milk.name=Schokomilch
item.cap_nuka.name=Nuka-Cola Kronkorken
item.cap_quantum.name=Nuka Cola Quantum Kronkorken
item.cap_sparkle.name=S~Cola Kronkorken
item.cap_korl.name=Korl Kronkorken
item.cap_fritz.name=Fritz-Kola Kronkorken
item.cap_sunset.name=Sunset Saraparilla Kronkorken
item.cap_sunset.name=Sunset Sarsaparilla Kronkorken
item.ring_pull.name=Dosenring

item.bottle_opener.name=Hbms eigener selbstgebauter Flaschenöffner
Expand Down
7 changes: 5 additions & 2 deletions assets/hbm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,9 @@ item.missile_exo.name=Exothermic Missile
item.missile_doomsday.name=Doomsday Missile
item.missile_taint.name=Taint-Tipped Missile
item.missile_micro.name=Micro-Nuclear Missile
item.missile_bhole.name=Black Hole Missile
item.missile_schrabidium.name=Schrabidium Missile
item.missile_emp.name=EMP Missile

item.missile_carrier.name=HTR-01 Carrier Rocket
item.sat_mapper.name=Surface Mapping Satellite
Expand Down Expand Up @@ -1531,14 +1534,14 @@ item.bottle2_korl.name=Korl
item.bottle2_fritz.name=Fritz Cola
item.bottle2_korl_special.name=The First Korl
item.bottle2_fritz_special.name=The First Fritz Cola
item.bottle2_sunset.name=Sunset Saraparilla
item.bottle2_sunset.name=Sunset Sarsaparilla
item.chocolate_milk.name=Chocolate Milk
item.cap_nuka.name=Nuka Cola Bottle Cap
item.cap_quantum.name=Nuka Cola Quantum Bottle Cap
item.cap_sparkle.name=S~Cola Bottle Cap
item.cap_korl.name=Korl Bottle Cap
item.cap_fritz.name=Fritz Cola Bottle Cap
item.cap_sunset.name=Sunset Saraparilla Bottle Cap
item.cap_sunset.name=Sunset Sarsaparilla Bottle Cap
item.ring_pull.name=Ring Pull

item.bottle_opener.name=Hbm's Own Self-Made Bottle Opener
Expand Down
Binary file modified assets/hbm/textures/gui/centrifuge.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/items/missile_bhole.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/items/missile_emp.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/items/missile_schrabidium.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/missileMicroBHole.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/missileMicroEMP.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/missileMicroSchrab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions com/hbm/entity/grenade/EntityGrenadeASchrab.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public void explode() {
cloud.posY = this.posY;
cloud.posZ = this.posZ;
this.worldObj.spawnEntityInWorld(cloud);

this.setDead();
}
}
}
2 changes: 1 addition & 1 deletion com/hbm/entity/missile/EntityMissileSchrabidium.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public List<ItemStack> getDebris() {

@Override
public ItemStack getDebrisRareDrop() {
return new ItemStack(ModItems.grenade_aschrab, 1);
return new ItemStack(ModItems.powder_schrabidium, 1);
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion com/hbm/entity/projectile/EntityBullet.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.RedBarrel;
import com.hbm.entity.grenade.EntityGrenadeTau;
import com.hbm.entity.mob.EntityHunterChopper;
import com.hbm.entity.mob.EntityNuclearCreeper;
import com.hbm.entity.particle.EntityBSmokeFX;
import com.hbm.items.ModItems;
Expand Down Expand Up @@ -582,7 +583,7 @@ public void onUpdate() {
;
}
} else {
if (movingobjectposition.entityHit instanceof EntityLivingBase) {
if (movingobjectposition.entityHit instanceof EntityLivingBase && !(movingobjectposition.entityHit instanceof EntityHunterChopper)) {
EntityLivingBase target = (EntityLivingBase) movingobjectposition.entityHit;
target.setHealth((float) (target.getHealth() - damage));
}
Expand Down
7 changes: 6 additions & 1 deletion com/hbm/items/tool/ItemSatInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.hbm.inventory.gui.GUIScreenSatInterface;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.SatPanelPacket;
import com.hbm.saveddata.SatelliteSavedData;

import net.minecraft.entity.Entity;
Expand All @@ -29,7 +31,10 @@ public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean

if(!world.isRemote) {
SatelliteSavedData data = (SatelliteSavedData)entity.worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
satData = data;

for(int j = 0; j < data.satellites.size(); j++) {
PacketDispatcher.wrapper.sendToAll(new SatPanelPacket(data.satellites.get(j)));
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions com/hbm/items/weapon/ItemClip.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,18 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_bf_ammo, 1));
if(player.inventory.hasItem(ModItems.gun_mp40))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp40_ammo, 32));
if(player.inventory.hasItem(ModItems.gun_uzi))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_uzi_ammo, 32));
if(player.inventory.hasItem(ModItems.gun_uzi_silencer))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_uzi_ammo, 32));
if(player.inventory.hasItem(ModItems.gun_uboinik))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_uboinik_ammo, 12));
if(player.inventory.hasItem(ModItems.gun_lever_action))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_lever_action_ammo, 12));
if(player.inventory.hasItem(ModItems.gun_lever_action_dark))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_lever_action_ammo, 12));
if(player.inventory.hasItem(ModItems.gun_lever_action_sonata))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_lever_action_ammo, 1));
if(player.inventory.hasItem(ModItems.gun_bolt_action))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_bolt_action_ammo, 12));
if(player.inventory.hasItem(ModItems.gun_bolt_action_green))
Expand All @@ -328,6 +334,8 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_emp_ammo, 8));
if(player.inventory.hasItem(ModItems.gun_revolver_inverted))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_ammo, 1));
if(player.inventory.hasItem(ModItems.gun_revolver_inverted))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_ammo, 1));
if(player.inventory.hasItem(ModItems.gun_jack))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_jack_ammo, 3));
if(player.inventory.hasItem(ModItems.gun_spark))
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 (2835)";
public static final String VERSION = "1.0.27 BETA (2855)";
//HBM's Beta Naming Convention:
//V T (X-Y-Z)
//V -> next release version
Expand Down
5 changes: 5 additions & 0 deletions com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ public static void AddCraftingRec()
//GameRegistry.addRecipe(new ItemStack(ModItems.missile_exo, 1), new Object[] { "W", "T", "M", 'W', ModItems.warhead_thermo_exo, 'T', ModItems.fuel_tank_large, 'M', ModItems.thruster_large });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_taint, 1), new Object[] { ModItems.missile_assembly, ModItems.bucket_mud, ModItems.powder_spark_mix, ModItems.powder_magic });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.gun_fatman_ammo });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_bhole, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_black_hole });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_aschrab });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.cell_sas3, ModItems.circuit_targeting_tier4 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_emp, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModBlocks.emp_bomb, ModItems.circuit_targeting_tier3 });

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "AHA", "TCT", "TPT", 'T', "plateIron", 'A', "plateAluminum", 'S', "plateSteel", 'C', "ingotCopper", 'P', Item.getItemFromBlock(Blocks.piston), 'H', Item.getItemFromBlock(Blocks.hopper) }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_centrifuge), 1), new Object[] { " T ", "RDR", "RSR", 'S', "plateSteel", 'T', ModItems.centrifuge_tower, 'W', ModItems.coil_tungsten, 'R', ModItems.coil_copper, 'D', Item.getItemFromBlock(ModBlocks.machine_difurnace_off) }));
Expand Down Expand Up @@ -813,6 +817,7 @@ public static void AddCraftingRec()
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle2_fritz, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, ModItems.powder_tungsten });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle2_korl_special, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, ModItems.powder_copper, ModItems.powder_strontium });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle2_fritz_special, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, ModItems.powder_tungsten, ModItems.powder_thorium });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle2_sunset, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, ModItems.powder_gold });

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.syringe_empty, 6), new Object[] { "P", "C", "B", 'B', Item.getItemFromBlock(Blocks.iron_bars), 'C', ModItems.cell_empty, 'P', "plateIron" }));
GameRegistry.addRecipe(new ItemStack(ModItems.syringe_antidote, 6), new Object[] { "SSS", "PMP", "SSS", 'S', ModItems.syringe_empty, 'P', Items.pumpkin_seeds, 'M', Items.milk_bucket });
Expand Down
3 changes: 3 additions & 0 deletions com/hbm/main/ResourceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,7 @@ public class ResourceManager {
public static final ResourceLocation missileMicro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicro.png");
public static final ResourceLocation missileCarrier_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileCarrier.png");
public static final ResourceLocation missileBooster_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileBooster.png");
public static final ResourceLocation missileMicroBHole_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroBHole.png");
public static final ResourceLocation missileMicroSchrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroSchrab.png");
public static final ResourceLocation missileMicroEMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroEMP.png");
}
2 changes: 2 additions & 0 deletions com/hbm/packet/PacketDispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public static final void registerPackets()
wrapper.registerMessage(AuxButtonPacket.Handler.class, AuxButtonPacket.class, i++, Side.SERVER);
//Siren packet for looped sounds
wrapper.registerMessage(TEVaultPacket.Handler.class, TEVaultPacket.class, i++, Side.CLIENT);
//Packet to send sat info to players
wrapper.registerMessage(SatPanelPacket.Handler.class, SatPanelPacket.class, i++, Side.CLIENT);
}

}
78 changes: 78 additions & 0 deletions com/hbm/packet/SatPanelPacket.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package com.hbm.packet;

import com.hbm.items.tool.ItemSatInterface;
import com.hbm.saveddata.SatelliteSaveStructure;
import com.hbm.saveddata.SatelliteSaveStructure.SatelliteType;
import com.hbm.saveddata.SatelliteSavedData;
import com.hbm.tileentity.machine.TileEntityMachineRadar;

import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;

public class SatPanelPacket implements IMessage {

int id;
int dim;
SatelliteType type;
long lastOp;

public SatPanelPacket() {

}

public SatPanelPacket(SatelliteSaveStructure sat) {
id = sat.satelliteID;
dim = sat.satDim;
type = sat.satelliteType;
lastOp = sat.lastOp;
}

@Override
public void fromBytes(ByteBuf buf) {
id = buf.readInt();
dim = buf.readInt();
type = SatelliteType.getEnum(buf.readInt());
lastOp = buf.readLong();
}

@Override
public void toBytes(ByteBuf buf) {
buf.writeInt(id);
buf.writeInt(dim);
buf.writeInt(type.getID());
buf.writeLong(lastOp);
}

public static class Handler implements IMessageHandler<SatPanelPacket, IMessage> {

@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(SatPanelPacket m, MessageContext ctx) {

EntityPlayer p = Minecraft.getMinecraft().thePlayer;

try {

if(ItemSatInterface.satData == null) {
ItemSatInterface.satData = new SatelliteSavedData(p.worldObj);
}

SatelliteSaveStructure sat = new SatelliteSaveStructure(m.id, m.type, m.dim);
sat.lastOp = m.lastOp;
ItemSatInterface.satData.satellites.add(sat);

ItemSatInterface.satData.satCount = ItemSatInterface.satData.satellites.size();

} catch (Exception x) {
}
return null;
}
}
}
9 changes: 9 additions & 0 deletions com/hbm/render/entity/RenderMissileTaint.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import org.lwjgl.opengl.GL11;

import com.hbm.entity.missile.EntityMissileBHole;
import com.hbm.entity.missile.EntityMissileEMP;
import com.hbm.entity.missile.EntityMissileSchrabidium;
import com.hbm.entity.missile.EntityMissileTaint;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
Expand Down Expand Up @@ -37,6 +40,12 @@ public void doRender(Entity missile, double x, double y, double z, float f1, flo
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
if(p_110775_1_ instanceof EntityMissileTaint)
return ResourceManager.missileTaint_tex;
if(p_110775_1_ instanceof EntityMissileBHole)
return ResourceManager.missileMicroBHole_tex;
if(p_110775_1_ instanceof EntityMissileSchrabidium)
return ResourceManager.missileMicroSchrab_tex;
if(p_110775_1_ instanceof EntityMissileEMP)
return ResourceManager.missileMicroEMP_tex;

return ResourceManager.missileMicro_tex;
}
Expand Down
6 changes: 3 additions & 3 deletions com/hbm/render/tileentity/RenderLaunchPadTier1.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,19 @@ public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double
if(state == 22)
{
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileMicro_tex);
bindTexture(ResourceManager.missileMicroBHole_tex);
ResourceManager.missileTaint.renderAll();
}
if(state == 23)
{
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileMicro_tex);
bindTexture(ResourceManager.missileMicroSchrab_tex);
ResourceManager.missileTaint.renderAll();
}
if(state == 24)
{
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileMicro_tex);
bindTexture(ResourceManager.missileMicroEMP_tex);
ResourceManager.missileTaint.renderAll();
}

Expand Down

0 comments on commit 41623ce

Please sign in to comment.