sorted lang file entries alphabetically, texture work, breeder overhaul
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 457 B |
|
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
BIN
src/main/java/assets/hbm/textures/gui/processing/gui_breeder.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 609 B |
BIN
src/main/java/assets/hbm/textures/items/rod_dual_polonium.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/main/java/assets/hbm/textures/items/rod_polonium.png
Normal file
|
After Width: | Height: | Size: 276 B |
BIN
src/main/java/assets/hbm/textures/items/rod_quad_polonium.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_357_desh.png
Normal file
|
After Width: | Height: | Size: 201 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_44_desh.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_50_desh.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_9_desh.png
Normal file
|
After Width: | Height: | Size: 204 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_desh_circuit.png
Normal file
|
After Width: | Height: | Size: 277 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_desh_flat.png
Normal file
|
After Width: | Height: | Size: 202 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_desh_plate.png
Normal file
|
After Width: | Height: | Size: 241 B |
BIN
src/main/java/assets/hbm/textures/items/stamp_desh_wire.png
Normal file
|
After Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 215 B |
@ -26,46 +26,37 @@ public class EntityMaskMan extends EntityMob implements IRangedAttackMob, IBossD
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(3, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(4, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
|
||||
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
|
||||
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
|
||||
this.targetTasks.addTask(3, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
|
||||
|
||||
this.setSize(2F, 5F);
|
||||
this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
protected void applyEntityAttributes()
|
||||
{
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D);
|
||||
}
|
||||
|
||||
public boolean isAIEnabled()
|
||||
{
|
||||
public boolean isAIEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
protected boolean canDespawn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase target, float dist) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(posX - target.posX, (posY + 3) - (target.posY + target.getEyeHeight()), posZ - target.posZ);
|
||||
Vec3 vec = Vec3.createVectorHelper(target.posX - posX, (target.posY + target.getEyeHeight()) - (posY + 3), target.posZ - posZ).normalize();
|
||||
|
||||
EntityBulletBase rawkett = new EntityBulletBase(worldObj, BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
|
||||
rawkett.copyLocationAndAnglesFrom(target);
|
||||
|
||||
//rawkett.lastTickPosX = rawkett.prevPosX = rawkett.posX = this.posX;
|
||||
//rawkett.lastTickPosY = rawkett.prevPosY = rawkett.posY = this.posY + 3;
|
||||
//rawkett.lastTickPosZ = rawkett.prevPosZ = rawkett.posZ = this.posZ;
|
||||
rawkett.setVelocity(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
rawkett.setLocationAndAngles(posX + vec.xCoord * 2, posY, posZ + vec.zCoord * 2, 0.0F, 0.0F);
|
||||
|
||||
rawkett.lastTickPosY = rawkett.prevPosY = rawkett.posY = rawkett.posY + 3;
|
||||
rawkett.setVelocity(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
|
||||
System.out.println("aaaaaa");
|
||||
|
||||
worldObj.spawnEntityInWorld(rawkett);
|
||||
}
|
||||
|
||||
43
src/main/java/com/hbm/inventory/BreederRecipes.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BreederRecipes {
|
||||
|
||||
private static HashMap<ComparableStack, ItemStack> recipes = new HashMap();
|
||||
private static HashMap<ComparableStack, int[]> fuels = new HashMap();
|
||||
|
||||
public static void registerRecipes() {
|
||||
|
||||
}
|
||||
|
||||
public static void registerFuels() {
|
||||
fuels.put(new ComparableStack(ModItems.rod_u233), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_u233), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_u233), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_u235), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_u235), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_u235), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_u238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_u238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_u238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_neptunium), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_neptunium), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_neptunium), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_pu238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_pu238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_pu238), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_pu239), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_pu239), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_pu239), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_pu240), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_dual_pu240), new int[] {0, 0});
|
||||
fuels.put(new ComparableStack(ModItems.rod_quad_pu240), new int[] {0, 0});
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,21 +6,14 @@ import com.hbm.tileentity.machine.TileEntityMachineReactor;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerReactor extends Container {
|
||||
|
||||
private TileEntityMachineReactor diFurnace;
|
||||
private int dualCookTime;
|
||||
private int dualPower;
|
||||
private int lastItemBurnTime;
|
||||
|
||||
public ContainerReactor(InventoryPlayer invPlayer, TileEntityMachineReactor tedf) {
|
||||
dualCookTime = 0;
|
||||
dualPower = 0;
|
||||
lastItemBurnTime = 0;
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
@ -28,35 +21,25 @@ public class ContainerReactor extends Container {
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 56, 17));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 116, 35));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.dualPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
if (var4 != null && var4.getHasStack()) {
|
||||
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
@ -65,21 +48,17 @@ public class ContainerReactor extends Container {
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//Changing priorities without swapping the actual slots
|
||||
else if (!this.mergeItemStack(var5, 1, 2, false))
|
||||
{
|
||||
} else if (!this.mergeItemStack(var5, 1, 2, false)) {
|
||||
if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
if (var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
@ -91,40 +70,4 @@ public class ContainerReactor extends Container {
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return diFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if(this.dualCookTime != this.diFurnace.dualCookTime)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
||||
}
|
||||
|
||||
if(this.dualPower != this.diFurnace.dualPower)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.dualPower);
|
||||
}
|
||||
}
|
||||
|
||||
this.dualCookTime = this.diFurnace.dualCookTime;
|
||||
this.dualPower = this.diFurnace.dualPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
diFurnace.dualCookTime = j;
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
diFurnace.dualPower = j;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineReactor extends GuiContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIReactor.png");
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_breeder.png");
|
||||
private TileEntityMachineReactor diFurnace;
|
||||
|
||||
public GUIMachineReactor(InventoryPlayer invPlayer, TileEntityMachineReactor tedf) {
|
||||
|
||||
@ -98,6 +98,7 @@ public class ModItems {
|
||||
public static Item ingot_pu239;
|
||||
public static Item ingot_pu240;
|
||||
public static Item ingot_neptunium;
|
||||
public static Item ingot_polonium;
|
||||
public static Item ingot_titanium;
|
||||
public static Item ingot_cobalt;
|
||||
public static Item sulfur;
|
||||
@ -176,6 +177,7 @@ public class ModItems {
|
||||
public static Item nugget_pu239;
|
||||
public static Item nugget_pu240;
|
||||
public static Item nugget_neptunium;
|
||||
public static Item nugget_polonium;
|
||||
public static Item plate_titanium;
|
||||
public static Item plate_aluminium;
|
||||
public static Item wire_red_copper;
|
||||
@ -255,6 +257,7 @@ public class ModItems {
|
||||
|
||||
public static Item powder_lead;
|
||||
public static Item powder_neptunium;
|
||||
public static Item powder_polonium;
|
||||
public static Item powder_schrabidium;
|
||||
|
||||
public static Item powder_aluminium;
|
||||
@ -745,6 +748,7 @@ public class ModItems {
|
||||
public static Item rod_pu239;
|
||||
public static Item rod_pu240;
|
||||
public static Item rod_neptunium;
|
||||
public static Item rod_polonium;
|
||||
public static Item rod_lead;
|
||||
public static Item rod_schrabidium;
|
||||
public static Item rod_solinium;
|
||||
@ -767,6 +771,7 @@ public class ModItems {
|
||||
public static Item rod_dual_pu239;
|
||||
public static Item rod_dual_pu240;
|
||||
public static Item rod_dual_neptunium;
|
||||
public static Item rod_dual_polonium;
|
||||
public static Item rod_dual_lead;
|
||||
public static Item rod_dual_schrabidium;
|
||||
public static Item rod_dual_solinium;
|
||||
@ -782,6 +787,7 @@ public class ModItems {
|
||||
public static Item rod_quad_pu239;
|
||||
public static Item rod_quad_pu240;
|
||||
public static Item rod_quad_neptunium;
|
||||
public static Item rod_quad_polonium;
|
||||
public static Item rod_quad_lead;
|
||||
public static Item rod_quad_schrabidium;
|
||||
public static Item rod_quad_solinium;
|
||||
@ -1962,6 +1968,7 @@ public class ModItems {
|
||||
ingot_pu239 = new ItemRadioactive(5F).setUnlocalizedName("ingot_pu239").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_pu239");
|
||||
ingot_pu240 = new ItemRadioactive(5F).setUnlocalizedName("ingot_pu240").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_pu240");
|
||||
ingot_neptunium = new ItemRadioactive(2.5F).setUnlocalizedName("ingot_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_neptunium");
|
||||
ingot_polonium = new ItemRadioactive(10F).setUnlocalizedName("ingot_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_polonium");
|
||||
ingot_titanium = new Item().setUnlocalizedName("ingot_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_titanium");
|
||||
ingot_cobalt = new Item().setUnlocalizedName("ingot_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_cobalt");
|
||||
sulfur = new Item().setUnlocalizedName("sulfur").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":sulfur");
|
||||
@ -2072,6 +2079,7 @@ public class ModItems {
|
||||
nugget_pu239 = new ItemRadioactive(1.5F).setUnlocalizedName("nugget_pu239").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_pu239");
|
||||
nugget_pu240 = new ItemRadioactive(1.5F).setUnlocalizedName("nugget_pu240").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_pu240");
|
||||
nugget_neptunium = new ItemRadioactive(1.5F).setUnlocalizedName("nugget_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_neptunium");
|
||||
nugget_polonium = new ItemRadioactive(3.5F).setUnlocalizedName("nugget_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_polonium");
|
||||
plate_titanium = new Item().setUnlocalizedName("plate_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_titanium");
|
||||
plate_aluminium = new Item().setUnlocalizedName("plate_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_aluminium");
|
||||
wire_red_copper = new Item().setUnlocalizedName("wire_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_red_copper");
|
||||
@ -2117,6 +2125,7 @@ public class ModItems {
|
||||
|
||||
powder_lead = new Item().setUnlocalizedName("powder_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lead");
|
||||
powder_neptunium = new ItemRadioactive(2.5F, true).setUnlocalizedName("powder_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_neptunium");
|
||||
powder_polonium = new ItemRadioactive(10F, true).setUnlocalizedName("powder_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_polonium");
|
||||
powder_schrabidium = new ItemRadioactive(7.5F, true, true).setUnlocalizedName("powder_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_schrabidium");
|
||||
powder_aluminium = new Item().setUnlocalizedName("powder_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_aluminium");
|
||||
powder_beryllium = new Item().setUnlocalizedName("powder_beryllium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_beryllium");
|
||||
@ -2580,6 +2589,7 @@ public class ModItems {
|
||||
rod_pu239 = new ItemRadioactive(5F).setUnlocalizedName("rod_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_pu239");
|
||||
rod_pu240 = new ItemRadioactive(5F).setUnlocalizedName("rod_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_pu240");
|
||||
rod_neptunium = new ItemRadioactive(5F).setUnlocalizedName("rod_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_neptunium");
|
||||
rod_polonium = new ItemRadioactive(10F).setUnlocalizedName("rod_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_polonium");
|
||||
rod_lead = new Item().setUnlocalizedName("rod_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_lead");
|
||||
rod_schrabidium = new ItemRadioactive(7.5F, false, true).setUnlocalizedName("rod_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium");
|
||||
rod_solinium = new ItemRadioactive(7.5F, false, true).setUnlocalizedName("rod_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_solinium");
|
||||
@ -2602,6 +2612,7 @@ public class ModItems {
|
||||
rod_dual_pu239 = new ItemRadioactive(10F).setUnlocalizedName("rod_dual_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_pu239");
|
||||
rod_dual_pu240 = new ItemRadioactive(10F).setUnlocalizedName("rod_dual_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_pu240");
|
||||
rod_dual_neptunium = new ItemRadioactive(10F).setUnlocalizedName("rod_dual_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_neptunium");
|
||||
rod_dual_polonium = new ItemRadioactive(20F).setUnlocalizedName("rod_dual_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_polonium");
|
||||
rod_dual_lead = new Item().setUnlocalizedName("rod_dual_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_lead");
|
||||
rod_dual_schrabidium = new ItemRadioactive(15F, false, true).setUnlocalizedName("rod_dual_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium");
|
||||
rod_dual_solinium = new ItemRadioactive(15F, false, true).setUnlocalizedName("rod_dual_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_solinium");
|
||||
@ -2617,6 +2628,7 @@ public class ModItems {
|
||||
rod_quad_pu239 = new ItemRadioactive(20F).setUnlocalizedName("rod_quad_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_pu239");
|
||||
rod_quad_pu240 = new ItemRadioactive(20F).setUnlocalizedName("rod_quad_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_pu240");
|
||||
rod_quad_neptunium = new ItemRadioactive(20F).setUnlocalizedName("rod_quad_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_neptunium");
|
||||
rod_quad_polonium = new ItemRadioactive(40F).setUnlocalizedName("rod_quad_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_polonium");
|
||||
rod_quad_lead = new Item().setUnlocalizedName("rod_quad_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_lead");
|
||||
rod_quad_schrabidium = new ItemRadioactive(30F, false, true).setUnlocalizedName("rod_quad_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium");
|
||||
rod_quad_solinium = new ItemRadioactive(30F, false, true).setUnlocalizedName("rod_quad_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_solinium");
|
||||
@ -3915,6 +3927,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ingot_pu239, ingot_pu239.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_pu240, ingot_pu240.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_neptunium, ingot_neptunium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_polonium, ingot_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_titanium, ingot_titanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_copper, ingot_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_red_copper, ingot_red_copper.getUnlocalizedName());
|
||||
@ -3979,6 +3992,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_uranium, powder_uranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_plutonium, powder_plutonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_neptunium, powder_neptunium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_polonium, powder_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_titanium, powder_titanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_copper, powder_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_red_copper, powder_red_copper.getUnlocalizedName());
|
||||
@ -4093,6 +4107,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(nugget_pu239, nugget_pu239.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_pu240, nugget_pu240.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_neptunium, nugget_neptunium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_polonium, nugget_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_lead, nugget_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_beryllium, nugget_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_schrabidium, nugget_schrabidium.getUnlocalizedName());
|
||||
@ -4677,6 +4692,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rod_dual_neptunium, rod_dual_neptunium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_quad_neptunium, rod_quad_neptunium.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(rod_polonium, rod_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_dual_polonium, rod_dual_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_quad_polonium, rod_quad_polonium.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(rod_lead, rod_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_dual_lead, rod_dual_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_quad_lead, rod_quad_lead.getUnlocalizedName());
|
||||
|
||||
@ -26,38 +26,39 @@ public class ModelMaskMan extends ModelBase {
|
||||
float f7 = man.limbSwing - man.limbSwingAmount * (1.0F - f5);
|
||||
float f6 = (man.prevLimbSwingAmount + (man.limbSwingAmount - man.prevLimbSwingAmount) * f5) * 0.5F;
|
||||
|
||||
GL11.glRotated(Math.toDegrees(MathHelper.cos(f7 * 0.6662F + (float)Math.PI) * 1.4F * f6) * -0.1, 1, 0, 0);
|
||||
double swing = Math.toDegrees(MathHelper.cos(f7 / 2F + (float)Math.PI) * 1.4F * f6);
|
||||
|
||||
GL11.glRotated(swing * -0.1, 1, 0, 0);
|
||||
|
||||
ResourceManager.maskman.renderPart("Torso");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 4F, 0);
|
||||
//GL11.glRotated(f3, 1, 0, 0);
|
||||
GL11.glRotated(f3, 0, 1, 0);
|
||||
ResourceManager.maskman.renderPart("Head");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 1.75F, -0.5F);
|
||||
GL11.glRotated(Math.toDegrees(MathHelper.cos(f7 * 0.6662F + (float)Math.PI) * 1.4F * f6), 0, 0, 1);
|
||||
GL11.glRotated(swing, 0, 0, 1);
|
||||
ResourceManager.maskman.renderPart("LLeg");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 1.75F, 0.5F);
|
||||
GL11.glRotated(Math.toDegrees(MathHelper.cos(f7 * 0.6662F) * 1.4F * f6), 0, 0, 1);
|
||||
GL11.glRotated(swing * -1, 0, 0, 1);
|
||||
ResourceManager.maskman.renderPart("RLeg");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 3.75F, -1.5F);
|
||||
GL11.glRotated(Math.toDegrees(MathHelper.cos(f7 * 0.6662F) * 1.4F * f6), 0, 0, 1);
|
||||
GL11.glRotated(swing * 0.25, 0, 0, 1);
|
||||
ResourceManager.maskman.renderPart("LArm");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 3.75F, 1.5F);
|
||||
GL11.glRotated(Math.toDegrees(MathHelper.cos(f7 * 0.6662F + (float)Math.PI) * 1.4F * f6), 0, 0, 1);
|
||||
GL11.glRotated(swing * -0.25, 0, 0, 1);
|
||||
ResourceManager.maskman.renderPart("RArm");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
@ -3,37 +3,30 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.blocks.machine.MachineReactor;
|
||||
import com.hbm.inventory.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityMachineReactor extends TileEntity implements ISidedInventory {
|
||||
public class TileEntityMachineReactor extends TileEntityMachineBase {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public int dualCookTime;
|
||||
public int dualPower;
|
||||
|
||||
public int progress;
|
||||
public int charge;
|
||||
public static final int maxPower = 1000;
|
||||
public static final int processingSpeed = 1000;
|
||||
|
||||
private static final int[] slots_top = new int[] {1};
|
||||
private static final int[] slots_bottom = new int[] {2, 0};
|
||||
private static final int[] slots_side = new int[] {0};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineReactor() {
|
||||
slots = new ItemStack[3];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
private static final int[] slots_top = new int[] { 1 };
|
||||
private static final int[] slots_bottom = new int[] { 2, 0 };
|
||||
private static final int[] slots_side = new int[] { 0 };
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineReactor() {
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -42,175 +35,147 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
public String getName() {
|
||||
return "container.reactor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.reactor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
//You scrubs aren't needed for anything (right now)
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return i == 2 ? false : (i == 0 ? hasItemPower(itemStack) : true);
|
||||
}
|
||||
|
||||
|
||||
public boolean hasItemPower(ItemStack itemStack) {
|
||||
return getItemPower(itemStack) > 0;
|
||||
}
|
||||
|
||||
private static int getItemPower(ItemStack itemStack) {
|
||||
if(itemStack == null)
|
||||
{
|
||||
return 0;
|
||||
}else{
|
||||
Item item = itemStack.getItem();
|
||||
|
||||
if(item == ModItems.pellet_rtg_weak) return 1;
|
||||
if(item == ModItems.pellet_rtg) return 2;
|
||||
if(item == ModItems.rod_u238) return 1;
|
||||
if(item == ModItems.rod_dual_u238) return 2;
|
||||
if(item == ModItems.rod_quad_u238) return 4;
|
||||
if(item == ModItems.rod_u235) return 3;
|
||||
if(item == ModItems.rod_dual_u235) return 6;
|
||||
if(item == ModItems.rod_quad_u235) return 12;
|
||||
if(item == ModItems.rod_pu238) return 5;
|
||||
if(item == ModItems.rod_dual_pu238) return 10;
|
||||
if(item == ModItems.rod_quad_pu238) return 20;
|
||||
if(item == ModItems.rod_pu239) return 3;
|
||||
if(item == ModItems.rod_dual_pu239) return 6;
|
||||
if(item == ModItems.rod_quad_pu239) return 12;
|
||||
if(item == ModItems.rod_pu240) return 1;
|
||||
if(item == ModItems.rod_dual_pu240) return 2;
|
||||
if(item == ModItems.rod_quad_pu240) return 4;
|
||||
if(item == ModItems.rod_neptunium) return 3;
|
||||
if(item == ModItems.rod_dual_neptunium) return 6;
|
||||
if(item == ModItems.rod_quad_neptunium) return 12;
|
||||
if(item == ModItems.rod_schrabidium) return 15;
|
||||
if(item == ModItems.rod_dual_schrabidium) return 30;
|
||||
if(item == ModItems.rod_quad_schrabidium) return 60;
|
||||
if(item == ModItems.rod_solinium) return 20;
|
||||
if(item == ModItems.rod_dual_solinium) return 40;
|
||||
if(item == ModItems.rod_quad_solinium) return 80;
|
||||
private static int getItemPower(ItemStack itemStack) {
|
||||
|
||||
return 0;
|
||||
if(itemStack == null) {
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
|
||||
Item item = itemStack.getItem();
|
||||
|
||||
if(item == ModItems.pellet_rtg_weak)
|
||||
return 1;
|
||||
if(item == ModItems.pellet_rtg)
|
||||
return 2;
|
||||
if(item == ModItems.rod_u238)
|
||||
return 1;
|
||||
if(item == ModItems.rod_dual_u238)
|
||||
return 2;
|
||||
if(item == ModItems.rod_quad_u238)
|
||||
return 4;
|
||||
if(item == ModItems.rod_u235)
|
||||
return 3;
|
||||
if(item == ModItems.rod_dual_u235)
|
||||
return 6;
|
||||
if(item == ModItems.rod_quad_u235)
|
||||
return 12;
|
||||
if(item == ModItems.rod_pu238)
|
||||
return 5;
|
||||
if(item == ModItems.rod_dual_pu238)
|
||||
return 10;
|
||||
if(item == ModItems.rod_quad_pu238)
|
||||
return 20;
|
||||
if(item == ModItems.rod_pu239)
|
||||
return 3;
|
||||
if(item == ModItems.rod_dual_pu239)
|
||||
return 6;
|
||||
if(item == ModItems.rod_quad_pu239)
|
||||
return 12;
|
||||
if(item == ModItems.rod_pu240)
|
||||
return 1;
|
||||
if(item == ModItems.rod_dual_pu240)
|
||||
return 2;
|
||||
if(item == ModItems.rod_quad_pu240)
|
||||
return 4;
|
||||
if(item == ModItems.rod_neptunium)
|
||||
return 3;
|
||||
if(item == ModItems.rod_dual_neptunium)
|
||||
return 6;
|
||||
if(item == ModItems.rod_quad_neptunium)
|
||||
return 12;
|
||||
if(item == ModItems.rod_schrabidium)
|
||||
return 15;
|
||||
if(item == ModItems.rod_dual_schrabidium)
|
||||
return 30;
|
||||
if(item == ModItems.rod_quad_schrabidium)
|
||||
return 60;
|
||||
if(item == ModItems.rod_solinium)
|
||||
return 20;
|
||||
if(item == ModItems.rod_dual_solinium)
|
||||
return 40;
|
||||
if(item == ModItems.rod_quad_solinium)
|
||||
return 80;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
|
||||
if(slots[i] != null) {
|
||||
if(slots[i].stackSize <= j) {
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
if(slots[i].stackSize == 0) {
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
|
||||
return itemStack1;
|
||||
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
dualPower = nbt.getShort("powerTime");
|
||||
dualCookTime = nbt.getShort("CookTime");
|
||||
|
||||
charge = nbt.getShort("charge");
|
||||
progress = nbt.getShort("progress");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
if(b0 >= 0 && b0 < slots.length) {
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setShort("powerTime", (short) dualPower);
|
||||
nbt.setShort("cookTime", (short) dualCookTime);
|
||||
nbt.setShort("charge", (short) charge);
|
||||
nbt.setShort("progress", (short) progress);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
|
||||
for(int i = 0; i < slots.length; i++) {
|
||||
if(slots[i] != null) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
nbt1.setByte("slot", (byte) i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
@ -219,141 +184,123 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
if(itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty)
|
||||
{
|
||||
if(i == 0) {
|
||||
if(itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty
|
||||
|| itemStack.getItem() == ModItems.rod_quad_empty) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public int getDiFurnaceProgressScaled(int i) {
|
||||
return (dualCookTime * i) / processingSpeed;
|
||||
return (progress * i) / processingSpeed;
|
||||
}
|
||||
|
||||
|
||||
public int getPowerRemainingScaled(int i) {
|
||||
return (dualPower * i) / maxPower;
|
||||
return (charge * i) / maxPower;
|
||||
}
|
||||
|
||||
|
||||
public boolean canProcess() {
|
||||
if(slots[1] == null)
|
||||
{
|
||||
if(slots[1] == null) {
|
||||
return false;
|
||||
}
|
||||
ItemStack itemStack = MachineRecipes.getReactorProcessingResult(slots[1].getItem());
|
||||
if(itemStack == null)
|
||||
{
|
||||
if(itemStack == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(slots[2] == null)
|
||||
{
|
||||
|
||||
if(slots[2] == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(!slots[2].isItemEqual(itemStack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(slots[2].stackSize < getInventoryStackLimit() && slots[2].stackSize < slots[2].getMaxStackSize()) {
|
||||
return true;
|
||||
}else{
|
||||
} else {
|
||||
return slots[2].stackSize < itemStack.getMaxStackSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void processItem() {
|
||||
if(canProcess()) {
|
||||
ItemStack itemStack = MachineRecipes.getReactorProcessingResult(slots[1].getItem());
|
||||
|
||||
if(slots[2] == null)
|
||||
{
|
||||
|
||||
if(slots[2] == null) {
|
||||
slots[2] = itemStack.copy();
|
||||
}else if(slots[2].isItemEqual(itemStack)) {
|
||||
} else if(slots[2].isItemEqual(itemStack)) {
|
||||
slots[2].stackSize += itemStack.stackSize;
|
||||
}
|
||||
|
||||
for(int i = 1; i < 2; i++)
|
||||
{
|
||||
if(slots[i].stackSize <= 0)
|
||||
{
|
||||
|
||||
for(int i = 1; i < 2; i++) {
|
||||
if(slots[i].stackSize <= 0) {
|
||||
slots[i] = new ItemStack(slots[i].getItem().setFull3D());
|
||||
}else{
|
||||
} else {
|
||||
slots[i].stackSize--;
|
||||
}
|
||||
if(slots[i].stackSize <= 0)
|
||||
{
|
||||
if(slots[i].stackSize <= 0) {
|
||||
slots[i] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean hasPower() {
|
||||
return dualPower > 0;
|
||||
return charge > 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean isProcessing() {
|
||||
return this.dualCookTime > 0;
|
||||
return this.progress > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.hasPower();
|
||||
boolean flag1 = false;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(this.hasItemPower(this.slots[0]) && this.dualPower == 0)
|
||||
{
|
||||
this.dualPower += getItemPower(this.slots[0]);
|
||||
if(this.slots[0] != null)
|
||||
{
|
||||
flag1 = true;
|
||||
boolean markDirty = false;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(this.hasItemPower(this.slots[0]) && this.charge == 0) {
|
||||
this.charge += getItemPower(this.slots[0]);
|
||||
if(this.slots[0] != null) {
|
||||
markDirty = true;
|
||||
this.slots[0].stackSize--;
|
||||
if(this.slots[0].stackSize == 0)
|
||||
{
|
||||
if(this.slots[0].stackSize == 0) {
|
||||
this.slots[0] = this.slots[0].getItem().getContainerItem(this.slots[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(hasPower() && canProcess())
|
||||
{
|
||||
dualCookTime++;
|
||||
|
||||
if(this.dualCookTime == TileEntityMachineReactor.processingSpeed)
|
||||
{
|
||||
this.dualCookTime = 0;
|
||||
|
||||
if(hasPower() && canProcess()) {
|
||||
progress++;
|
||||
|
||||
if(this.progress == TileEntityMachineReactor.processingSpeed) {
|
||||
this.progress = 0;
|
||||
this.processItem();
|
||||
flag1 = true;
|
||||
markDirty = true;
|
||||
}
|
||||
}else{
|
||||
dualCookTime = 0;
|
||||
} else {
|
||||
progress = 0;
|
||||
}
|
||||
|
||||
|
||||
boolean trigger = true;
|
||||
|
||||
if(hasPower() && canProcess() && this.dualCookTime == 0)
|
||||
{
|
||||
|
||||
if(hasPower() && canProcess() && this.progress == 0)
|
||||
trigger = false;
|
||||
|
||||
if(trigger) {
|
||||
markDirty = true;
|
||||
MachineReactor.updateBlockState(this.progress > 0, this.worldObj, this.xCoord, this.yCoord,
|
||||
this.zCoord);
|
||||
}
|
||||
|
||||
if(trigger)
|
||||
{
|
||||
flag1 = true;
|
||||
MachineReactor.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
if(flag1)
|
||||
{
|
||||
|
||||
if(markDirty)
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -526,8 +526,8 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
||||
|
||||
} else if(te instanceof TileEntityMachineReactor) {
|
||||
TileEntityMachineReactor reactor = (TileEntityMachineReactor)te;
|
||||
if(reactor.dualPower < 1 && this.coreHeat > 0)
|
||||
reactor.dualPower = 1;
|
||||
if(reactor.charge < 1 && this.coreHeat > 0)
|
||||
reactor.charge = 1;
|
||||
|
||||
} else if(te instanceof TileEntityNukeFurnace) {
|
||||
TileEntityNukeFurnace reactor = (TileEntityNukeFurnace)te;
|
||||
|
||||