Solinium functionality and items, env effect base

This commit is contained in:
HbmMods 2018-03-20 18:33:54 +01:00
parent 81a920e228
commit 867362e5d8
33 changed files with 590 additions and 39 deletions

View File

@ -134,6 +134,8 @@ death.attack.blender=%1$s wurde in kleine, mundgerechte Stücke geschnitten.
death.attack.meteorite=%1$s wurde von einem fallenden Stein aus dem Weltall erschlagen.
death.attack.boxcar=%1$s wurde von einem fallenden Güterwagon zermatscht. Autsch!
death.attack.broadcast=%1$s wurde das Gehirn geschmolzen.
death.attack.ams=%1$s wurde in tödlichen Teilchen gebadet, die von der Menschheit erst benannt werden müssen.
death.attack.amsCore=%1$s wurde vom Feuer einer Singularität verdampft.
item.redstone_sword.name=Redstoneschwert
item.big_sword.name=Großes Schwert

View File

@ -134,6 +134,8 @@ death.attack.blender=%1$s was chopped in small, bite-sized pieces.
death.attack.meteorite=%1$s was hit by a falling rock from outer space.
death.attack.boxcar=%1$s was smushed by a falling boxcar. Oh well.
death.attack.broadcast=%1$s got their brain melted.
death.attack.ams=%1$s was bathed in deadly particles that have yet to be named by human science.
death.attack.amsCore=%1$s was vaporized in the fire of a singularity.
item.redstone_sword.name=Redstone Sword
item.big_sword.name=Great Sword

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

View File

@ -140,7 +140,6 @@ public class NukeFleija extends BlockContainer implements IBomb {
{
if (!world.isRemote)
{
tetn.clearSlots();
//world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0);
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.effect.EntityCloudFleija;
import com.hbm.entity.effect.EntityCloudSolinium;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.interfaces.IBomb;
import com.hbm.main.MainRegistry;
@ -136,8 +137,6 @@ public class NukeSolinium extends BlockContainer implements IBomb {
{
if (!world.isRemote)
{
TileEntityNukeSolinium entityn = (TileEntityNukeSolinium) world.getTileEntity(x, y, z);
entityn.clearSlots();
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);
EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world);
@ -148,10 +147,11 @@ public class NukeSolinium extends BlockContainer implements IBomb {
entity.speed = MainRegistry.blastSpeed;
entity.coefficient = 1.0F;
entity.waste = false;
entity.extType = 1;
world.spawnEntityInWorld(entity);
EntityCloudFleija cloud = new EntityCloudFleija(world, r);
EntityCloudSolinium cloud = new EntityCloudSolinium(world, r);
cloud.posX = x;
cloud.posY = y;
cloud.posZ = z;

View File

@ -0,0 +1,84 @@
package com.hbm.entity.effect;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class EntityCloudSolinium extends Entity {
public int maxAge = 100;
public int age;
public float scale = 0;
public EntityCloudSolinium(World p_i1582_1_) {
super(p_i1582_1_);
this.setSize(1, 4);
this.ignoreFrustumCheck = true;
this.isImmuneToFire = true;
this.age = 0;
scale = 0;
}
@Override
protected void entityInit() {
this.dataWatcher.addObject(16, Integer.valueOf(0));
}
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float p_70070_1_)
{
return 15728880;
}
@Override
public float getBrightness(float p_70013_1_)
{
return 1.0F;
}
public EntityCloudSolinium(World p_i1582_1_, int maxAge) {
super(p_i1582_1_);
this.setSize(20, 40);
this.isImmuneToFire = true;
this.setMaxAge(maxAge);
}
@Override
public void onUpdate() {
this.age++;
this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, this.posX, this.posY + 200, this.posZ));
if(this.age >= this.getMaxAge())
{
this.age = 0;
this.setDead();
}
this.scale++;
}
@Override
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
age = p_70037_1_.getShort("age");
scale = p_70037_1_.getShort("scale");
}
@Override
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
p_70014_1_.setShort("age", (short)age);
p_70014_1_.setShort("scale", (short)scale);
}
public void setMaxAge(int i) {
this.dataWatcher.updateObject(16, Integer.valueOf(i));
}
public int getMaxAge() {
return this.dataWatcher.getWatchableObjectInt(16);
}
}

View File

@ -0,0 +1,49 @@
package com.hbm.entity.logic;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public abstract class EntityEnvirEffect extends Entity {
public int maxAge = 100;
public int blockRadius = 7;
public int entityRadius = 7;
public int chance = 10;
public boolean hasBlockEffect = true;
public boolean hasEntityEffect = true;
public EntityEnvirEffect(World p_i1582_1_) {
super(p_i1582_1_);
}
@Override
protected void entityInit() {
}
@Override
protected void readEntityFromNBT(NBTTagCompound nbt) {
this.ticksExisted = nbt.getInteger("lifetime");
this.maxAge = nbt.getInteger("lifecap");
}
@Override
protected void writeEntityToNBT(NBTTagCompound nbt) {
nbt.setInteger("lifetime", this.ticksExisted);
nbt.setInteger("lifecap", this.maxAge);
}
public void onUpdate() {
if(hasBlockEffect && rand.nextInt(chance) == 0)
applyBlockEffect();
if(hasEntityEffect && rand.nextInt(chance) == 0)
applyEntityEffect();
}
private void applyBlockEffect() { };
private void applyEntityEffect() { };
}

View File

@ -0,0 +1,15 @@
package com.hbm.entity.logic;
import net.minecraft.world.World;
public class EntityEnvirEffectRad extends EntityEnvirEffect {
public EntityEnvirEffectRad(World p_i1582_1_) {
super(p_i1582_1_);
}
public void randomizeAge(int min, int max) {
this.maxAge = min + rand.nextInt(max - min);
}
}

View File

@ -4,6 +4,7 @@ import com.hbm.entity.effect.EntityFalloutRain;
import com.hbm.explosion.ExplosionFleija;
import com.hbm.explosion.ExplosionNukeAdvanced;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.explosion.ExplosionSolinium;
import com.hbm.main.MainRegistry;
import net.minecraft.entity.Entity;
@ -18,12 +19,15 @@ public class EntityNukeExplosionMK3 extends Entity {
public ExplosionNukeAdvanced wst;
public ExplosionNukeAdvanced vap;
public ExplosionFleija expl;
public ExplosionSolinium sol;
public int speed = 1;
public float coefficient = 1;
public float coefficient2 = 1;
public boolean did = false;
public boolean did2 = false;
public boolean waste = true;
//Extended Type
public int extType = 0;
@Override
protected void readEntityFromNBT(NBTTagCompound nbt) {
@ -35,6 +39,7 @@ public class EntityNukeExplosionMK3 extends Entity {
did = nbt.getBoolean("did");
did2 = nbt.getBoolean("did2");
waste = nbt.getBoolean("waste");
extType = nbt.getInteger("extType");
long time = nbt.getLong("milliTime");
@ -50,8 +55,15 @@ public class EntityNukeExplosionMK3 extends Entity {
vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1);
vap.readFromNbt(nbt, "vap_");
} else {
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
expl.readFromNbt(nbt, "expl_");
if(extType == 0) {
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
expl.readFromNbt(nbt, "expl_");
}
if(extType == 1) {
sol = new ExplosionSolinium((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
sol.readFromNbt(nbt, "sol_");
}
}
this.did = true;
@ -68,6 +80,7 @@ public class EntityNukeExplosionMK3 extends Entity {
nbt.setBoolean("did", did);
nbt.setBoolean("did2", did2);
nbt.setBoolean("waste", waste);
nbt.setInteger("extType", extType);
nbt.setLong("milliTime", System.currentTimeMillis());
@ -79,6 +92,8 @@ public class EntityNukeExplosionMK3 extends Entity {
vap.saveToNbt(nbt, "vap_");
if(expl != null)
expl.saveToNbt(nbt, "expl_");
if(sol != null)
sol.saveToNbt(nbt, "sol_");
}
@ -98,7 +113,10 @@ public class EntityNukeExplosionMK3 extends Entity {
wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2);
vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1);
} else {
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
if(extType == 0)
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
if(extType == 1)
sol = new ExplosionSolinium((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
}
this.did = true;
@ -121,9 +139,12 @@ public class EntityNukeExplosionMK3 extends Entity {
this.setDead();
}
} else {
if(expl.update()) {
this.setDead();
}
if(extType == 0)
if(expl.update())
this.setDead();
if(extType == 1)
if(sol.update())
this.setDead();
}
}

View File

@ -628,4 +628,20 @@ public class ExplosionNukeGeneric {
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
}
}
public static void solinium(World world, int x, int y, int z) {
if (!world.isRemote) {
Block b = world.getBlock(x,y,z);
Material m = b.getMaterial();
if(b == Blocks.grass || b == Blocks.mycelium || b == ModBlocks.waste_earth || b == ModBlocks.waste_mycelium) {
world.setBlock(x, y, z, Blocks.dirt);
return;
}
if(m == Material.cactus || m == Material.coral || m == Material.leaves || m == Material.plants || m == Material.sponge || m == Material.vine || m == Material.gourd || m == Material.wood) {
world.setBlockToAir(x, y, z);
}
}
}
}

View File

@ -0,0 +1,103 @@
package com.hbm.explosion;
import com.hbm.blocks.generic.DecoBlockAlt;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class ExplosionSolinium
{
public int posX;
public int posY;
public int posZ;
public int lastposX = 0;
public int lastposZ = 0;
public int radius;
public int radius2;
public World worldObj;
private int n = 1;
private int nlimit;
private int shell;
private int leg;
private int element;
public float explosionCoefficient = 1.0F;
public float explosionCoefficient2 = 1.0F;
public void saveToNbt(NBTTagCompound nbt, String name) {
nbt.setInteger(name + "posX", posX);
nbt.setInteger(name + "posY", posY);
nbt.setInteger(name + "posZ", posZ);
nbt.setInteger(name + "lastposX", lastposX);
nbt.setInteger(name + "lastposZ", lastposZ);
nbt.setInteger(name + "radius", radius);
nbt.setInteger(name + "radius2", radius2);
nbt.setInteger(name + "n", n);
nbt.setInteger(name + "nlimit", nlimit);
nbt.setInteger(name + "shell", shell);
nbt.setInteger(name + "leg", leg);
nbt.setInteger(name + "element", element);
nbt.setFloat(name + "explosionCoefficient", explosionCoefficient);
nbt.setFloat(name + "explosionCoefficient2", explosionCoefficient2);
}
public void readFromNbt(NBTTagCompound nbt, String name) {
posX = nbt.getInteger(name + "posX");
posY = nbt.getInteger(name + "posY");
posZ = nbt.getInteger(name + "posZ");
lastposX = nbt.getInteger(name + "lastposX");
lastposZ = nbt.getInteger(name + "lastposZ");
radius = nbt.getInteger(name + "radius");
radius2 = nbt.getInteger(name + "radius2");
n = nbt.getInteger(name + "n");
nlimit = nbt.getInteger(name + "nlimit");
shell = nbt.getInteger(name + "shell");
leg = nbt.getInteger(name + "leg");
element = nbt.getInteger(name + "element");
explosionCoefficient = nbt.getFloat(name + "explosionCoefficient");
explosionCoefficient2 = nbt.getFloat(name + "explosionCoefficient2");
}
public ExplosionSolinium(int x, int y, int z, World world, int rad, float coefficient, float coefficient2)
{
this.posX = x;
this.posY = y;
this.posZ = z;
this.worldObj = world;
this.radius = rad;
this.radius2 = this.radius * this.radius;
this.explosionCoefficient = coefficient;
this.explosionCoefficient2 = coefficient2;
this.nlimit = this.radius2 * 4;
}
public boolean update()
{
breakColumn(this.lastposX, this.lastposZ);
this.shell = (int) Math.floor((Math.sqrt(n) + 1) / 2);
int shell2 = this.shell * 2;
this.leg = (int) Math.floor((this.n - (shell2 - 1) * (shell2 - 1)) / shell2);
this.element = (this.n - (shell2 - 1) * (shell2 - 1)) - shell2 * this.leg - this.shell + 1;
this.lastposX = this.leg == 0 ? this.shell : this.leg == 1 ? -this.element : this.leg == 2 ? -this.shell : this.element;
this.lastposZ = this.leg == 0 ? this.element : this.leg == 1 ? this.shell : this.leg == 2 ? -this.element : -this.shell;
this.n++;
return this.n > this.nlimit;
}
private void breakColumn(int x, int z)
{
int dist = this.radius2 - (x * x + z * z);
if (dist > 0)
{
dist = (int) Math.sqrt(dist);
for (int y = (int)(dist / this.explosionCoefficient2); y > -dist / this.explosionCoefficient; y--)
{
ExplosionNukeGeneric.solinium(this.worldObj, this.posX + x, this.posY + y, this.posZ + z);
}
}
}
}

View File

@ -604,7 +604,7 @@ public class GUIHandler implements IGuiHandler {
{
if(entity instanceof TileEntityNukeSolinium)
{
//return new ContainerNukeSolinium(player.inventory, (TileEntityNukeSolinium) entity);
return new ContainerNukeSolinium(player.inventory, (TileEntityNukeSolinium) entity);
}
return null;
}
@ -1145,7 +1145,7 @@ public class GUIHandler implements IGuiHandler {
{
if(entity instanceof TileEntityNukeSolinium)
{
//return new GUINukeSolinium(player.inventory, (TileEntityNukeSolinium) entity);
return new GUINukeSolinium(player.inventory, (TileEntityNukeSolinium) entity);
}
return null;
}

View File

@ -0,0 +1,81 @@
package com.hbm.inventory.container;
import com.hbm.tileentity.bomb.TileEntityNukeFleija;
import com.hbm.tileentity.bomb.TileEntityNukeSolinium;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerNukeSolinium extends Container {
private TileEntityNukeSolinium nukeSol;
public ContainerNukeSolinium(InventoryPlayer invPlayer, TileEntityNukeSolinium tedf) {
nukeSol = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 26, 18));
this.addSlotToContainer(new Slot(tedf, 1, 53, 18));
this.addSlotToContainer(new Slot(tedf, 2, 107, 18));
this.addSlotToContainer(new Slot(tedf, 3, 134, 18));
this.addSlotToContainer(new Slot(tedf, 4, 80, 36));
this.addSlotToContainer(new Slot(tedf, 5, 26, 54));
this.addSlotToContainer(new Slot(tedf, 6, 53, 54));
this.addSlotToContainer(new Slot(tedf, 7, 107, 54));
this.addSlotToContainer(new Slot(tedf, 8, 134, 54));
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
}
}
for(int i = 0; i < 9; i++)
{
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if (var4 != null && var4.getHasStack())
{
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if (par2 <= 10) {
if (!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true))
{
return null;
}
} else {
return null;
}
if (var5.stackSize == 0)
{
var4.putStack((ItemStack) null);
}
else
{
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return nukeSol.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,94 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerNukeFleija;
import com.hbm.inventory.container.ContainerNukeSolinium;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.bomb.TileEntityNukeFleija;
import com.hbm.tileentity.bomb.TileEntityNukeSolinium;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUINukeSolinium extends GuiContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/soliniumSchematic.png");
private TileEntityNukeSolinium testNuke;
public GUINukeSolinium(InventoryPlayer invPlayer, TileEntityNukeSolinium tedf) {
super(new ContainerNukeSolinium(invPlayer, tedf));
testNuke = tedf;
this.xSize = 176;
this.ySize = 222;
}
@Override
protected void drawGuiContainerForegroundLayer( int i, int j) {
String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(this.testNuke.slots[0] != null && this.testNuke.slots[0].getItem() == ModItems.solinium_igniter)
{
drawTexturedModalRect(guiLeft + 24, guiTop + 84, 0, 222, 22, 14);
}
if(this.testNuke.slots[1] != null && this.testNuke.slots[1].getItem() == ModItems.solinium_propellant)
{
drawTexturedModalRect(guiLeft + 46, guiTop + 84, 22, 222, 18, 14);
}
if(this.testNuke.slots[2] != null && this.testNuke.slots[2].getItem() == ModItems.solinium_propellant)
{
drawTexturedModalRect(guiLeft + 76, guiTop + 84, 52, 222, 18, 14);
}
if(this.testNuke.slots[3] != null && this.testNuke.slots[3].getItem() == ModItems.solinium_igniter)
{
drawTexturedModalRect(guiLeft + 94, guiTop + 84, 70, 222, 22, 14);
}
if(this.testNuke.slots[4] != null && this.testNuke.slots[4].getItem() == ModItems.solinium_core)
{
drawTexturedModalRect(guiLeft + 64, guiTop + 84, 40, 222, 12, 28);
}
if(this.testNuke.slots[5] != null && this.testNuke.slots[5].getItem() == ModItems.solinium_igniter)
{
drawTexturedModalRect(guiLeft + 24, guiTop + 98, 0, 236, 22, 14);
}
if(this.testNuke.slots[6] != null && this.testNuke.slots[6].getItem() == ModItems.solinium_propellant)
{
drawTexturedModalRect(guiLeft + 46, guiTop + 98, 22, 236, 18, 14);
}
if(this.testNuke.slots[7] != null && this.testNuke.slots[7].getItem() == ModItems.solinium_propellant)
{
drawTexturedModalRect(guiLeft + 76, guiTop + 98, 52, 236, 18, 14);
}
if(this.testNuke.slots[8] != null && this.testNuke.slots[8].getItem() == ModItems.solinium_igniter)
{
drawTexturedModalRect(guiLeft + 94, guiTop + 98, 70, 236, 22, 14);
}
if(this.testNuke.isReady()) {
drawTexturedModalRect(guiLeft + 134, guiTop + 90, 176, 0, 16, 16);
}
}
}

View File

@ -75,6 +75,8 @@ public class ModItems {
public static Item nugget_les;
public static Item ingot_magnetized_tungsten;
public static Item ingot_combine_steel;
public static Item ingot_solinium;
public static Item nugget_solinium;
public static Item ingot_australium;
public static Item ingot_weidanium;
@ -806,6 +808,10 @@ public class ModItems {
public static Item fleija_propellant;
public static Item fleija_core;
public static Item solinium_igniter;
public static Item solinium_propellant;
public static Item solinium_core;
public static Item battery_generic;
public static Item battery_advanced;
public static Item battery_lithium;
@ -1259,6 +1265,8 @@ public class ModItems {
plate_polymer = new Item().setUnlocalizedName("plate_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_polymer");
plate_dineutronium = new Item().setUnlocalizedName("plate_dineutronium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_dineutronium");
plate_desh = new Item().setUnlocalizedName("plate_desh").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_desh");
ingot_solinium = new Item().setUnlocalizedName("ingot_solinium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_solinium");
nugget_solinium = new Item().setUnlocalizedName("nugget_solinium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_solinium");
ingot_dura_steel = new ItemCustomLore().setUnlocalizedName("ingot_dura_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_dura_steel");
ingot_polymer = new ItemCustomLore().setUnlocalizedName("ingot_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_polymer");
@ -1917,6 +1925,10 @@ public class ModItems {
fleija_propellant = new ItemFleija().setUnlocalizedName("fleija_propellant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":fleija_propellant");
fleija_core = new ItemFleija().setUnlocalizedName("fleija_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":fleija_core");
solinium_igniter = new ItemSolinium().setUnlocalizedName("solinium_igniter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_igniter");
solinium_propellant = new ItemSolinium().setUnlocalizedName("solinium_propellant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_propellant");
solinium_core = new ItemSolinium().setUnlocalizedName("solinium_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_core");
battery_generic = new ItemBattery(50).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_generic");
battery_advanced = new ItemBattery(200).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_advanced");
battery_lithium = new ItemBattery(2500).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_lithium");
@ -2368,6 +2380,7 @@ public class ModItems {
GameRegistry.registerItem(ingot_schrabidium, ingot_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(ingot_magnetized_tungsten, ingot_magnetized_tungsten.getUnlocalizedName());
GameRegistry.registerItem(ingot_combine_steel, ingot_combine_steel.getUnlocalizedName());
GameRegistry.registerItem(ingot_solinium, ingot_solinium.getUnlocalizedName());
GameRegistry.registerItem(ingot_uranium_fuel, ingot_uranium_fuel.getUnlocalizedName());
GameRegistry.registerItem(ingot_plutonium_fuel, ingot_plutonium_fuel.getUnlocalizedName());
GameRegistry.registerItem(ingot_mox_fuel, ingot_mox_fuel.getUnlocalizedName());
@ -2487,6 +2500,7 @@ public class ModItems {
GameRegistry.registerItem(nugget_lead, nugget_lead.getUnlocalizedName());
GameRegistry.registerItem(nugget_beryllium, nugget_beryllium.getUnlocalizedName());
GameRegistry.registerItem(nugget_schrabidium, nugget_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(nugget_solinium, nugget_solinium.getUnlocalizedName());
GameRegistry.registerItem(nugget_uranium_fuel, nugget_uranium_fuel.getUnlocalizedName());
GameRegistry.registerItem(nugget_plutonium_fuel, nugget_plutonium_fuel.getUnlocalizedName());
GameRegistry.registerItem(nugget_mox_fuel, nugget_mox_fuel.getUnlocalizedName());
@ -3357,6 +3371,11 @@ public class ModItems {
GameRegistry.registerItem(fleija_propellant, fleija_propellant.getUnlocalizedName());
GameRegistry.registerItem(fleija_core, fleija_core.getUnlocalizedName());
//Solinium
GameRegistry.registerItem(solinium_igniter, solinium_igniter.getUnlocalizedName());
GameRegistry.registerItem(solinium_propellant, solinium_propellant.getUnlocalizedName());
GameRegistry.registerItem(solinium_core, solinium_core.getUnlocalizedName());
//Conventional Armor
GameRegistry.registerItem(goggles, goggles.getUnlocalizedName());
GameRegistry.registerItem(gas_mask, gas_mask.getUnlocalizedName());

View File

@ -0,0 +1,20 @@
package com.hbm.items.bomb;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemRadioactive;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
public class ItemSolinium extends ItemRadioactive {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
{
list.add("Used in:");
list.add("Solinium Bomb");
}
}

View File

@ -43,9 +43,6 @@ public class GunBaleFlare extends Item {
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
return;
}
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@ -81,7 +82,10 @@ public class GunDefabricator extends Item {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("BAD WOLF");
if(MainRegistry.polaroidID == 11)
list.add("Did you set your alarm for volcano day?");
else
list.add("BAD WOLF");
list.add("");
list.add("Ammo: Defabricator Energy Cell");
list.add("Damage: 40 - 120");

View File

@ -43,9 +43,9 @@ public class GunFatman extends Item {
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
/*if (event.isCanceled()) {
return;
}
}*/
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode

View File

@ -44,9 +44,6 @@ public class GunMIRV extends Item {
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
return;
}
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode

View File

@ -43,9 +43,6 @@ public class GunRpg extends Item {
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
return;
}
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode

View File

@ -135,6 +135,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudBig.class, new RenderBigNuke());
RenderingRegistry.registerEntityRenderingHandler(EntityCloudFleija.class, new RenderCloudFleija());
RenderingRegistry.registerEntityRenderingHandler(EntityCloudFleijaRainbow.class, new RenderCloudRainbow());
RenderingRegistry.registerEntityRenderingHandler(EntityCloudSolinium.class, new RenderCloudSolinium());
RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudNoShroom.class, new RenderNoCloud());
RenderingRegistry.registerEntityRenderingHandler(EntityFalloutRain.class, new RenderFallout());
RenderingRegistry.registerEntityRenderingHandler(EntityBlackHole.class, new RenderBlackHole());

View File

@ -51,6 +51,7 @@ import com.hbm.creativetabs.PartsTab;
import com.hbm.entity.effect.EntityBlackHole;
import com.hbm.entity.effect.EntityCloudFleija;
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
import com.hbm.entity.effect.EntityCloudSolinium;
import com.hbm.entity.effect.EntityEMPBlast;
import com.hbm.entity.effect.EntityFalloutRain;
import com.hbm.entity.effect.EntityNukeCloudBig;
@ -683,6 +684,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityAAShell.class, "entity_aa_shell", 92, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityRocketHoming.class, "entity_stinger", 93, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityMissileMicro.class, "entity_missile_taint", 94, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityCloudSolinium.class, "entity_cloud_rainbow", 95, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72);

View File

@ -0,0 +1,50 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.effect.EntityCloudSolinium;
import com.hbm.lib.RefStrings;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderCloudSolinium extends Render {
private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Sphere.obj");
private IModelCustom blastModel;
private ResourceLocation blastTexture;
public float scale = 0;
public float ring = 0;
public RenderCloudSolinium() {
blastModel = AdvancedModelLoader.loadModel(objTesterModelRL);
blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BlastSolinium.png");
scale = 0;
}
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
render((EntityCloudSolinium)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
public void render(EntityCloudSolinium cloud, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(cloud.age, cloud.age, cloud.age);
bindTexture(blastTexture);
blastModel.renderAll();
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return null;
}
}

View File

@ -19,7 +19,7 @@ public class TileEntityNukeSolinium extends TileEntity implements ISidedInventor
private String customName;
public TileEntityNukeSolinium() {
slots = new ItemStack[11];
slots = new ItemStack[9];
}
@Override
@ -171,18 +171,16 @@ public class TileEntityNukeSolinium extends TileEntity implements ISidedInventor
public boolean isReady() {
if(slots[0] != null && slots[1] != null && slots[2] != null && slots[3] != null && slots[4] != null && slots[5] != null && slots[6] != null && slots[7] != null && slots[8] != null && slots[9] != null && slots[10] != null)
if(slots[0].getItem() == ModItems.fleija_igniter &&
slots[1].getItem() == ModItems.fleija_igniter &&
slots[2].getItem() == ModItems.fleija_propellant &&
slots[3].getItem() == ModItems.fleija_propellant &&
slots[4].getItem() == ModItems.fleija_propellant &&
slots[5].getItem() == ModItems.fleija_core &&
slots[6].getItem() == ModItems.fleija_core &&
slots[7].getItem() == ModItems.fleija_core &&
slots[8].getItem() == ModItems.fleija_core &&
slots[9].getItem() == ModItems.fleija_core &&
slots[10].getItem() == ModItems.fleija_core)
if(slots[0] != null && slots[1] != null && slots[2] != null && slots[3] != null && slots[4] != null && slots[5] != null && slots[6] != null && slots[7] != null && slots[8] != null)
if(slots[0].getItem() == ModItems.solinium_igniter &&
slots[1].getItem() == ModItems.solinium_propellant &&
slots[2].getItem() == ModItems.solinium_propellant &&
slots[3].getItem() == ModItems.solinium_igniter &&
slots[4].getItem() == ModItems.solinium_core &&
slots[5].getItem() == ModItems.solinium_igniter &&
slots[6].getItem() == ModItems.solinium_propellant &&
slots[7].getItem() == ModItems.solinium_propellant &&
slots[8].getItem() == ModItems.solinium_igniter)
{
return true;
}

View File

@ -27,7 +27,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
public int dualCookTime;
public long power;
public int soundCycle = 0;
public static final int maxPower = 1000000;
public static final int maxPower = 100000;
public static final int processingSpeed = 500;
private static final int[] slots_top = new int[] {0};
@ -302,7 +302,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
if(hasPower() && isProcessing())
{
this.power -= 2500;
this.power -= 500;
if(this.power < 0)
{