mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
cleanup
This commit is contained in:
parent
42d6c39d14
commit
9f4323bb0d
159 changed files with 1234 additions and 719 deletions
|
@ -43,6 +43,7 @@ import ellpeck.actuallyadditions.tile.TileEntityBase;
|
|||
import ellpeck.actuallyadditions.update.UpdateChecker;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
|
||||
// So that BuildCraft Oil always gets used
|
||||
@Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, dependencies = "after:BuildCraft|Energy", canBeDeactivated = false, guiFactory = "ellpeck.actuallyadditions.config.GuiFactory")
|
||||
public class ActuallyAdditions{
|
||||
|
|
|
@ -50,7 +50,7 @@ public enum TheAchievements{
|
|||
public final int type;
|
||||
|
||||
TheAchievements(String name, int x, int y, ItemStack displayStack, Achievement hasToHaveBefore, int type){
|
||||
this.ach = new Achievement("achievement." + ModUtil.MOD_ID_LOWER + "." + name, ModUtil.MOD_ID_LOWER + "." + name, x, y, displayStack, hasToHaveBefore);
|
||||
this.ach = new Achievement("achievement."+ModUtil.MOD_ID_LOWER+"."+name, ModUtil.MOD_ID_LOWER+"."+name, x, y, displayStack, hasToHaveBefore);
|
||||
if(hasToHaveBefore == null) this.ach.initIndependentStat();
|
||||
this.ach.registerStat();
|
||||
this.type = type;
|
||||
|
|
|
@ -76,16 +76,18 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityBreaker breaker = (TileEntityBreaker)world.getTileEntity(x, y, z);
|
||||
if (breaker != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BREAKER.ordinal(), world, x, y, z);
|
||||
if(breaker != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BREAKER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -53,15 +53,17 @@ public class BlockCanolaPress extends BlockContainerBase implements IActAddItemO
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCanolaPress press = (TileEntityCanolaPress)world.getTileEntity(x, y, z);
|
||||
if (press != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, x, y, z);
|
||||
if(press != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -49,9 +49,9 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte
|
|||
public void randomDisplayTick(World world, int x, int y, int z, Random rand){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta == 1){
|
||||
if(meta == 1){
|
||||
for(int i = 0; i < 5; i++){
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y + 1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,16 +69,18 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCoalGenerator press = (TileEntityCoalGenerator)world.getTileEntity(x, y, z);
|
||||
if (press != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, x, y, z);
|
||||
if(press != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -58,7 +58,9 @@ public class BlockCoffeeMachine extends BlockContainerBase implements IActAddIte
|
|||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine)world.getTileEntity(x, y, z);
|
||||
if (machine != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, x, y, z);
|
||||
if(machine != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -74,7 +74,9 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
if(world.getBlockMetadata(x, y, z) != color.ordinal()){
|
||||
if(!world.isRemote){
|
||||
world.setBlockMetadataWithNotify(x, y, z, color.ordinal(), 2);
|
||||
if(!player.capabilities.isCreativeMode) player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -98,7 +100,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
@SuppressWarnings("all")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
for (int j = 0; j < allLampTypes.length; j++){
|
||||
for(int j = 0; j < allLampTypes.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +130,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
for(int i = 0; i < allLampTypes.length; i++){
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + ((IActAddItemOrBlock)InitBlocks.blockColoredLamp).getName() + allLampTypes[i].name + (isOn ? "On" : ""));
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+((IActAddItemOrBlock)InitBlocks.blockColoredLamp).getName()+allLampTypes[i].name+(isOn ? "On" : ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +152,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return InitBlocks.blockColoredLamp.getUnlocalizedName() + allLampTypes[stack.getItemDamage()].getName();
|
||||
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -161,7 +163,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack){
|
||||
if(stack.getItemDamage() >= allLampTypes.length) return null;
|
||||
return StringUtil.localize(this.getUnlocalizedName(stack)+".name") + (((BlockColoredLamp)this.theBlock).isOn ? " (" + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc") + ")" : "");
|
||||
return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.theBlock).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc")+")" : "");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -54,15 +54,23 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo
|
|||
TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(x, y, z);
|
||||
//Add items to be composted
|
||||
if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < ConfigIntValues.COMPOST_AMOUNT.getValue()))){
|
||||
if(tile.slots[0] == null) tile.slots[0] = new ItemStack(stackPlayer.getItem(), 1, TheMiscItems.MASHED_FOOD.ordinal());
|
||||
else tile.slots[0].stackSize++;
|
||||
if(tile.slots[0] == null){
|
||||
tile.slots[0] = new ItemStack(stackPlayer.getItem(), 1, TheMiscItems.MASHED_FOOD.ordinal());
|
||||
}
|
||||
else{
|
||||
tile.slots[0].stackSize++;
|
||||
}
|
||||
if(!player.capabilities.isCreativeMode) player.inventory.getCurrentItem().stackSize--;
|
||||
}
|
||||
|
||||
//Add Fertilizer to player's inventory
|
||||
else if(tile.slots[0] != null && (stackPlayer == null || (stackPlayer.getItem() instanceof ItemFertilizer && stackPlayer.stackSize <= stackPlayer.getMaxStackSize() - tile.slots[0].stackSize)) && tile.slots[0].getItem() instanceof ItemFertilizer){
|
||||
if(stackPlayer == null) player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.slots[0].copy());
|
||||
else player.getCurrentEquippedItem().stackSize+=tile.slots[0].stackSize;
|
||||
else if(tile.slots[0] != null && (stackPlayer == null || (stackPlayer.getItem() instanceof ItemFertilizer && stackPlayer.stackSize <= stackPlayer.getMaxStackSize()-tile.slots[0].stackSize)) && tile.slots[0].getItem() instanceof ItemFertilizer){
|
||||
if(stackPlayer == null){
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.slots[0].copy());
|
||||
}
|
||||
else{
|
||||
player.getCurrentEquippedItem().stackSize += tile.slots[0].stackSize;
|
||||
}
|
||||
tile.slots[0] = null;
|
||||
}
|
||||
}
|
||||
|
@ -78,9 +86,9 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo
|
|||
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
|
||||
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||
this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.setBlockBounds(1.0F-f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||
this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
|
||||
this.setBlockBounds(0.0F, 0.0F, 1.0F-f, 1.0F, 1.0F, 1.0F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||
this.setBlockBoundsForItemRender();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,9 @@ public abstract class BlockContainerBase extends BlockContainer{
|
|||
float dY = rand.nextFloat()*0.8F+0.1F;
|
||||
float dZ = rand.nextFloat()*0.8F+0.1F;
|
||||
EntityItem entityItem = new EntityItem(world, x+dX, y+dY, z+dZ, stack.copy());
|
||||
if(stack.hasTagCompound()) entityItem.getEntityItem().setTagCompound((NBTTagCompound)stack.getTagCompound().copy());
|
||||
if(stack.hasTagCompound()){
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound)stack.getTagCompound().copy());
|
||||
}
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian()*factor;
|
||||
entityItem.motionY = rand.nextGaussian()*factor+0.2F;
|
||||
|
|
|
@ -73,16 +73,18 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityDropper dropper = (TileEntityDropper)world.getTileEntity(x, y, z);
|
||||
if (dropper != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DROPPER.ordinal(), world, x, y, z);
|
||||
if(dropper != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DROPPER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -57,9 +57,9 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.sideIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Side");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.sideIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Side");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,11 +67,15 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
|
|||
if(!world.isRemote){
|
||||
if(this.isEnergizer){
|
||||
TileEntityEnergizer energizer = (TileEntityEnergizer)world.getTileEntity(x, y, z);
|
||||
if(energizer != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERGIZER.ordinal(), world, x, y, z);
|
||||
if(energizer != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERGIZER.ordinal(), world, x, y, z);
|
||||
}
|
||||
}
|
||||
else{
|
||||
TileEntityEnervator energizer = (TileEntityEnervator)world.getTileEntity(x, y, z);
|
||||
if(energizer != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERVATOR.ordinal(), world, x, y, z);
|
||||
if(energizer != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ENERVATOR.ordinal(), world, x, y, z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -53,15 +53,17 @@ public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBloc
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFeeder feeder = (TileEntityFeeder)world.getTileEntity(x, y, z);
|
||||
if (feeder != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FEEDER.ordinal(), world, x, y, z);
|
||||
if(feeder != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FEEDER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -49,7 +49,9 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd
|
|||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFermentingBarrel press = (TileEntityFermentingBarrel)world.getTileEntity(x, y, z);
|
||||
if (press != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FERMENTING_BARREL.ordinal(), world, x, y, z);
|
||||
if(press != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FERMENTING_BARREL.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -69,8 +71,8 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.iconTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.iconTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -76,16 +76,18 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFluidCollector collector = (TileEntityFluidCollector)world.getTileEntity(x, y, z);
|
||||
if (collector != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FLUID_COLLECTOR.ordinal(), world, x, y, z);
|
||||
if(collector != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FLUID_COLLECTOR.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -58,8 +58,8 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.stillIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Still");
|
||||
this.flowingIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Flowing");
|
||||
this.stillIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Still");
|
||||
this.flowingIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Flowing");
|
||||
this.definedFluid.setIcons(this.stillIcon, this.flowingIcon);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,12 +50,12 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3;
|
||||
|
||||
if (rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if (rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if (rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if(rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if(rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,9 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(side == 1) return this.topIcon;
|
||||
if(side == meta+2 && meta <= 3) return this.frontIcon;
|
||||
if(side == meta+2 && meta <= 3){
|
||||
return this.frontIcon;
|
||||
}
|
||||
else if(side == meta-2 && meta > 3) return this.onIcon;
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
@ -87,17 +89,19 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "On");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"On");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFurnaceDouble furnace = (TileEntityFurnaceDouble)world.getTileEntity(x, y, z);
|
||||
if (furnace != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FURNACE_DOUBLE.ordinal(), world, x, y, z);
|
||||
if(furnace != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FURNACE_DOUBLE.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -108,32 +112,32 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
public void randomDisplayTick(World world, int x, int y, int z, Random rand){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta > 3){
|
||||
float f = (float)x + 0.5F;
|
||||
float f1 = (float)y + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
|
||||
float f2 = (float)z + 0.5F;
|
||||
if(meta > 3){
|
||||
float f = (float)x+0.5F;
|
||||
float f1 = (float)y+0.0F+rand.nextFloat()*6.0F/16.0F;
|
||||
float f2 = (float)z+0.5F;
|
||||
float f3 = 0.52F;
|
||||
float f4 = rand.nextFloat() * 0.6F - 0.3F;
|
||||
float f4 = rand.nextFloat()*0.6F-0.3F;
|
||||
|
||||
if(meta == 6){
|
||||
world.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f-f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
if(meta == 7){
|
||||
world.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f+f3), (double)f1, (double)(f2+f4), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
if(meta == 4){
|
||||
world.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f+f4), (double)f1, (double)(f2-f3), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
if(meta == 5){
|
||||
world.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", (double)(f+f4), (double)f1, (double)(f2+f3), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y + 1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class BlockGeneric extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlock{
|
||||
|
|
|
@ -54,16 +54,18 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityGiantChest chest = (TileEntityGiantChest)world.getTileEntity(x, y, z);
|
||||
if (chest != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, x, y, z);
|
||||
if(chest != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -100,6 +102,7 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
|
|
|
@ -66,7 +66,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddI
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,30 +72,32 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
|
|||
public void randomDisplayTick(World world, int x, int y, int z, Random rand){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta == 1){
|
||||
if(meta == 1){
|
||||
for(int i = 0; i < 5; i++){
|
||||
double xRand = new Random().nextDouble()/0.75D - 0.5D;
|
||||
double zRand = new Random().nextDouble()/0.75D - 0.5D;
|
||||
world.spawnParticle("crit", (double)x+0.4F, (double)y + 0.8F, (double)z+0.4F, xRand, 0.5D, zRand);
|
||||
double xRand = new Random().nextDouble()/0.75D-0.5D;
|
||||
double zRand = new Random().nextDouble()/0.75D-0.5D;
|
||||
world.spawnParticle("crit", (double)x+0.4F, (double)y+0.8F, (double)z+0.4F, xRand, 0.5D, zRand);
|
||||
}
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y + 1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":blockGrinderTop");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":blockGrinderOn");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":blockGrinderBottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderTop");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderOn");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderBottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityGrinder grinder = (TileEntityGrinder)world.getTileEntity(x, y, z);
|
||||
if (grinder != null) player.openGui(ActuallyAdditions.instance, this.isDouble ? GuiHandler.GuiTypes.GRINDER_DOUBLE.ordinal() : GuiHandler.GuiTypes.GRINDER.ordinal(), world, x, y, z);
|
||||
if(grinder != null){
|
||||
player.openGui(ActuallyAdditions.instance, this.isDouble ? GuiHandler.GuiTypes.GRINDER_DOUBLE.ordinal() : GuiHandler.GuiTypes.GRINDER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -51,9 +51,9 @@ public class BlockHeatCollector extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Side");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Side");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -61,14 +61,16 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityInputter inputter = (TileEntityInputter)world.getTileEntity(x, y, z);
|
||||
if (inputter != null) player.openGui(ActuallyAdditions.instance, this.isAdvanced ? GuiHandler.GuiTypes.INPUTTER_ADVANCED.ordinal() : GuiHandler.GuiTypes.INPUTTER.ordinal(), world, x, y, z);
|
||||
if(inputter != null){
|
||||
player.openGui(ActuallyAdditions.instance, this.isAdvanced ? GuiHandler.GuiTypes.INPUTTER_ADVANCED.ordinal() : GuiHandler.GuiTypes.INPUTTER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -120,7 +122,7 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
|
|||
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS)+1;
|
||||
}
|
||||
|
||||
return StringUtil.localize(this.getUnlocalizedName()+".name") + " (" + StringUtil.localize("tile."+ModUtil.MOD_ID_LOWER+".blockInputter.add."+this.toPick+".name") + ")";
|
||||
return StringUtil.localize(this.getUnlocalizedName()+".name")+" ("+StringUtil.localize("tile."+ModUtil.MOD_ID_LOWER+".blockInputter.add."+this.toPick+".name")+")";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,16 +63,18 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityItemRepairer repairer = (TileEntityItemRepairer)world.getTileEntity(x, y, z);
|
||||
if (repairer != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, x, y, z);
|
||||
if(repairer != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.REPAIRER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -96,8 +96,8 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlock{
|
||||
|
|
|
@ -53,8 +53,8 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,7 +69,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA
|
|||
if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc")));
|
||||
}
|
||||
player.addChatComponentMessage(new ChatComponentText(factory.storage.getEnergyStored() + "/" + factory.storage.getMaxEnergyStored() + " RF"));
|
||||
player.addChatComponentMessage(new ChatComponentText(factory.storage.getEnergyStored()+"/"+factory.storage.getMaxEnergyStored()+" RF"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
@SuppressWarnings("all")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
for (int j = 0; j < allMiscBlocks.length; j++){
|
||||
for(int j = 0; j < allMiscBlocks.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
for(int i = 0; i < textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + allMiscBlocks[i].getName());
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscBlocks[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + (stack.getItemDamage() >= allMiscBlocks.length ? " ERROR!" : allMiscBlocks[stack.getItemDamage()].getName());
|
||||
return this.getUnlocalizedName()+(stack.getItemDamage() >= allMiscBlocks.length ? " ERROR!" : allMiscBlocks[stack.getItemDamage()].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,9 +49,9 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem
|
|||
public void randomDisplayTick(World world, int x, int y, int z, Random rand){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta == 1){
|
||||
if(meta == 1){
|
||||
for(int i = 0; i < 5; i++){
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y + 1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("smoke", (double)x+0.5F, (double)y+1.0F, (double)z+0.5F, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,16 +69,18 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityOilGenerator generator = (TileEntityOilGenerator)world.getTileEntity(x, y, z);
|
||||
if (generator != null) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.OIL_GENERATOR.ordinal(), world, x, y, z);
|
||||
if(generator != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.OIL_GENERATOR.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -63,8 +63,9 @@ public class BlockOreMagnet extends BlockContainerBase implements IActAddItemOrB
|
|||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityOreMagnet magnet = (TileEntityOreMagnet)world.getTileEntity(x, y, z);
|
||||
if(magnet != null)
|
||||
if(magnet != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ORE_MAGNET.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -77,19 +77,27 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
|
|||
if(tile instanceof IPhantomTile){
|
||||
IPhantomTile phantom = (IPhantomTile)tile;
|
||||
if(player.isSneaking() || phantom.getGuiID() == -1){
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + phantom.getRange()));
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc")+": "+phantom.getRange()));
|
||||
if(phantom.hasBoundPosition()){
|
||||
int distance = (int)Vec3.createVectorHelper(x, y, z).distanceTo(Vec3.createVectorHelper(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()));
|
||||
Item item = phantom.getBoundPosition().getItemBlock();
|
||||
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.getBoundPosition().getBlock(), 1, phantom.getBoundPosition().getMetadata()));
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance)));
|
||||
|
||||
if(phantom.isBoundThingInRange()) player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
||||
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
||||
if(phantom.isBoundThingInRange()){
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc")));
|
||||
}
|
||||
else{
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc")));
|
||||
}
|
||||
}
|
||||
else{
|
||||
player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
||||
}
|
||||
else player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.notConnected.desc")));
|
||||
}
|
||||
else player.openGui(ActuallyAdditions.instance, phantom.getGuiID(), world, x, y, z);
|
||||
else{
|
||||
player.openGui(ActuallyAdditions.instance, phantom.getGuiID(), world, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +128,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,10 +59,12 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta){
|
||||
if(meta < 7){
|
||||
if (meta == 6) meta = 5;
|
||||
if(meta == 6) meta = 5;
|
||||
return this.textures[meta >> 1];
|
||||
}
|
||||
else return this.textures[this.textures.length-1];
|
||||
else{
|
||||
return this.textures[this.textures.length-1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,8 +95,8 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
for (int i = 0; i < this.textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Stage" + (i+1));
|
||||
for(int i = 0; i < this.textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Stage"+(i+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ public class BlockSlabs extends Block implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public int onBlockPlaced(World par1World, int blockX, int blockY, int blockZ, int side, float hitX, float hitY, float hitZ, int meta){
|
||||
if (side == 1) return meta;
|
||||
if (side == 0 || hitY >= 0.5F) return meta+1;
|
||||
if(side == 1) return meta;
|
||||
if(side == 0 || hitY >= 0.5F) return meta+1;
|
||||
return meta;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,10 +80,10 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO
|
|||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3;
|
||||
|
||||
if (rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if (rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if (rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if(rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if(rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -57,12 +57,12 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3;
|
||||
|
||||
if (rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if (rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if (rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if(rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if(rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,10 +90,10 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Front");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -118,7 +118,9 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
|||
float dY = rand.nextFloat()*0.8F+0.1F;
|
||||
float dZ = rand.nextFloat()*0.8F+0.1F;
|
||||
EntityItem entityItem = new EntityItem(world, x+dX, y+dY, z+dZ, itemStack.copy());
|
||||
if(itemStack.hasTagCompound()) entityItem.getEntityItem().setTagCompound((NBTTagCompound)itemStack.getTagCompound().copy());
|
||||
if(itemStack.hasTagCompound()){
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound)itemStack.getTagCompound().copy());
|
||||
}
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian()*factor;
|
||||
entityItem.motionY = rand.nextGaussian()*factor+0.2F;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z){
|
||||
return world.getBlockMetadata(x, y, z) == TheWildPlants.RICE.ordinal() ? world.getBlock(x, y-1, z).getMaterial() == Material.water : world.getBlock(x, y - 1, z).canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
return world.getBlockMetadata(x, y, z) == TheWildPlants.RICE.ordinal() ? world.getBlock(x, y-1, z).getMaterial() == Material.water : world.getBlock(x, y-1, z).canSustainPlant(world, x, y-1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,7 +52,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
|||
@SuppressWarnings("all")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
for (int j = 0; j < allWildPlants.length; j++){
|
||||
for(int j = 0; j < allWildPlants.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + (stack.getItemDamage() >= allWildPlants.length ? " ERROR!" : allWildPlants[stack.getItemDamage()].getName());
|
||||
return this.getUnlocalizedName()+(stack.getItemDamage() >= allWildPlants.length ? " ERROR!" : allWildPlants[stack.getItemDamage()].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -89,8 +89,9 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
|
|||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(x, y, z);
|
||||
if(solidifier != null)
|
||||
if(solidifier != null){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.XP_SOLIDIFIER.ordinal(), world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -24,7 +24,7 @@ public class RenderItems implements IItemRenderer{
|
|||
|
||||
public RenderItems(ModelBaseAA model){
|
||||
this.theModel = model;
|
||||
this.theTexture = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/" + this.theModel.getName() + ".png");
|
||||
this.theTexture = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/"+this.theModel.getName()+".png");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ public class RenderItems implements IItemRenderer{
|
|||
switch(type){
|
||||
case INVENTORY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, -1.27F, 0.5F);
|
||||
GL11.glRotatef(180F, 0F, 1F, 0F);
|
||||
|
|
|
@ -32,6 +32,7 @@ public class PageFurnace extends BookletPage{
|
|||
this.input = input;
|
||||
InitBooklet.pagesWithItemStackData.add(this);
|
||||
}
|
||||
|
||||
public PageFurnace(int id, ItemStack result){
|
||||
this(id, null, result);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ public class InterModCommunications{
|
|||
CrusherRecipeManualRegistry.registerRecipe(input, outputOne, outputTwo, secondChance);
|
||||
ModUtil.LOGGER.info("Crusher Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input.toString()+" -> "+outputOne.toString()+(outputTwo != null ? " + "+outputTwo.toString()+", Second Chance: "+secondChance : ""));
|
||||
}
|
||||
else ModUtil.LOGGER.error("Crusher Recipe that was sent from Mod "+message.getSender()+" could not be registered: It's missing an Input or an Output!");
|
||||
else{
|
||||
ModUtil.LOGGER.error("Crusher Recipe that was sent from Mod "+message.getSender()+" could not be registered: It's missing an Input or an Output!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +58,9 @@ public class InterModCommunications{
|
|||
ItemCoffee.registerIngredient(new ItemCoffee.Ingredient(input, new PotionEffect[]{effect}, maxAmp));
|
||||
ModUtil.LOGGER.info("Coffee Machine Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input.toString()+" -> "+effect.toString());
|
||||
}
|
||||
else ModUtil.LOGGER.error("Coffee Machine Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Input, a Potion ID, a Duration or a max Amplifier!");
|
||||
else{
|
||||
ModUtil.LOGGER.error("Coffee Machine Recipe that was sent from Mod "+message.getSender()+" could not be registered: It's missing an Input, a Potion ID, a Duration or a max Amplifier!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +74,9 @@ public class InterModCommunications{
|
|||
HairyBallHandler.addReturn(output, chance);
|
||||
ModUtil.LOGGER.info("Ball Of Hair Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+output.toString()+", Chance: "+chance);
|
||||
}
|
||||
else ModUtil.LOGGER.error("Ball Of Hair Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Output or a Chance!");
|
||||
else{
|
||||
ModUtil.LOGGER.error("Ball Of Hair Recipe that was sent from Mod "+message.getSender()+" could not be registered: It's missing an Output or a Chance!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +92,9 @@ public class InterModCommunications{
|
|||
TreasureChestHandler.addReturn(output, chance, minAmount, maxAmount);
|
||||
ModUtil.LOGGER.info("Treasure Chest Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+output.toString()+", Chance: "+chance+", Min Amount: "+minAmount+", Max Amount: "+maxAmount);
|
||||
}
|
||||
else ModUtil.LOGGER.error("Treasure Chest Recipe that was sent from Mod " + message.getSender() + " could not be registered: It's missing an Output, a Chance or minimum and maximum Amounts!");
|
||||
else{
|
||||
ModUtil.LOGGER.error("Treasure Chest Recipe that was sent from Mod "+message.getSender()+" could not be registered: It's missing an Output, a Chance or minimum and maximum Amounts!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ConfigurationHandler{
|
|||
|
||||
@SubscribeEvent
|
||||
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event){
|
||||
if (event.modID.equalsIgnoreCase(ModUtil.MOD_ID)){
|
||||
if(event.modID.equalsIgnoreCase(ModUtil.MOD_ID)){
|
||||
loadConfig();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public enum ConfigCrafting{
|
|||
this.name = name;
|
||||
this.category = category.name;
|
||||
this.defaultValue = defaultValue;
|
||||
this.extraText = extraText.length() > 0 ? extraText + " " : "";
|
||||
this.extraText = extraText.length() > 0 ? extraText+" " : "";
|
||||
}
|
||||
|
||||
ConfigCrafting(String name, ConfigCategories category, boolean defaultValue){
|
||||
|
|
|
@ -48,14 +48,14 @@ public enum ConfigIntValues{
|
|||
QUARTZ_HARVEST_LEVEL("Quartz: Harvest Level", ConfigCategories.TOOL_VALUES, 2, 0, 3, "What Harvest Level Quartz Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)"),
|
||||
QUARTZ_USES("Quartz: Max Uses", ConfigCategories.TOOL_VALUES, 280, 50, 20000, "How often Quartz Tools can be used"),
|
||||
QUARTZ_ENCHANTABILITY("Quartz: Enchantability", ConfigCategories.TOOL_VALUES, 10, 1, 30, "How enchantable an Quartz Tool is"),
|
||||
|
||||
|
||||
EMERALD_ARMOR_DURABILITY("Emerald Armor: Durability", ConfigCategories.ARMOR_VALUES, 1500, 10, 10000, "The Durability of Emerald Armor"),
|
||||
EMERALD_ARMOR_HEAD_DAMAGE("Emerald Helmets: Damage Reduction", ConfigCategories.ARMOR_VALUES, 5, 0, 10, "The Damage Reduction of Emerald Helmets"),
|
||||
EMERALD_ARMOR_CHEST_DAMAGE("Emerald Chests: Damage Reduction", ConfigCategories.ARMOR_VALUES, 9, 0, 10, "The Damage Reduction of Emerald Chests"),
|
||||
EMERALD_ARMOR_LEGS_DAMAGE("Emerald Legs: Damage Reduction", ConfigCategories.ARMOR_VALUES, 8, 0, 10, "The Damage Reduction of Emerald Legs"),
|
||||
EMERALD_ARMOR_BOOTS_DAMAGE("Emerald Boots: Damage Reduction", ConfigCategories.ARMOR_VALUES, 5, 0, 10, "The Damage Reduction of Emerald Boots"),
|
||||
EMERALD_ARMOR_ENCHANTABILITY("Emerald Armor: Enchantability", ConfigCategories.ARMOR_VALUES, 15, 1, 30, "The Enchantability of Emerald Armor"),
|
||||
|
||||
|
||||
QUARTZ_ARMOR_DURABILITY("Quartz Armor: Durability", ConfigCategories.ARMOR_VALUES, 200, 10, 10000, "The Durability of Quartz Armor"),
|
||||
QUARTZ_ARMOR_HEAD_DAMAGE("Quartz Helmets: Damage Reduction", ConfigCategories.ARMOR_VALUES, 3, 0, 10, "The Damage Reduction of Quartz Helmets"),
|
||||
QUARTZ_ARMOR_CHEST_DAMAGE("Quartz Chests: Damage Reduction", ConfigCategories.ARMOR_VALUES, 6, 0, 10, "The Damage Reduction of Quartz Chests"),
|
||||
|
|
|
@ -27,19 +27,41 @@ public class CrusherCrafting{
|
|||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Crusher Recipes...");
|
||||
|
||||
if(ConfigCrafting.REDSTONE.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10));
|
||||
if(ConfigCrafting.LAPIS.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.lapis_ore), new ItemStack(Items.dye, 12, 4));
|
||||
if(ConfigCrafting.COAL.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Items.coal), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()));
|
||||
if(ConfigCrafting.COAL_ORE.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.coal_ore), new ItemStack(Items.coal, 3));
|
||||
if(ConfigCrafting.COAL_BLOCKS.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.coal_block), new ItemStack(Items.coal, 9));
|
||||
if(ConfigCrafting.REDSTONE.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10));
|
||||
}
|
||||
if(ConfigCrafting.LAPIS.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.lapis_ore), new ItemStack(Items.dye, 12, 4));
|
||||
}
|
||||
if(ConfigCrafting.COAL.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Items.coal), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()));
|
||||
}
|
||||
if(ConfigCrafting.COAL_ORE.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.coal_ore), new ItemStack(Items.coal, 3));
|
||||
}
|
||||
if(ConfigCrafting.COAL_BLOCKS.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.coal_block), new ItemStack(Items.coal, 9));
|
||||
}
|
||||
|
||||
if(ConfigCrafting.COBBLESTONE.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.sand));
|
||||
if(ConfigCrafting.GRAVEL.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.gravel), new ItemStack(Items.flint));
|
||||
if(ConfigCrafting.STONE.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.cobblestone));
|
||||
if(ConfigCrafting.RICE_SUGAR.isEnabled()) CrusherRecipeManualRegistry.registerRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.sugar, 2));
|
||||
if(ConfigCrafting.COBBLESTONE.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.sand));
|
||||
}
|
||||
if(ConfigCrafting.GRAVEL.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.gravel), new ItemStack(Items.flint));
|
||||
}
|
||||
if(ConfigCrafting.STONE.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.cobblestone));
|
||||
}
|
||||
if(ConfigCrafting.RICE_SUGAR.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.sugar, 2));
|
||||
}
|
||||
|
||||
if(ConfigCrafting.NICKEL.isEnabled()) CrusherRecipeManualRegistry.registerRecipe("oreNickel", "dustNickel", "dustPlatinum", 15, 2, 1);
|
||||
if(ConfigCrafting.IRON.isEnabled()) CrusherRecipeManualRegistry.registerRecipe("oreIron", "dustIron", "dustGold", 20, 2, 1);
|
||||
if(ConfigCrafting.NICKEL.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe("oreNickel", "dustNickel", "dustPlatinum", 15, 2, 1);
|
||||
}
|
||||
if(ConfigCrafting.IRON.isEnabled()){
|
||||
CrusherRecipeManualRegistry.registerRecipe("oreIron", "dustIron", "dustGold", 20, 2, 1);
|
||||
}
|
||||
|
||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("oreNether", 6));
|
||||
CrusherRecipeAutoRegistry.searchCases.add(new SearchCase("orePoor", 4, "nugget"));
|
||||
|
|
|
@ -12,7 +12,7 @@ package ellpeck.actuallyadditions.crafting;
|
|||
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
||||
public class InitCrafting {
|
||||
public class InitCrafting{
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Crafting Recipes...");
|
||||
|
|
|
@ -60,7 +60,7 @@ public class ToolCrafting{
|
|||
"EE", " S", " S",
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
|
||||
|
||||
//Helm
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemHelmEmerald),
|
||||
"OOO", "O O",
|
||||
|
|
|
@ -111,7 +111,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
add(InitItems.itemGrowthRing);
|
||||
add(InitItems.itemMagnetRing);
|
||||
add(InitItems.itemWaterRemovalRing);
|
||||
|
||||
|
||||
add(InitItems.itemPhantomConnector);
|
||||
add(InitItems.itemBucketCanolaOil);
|
||||
add(InitItems.itemBucketOil);
|
||||
|
@ -163,7 +163,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
add(InitItems.itemAxeEmerald);
|
||||
add(InitItems.itemShovelEmerald);
|
||||
add(InitItems.itemHoeEmerald);
|
||||
|
||||
|
||||
add(InitItems.itemHelmEmerald);
|
||||
add(InitItems.itemChestEmerald);
|
||||
add(InitItems.itemPantsEmerald);
|
||||
|
|
|
@ -33,7 +33,7 @@ public class EntityLivingEvent{
|
|||
EntityOcelot theOcelot = (EntityOcelot)event.entityLiving;
|
||||
if(ConfigBoolValues.DO_CAT_DROPS.isEnabled() && theOcelot.isTamed()){
|
||||
if(new Random().nextInt(ConfigIntValues.CAT_DROP_CHANCE.getValue())+1 == 1){
|
||||
EntityItem item = new EntityItem(theOcelot.worldObj, theOcelot.posX + 0.5, theOcelot.posY + 0.5, theOcelot.posZ + 0.5, new ItemStack(InitItems.itemHairyBall));
|
||||
EntityItem item = new EntityItem(theOcelot.worldObj, theOcelot.posX+0.5, theOcelot.posY+0.5, theOcelot.posZ+0.5, new ItemStack(InitItems.itemHairyBall));
|
||||
theOcelot.worldObj.spawnEntityInWorld(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ public class LivingDropEvent{
|
|||
for(int i = 0; i < TheSpecialDrops.values().length; i++){
|
||||
TheSpecialDrops theDrop = TheSpecialDrops.values()[i];
|
||||
if(theDrop.canDrop && theDrop.dropFrom.isAssignableFrom(event.entityLiving.getClass())){
|
||||
if(new Random().nextInt(100) + 1 <= theDrop.chance){
|
||||
event.entityLiving.entityDropItem(new ItemStack(InitItems.itemSpecialDrop, new Random().nextInt(theDrop.maxAmount) + 1, theDrop.ordinal()), 0);
|
||||
if(new Random().nextInt(100)+1 <= theDrop.chance){
|
||||
event.entityLiving.entityDropItem(new ItemStack(InitItems.itemSpecialDrop, new Random().nextInt(theDrop.maxAmount)+1, theDrop.ordinal()), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ public class ModelStandardBlock extends ModelBaseAA{
|
|||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "model" + this.name;
|
||||
return "model"+this.name;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"glenthor", "glenthorlp", "twoofeight"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(true, new ItemStack(Items.dye, 1, 2));
|
||||
|
@ -46,6 +47,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"ellpeck", "ellopecko", "peck"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(InitItems.itemPhantomConnector));
|
||||
|
@ -58,6 +60,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"tyrex", "lord_tobinho", "tobinho"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.fishing_rod));
|
||||
|
@ -70,6 +73,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"dqmhose", "xdqmhose", "hose"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.reeds));
|
||||
|
@ -82,6 +86,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"jemx", "jemxx", "jemxxx", "spielertobi200"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(true, new ItemStack(Items.milk_bucket));
|
||||
|
@ -94,6 +99,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"vazkii", "vaski", "waskie"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(true, new ItemStack(Items.dye, 1, 15));
|
||||
|
@ -106,6 +112,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"kitty", "kiddy", "kittyvancat", "kittyvancatlp"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(true, new ItemStack(Items.fish));
|
||||
|
@ -119,6 +126,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"canitz", "canitzp", "kannnichts", "kannnichtsp"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.wooden_sword));
|
||||
|
@ -131,6 +139,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"lari", "larixine", "xine", "laxi", "lachsirine", "lala", "lalilu"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.iron_helmet));
|
||||
|
@ -143,6 +152,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"rotesding", "dotesring"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.milk_bucket));
|
||||
|
@ -156,6 +166,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"bande", "bandelenth"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.diamond_pickaxe));
|
||||
|
@ -168,6 +179,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"wolle", "wuitoi"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.string));
|
||||
|
@ -180,6 +192,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"pakto", "paktosan", "paktosanlp"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.dye, 1, 9));
|
||||
|
@ -192,6 +205,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"honka", "honkalonka", "lonka", "lonki"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(InitItems.itemLeafBlowerAdvanced, 1, 9));
|
||||
|
@ -204,6 +218,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"acid", "acid_blues", "acidblues"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()));
|
||||
|
@ -216,6 +231,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"jasin", "jasindow"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.written_book));
|
||||
|
@ -228,6 +244,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"lordi", "lordhallo"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(true, new ItemStack(Items.paper));
|
||||
|
@ -241,6 +258,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"freakyninja", "ninja", "tl"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.diamond_sword));
|
||||
|
@ -253,6 +271,7 @@ public class SmileyCloudEasterEggs{
|
|||
public String[] getTriggerNames(){
|
||||
return new String[]{"nihon", "nihontiger", "tiger"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtra(float f){
|
||||
renderHoldingItem(false, new ItemStack(Items.stone_pickaxe));
|
||||
|
|
|
@ -36,8 +36,8 @@ public class OreGen implements IWorldGenerator{
|
|||
switch(world.provider.dimensionId){
|
||||
case -1:
|
||||
generateNether(world, random, chunkX*16, chunkZ*16);
|
||||
//case 0:
|
||||
// generateSurface(world, random, chunkX*16, chunkZ*16);
|
||||
//case 0:
|
||||
// generateSurface(world, random, chunkX*16, chunkZ*16);
|
||||
case 1:
|
||||
generateEnd(world, random, chunkX*16, chunkZ*16);
|
||||
default:
|
||||
|
@ -63,15 +63,17 @@ public class OreGen implements IWorldGenerator{
|
|||
|
||||
public void addOreSpawn(Block block, int meta, Block blockIn, World world, Random random, int blockXPos, int blockZPos, int maxVeinSize, int chancesToSpawn, int minY, int maxY){
|
||||
if(maxY > minY){
|
||||
int yDiff = maxY - minY;
|
||||
int yDiff = maxY-minY;
|
||||
for(int i = 0; i < chancesToSpawn; i++){
|
||||
int posX = blockXPos + random.nextInt(16);
|
||||
int posY = minY + random.nextInt(yDiff);
|
||||
int posZ = blockZPos + random.nextInt(16);
|
||||
int posX = blockXPos+random.nextInt(16);
|
||||
int posY = minY+random.nextInt(yDiff);
|
||||
int posZ = blockZPos+random.nextInt(16);
|
||||
new WorldGenMinable(block, meta, maxVeinSize, blockIn).generate(world, random, posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
else ModUtil.LOGGER.fatal("Couldn't generate '" + block.getUnlocalizedName() + "' into the world because the Min Y coordinate is bigger than the Max! This is definitely a Config Error! Check the Files!");
|
||||
else{
|
||||
ModUtil.LOGGER.fatal("Couldn't generate '"+block.getUnlocalizedName()+"' into the world because the Min Y coordinate is bigger than the Max! This is definitely a Config Error! Check the Files!");
|
||||
}
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
|
|
|
@ -56,7 +56,7 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
this.fillWithBlocks(world, sbb, 0, 0, 0, xSize-1, ySize-1, zSize-1, Blocks.air);
|
||||
this.spawnActualHouse(world, rand, sbb);
|
||||
|
||||
for (int i = 0; i < xSize; i++){
|
||||
for(int i = 0; i < xSize; i++){
|
||||
for(int j = 0; j < zSize; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb);
|
||||
this.func_151554_b(world, Blocks.dirt, 0, i, -1, j, sbb);
|
||||
|
@ -68,10 +68,14 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
|
||||
private Block getRandomCropType(Random rand){
|
||||
switch(rand.nextInt(4)){
|
||||
case 0: return InitBlocks.blockFlax;
|
||||
case 1: return InitBlocks.blockCoffee;
|
||||
case 2: return InitBlocks.blockRice;
|
||||
default: return InitBlocks.blockCanola;
|
||||
case 0:
|
||||
return InitBlocks.blockFlax;
|
||||
case 1:
|
||||
return InitBlocks.blockCoffee;
|
||||
case 2:
|
||||
return InitBlocks.blockRice;
|
||||
default:
|
||||
return InitBlocks.blockCanola;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
|
|||
this.fillWithBlocks(world, sbb, 0, 0, 0, xSize-1, ySize-1, zSize-1, Blocks.air);
|
||||
this.spawnActualHouse(world, rand, sbb);
|
||||
|
||||
for (int i = 0; i < xSize; i++){
|
||||
for(int i = 0; i < xSize; i++){
|
||||
for(int j = 0; j < zSize; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb);
|
||||
this.func_151554_b(world, Blocks.cobblestone, 0, i, -1, j, sbb);
|
||||
|
@ -100,7 +100,7 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
|
|||
this.fillWithBlocks(world, sbb, 1+i*8, 1, 7, 1+i*8, 4, 7, Blocks.cobblestone);
|
||||
this.fillWithBlocks(world, sbb, 1+i*8, 4, 2, 1+i*8, 5, 6, Blocks.cobblestone);
|
||||
this.fillWithBlocks(world, sbb, 1+i*8, 3, 2, 1+i*8, 3, 6, Blocks.planks);
|
||||
this.placeBlockAtCurrentPosition(world, Blocks.planks, 0, 1+i* 8, 2, 2, sbb);
|
||||
this.placeBlockAtCurrentPosition(world, Blocks.planks, 0, 1+i*8, 2, 2, sbb);
|
||||
this.placeBlockAtCurrentPosition(world, Blocks.planks, 0, 1+i*8, 2, 6, sbb);
|
||||
this.fillWithBlocks(world, sbb, 1+i*8, 2, 3, 1+i*8, 2, 5, Blocks.glass_pane);
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ public class ContainerBreaker extends Container{
|
|||
public ContainerBreaker(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.breaker = (TileEntityBreaker)tile;
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 3; j++){
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 3; j++){
|
||||
this.addSlotToContainer(new Slot(this.breaker, j+i*3, 62+j*18, 21+i*18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class ContainerBreaker extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -69,16 +69,21 @@ public class ContainerBreaker extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -37,13 +37,13 @@ public class ContainerCanolaPress extends Container{
|
|||
this.addSlotToContainer(new Slot(this.press, 1, 136, 73));
|
||||
this.addSlotToContainer(new SlotOutput(this.press, 2, 136, 42));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class ContainerCanolaPress extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -79,14 +79,20 @@ public class ContainerCanolaPress extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -30,13 +30,13 @@ public class ContainerCoalGenerator extends Container{
|
|||
|
||||
this.addSlotToContainer(new Slot(this.generator, 0, 87, 43));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,14 +69,20 @@ public class ContainerCoalGenerator extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -38,8 +38,8 @@ public class ContainerCoffeeMachine extends Container{
|
|||
this.addSlotToContainer(new Slot(machine, TileEntityCoffeeMachine.SLOT_INPUT, 80, 42));
|
||||
this.addSlotToContainer(new SlotOutput(machine, TileEntityCoffeeMachine.SLOT_OUTPUT, 80, 73));
|
||||
|
||||
for (int i = 0; i < 4; i++){
|
||||
for (int j = 0; j < 2; j++){
|
||||
for(int i = 0; i < 4; i++){
|
||||
for(int j = 0; j < 2; j++){
|
||||
this.addSlotToContainer(new Slot(machine, j+i*2+3, 125+j*18, 6+i*18));
|
||||
}
|
||||
}
|
||||
|
@ -47,13 +47,13 @@ public class ContainerCoffeeMachine extends Container{
|
|||
this.addSlotToContainer(new Slot(machine, TileEntityCoffeeMachine.SLOT_WATER_INPUT, 26, 73));
|
||||
this.addSlotToContainer(new SlotOutput(machine, TileEntityCoffeeMachine.SLOT_WATER_OUTPUT, 45, 73));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class ContainerCoffeeMachine extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -84,30 +84,42 @@ public class ContainerCoffeeMachine extends Container{
|
|||
else if(slot >= inventoryStart){
|
||||
//Shift from Inventory
|
||||
if(newStack.getItem() == InitItems.itemMisc && newStack.getItemDamage() == TheMiscItems.CUP.ordinal()){
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_INPUT, TileEntityCoffeeMachine.SLOT_INPUT+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_INPUT, TileEntityCoffeeMachine.SLOT_INPUT+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(FluidContainerRegistry.containsFluid(newStack, new FluidStack(FluidRegistry.WATER, 1))){
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_WATER_INPUT, TileEntityCoffeeMachine.SLOT_WATER_INPUT+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_WATER_INPUT, TileEntityCoffeeMachine.SLOT_WATER_INPUT+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(ItemCoffee.getIngredientFromStack(newStack) != null){
|
||||
if(!this.mergeItemStack(newStack, 3, 11, false)) return null;
|
||||
}
|
||||
else if(newStack.getItem() == InitItems.itemCoffeeBean){
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -38,19 +38,19 @@ public class ContainerCrafter extends Container{
|
|||
this.z = (int)player.posZ;
|
||||
|
||||
this.addSlotToContainer(new SlotCrafting(inventory.player, this.craftMatrix, this.craftResult, 0, 124, 35));
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 3; j++){
|
||||
this.addSlotToContainer(new Slot(this.craftMatrix, j + i*3, 30 + j*18, 17 + i*18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 3; j++){
|
||||
this.addSlotToContainer(new Slot(this.craftMatrix, j+i*3, 30+j*18, 17+i*18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i*9 + 9, 8 + j*18, 84 + i*18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 84+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i*18, 142));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 142));
|
||||
}
|
||||
|
||||
this.onCraftMatrixChanged(this.craftMatrix);
|
||||
|
@ -65,8 +65,8 @@ public class ContainerCrafter extends Container{
|
|||
public void onContainerClosed(EntityPlayer player){
|
||||
super.onContainerClosed(player);
|
||||
|
||||
if (!this.world.isRemote){
|
||||
for (int i = 0; i < 9; ++i){
|
||||
if(!this.world.isRemote){
|
||||
for(int i = 0; i < 9; ++i){
|
||||
ItemStack stack = this.craftMatrix.getStackInSlotOnClosing(i);
|
||||
if(stack != null) player.dropPlayerItemWithRandomChoice(stack, false);
|
||||
}
|
||||
|
@ -91,12 +91,20 @@ public class ContainerCrafter extends Container{
|
|||
if(!this.mergeItemStack(savedStack, 10, 46, true)) return null;
|
||||
theSlot.onSlotChange(savedStack, stack);
|
||||
}
|
||||
else if(slot >= 10 && slot < 37 && !this.mergeItemStack(savedStack, 37, 46, false)) return null;
|
||||
else if(slot >= 37 && slot < 46 && !this.mergeItemStack(savedStack, 10, 37, false)) return null;
|
||||
else if(slot >= 10 && slot < 37 && !this.mergeItemStack(savedStack, 37, 46, false)){
|
||||
return null;
|
||||
}
|
||||
else if(slot >= 37 && slot < 46 && !this.mergeItemStack(savedStack, 10, 37, false)){
|
||||
return null;
|
||||
}
|
||||
else if(!this.mergeItemStack(savedStack, 10, 46, false)) return null;
|
||||
|
||||
if(savedStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(savedStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(savedStack.stackSize == stack.stackSize) return null;
|
||||
|
||||
|
|
|
@ -48,8 +48,12 @@ public class ContainerDrill extends Container{
|
|||
}
|
||||
}
|
||||
for(int i = 0; i < 9; i++){
|
||||
if(i == inventory.currentItem) this.addSlotToContainer(new SlotImmovable(inventory, i, 8+i*18, 116));
|
||||
else this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 116));
|
||||
if(i == inventory.currentItem){
|
||||
this.addSlotToContainer(new SlotImmovable(inventory, i, 8+i*18, 116));
|
||||
}
|
||||
else{
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 116));
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack stack = inventory.getCurrentItem();
|
||||
|
@ -70,15 +74,19 @@ public class ContainerDrill extends Container{
|
|||
if(stack != null && stack.getItem() instanceof ItemDrill){
|
||||
((ItemDrill)stack.getItem()).writeSlotsToNBT(this.drillInventory.slots, inventory.getCurrentItem());
|
||||
}
|
||||
super.onContainerClosed(player);
|
||||
super.onContainerClosed(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer player){
|
||||
//par3 appears to be the type of clicking
|
||||
//par3 == 2 appears to be one of the number keys being hit
|
||||
if(par3 == 2 && par2 == inventory.currentItem) return null;
|
||||
else return super.slotClick(par1, par2, par3, player);
|
||||
if(par3 == 2 && par2 == inventory.currentItem){
|
||||
return null;
|
||||
}
|
||||
else{
|
||||
return super.slotClick(par1, par2, par3, player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,7 +98,7 @@ public class ContainerDrill extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -105,14 +113,20 @@ public class ContainerDrill extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
@ -190,7 +204,7 @@ public class ContainerDrill extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j){
|
||||
if (slots[i] != null){
|
||||
if(slots[i] != null){
|
||||
ItemStack stackAt;
|
||||
if(slots[i].stackSize <= j){
|
||||
stackAt = slots[i];
|
||||
|
@ -200,7 +214,7 @@ public class ContainerDrill extends Container{
|
|||
}
|
||||
else{
|
||||
stackAt = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0) slots[i] = null;
|
||||
if(slots[i].stackSize == 0) slots[i] = null;
|
||||
this.markDirty();
|
||||
return stackAt;
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ public class ContainerDropper extends Container{
|
|||
public ContainerDropper(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.dropper = (TileEntityDropper)tile;
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 3; j++){
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 3; j++){
|
||||
this.addSlotToContainer(new Slot(this.dropper, j+i*3, 62+j*18, 21+i*18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class ContainerDropper extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -69,16 +69,21 @@ public class ContainerDropper extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -37,13 +37,13 @@ public class ContainerEnergizer extends Container{
|
|||
this.addSlotToContainer(new Slot(this.energizer, 0, 76, 73));
|
||||
this.addSlotToContainer(new SlotOutput(this.energizer, 1, 76, 42));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
final EntityPlayer finalPlayer = player;
|
||||
for(int i = 0; i < 4; ++i){
|
||||
|
@ -53,10 +53,12 @@ public class ContainerEnergizer extends Container{
|
|||
public int getSlotStackLimit(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack){
|
||||
return stack != null && stack.getItem().isValidArmor(stack, finalI, finalPlayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getBackgroundIconIndex(){
|
||||
|
@ -80,7 +82,7 @@ public class ContainerEnergizer extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -100,14 +102,20 @@ public class ContainerEnergizer extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -37,13 +37,13 @@ public class ContainerEnervator extends Container{
|
|||
this.addSlotToContainer(new Slot(this.enervator, 0, 76, 73));
|
||||
this.addSlotToContainer(new SlotOutput(this.enervator, 1, 76, 42));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
final EntityPlayer finalPlayer = player;
|
||||
for(int i = 0; i < 4; ++i){
|
||||
|
@ -53,10 +53,12 @@ public class ContainerEnervator extends Container{
|
|||
public int getSlotStackLimit(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack){
|
||||
return stack != null && stack.getItem().isValidArmor(stack, finalI, finalPlayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getBackgroundIconIndex(){
|
||||
|
@ -80,7 +82,7 @@ public class ContainerEnervator extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -100,14 +102,20 @@ public class ContainerEnervator extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -28,13 +28,13 @@ public class ContainerFeeder extends Container{
|
|||
this.tileFeeder = (TileEntityFeeder)tile;
|
||||
this.addSlotToContainer(new Slot(this.tileFeeder, 0, 80, 45));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 74+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 132));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 132));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ContainerFeeder extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -64,16 +64,21 @@ public class ContainerFeeder extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -36,13 +36,13 @@ public class ContainerFermentingBarrel extends Container{
|
|||
this.addSlotToContainer(new Slot(this.barrel, 2, 118, 74));
|
||||
this.addSlotToContainer(new SlotOutput(this.barrel, 3, 118, 43));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class ContainerFermentingBarrel extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -78,14 +78,20 @@ public class ContainerFermentingBarrel extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -32,13 +32,13 @@ public class ContainerFluidCollector extends Container{
|
|||
this.addSlotToContainer(new Slot(collector, 0, 90, 73));
|
||||
this.addSlotToContainer(new SlotOutput(collector, 1, 90, 42));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class ContainerFluidCollector extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -76,14 +76,20 @@ public class ContainerFluidCollector extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -34,13 +34,13 @@ public class ContainerFurnaceDouble extends Container{
|
|||
this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_2, 109, 21));
|
||||
this.addSlotToContainer(new SlotFurnace(inventory.player, this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_2, 108, 69));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ContainerFurnaceDouble extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -72,7 +72,9 @@ public class ContainerFurnaceDouble extends Container{
|
|||
//Shift from Inventory
|
||||
if(FurnaceRecipes.smelting().getSmeltingResult(newStack) != null){
|
||||
if(!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1+1, false)){
|
||||
if(!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -80,14 +82,20 @@ public class ContainerFurnaceDouble extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -27,19 +27,19 @@ public class ContainerGiantChest extends Container{
|
|||
public ContainerGiantChest(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.tileChest = (TileEntityGiantChest)tile;
|
||||
|
||||
for (int i = 0; i < 9; i++){
|
||||
for (int j = 0; j < 13; j++){
|
||||
this.addSlotToContainer(new Slot(this.tileChest, j + (i*13), 5 + j * 18, 5 + i * 18));
|
||||
for(int i = 0; i < 9; i++){
|
||||
for(int j = 0; j < 13; j++){
|
||||
this.addSlotToContainer(new Slot(this.tileChest, j+(i*13), 5+j*18, 5+i*18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 33 + 8 + j * 18, 172 + 4 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 33+8+j*18, 172+4+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 33 + 8 + i * 18, 172 + 62));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 33+8+i*18, 172+62));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class ContainerGiantChest extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -69,16 +69,21 @@ public class ContainerGiantChest extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -40,13 +40,13 @@ public class ContainerGrinder extends Container{
|
|||
this.addSlotToContainer(new SlotOutput(this.tileGrinder, TileEntityGrinder.SLOT_OUTPUT_2_2, 121, 69));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class ContainerGrinder extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -79,9 +79,13 @@ public class ContainerGrinder extends Container{
|
|||
if(CrusherRecipeManualRegistry.getOutput(newStack, false) != null){
|
||||
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_1, TileEntityGrinder.SLOT_INPUT_1+1, false)){
|
||||
if(this.isDouble){
|
||||
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else{
|
||||
return null;
|
||||
}
|
||||
else return null;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -89,14 +93,20 @@ public class ContainerGrinder extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -65,7 +65,9 @@ public class ContainerInputter extends Container{
|
|||
//Calls the Filter's SlotClick function
|
||||
return ((SlotFilter)getSlot(par1)).slotClick(player, par2);
|
||||
}
|
||||
else return super.slotClick(par1, par2, par3, player);
|
||||
else{
|
||||
return super.slotClick(par1, par2, par3, player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,14 +91,19 @@ public class ContainerInputter extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if(newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
|
|
@ -34,13 +34,13 @@ public class ContainerOilGenerator extends Container{
|
|||
this.addSlotToContainer(new Slot(this.generator, 0, 98, 74));
|
||||
this.addSlotToContainer(new SlotOutput(this.generator, 1, 98, 43));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ContainerOilGenerator extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -73,14 +73,20 @@ public class ContainerOilGenerator extends Container{
|
|||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -36,13 +36,13 @@ public class ContainerOreMagnet extends Container{
|
|||
|
||||
this.addSlotToContainer(new SlotOutput(this.magnet, TileEntityOreMagnet.SLOT_UPGRADE, 71, 43));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class ContainerOreMagnet extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -68,21 +68,29 @@ public class ContainerOreMagnet extends Container{
|
|||
if(slot >= inventoryStart){
|
||||
//Shift from Inventory
|
||||
if(FluidContainerRegistry.containsFluid(newStack, new FluidStack(InitBlocks.fluidOil, 1))){
|
||||
if(!this.mergeItemStack(newStack, TileEntityOreMagnet.SLOT_OIL_INPUT, TileEntityOreMagnet.SLOT_OIL_INPUT+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityOreMagnet.SLOT_OIL_INPUT, TileEntityOreMagnet.SLOT_OIL_INPUT+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -27,19 +27,19 @@ public class ContainerPhantomPlacer extends Container{
|
|||
public ContainerPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.placer = (TileEntityPhantomPlacer)tile;
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 3; j++){
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 3; j++){
|
||||
this.addSlotToContainer(new Slot(this.placer, j+i*3, 62+j*18, 21+i*18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,14 +69,19 @@ public class ContainerPhantomPlacer extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false))
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if(newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
|
|
@ -31,13 +31,13 @@ public class ContainerRepairer extends Container{
|
|||
this.addSlotToContainer(new Slot(this.tileRepairer, TileEntityItemRepairer.SLOT_INPUT, 47, 53));
|
||||
this.addSlotToContainer(new SlotOutput(this.tileRepairer, TileEntityItemRepairer.SLOT_OUTPUT, 109, 53));
|
||||
|
||||
for (int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class ContainerRepairer extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -63,21 +63,29 @@ public class ContainerRepairer extends Container{
|
|||
if(slot >= inventoryStart){
|
||||
//Shift from Inventory
|
||||
if(TileEntityItemRepairer.canBeRepaired(newStack)){
|
||||
if(!this.mergeItemStack(newStack, TileEntityItemRepairer.SLOT_INPUT, TileEntityItemRepairer.SLOT_INPUT+1, false)) return null;
|
||||
if(!this.mergeItemStack(newStack, TileEntityItemRepairer.SLOT_INPUT, TileEntityItemRepairer.SLOT_INPUT+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
else if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ContainerXPSolidifier extends Container{
|
|||
|
||||
Slot theSlot = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (theSlot != null && theSlot.getHasStack()){
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
|
@ -63,14 +63,20 @@ public class ContainerXPSolidifier extends Container{
|
|||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)) return null;
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)) return null;
|
||||
|
||||
if (newStack.stackSize == 0) theSlot.putStack(null);
|
||||
else theSlot.onSlotChanged();
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (newStack.stackSize == currentStack.stackSize) return null;
|
||||
if(newStack.stackSize == currentStack.stackSize) return null;
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
|
|
|
@ -55,29 +55,29 @@ public class GuiCanolaPress extends GuiContainer{
|
|||
|
||||
if(this.press.storage.getEnergyStored() > 0){
|
||||
int i = this.press.getEnergyScaled(83);
|
||||
drawTexturedModalRect(this.guiLeft + 43, this.guiTop+89-i, 176, 29, 16, i);
|
||||
drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 29, 16, i);
|
||||
}
|
||||
|
||||
if(this.press.tank.getFluidAmount() > 0){
|
||||
int i = this.press.getTankScaled(83);
|
||||
drawTexturedModalRect(this.guiLeft + 117, this.guiTop+89-i, 192, 29, 16, i);
|
||||
drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 29, 16, i);
|
||||
}
|
||||
|
||||
if(this.press.currentProcessTime > 0){
|
||||
int i = this.press.getProcessScaled(29);
|
||||
drawTexturedModalRect(this.guiLeft + 83, this.guiTop+32, 176, 0, 12, i);
|
||||
drawTexturedModalRect(this.guiLeft+83, this.guiTop+32, 176, 0, 12, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.press.storage.getEnergyStored() + "/" + this.press.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.press.storage.getEnergyStored()+"/"+this.press.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
||||
String text2 = this.press.tank.getFluidAmount() + "/" + this.press.tank.getCapacity() + " mB " +StringUtil.localize("fluid.canolaoil");
|
||||
String text2 = this.press.tank.getFluidAmount()+"/"+this.press.tank.getCapacity()+" mB "+StringUtil.localize("fluid.canolaoil");
|
||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class GuiCoalGenerator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.generator.storage.getEnergyStored() + "/" + this.generator.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -110,16 +110,16 @@ public class GuiCoffeeMachine extends GuiContainer{
|
|||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
String text1 = this.machine.storage.getEnergyStored() + "/" + this.machine.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.machine.storage.getEnergyStored()+"/"+this.machine.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+16 && y >= guiTop+5 && x <= guiLeft+23 && y <= guiTop+89){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
String text3 = this.machine.tank.getFluidAmount() + "/" + this.machine.tank.getCapacity() + " mB "+FluidRegistry.WATER.getLocalizedName(this.machine.tank.getFluid());
|
||||
String text3 = this.machine.tank.getFluidAmount()+"/"+this.machine.tank.getCapacity()+" mB "+FluidRegistry.WATER.getLocalizedName(this.machine.tank.getFluid());
|
||||
if(x >= guiLeft+27 && y >= guiTop+5 && x <= guiLeft+33 && y <= guiTop+70){
|
||||
this.func_146283_a(Collections.singletonList(text3), x, y);
|
||||
}
|
||||
|
||||
String text2 = this.machine.coffeeCacheAmount + "/" + this.machine.coffeeCacheMaxAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.coffee");
|
||||
String text2 = this.machine.coffeeCacheAmount+"/"+this.machine.coffeeCacheMaxAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.coffee");
|
||||
if(x >= guiLeft+40 && y >= guiTop+25 && x <= guiLeft+49 && y <= guiTop+56){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class GuiEnergizer extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.energizer.storage.getEnergyStored() + "/" + this.energizer.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.energizer.storage.getEnergyStored()+"/"+this.energizer.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class GuiEnervator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.enervator.storage.getEnergyStored() + "/" + this.enervator.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.enervator.storage.getEnergyStored()+"/"+this.enervator.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -57,11 +57,13 @@ public class GuiFeeder extends GuiContainer{
|
|||
this.drawTexturedModalRect(guiLeft+85, guiTop+42-i, 181, 19+19-i, 6, 20);
|
||||
}
|
||||
|
||||
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < ConfigIntValues.FEEDER_THRESHOLD.getValue())
|
||||
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < ConfigIntValues.FEEDER_THRESHOLD.getValue()){
|
||||
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 16, 8, 8);
|
||||
}
|
||||
|
||||
if(this.tileFeeder.currentAnimalAmount >= ConfigIntValues.FEEDER_THRESHOLD.getValue())
|
||||
if(this.tileFeeder.currentAnimalAmount >= ConfigIntValues.FEEDER_THRESHOLD.getValue()){
|
||||
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 24, 8, 8);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,12 +55,12 @@ public class GuiFermentingBarrel extends GuiContainer{
|
|||
|
||||
if(this.press.canolaTank.getFluidAmount() > 0){
|
||||
int i = this.press.getCanolaTankScaled(83);
|
||||
drawTexturedModalRect(this.guiLeft + 61, this.guiTop+89-i, 192, 29, 16, i);
|
||||
drawTexturedModalRect(this.guiLeft+61, this.guiTop+89-i, 192, 29, 16, i);
|
||||
}
|
||||
|
||||
if(this.press.oilTank.getFluidAmount() > 0){
|
||||
int i = this.press.getOilTankScaled(83);
|
||||
drawTexturedModalRect(this.guiLeft + 99, this.guiTop+89-i, 176, 29, 16, i);
|
||||
drawTexturedModalRect(this.guiLeft+99, this.guiTop+89-i, 176, 29, 16, i);
|
||||
}
|
||||
|
||||
if(this.press.currentProcessTime > 0){
|
||||
|
@ -73,12 +73,12 @@ public class GuiFermentingBarrel extends GuiContainer{
|
|||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
String text1 = this.press.canolaTank.getFluidAmount() + "/" + this.press.canolaTank.getCapacity() + " mB " +StringUtil.localize("fluid.canolaoil");
|
||||
String text1 = this.press.canolaTank.getFluidAmount()+"/"+this.press.canolaTank.getCapacity()+" mB "+StringUtil.localize("fluid.canolaoil");
|
||||
if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
||||
String text2 = this.press.oilTank.getFluidAmount() + "/" + this.press.oilTank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||
String text2 = this.press.oilTank.getFluidAmount()+"/"+this.press.oilTank.getCapacity()+" mB "+StringUtil.localize("fluid.oil");
|
||||
if(x >= guiLeft+99 && y >= guiTop+6 && x <= guiLeft+114 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GuiFluidCollector extends GuiContainer{
|
|||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
String text2 = this.collector.tank.getFluidAmount()+"/"+this.collector.tank.getCapacity()+" mB "+ (this.collector.tank.getFluidAmount() > 0 ? this.collector.tank.getFluid().getLocalizedName() : "");
|
||||
String text2 = this.collector.tank.getFluidAmount()+"/"+this.collector.tank.getCapacity()+" mB "+(this.collector.tank.getFluidAmount() > 0 ? this.collector.tank.getFluid().getLocalizedName() : "");
|
||||
if(x >= guiLeft+68 && y >= guiTop+6 && x <= guiLeft+83 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -61,14 +61,14 @@ public class GuiFurnaceDouble extends GuiContainer{
|
|||
}
|
||||
if(this.tileFurnace.secondSmeltTime > 0){
|
||||
int i = this.tileFurnace.getSecondTimeToScale(23);
|
||||
this.drawTexturedModalRect(this.guiLeft + 101, this.guiTop + 40, 176, 22, 24, i);
|
||||
this.drawTexturedModalRect(this.guiLeft+101, this.guiTop+40, 176, 22, 24, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileFurnace.storage.getEnergyStored() + "/" + this.tileFurnace.storage.getMaxEnergyStored() + " RF";
|
||||
String text = this.tileFurnace.storage.getEnergyStored()+"/"+this.tileFurnace.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class GuiGrinder extends GuiContainer{
|
|||
|
||||
if(this.tileGrinder.storage.getEnergyStored() > 0){
|
||||
int i = this.tileGrinder.getEnergyScaled(83);
|
||||
drawTexturedModalRect(this.guiLeft + (isDouble ? 14 : 43), this.guiTop+89-i, 176, (isDouble ? 44 : 23), 16, i);
|
||||
drawTexturedModalRect(this.guiLeft+(isDouble ? 14 : 43), this.guiTop+89-i, 176, (isDouble ? 44 : 23), 16, i);
|
||||
}
|
||||
if(this.tileGrinder.firstCrushTime > 0){
|
||||
int i = this.tileGrinder.getFirstTimeToScale(23);
|
||||
|
@ -75,7 +75,7 @@ public class GuiGrinder extends GuiContainer{
|
|||
if(this.isDouble){
|
||||
if(this.tileGrinder.secondCrushTime > 0){
|
||||
int i = this.tileGrinder.getSecondTimeToScale(23);
|
||||
this.drawTexturedModalRect(this.guiLeft + 101, this.guiTop + 40, 176, 22, 24, i);
|
||||
this.drawTexturedModalRect(this.guiLeft+101, this.guiTop+40, 176, 22, 24, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class GuiGrinder extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileGrinder.storage.getEnergyStored() + "/" + this.tileGrinder.storage.getMaxEnergyStored() + " RF";
|
||||
String text = this.tileGrinder.storage.getEnergyStored()+"/"+this.tileGrinder.storage.getMaxEnergyStored()+" RF";
|
||||
if((this.isDouble && x >= guiLeft+14 && y >= guiTop+6 && x <= guiLeft+29 && y <= guiTop+88) || (!this.isDouble && x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88)){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -265,7 +265,9 @@ public class GuiInputter extends GuiContainer{
|
|||
this.setVariable(this.fieldPullStart, 2);
|
||||
this.setVariable(this.fieldPullEnd, 3);
|
||||
}
|
||||
else PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
|
||||
else{
|
||||
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
|
||||
}
|
||||
}
|
||||
|
||||
public static class SmallerButton extends GuiButton{
|
||||
|
@ -290,8 +292,12 @@ public class GuiInputter extends GuiContainer{
|
|||
this.mouseDragged(mc, x, y);
|
||||
|
||||
int color = 14737632;
|
||||
if(packedFGColour != 0) color = packedFGColour;
|
||||
else if(!this.enabled) color = 10526880;
|
||||
if(packedFGColour != 0){
|
||||
color = packedFGColour;
|
||||
}
|
||||
else if(!this.enabled){
|
||||
color = 10526880;
|
||||
}
|
||||
else if(this.field_146123_n) color = 16777120;
|
||||
|
||||
this.drawCenteredString(mc.fontRenderer, this.displayString, this.xPosition+this.width/2, this.yPosition+(this.height-8)/2, color);
|
||||
|
|
|
@ -72,11 +72,11 @@ public class GuiOilGenerator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.generator.storage.getEnergyStored() + "/" + this.generator.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
String text2 = this.generator.tank.getFluidAmount() + "/" + this.generator.tank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||
String text2 = this.generator.tank.getFluidAmount()+"/"+this.generator.tank.getCapacity()+" mB "+StringUtil.localize("fluid.oil");
|
||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -68,11 +68,11 @@ public class GuiOreMagnet extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.magnet.storage.getEnergyStored() + "/" + this.magnet.storage.getMaxEnergyStored() + " RF";
|
||||
String text1 = this.magnet.storage.getEnergyStored()+"/"+this.magnet.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
String text2 = this.magnet.tank.getFluidAmount() + "/" + this.magnet.tank.getCapacity() + " mB " +StringUtil.localize("fluid.oil");
|
||||
String text2 = this.magnet.tank.getFluidAmount()+"/"+this.magnet.tank.getCapacity()+" mB "+StringUtil.localize("fluid.oil");
|
||||
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text2), x, y);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class GuiRepairer extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileRepairer.storage.getEnergyStored() + "/" + this.tileRepairer.storage.getMaxEnergyStored() + " RF";
|
||||
String text = this.tileRepairer.storage.getEnergyStored()+"/"+this.tileRepairer.storage.getMaxEnergyStored()+" RF";
|
||||
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -94,7 +94,9 @@ public class GuiSmileyCloud extends GuiContainer{
|
|||
this.nameField.textboxKeyTyped(theChar, key);
|
||||
}
|
||||
}
|
||||
else super.keyTyped(theChar, key);
|
||||
else{
|
||||
super.keyTyped(theChar, key);
|
||||
}
|
||||
}
|
||||
|
||||
public void setVariable(GuiTextField field){
|
||||
|
|
|
@ -24,6 +24,7 @@ public class SlotFilter extends Slot{
|
|||
/**
|
||||
* Gets called when the Filter Slot is clicked
|
||||
* Needs to be called in slotClick() in the Container!
|
||||
*
|
||||
* @param player The player
|
||||
* @param button The button pressed (1 is right mouse button!)
|
||||
* @return Nothing, as the Item didn't really get "transferred"
|
||||
|
|
|
@ -64,7 +64,9 @@ public class InitForeignPaxels{
|
|||
}
|
||||
}
|
||||
}
|
||||
else ModUtil.LOGGER.info(MEKANISM_TOOLS+" not loaded, can't initialize Special AIOTs.");
|
||||
else{
|
||||
ModUtil.LOGGER.info(MEKANISM_TOOLS+" not loaded, can't initialize Special AIOTs.");
|
||||
}
|
||||
}
|
||||
|
||||
//Thermal Foundation
|
||||
|
@ -91,7 +93,9 @@ public class InitForeignPaxels{
|
|||
}
|
||||
}
|
||||
}
|
||||
else ModUtil.LOGGER.info(THERMAL_FOUNDATION+" not loaded, can't initialize Special AIOTs.");
|
||||
else{
|
||||
ModUtil.LOGGER.info(THERMAL_FOUNDATION+" not loaded, can't initialize Special AIOTs.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class InitItems{
|
|||
public static Item itemShovelEmerald;
|
||||
public static Item itemSwordEmerald;
|
||||
public static Item itemHoeEmerald;
|
||||
|
||||
|
||||
public static Item itemHelmEmerald;
|
||||
public static Item itemChestEmerald;
|
||||
public static Item itemPantsEmerald;
|
||||
|
|
|
@ -52,7 +52,7 @@ public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ItemBattery extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ItemBooklet extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ItemCoffeeBean extends ItemFood implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,12 +38,14 @@ public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){
|
||||
if(!world.isRemote) player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CRAFTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
if(!world.isRemote){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CRAFTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,8 +67,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
try{
|
||||
//Places the Block into the World
|
||||
if(equip.tryPlaceItemIntoWorld(player, world, x, y, z, hitSide, hitX, hitY, hitZ)){
|
||||
if(!player.capabilities.isCreativeMode)
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
player.inventory.setInventorySlotContents(slot, equip.stackSize <= 0 ? null : equip.copy());
|
||||
}
|
||||
//Synchronizes the Client
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
return true;
|
||||
|
@ -80,7 +81,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
ModUtil.LOGGER.error("Player "+player.getDisplayName()+" who should place a Block using a Drill at "+player.posX+", "+player.posY+", "+player.posZ+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!");
|
||||
}
|
||||
}
|
||||
else return true;
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,6 +114,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
/**
|
||||
* Gets the Mining Speed of the Drill
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @return The Mining Speed depending on the Speed Upgrades
|
||||
*/
|
||||
|
@ -118,16 +122,23 @@ public class ItemDrill extends ItemEnergy{
|
|||
float efficiency = ConfigFloatValues.DRILL_DAMAGE.getValue();
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED)){
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_II)){
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_III)) efficiency += 37.0F;
|
||||
else efficiency += 25.0F;
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_III)){
|
||||
efficiency += 37.0F;
|
||||
}
|
||||
else{
|
||||
efficiency += 25.0F;
|
||||
}
|
||||
}
|
||||
else{
|
||||
efficiency += 8.0F;
|
||||
}
|
||||
else efficiency += 8.0F;
|
||||
}
|
||||
return efficiency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Energy that is used per Block broken
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @return The Energy use per Block
|
||||
*/
|
||||
|
@ -139,27 +150,31 @@ public class ItemDrill extends ItemEnergy{
|
|||
use += ConfigIntValues.DRILL_SPEED_EXTRA_USE.getValue();
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_II)){
|
||||
use += ConfigIntValues.DRILL_SPEED_II_EXTRA_USE.getValue();
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_III))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_III)){
|
||||
use += ConfigIntValues.DRILL_SPEED_III_EXTRA_USE.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Silk Touch
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH)){
|
||||
use += ConfigIntValues.DRILL_SILK_EXTRA_USE.getValue();
|
||||
}
|
||||
|
||||
//Fortune
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE)){
|
||||
use += ConfigIntValues.DRILL_FORTUNE_EXTRA_USE.getValue();
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE_II))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE_II)){
|
||||
use += ConfigIntValues.DRILL_FORTUNE_II_EXTRA_USE.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
//Size
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)){
|
||||
use += ConfigIntValues.DRILL_THREE_BY_THREE_EXTRA_USE.getValue();
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)){
|
||||
use += ConfigIntValues.DRILL_FIVE_BY_FIVE_EXTRA_USE.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
return use;
|
||||
|
@ -172,7 +187,8 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
/**
|
||||
* Checks if a certain Upgrade is applied
|
||||
* @param stack The Drill
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @param upgrade The Upgrade to be checked
|
||||
* @return Is the Upgrade applied?
|
||||
*/
|
||||
|
@ -182,7 +198,8 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
/**
|
||||
* Checks if a certain Upgrade is installed and returns it as an ItemStack
|
||||
* @param stack The Drill
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @param upgrade The Upgrade to be checked
|
||||
* @return The Upgrade, if it's installed
|
||||
*/
|
||||
|
@ -214,6 +231,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
/**
|
||||
* Writes all of the Slots to NBT
|
||||
*
|
||||
* @param slots The Slots
|
||||
* @param stack The Drill
|
||||
*/
|
||||
|
@ -240,6 +258,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
/**
|
||||
* Gets all of the Slots from NBT
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @return All of the Slots
|
||||
*/
|
||||
|
@ -266,12 +285,13 @@ public class ItemDrill extends ItemEnergy{
|
|||
/**
|
||||
* Breaks Blocks in a certain Radius
|
||||
* Has to be called on both Server and Client
|
||||
* @param stack The Drill
|
||||
*
|
||||
* @param stack The Drill
|
||||
* @param radius The Radius to break Blocks in (0 means only 1 Block will be broken!)
|
||||
* @param world The World
|
||||
* @param x The X Coord of the main Block to break
|
||||
* @param y The Y Coord of the main Block to break
|
||||
* @param z The Z Coord of the main Block to break
|
||||
* @param world The World
|
||||
* @param x The X Coord of the main Block to break
|
||||
* @param y The Y Coord of the main Block to break
|
||||
* @param z The Z Coord of the main Block to break
|
||||
* @param player The Player who breaks the Blocks
|
||||
*/
|
||||
public boolean breakBlocks(ItemStack stack, int radius, World world, int x, int y, int z, EntityPlayer player){
|
||||
|
@ -302,7 +322,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
if(this.getEnergyStored(stack) >= use){
|
||||
if(!this.tryHarvestBlock(world, x, y, z, false, stack, player, use)) return false;
|
||||
}
|
||||
else return false;
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Break Blocks around
|
||||
if(radius > 0){
|
||||
|
@ -316,7 +338,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
this.tryHarvestBlock(world, xPos, yPos, zPos, true, stack, player, use);
|
||||
}
|
||||
}
|
||||
else return false;
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -329,14 +353,15 @@ public class ItemDrill extends ItemEnergy{
|
|||
* Tries to harvest a certain Block
|
||||
* Breaks the Block, drops Particles etc.
|
||||
* Has to be called on both Server and Client
|
||||
* @param world The World
|
||||
* @param xPos The X Position of the Block to break
|
||||
* @param yPos The Y Position of the Block to break
|
||||
* @param zPos The Z Position of the Block to break
|
||||
*
|
||||
* @param world The World
|
||||
* @param xPos The X Position of the Block to break
|
||||
* @param yPos The Y Position of the Block to break
|
||||
* @param zPos The Z Position of the Block to break
|
||||
* @param isExtra If the Block is the Block that was looked at when breaking or an additional Block
|
||||
* @param stack The Drill
|
||||
* @param player The Player breaking the Blocks
|
||||
* @param use The Energy that should be extracted per Block
|
||||
* @param stack The Drill
|
||||
* @param player The Player breaking the Blocks
|
||||
* @param use The Energy that should be extracted per Block
|
||||
*/
|
||||
private boolean tryHarvestBlock(World world, int xPos, int yPos, int zPos, boolean isExtra, ItemStack stack, EntityPlayer player, int use){
|
||||
Block block = world.getBlock(xPos, yPos, zPos);
|
||||
|
@ -362,11 +387,13 @@ public class ItemDrill extends ItemEnergy{
|
|||
int use = this.getEnergyUsePerBlock(stack);
|
||||
if(this.getEnergyStored(stack) >= use){
|
||||
//Enchants the Drill depending on the Upgrades it has
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH)){
|
||||
ItemUtil.addEnchantment(stack, Enchantment.silkTouch, 1);
|
||||
}
|
||||
else{
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE))
|
||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE)){
|
||||
ItemUtil.addEnchantment(stack, Enchantment.fortune, this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FORTUNE_II) ? 3 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
//Breaks the Blocks
|
||||
|
@ -374,9 +401,13 @@ public class ItemDrill extends ItemEnergy{
|
|||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)){
|
||||
toReturn = this.breakBlocks(stack, 2, player.worldObj, x, y, z, player);
|
||||
}
|
||||
else toReturn = this.breakBlocks(stack, 1, player.worldObj, x, y, z, player);
|
||||
else{
|
||||
toReturn = this.breakBlocks(stack, 1, player.worldObj, x, y, z, player);
|
||||
}
|
||||
}
|
||||
else{
|
||||
toReturn = this.breakBlocks(stack, 0, player.worldObj, x, y, z, player);
|
||||
}
|
||||
else toReturn = this.breakBlocks(stack, 0, player.worldObj, x, y, z, player);
|
||||
|
||||
//Removes Enchantments added above
|
||||
ItemUtil.removeEnchantment(stack, Enchantment.silkTouch);
|
||||
|
|
|
@ -78,7 +78,7 @@ public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ItemDust extends Item implements IActAddItemOrBlock{
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + (stack.getItemDamage() >= allDusts.length ? " ERROR!" : allDusts[stack.getItemDamage()].getName());
|
||||
return this.getUnlocalizedName()+(stack.getItemDamage() >= allDusts.length ? " ERROR!" : allDusts[stack.getItemDamage()].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,6 +74,6 @@ public class ItemDust extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue