contrail particle, bobmazon gui, offers, base framework, achievements
@ -33,6 +33,16 @@ achievement.fiend=Unhold
|
||||
achievement.fiend.desc=Sei gemein.
|
||||
achievement.fiend2=Unhold 2: Noch unholdiger
|
||||
achievement.fiend2.desc=Sei gemeiner.
|
||||
achievement.metalworks=Metallurgie
|
||||
achievement.metalworks.desc=Bobmazon Level 1
|
||||
achievement.assembly=Fertigung
|
||||
achievement.assembly.desc=Bobmazon Level 2
|
||||
achievement.chemistry=Chemie
|
||||
achievement.chemistry.desc=Bobmazon Level 3
|
||||
achievement.oil=Petroleum
|
||||
achievement.oil.desc=Bobmazon Level 4
|
||||
achievement.nuclear=Atomwissenschaft
|
||||
achievement.nuclear.desc=Bobmazon Level 5
|
||||
|
||||
potion.hbm_taint=Verdorben
|
||||
potion.hbm_mutation=Verdorbenes Herz
|
||||
|
||||
@ -33,6 +33,16 @@ achievement.fiend=Delinquent
|
||||
achievement.fiend.desc=Be mean.
|
||||
achievement.fiend2=Delinquent 2: Delinquent Harder
|
||||
achievement.fiend2.desc=Be meaner.
|
||||
achievement.metalworks=Metalworks
|
||||
achievement.metalworks.desc=Bobmazon Level 1
|
||||
achievement.assembly=Fabrication
|
||||
achievement.assembly.desc=Bobmazon Level 2
|
||||
achievement.chemistry=Chemistry
|
||||
achievement.chemistry.desc=Bobmazon Level 3
|
||||
achievement.oil=Petroleum
|
||||
achievement.oil.desc=Bobmazon Level 4
|
||||
achievement.nuclear=Atomic Science
|
||||
achievement.nuclear.desc=Bobmazon Level 5
|
||||
|
||||
potion.hbm_taint=Tainted
|
||||
potion.hbm_mutation=Tainted Heart
|
||||
|
||||
BIN
assets/hbm/textures/items/bob_assembly.png
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
assets/hbm/textures/items/bob_chemistry.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
assets/hbm/textures/items/bob_metalworks.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
assets/hbm/textures/items/bob_nuclear.png
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
assets/hbm/textures/items/bob_oil.png
Normal file
|
After Width: | Height: | Size: 193 B |
BIN
assets/hbm/textures/items/bobmazon_machines.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
assets/hbm/textures/items/bobmazon_materials.png
Normal file
|
After Width: | Height: | Size: 356 B |
BIN
assets/hbm/textures/items/bobmazon_special.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
assets/hbm/textures/items/bobmazon_tools.png
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
assets/hbm/textures/items/bobmazon_weapons.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
assets/hbm/textures/particle/contrail.png
Normal file
|
After Width: | Height: | Size: 133 B |
@ -21,6 +21,8 @@ import com.hbm.explosion.ExplosionNukeRay.FloatTriplet;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ModEventHandler;
|
||||
import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.RadiationSaveStructure;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
@ -33,6 +35,7 @@ import com.hbm.world.GeyserLarge;
|
||||
import com.hbm.world.Meteorite;
|
||||
import com.hbm.world.Sellafield;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentProtection;
|
||||
@ -396,10 +399,14 @@ public class TestEventTester extends Block {
|
||||
worldObj.spawnEntityInWorld(emp);
|
||||
}*/
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
/*if(!worldObj.isRemote) {
|
||||
|
||||
new GeyserLarge().generate(worldObj, itemRand, par2, par3, par4);
|
||||
}
|
||||
}*/
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacket(par2, par3 + 2, par4, 2),
|
||||
new TargetPoint(worldObj.provider.dimensionId,par2, par3, par4, 50));
|
||||
|
||||
/*if(!worldObj.isRemote) {
|
||||
|
||||
|
||||
@ -7,8 +7,11 @@ import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -225,7 +228,9 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk
|
||||
}
|
||||
|
||||
if(!this.worldObj.isRemote)
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
//this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacket(posX, posY, posZ, 2),
|
||||
new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 300));
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air &&
|
||||
this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.water &&
|
||||
@ -238,6 +243,8 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
loadNeighboringChunks((int)(posX / 16), (int)(posZ / 16));
|
||||
|
||||
if(motionY < -1 && this.isCluster && !worldObj.isRemote) {
|
||||
cluster();
|
||||
|
||||
89
com/hbm/entity/particle/ParticleContrail.java
Normal file
@ -0,0 +1,89 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleContrail extends EntityFX {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/contrail.png");
|
||||
private TextureManager theRenderEngine;
|
||||
private int age;
|
||||
private int maxAge;
|
||||
|
||||
public ParticleContrail(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) {
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
theRenderEngine = p_i1213_1_;
|
||||
maxAge = 100 + rand.nextInt(40);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
particleAlpha = 1 - ((float) age / (float) maxAge);
|
||||
|
||||
++this.age;
|
||||
|
||||
|
||||
if (this.age == this.maxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
|
||||
|
||||
this.theRenderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
Random urandom = new Random(this.getEntityId());
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
p_70539_1_.startDrawingQuads();
|
||||
|
||||
this.particleRed = this.particleGreen = this.particleBlue = urandom.nextFloat() * 0.5F + 0.2F;
|
||||
|
||||
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
|
||||
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
//p_70539_1_.setBrightness(240);
|
||||
|
||||
float scale = particleAlpha + 0.5F;
|
||||
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX) + urandom.nextGaussian() * 0.5);
|
||||
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double)p_70539_2_ - interpPosY) + urandom.nextGaussian() * 0.5);
|
||||
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double)p_70539_2_ - interpPosZ) + urandom.nextGaussian() * 0.5);
|
||||
|
||||
p_70539_1_.addVertexWithUV((double)(pX - p_70539_3_ * scale - p_70539_6_ * scale), (double)(pY - p_70539_4_ * scale), (double)(pZ - p_70539_5_ * scale - p_70539_7_ * scale), 1, 1);
|
||||
p_70539_1_.addVertexWithUV((double)(pX - p_70539_3_ * scale + p_70539_6_ * scale), (double)(pY + p_70539_4_ * scale), (double)(pZ - p_70539_5_ * scale + p_70539_7_ * scale), 1, 0);
|
||||
p_70539_1_.addVertexWithUV((double)(pX + p_70539_3_ * scale + p_70539_6_ * scale), (double)(pY + p_70539_4_ * scale), (double)(pZ + p_70539_5_ * scale + p_70539_7_ * scale), 0, 0);
|
||||
p_70539_1_.addVertexWithUV((double)(pX + p_70539_3_ * scale - p_70539_6_ * scale), (double)(pY - p_70539_4_ * scale), (double)(pZ + p_70539_5_ * scale - p_70539_7_ * scale), 0, 1);
|
||||
p_70539_1_.draw();
|
||||
}
|
||||
|
||||
GL11.glPolygonOffset(0.0F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
173
com/hbm/handler/BobmazonOfferFactory.java
Normal file
@ -0,0 +1,173 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.gui.GUIScreenBobmazon.Offer;
|
||||
import com.hbm.inventory.gui.GUIScreenBobmazon.Requirement;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BobmazonOfferFactory {
|
||||
|
||||
public static List<Offer> materials = new ArrayList();
|
||||
public static List<Offer> machines = new ArrayList();
|
||||
public static List<Offer> weapons = new ArrayList();
|
||||
public static List<Offer> tools = new ArrayList();
|
||||
|
||||
public static void init() {
|
||||
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_uranium), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_u233), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_u238), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_th232), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_plutonium), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_titanium), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_copper), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_red_copper), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_tungsten), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_aluminium), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_steel), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_lead), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_polymer), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_uranium_fuel), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_thorium_fuel), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_desh), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.ingot_saturnite), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.lithium), Requirement.CHEMICS, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.solid_fuel), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.lignite), Requirement.STEEL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.canister_oil), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.canister_fuel), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.canister_petroil), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.canister_kerosene), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.canister_NITAN), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.gas_petroleum), Requirement.OIL, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.motor), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.rtg_unit), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.circuit_aluminium), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.circuit_copper), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.circuit_red_copper), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.circuit_gold), Requirement.CHEMICS, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.pellet_gas), Requirement.CHEMICS, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.magnetron), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.pellet_rtg), Requirement.NUCLEAR, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.piston_selenium), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(ItemBattery.getFullBattery(ModItems.battery_advanced), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(ItemBattery.getFullBattery(ModItems.battery_lithium), Requirement.CHEMICS, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.arc_electrode), Requirement.ASSEMBLY, 0));
|
||||
materials.add(new Offer(new ItemStack(ModItems.fuse), Requirement.ASSEMBLY, 0));
|
||||
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.concrete_smooth), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.brick_compound), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.barbed_wire), Requirement.ASSEMBLY, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_siren), Requirement.ASSEMBLY, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.vault_door), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.blast_door), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_epress), Requirement.OIL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_difurnace_off), Requirement.STEEL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_gascent), Requirement.OIL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_diesel), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_geo), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_battery), Requirement.ASSEMBLY, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_lithium_battery), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_assembler), Requirement.ASSEMBLY, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_chemplant), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_boiler_off), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_boiler_electric_off), Requirement.OIL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_shredder), Requirement.ASSEMBLY, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_well), Requirement.OIL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.machine_refinery), Requirement.OIL, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.absorber), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.absorber_green), Requirement.CHEMICS, 0));
|
||||
machines.add(new Offer(new ItemStack(ModBlocks.decon), Requirement.CHEMICS, 0));
|
||||
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.launch_pad), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.machine_radar), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.designator), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.designator_range), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.sat_chip), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.turret_cheapo), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.turret_cheapo_ammo), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.turret_control), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.turret_chip), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.turret_biometry), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.mine_ap), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.emp_bomb), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.det_cord), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModBlocks.det_charge), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.detonator), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.detonator_laser), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.defuser), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_revolver), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_revolver_nopip), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_minigun), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_panzerschreck), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_hk69), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_uzi), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_lever_action), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_bolt_action), Requirement.ASSEMBLY, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.gun_revolver_ammo), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_357_desh), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_44), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_44_ap), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_5mm), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_5mm_du), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket_incendiary), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket_sleek), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade_incendiary), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade_sleek), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_22lr), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_22lr_ap), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge_slug), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge_flechette), Requirement.OIL, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.grenade_if_generic), Requirement.CHEMICS, 0));
|
||||
weapons.add(new Offer(new ItemStack(ModItems.grenade_if_he), Requirement.CHEMICS, 0));
|
||||
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_keyforge), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_telelinker), Requirement.CHEMICS, 0));
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_satlinker), Requirement.CHEMICS, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.oil_detector), Requirement.CHEMICS, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.geiger_counter), Requirement.CHEMICS, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.key), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.padlock), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.padlock_reinforced), Requirement.OIL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.syringe_antidote), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.syringe_metal_stimpak), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.syringe_metal_medx), Requirement.STEEL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.radaway), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.radaway_strong), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.radx), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.pill_iodine), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.gas_mask_filter), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.gun_kit_1), Requirement.OIL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.gun_kit_2), Requirement.OIL, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.hazmat_kit), Requirement.ASSEMBLY, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.hazmat_red_kit), Requirement.CHEMICS, 0));
|
||||
tools.add(new Offer(new ItemStack(ModItems.hazmat_grey_kit), Requirement.OIL, 0));
|
||||
}
|
||||
|
||||
public static List<Offer> getOffers(ItemStack stack) {
|
||||
|
||||
if(stack != null) {
|
||||
|
||||
if(stack.getItem() == ModItems.bobmazon_materials)
|
||||
return materials;
|
||||
if(stack.getItem() == ModItems.bobmazon_machines)
|
||||
return machines;
|
||||
if(stack.getItem() == ModItems.bobmazon_weapons)
|
||||
return weapons;
|
||||
if(stack.getItem() == ModItems.bobmazon_tools)
|
||||
return tools;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1496,6 +1496,9 @@ public class GUIHandler implements IGuiHandler {
|
||||
return new GUIScreenSatInterface(player);
|
||||
case ModItems.guiID_item_box:
|
||||
return new GUILeadBox(new ContainerLeadBox(player, player.inventory, new InventoryLeadBox(player.getHeldItem())));
|
||||
case ModItems.guiID_item_bobmazon:
|
||||
if(BobmazonOfferFactory.getOffers(player.getHeldItem()) != null)
|
||||
return new GUIScreenBobmazon(player, BobmazonOfferFactory.getOffers(player.getHeldItem()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
313
com/hbm/inventory/gui/GUIScreenBobmazon.java
Normal file
@ -0,0 +1,313 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemAssemblyTemplate.EnumAssemblyTemplate;
|
||||
import com.hbm.items.tool.ItemCassette;
|
||||
import com.hbm.items.tool.ItemCassette.TrackType;
|
||||
import com.hbm.items.tool.ItemChemistryTemplate;
|
||||
import com.hbm.items.tool.ItemFluidIdentifier;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.ItemFolderPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIScreenBobmazon extends GuiScreen {
|
||||
|
||||
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_bobmazon.png");
|
||||
protected int xSize = 176;
|
||||
protected int ySize = 229;
|
||||
protected int guiLeft;
|
||||
protected int guiTop;
|
||||
int currentPage = 0;
|
||||
List<Offer> offers = new ArrayList<Offer>();
|
||||
List<FolderButton> buttons = new ArrayList<FolderButton>();
|
||||
private final EntityPlayer player;
|
||||
|
||||
public GUIScreenBobmazon(EntityPlayer player, List<Offer> offers) {
|
||||
|
||||
this.player = player;
|
||||
|
||||
this.offers = offers;
|
||||
}
|
||||
|
||||
int getPageCount() {
|
||||
return (int)Math.ceil((offers.size() - 1) / 3);
|
||||
}
|
||||
|
||||
public void updateScreen() {
|
||||
if(currentPage < 0)
|
||||
currentPage = 0;
|
||||
if(currentPage > getPageCount())
|
||||
currentPage = getPageCount();
|
||||
}
|
||||
|
||||
public void drawScreen(int mouseX, int mouseY, float f)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
protected void updateButtons() {
|
||||
|
||||
if(!buttons.isEmpty())
|
||||
buttons.clear();
|
||||
|
||||
for(int i = currentPage * 3; i < Math.min(currentPage * 3 + 3, offers.size()); i++) {
|
||||
buttons.add(new FolderButton(guiLeft + 34, guiTop + 35 + (54 * (int)Math.floor(i)) - currentPage * 3 * 54, offers.get(i)));
|
||||
}
|
||||
|
||||
if(currentPage != 0)
|
||||
buttons.add(new FolderButton(guiLeft + 25 - 18, guiTop + 26 + (27 * 3), 1, "Previous"));
|
||||
if(currentPage != getPageCount())
|
||||
buttons.add(new FolderButton(guiLeft + 25 + (27 * 4) + 18, guiTop + 26 + (27 * 3), 2, "Next"));
|
||||
}
|
||||
|
||||
protected void mouseClicked(int i, int j, int k) {
|
||||
try {
|
||||
for(FolderButton b : buttons)
|
||||
if(b.isMouseOnButton(i, j))
|
||||
b.executeAction();
|
||||
} catch (Exception ex) {
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
|
||||
this.fontRendererObj.drawString(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1)),
|
||||
guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format((currentPage + 1) + "/" + (getPageCount() + 1))) / 2, guiTop + 205, 4210752);
|
||||
|
||||
for(FolderButton b : buttons)
|
||||
if(b.isMouseOnButton(i, j))
|
||||
b.drawString(i, j);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
for(FolderButton b : buttons)
|
||||
b.drawButton(b.isMouseOnButton(i, j));
|
||||
for(FolderButton b : buttons)
|
||||
b.drawIcon(b.isMouseOnButton(i, j));
|
||||
|
||||
for(int d = currentPage * 3; d < Math.min(currentPage * 3 + 3, offers.size()); d++) {
|
||||
offers.get(d).drawRequirement(this, guiLeft + 34, guiTop + 53 + (54 * (int)Math.floor(d)) - currentPage * 3 * 54);
|
||||
}
|
||||
}
|
||||
|
||||
protected void keyTyped(char p_73869_1_, int p_73869_2_)
|
||||
{
|
||||
if (p_73869_2_ == 1 || p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode())
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class FolderButton {
|
||||
|
||||
int xPos;
|
||||
int yPos;
|
||||
//0: regular, 1: prev, 2: next
|
||||
int type;
|
||||
String info;
|
||||
Offer offer;
|
||||
|
||||
public FolderButton(int x, int y, int t, String i) {
|
||||
xPos = x;
|
||||
yPos = y;
|
||||
type = t;
|
||||
info = i;
|
||||
}
|
||||
|
||||
public FolderButton(int x, int y, Offer offer) {
|
||||
xPos = x;
|
||||
yPos = y;
|
||||
type = 0;
|
||||
this.offer = offer;
|
||||
}
|
||||
|
||||
public void updateButton(int mouseX, int mouseY) {
|
||||
}
|
||||
|
||||
public boolean isMouseOnButton(int mouseX, int mouseY) {
|
||||
return xPos <= mouseX && xPos + 18 > mouseX && yPos < mouseY && yPos + 18 >= mouseY;
|
||||
}
|
||||
|
||||
public void drawButton(boolean b) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(xPos, yPos, b ? 176 + 18 : 176, type == 1 ? 18 : (type == 2 ? 36 : 0), 18, 18);
|
||||
}
|
||||
|
||||
public void drawIcon(boolean b) {
|
||||
try {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
if(offer != null) {
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), offer.offer, xPos + 1, yPos + 1);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
} catch(Exception x) { }
|
||||
}
|
||||
|
||||
public void drawString(int x, int y) {
|
||||
if(info == null || info.isEmpty())
|
||||
return;
|
||||
|
||||
func_146283_a(Arrays.asList(new String[] { info }), x, y);
|
||||
}
|
||||
|
||||
public void executeAction() {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
if(type == 0) {
|
||||
//TODO: request purchase
|
||||
//PacketDispatcher.wrapper.sendToServer(new ItemFolderPacket(stack.copy()));
|
||||
} else if(type == 1) {
|
||||
if(currentPage > 0)
|
||||
currentPage--;
|
||||
updateButtons();
|
||||
} else if(type == 2) {
|
||||
if(currentPage < getPageCount())
|
||||
currentPage++;
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static class Offer {
|
||||
|
||||
ItemStack offer;
|
||||
Requirement requirement;
|
||||
int cost;
|
||||
int rating;
|
||||
String comment;
|
||||
String author;
|
||||
|
||||
public Offer(ItemStack offer, Requirement requirement, int cost, int rating, String comment, String author) {
|
||||
this.offer = offer;
|
||||
this.requirement = requirement;
|
||||
this.cost = cost;
|
||||
this.rating = rating * 4 - 1;
|
||||
this.comment = comment;
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public Offer(ItemStack offer, Requirement requirement, int cost) {
|
||||
this.offer = offer;
|
||||
this.requirement = requirement;
|
||||
this.cost = cost;
|
||||
this.rating = 0;
|
||||
this.comment = "No Ratings";
|
||||
this.author = "";
|
||||
}
|
||||
|
||||
public void drawRequirement(GUIScreenBobmazon gui, int x, int y) {
|
||||
try {
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
gui.drawTexturedModalRect(x + 19, y - 4, 176, 62, 39, 8);
|
||||
gui.drawTexturedModalRect(x + 19, y - 4, 176, 54, rating, 8);
|
||||
|
||||
String count = "";
|
||||
if(offer.stackSize > 1)
|
||||
count = " x" + offer.stackSize;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.65F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
gui.fontRendererObj.drawString(I18n.format(offer.getDisplayName()) + count, (int)((x + 20) / scale), (int)((y - 12) / scale), 4210752);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
String price = cost + " Cap";
|
||||
if(cost != 1)
|
||||
price += "s";
|
||||
|
||||
gui.fontRendererObj.drawString(price, x + 62, y - 3, 4210752);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
if(!author.isEmpty())
|
||||
gui.fontRendererObj.drawString("- " + author, (x + 20) * 2, (y + 18) * 2, 0x222222);
|
||||
gui.fontRendererObj.drawString(comment, (x + 20) * 2, (y + 8) * 2, 0x222222);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
if(offer != null) {
|
||||
gui.itemRender.renderItemAndEffectIntoGUI(gui.fontRendererObj, gui.mc.getTextureManager(), requirement.achievement.theItemStack, x + 1, y + 1);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
} catch(Exception ex) { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum Requirement {
|
||||
|
||||
STEEL(MainRegistry.bobMetalworks),
|
||||
ASSEMBLY(MainRegistry.bobAssembly),
|
||||
CHEMICS(MainRegistry.bobChemistry),
|
||||
OIL(MainRegistry.bobOil),
|
||||
NUCLEAR(MainRegistry.bobNuclear);
|
||||
|
||||
private Requirement(Achievement achievement) {
|
||||
this.achievement = achievement;
|
||||
}
|
||||
|
||||
public boolean fullfills(EntityPlayerMP player) {
|
||||
|
||||
return player.func_147099_x().hasAchievementUnlocked(achievement);
|
||||
}
|
||||
|
||||
Achievement achievement;
|
||||
}
|
||||
|
||||
}
|
||||
@ -107,6 +107,11 @@ public class GUIScreenSatInterface extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
|
||||
if(connectedSat != null && connectedSat.satelliteType == SatelliteType.LASER) {
|
||||
|
||||
@ -95,6 +95,11 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void updateButtons() {
|
||||
|
||||
|
||||
@ -791,6 +791,11 @@ public class ModItems {
|
||||
public static Item siren_track;
|
||||
public static Item fluid_duct;
|
||||
|
||||
public static Item bobmazon_materials;
|
||||
public static Item bobmazon_machines;
|
||||
public static Item bobmazon_weapons;
|
||||
public static Item bobmazon_tools;
|
||||
|
||||
public static Item missile_assembly;
|
||||
public static Item missile_generic;
|
||||
public static Item missile_anti_ballistic;
|
||||
@ -1556,10 +1561,17 @@ public class ModItems {
|
||||
public static Item nothing;
|
||||
public static Item void_anim;
|
||||
|
||||
public static Item bob_metalworks;
|
||||
public static Item bob_assembly;
|
||||
public static Item bob_chemistry;
|
||||
public static Item bob_oil;
|
||||
public static Item bob_nuclear;
|
||||
|
||||
public static final int guiID_item_folder = 99;
|
||||
public static final int guiID_item_designator = 100;
|
||||
public static final int guiID_item_sat_interface = 101;
|
||||
public static final int guiID_item_box = 102;
|
||||
public static final int guiID_item_bobmazon = 103;
|
||||
|
||||
public static Item mysteryshovel;
|
||||
public static Item memory;
|
||||
@ -2771,6 +2783,11 @@ public class ModItems {
|
||||
siren_track = new ItemCassette().setUnlocalizedName("siren_track").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":cassette");
|
||||
fluid_duct = new ItemFluidDuct().setUnlocalizedName("fluid_duct").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":duct");
|
||||
|
||||
bobmazon_materials = new ItemCatalog().setUnlocalizedName("bobmazon_materials").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":bobmazon_materials");
|
||||
bobmazon_machines = new ItemCatalog().setUnlocalizedName("bobmazon_machines").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":bobmazon_machines");
|
||||
bobmazon_weapons = new ItemCatalog().setUnlocalizedName("bobmazon_weapons").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":bobmazon_weapons");
|
||||
bobmazon_tools = new ItemCatalog().setUnlocalizedName("bobmazon_tools").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":bobmazon_tools");
|
||||
|
||||
euphemium_helmet = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 0).setUnlocalizedName("euphemium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_helmet");
|
||||
euphemium_plate = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 1).setUnlocalizedName("euphemium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_plate");
|
||||
euphemium_legs = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 2).setUnlocalizedName("euphemium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_legs");
|
||||
@ -3051,6 +3068,12 @@ public class ModItems {
|
||||
ln2_10 = new Item().setUnlocalizedName("ln2_10").setTextureName(RefStrings.MODID + ":ln2_10");
|
||||
nothing = new Item().setUnlocalizedName("nothing").setTextureName(RefStrings.MODID + ":nothing");
|
||||
void_anim = new Item().setUnlocalizedName("void_anim").setTextureName(RefStrings.MODID + ":void_anim");
|
||||
|
||||
bob_metalworks = new Item().setUnlocalizedName("bob_metalworks").setTextureName(RefStrings.MODID + ":bob_metalworks");
|
||||
bob_assembly = new Item().setUnlocalizedName("bob_assembly").setTextureName(RefStrings.MODID + ":bob_assembly");
|
||||
bob_chemistry = new Item().setUnlocalizedName("bob_chemistry").setTextureName(RefStrings.MODID + ":bob_chemistry");
|
||||
bob_oil = new Item().setUnlocalizedName("bob_oil").setTextureName(RefStrings.MODID + ":bob_oil");
|
||||
bob_nuclear = new Item().setUnlocalizedName("bob_nuclear").setTextureName(RefStrings.MODID + ":bob_nuclear");
|
||||
|
||||
mysteryshovel = new ItemMS().setUnlocalizedName("mysteryshovel").setFull3D().setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cursed_shovel");
|
||||
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000000000000L, 100000000000000L).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
|
||||
@ -3615,8 +3638,12 @@ public class ModItems {
|
||||
GameRegistry.registerItem(dynosphere_dineutronium, dynosphere_dineutronium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dynosphere_dineutronium_charged, dynosphere_dineutronium_charged.getUnlocalizedName());
|
||||
|
||||
//Template Folder
|
||||
//Folders
|
||||
GameRegistry.registerItem(template_folder, template_folder.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bobmazon_materials, bobmazon_materials.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bobmazon_machines, bobmazon_machines.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bobmazon_weapons, bobmazon_weapons.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bobmazon_tools, bobmazon_tools.getUnlocalizedName());
|
||||
|
||||
//Hydraulic Press Stamps
|
||||
GameRegistry.registerItem(stamp_stone_flat, stamp_stone_flat.getUnlocalizedName());
|
||||
@ -4663,6 +4690,11 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ln2_10, ln2_10.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nothing, nothing.getUnlocalizedName());
|
||||
GameRegistry.registerItem(void_anim, void_anim.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_metalworks, bob_metalworks.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_assembly, bob_assembly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_chemistry, bob_chemistry.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_oil, bob_oil.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_nuclear, bob_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mysteryshovel, mysteryshovel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(memory, memory.getUnlocalizedName());
|
||||
}
|
||||
|
||||
22
com/hbm/items/tool/ItemCatalog.java
Normal file
@ -0,0 +1,22 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCatalog extends Item {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(world.isRemote)
|
||||
player.openGui(MainRegistry.instance, ModItems.guiID_item_bobmazon, world, 0, 0, 0);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityCloudFX;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@ -407,7 +408,7 @@ public class ClientProxy extends ServerProxy
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.d_smoke1, ModItems.d_smoke2, ModItems.d_smoke3, ModItems.d_smoke4, ModItems.d_smoke5, ModItems.d_smoke6, ModItems.d_smoke7, ModItems.d_smoke8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(com.hbm.entity.particle.EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityOrangeFX.class, new MultiCloudRenderer(new Item[] { ModItems.orange1, ModItems.orange2, ModItems.orange3, ModItems.orange4, ModItems.orange5, ModItems.orange6, ModItems.orange7, ModItems.orange8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFogFX.class, new FogRenderer());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste));
|
||||
@ -436,6 +437,7 @@ public class ClientProxy extends ServerProxy
|
||||
|
||||
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
TextureManager man = Minecraft.getMinecraft().renderEngine;
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
@ -451,6 +453,12 @@ public class ClientProxy extends ServerProxy
|
||||
EntityCloudFX smoke = new EntityCloudFX(world, x, y, z, 0.0, 0.1, 0.0);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(smoke);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
ParticleContrail contrail = new ParticleContrail(man, world, x, y, z);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(contrail);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,6 +213,11 @@ public class MainRegistry
|
||||
public static Achievement achFOEQ;
|
||||
public static Achievement achFiend;
|
||||
public static Achievement achFiend2;
|
||||
public static Achievement bobMetalworks;
|
||||
public static Achievement bobAssembly;
|
||||
public static Achievement bobChemistry;
|
||||
public static Achievement bobOil;
|
||||
public static Achievement bobNuclear;
|
||||
|
||||
public static boolean enableDebugMode = true;
|
||||
public static boolean enableMycelium = false;
|
||||
@ -992,6 +997,12 @@ public class MainRegistry
|
||||
achFOEQ = new Achievement("achievement.FOEQ", "FOEQ", 4, 2, ModItems.sat_foeq, null).initIndependentStat().setSpecial().registerStat();
|
||||
achFiend = new Achievement("achievement.fiend", "fiend", 6, 0, ModItems.shimmer_sledge, null).initIndependentStat().setSpecial().registerStat();
|
||||
achFiend2 = new Achievement("achievement.fiend2", "fiend2", 6, 2, ModItems.shimmer_axe, null).initIndependentStat().setSpecial().registerStat();
|
||||
|
||||
bobMetalworks = new Achievement("achievement.metalworks", "metalworks", -2, 4, ModItems.bob_metalworks, null).initIndependentStat().registerStat();
|
||||
bobAssembly = new Achievement("achievement.assembly", "assembly", 0, 4, ModItems.bob_assembly, bobMetalworks).initIndependentStat().registerStat();
|
||||
bobChemistry = new Achievement("achievement.chemistry", "chemistry", 2, 4, ModItems.bob_chemistry, bobAssembly).initIndependentStat().registerStat();
|
||||
bobOil = new Achievement("achievement.oil", "oil", 4, 4, ModItems.bob_oil, bobChemistry).initIndependentStat().registerStat();
|
||||
bobNuclear = new Achievement("achievement.nuclear", "nuclear", 6, 4, ModItems.bob_nuclear, bobOil).initIndependentStat().registerStat();
|
||||
|
||||
AchievementPage.registerAchievementPage(new AchievementPage("Nuclear Tech", new Achievement[]{
|
||||
achSacrifice,
|
||||
@ -1005,8 +1016,16 @@ public class MainRegistry
|
||||
achSpace,
|
||||
achFOEQ,
|
||||
achFiend,
|
||||
achFiend2
|
||||
achFiend2,
|
||||
bobMetalworks,
|
||||
bobAssembly,
|
||||
bobChemistry,
|
||||
bobOil,
|
||||
bobNuclear
|
||||
}));
|
||||
|
||||
//MUST be initialized AFTER achievements!!
|
||||
BobmazonOfferFactory.init();
|
||||
|
||||
OreDictionary.registerOre("ingotUranium", ModItems.ingot_uranium);
|
||||
OreDictionary.registerOre("ingotUranium233", ModItems.ingot_u233);
|
||||
|
||||
@ -123,6 +123,12 @@ public class ModEventHandlerClient {
|
||||
public void clickHandler(MouseEvent event) {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(event.button == 0 && player.getUniqueID().toString().equals("c874fd4e-5841-42e4-8f77-70efd5881bc1"))
|
||||
if(player.worldObj.rand.nextInt(2) == 0)
|
||||
Minecraft.getMinecraft().gameSettings.limitFramerate = 10;
|
||||
else
|
||||
Minecraft.getMinecraft().gameSettings.limitFramerate = 60;
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBase) {
|
||||
|
||||
|
||||