Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
*.war
*.ear
/*.directory

#Mac OS X
.DS_Store
1 change: 0 additions & 1 deletion powercraft/core/gui/PCco_GuiCraftingTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ protected PC_Slot[] getAllSlots() {
return null;
}

@SuppressWarnings("hiding")
@Override
public void initGui(PC_GresGuiHandler gui) {
this.gui = gui;
Expand Down
1 change: 0 additions & 1 deletion powercraft/energy/block/PCeg_BlockAccumulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCeg_TileEntityAccumulator.class;
}

@SuppressWarnings("hiding")
@Override
public IIcon getIcon(PC_Direction side, int metadata) {
return this.side;
Expand Down
3 changes: 1 addition & 2 deletions powercraft/energy/block/PCeg_BlockSolarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCeg_TileEntitySolarPanel.class;
}

@SuppressWarnings("hiding")
@Override
public IIcon getIcon(PC_Direction side, int metadata) {
if(side==PC_Direction.UP){
if(side == PC_Direction.UP){
return this.top;
}
return this.side;
Expand Down
3 changes: 1 addition & 2 deletions powercraft/itemstorage/gui/PCis_GuiChannelChest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ public PCis_GuiChannelChest(EntityPlayer player, PCis_TileEntityChannelChest cha
super(player, channelChest);
}

@SuppressWarnings("hiding")
@Override
public void initGui(PC_GresGuiHandler gui) {
PC_GresWindow w = new PC_GresWindow(PC_Lang.translate(this.inventory.getInventoryName()+".name"));
PC_GresWindow w = new PC_GresWindow(PC_Lang.translate(this.inventory.getInventoryName() + ".name"));
w.setLayout(new PC_GresLayoutVertical());
PC_GresInventory inventory = new PC_GresInventory(9, 3);
inventory.setSlots(this.invSlots, 0);
Expand Down
3 changes: 1 addition & 2 deletions powercraft/itemstorage/gui/PCis_GuiCompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public PCis_GuiCompressor(EntityPlayer player, ItemStack itemStack, int slot, II
super(player, itemStack, slot, inv);
}

@SuppressWarnings("hiding")
@Override
public void initGui(PC_GresGuiHandler gui) {
PC_GresWindow w = new PC_GresWindow(PC_Lang.translate(this.inventory.getInventoryName()+".name"));
Expand All @@ -54,7 +53,7 @@ public void initGui(PC_GresGuiHandler gui) {
this.takeStacks.addEventListener(this);
this.takeStacks.check(PCis_ItemCompressor.isTakeStacks(this.itemStack));
tab.add(new PC_GresLabel(PC_Lang.translate("PCis.gui.compressor.putStacks")));
tab.add(this.putStacks = new PC_GresTextEdit(""+PCis_ItemCompressor.getPutStacks(this.itemStack), 3, PC_GresInputType.UNSIGNED_INT));
tab.add(this.putStacks = new PC_GresTextEdit("" + PCis_ItemCompressor.getPutStacks(this.itemStack), 3, PC_GresInputType.UNSIGNED_INT));
this.putStacks.addEventListener(this);
w.addSideTab(tab);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@

public class PCis_HightCompressorInventory extends PCis_NormalCompressorInventory implements PC_IInventorySizeOverrider {

@SuppressWarnings("hiding")
public PCis_HightCompressorInventory(IInventory inventory, int slot, String name){
super(inventory, slot, new PC_Vec2I(3, 3), name);
NBTTagCompound tag = getItemStack().getTagCompound();
if(tag.hasKey("size")){
int[] size = tag.getIntArray("size");
for(int i=0; i<this.is.length; i++){
if(this.is[i]!=null){
this.is[i].stackSize = size[i];
}
if(this.is[i] != null) this.is[i].stackSize = size[i];
}
}
}
Expand All @@ -33,7 +30,6 @@ public void setInventorySlotContents(int var1, ItemStack var2) {
this.is[var1]=var2;
}

@SuppressWarnings("hiding")
@Override
public ItemStack decrStackSize(int var1, int var2) {
int size = var2;
Expand All @@ -51,8 +47,7 @@ public int getInventoryStackLimit() {
public int getSlotStackLimit(int slotIndex) {
return 512;
}

@SuppressWarnings("hiding")

@Override
public void closeInventory() {
if(getItemStack()!=null){
Expand All @@ -68,7 +63,6 @@ public void closeInventory() {
}
}

@SuppressWarnings("hiding")
@Override
public int getMaxStackSize(ItemStack itemStack, int slot) {
int maxStack = itemStack.getMaxStackSize()*8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void onBlockPostSet(PC_Direction side, ItemStack stack, EntityPlayer play
set3DRotation(new PC_3DRotationY(player));
}

@SuppressWarnings("hiding")
public void changeID(int id){
if(!isClient()){
PCis_ChannelChestSave.remove(this.id);
Expand Down
1 change: 0 additions & 1 deletion powercraft/laser/PCla_Beam.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public double getLength() {
return this.startPos.distanceTo(this.pos)+this.startLength;
}

@SuppressWarnings("hiding")
@Override
public PC_IBeam getNewBeam(double maxLength, PC_Vec3 startPos, PC_Vec3 newDirection, PC_LightFilter filter) {
PC_LightValue lv = this.lightValue.filterBy(filter);
Expand Down
1 change: 0 additions & 1 deletion powercraft/laser/PCla_Beams.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public static PC_BeamHitResult onHitBlock(World world, int x, int y, int z, PCla
return PC_BeamHitResult.STANDARD;
}

@SuppressWarnings("unused")
public static PC_BeamHitResult onHitEntity(World world, Entity entity, PCla_Beam beam) {
return PC_BeamHitResult.STANDARD;
}
Expand Down
5 changes: 2 additions & 3 deletions powercraft/laser/block/PCla_BlockLaserBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.laser.PCla_LaserRenderer;
import powercraft.laser.tileEntity.PCla_TileEntityLaserBuilder;
import powercraft.laser.tileentity.PCla_TileEntityLaserBuilder;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -31,8 +31,7 @@ public PCla_BlockLaserBuilder() {
public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCla_TileEntityLaserBuilder.class;
}

@SuppressWarnings("hiding")

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(PC_Direction side, int metadata) {
Expand Down
5 changes: 2 additions & 3 deletions powercraft/laser/block/PCla_BlockLaserDamage.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.laser.PCla_LaserRenderer;
import powercraft.laser.tileEntity.PCla_TileEntityLaserDamage;
import powercraft.laser.tileentity.PCla_TileEntityLaserDamage;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -31,8 +31,7 @@ public PCla_BlockLaserDamage() {
public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCla_TileEntityLaserDamage.class;
}

@SuppressWarnings("hiding")

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(PC_Direction side, int metadata) {
Expand Down
3 changes: 1 addition & 2 deletions powercraft/laser/block/PCla_BlockLaserHarvester.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.laser.PCla_LaserRenderer;
import powercraft.laser.tileEntity.PCla_TileEntityLaserHarvester;
import powercraft.laser.tileentity.PCla_TileEntityLaserHarvester;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -31,7 +31,6 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCla_TileEntityLaserHarvester.class;
}

@SuppressWarnings("hiding")
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(PC_Direction side, int metadata) {
Expand Down
5 changes: 2 additions & 3 deletions powercraft/laser/block/PCla_BlockLaserPusher.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.laser.PCla_LaserRenderer;
import powercraft.laser.tileEntity.PCla_TileEntityLaserPusher;
import powercraft.laser.tileentity.PCla_TileEntityLaserPusher;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -31,8 +31,7 @@ public PCla_BlockLaserPusher() {
public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCla_TileEntityLaserPusher.class;
}

@SuppressWarnings("hiding")

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(PC_Direction side, int metadata) {
Expand Down
5 changes: 2 additions & 3 deletions powercraft/laser/block/PCla_BlockLaserTractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.laser.PCla_LaserRenderer;
import powercraft.laser.tileEntity.PCla_TileEntityLaserTractor;
import powercraft.laser.tileentity.PCla_TileEntityLaserTractor;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -31,8 +31,7 @@ public PCla_BlockLaserTractor() {
public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCla_TileEntityLaserTractor.class;
}

@SuppressWarnings("hiding")

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(PC_Direction side, int metadata) {
Expand Down
2 changes: 1 addition & 1 deletion powercraft/laser/block/PCla_BlockMirror.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.api.renderer.PC_Renderer;
import powercraft.laser.tileEntity.PCla_TileEntityMirror;
import powercraft.laser.tileentity.PCla_TileEntityMirror;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand Down
2 changes: 1 addition & 1 deletion powercraft/laser/block/PCla_BlockPrism.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import powercraft.api.block.PC_BlockType;
import powercraft.api.block.PC_TileEntity;
import powercraft.api.renderer.PC_Renderer;
import powercraft.laser.tileEntity.PCla_TileEntityPrism;
import powercraft.laser.tileentity.PCla_TileEntityPrism;


public class PCla_BlockPrism extends PC_BlockTileEntity {
Expand Down
2 changes: 1 addition & 1 deletion powercraft/laser/container/PCla_ContainerLaserBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import net.minecraft.entity.player.EntityPlayer;
import powercraft.api.gres.PC_GresBaseWithInventory;
import powercraft.laser.tileEntity.PCla_TileEntityLaserBuilder;
import powercraft.laser.tileentity.PCla_TileEntityLaserBuilder;


public class PCla_ContainerLaserBuilder extends PC_GresBaseWithInventory {
Expand Down
1 change: 0 additions & 1 deletion powercraft/laser/entity/PCla_LaserEntityFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public int getFXLayer() {
return 3;
}

@SuppressWarnings("hiding")
@Override
public void renderParticle(Tessellator tessellator, float patrialTickTime, float par3, float par4, float par5, float par6, float par7) {
if(this.isDead)
Expand Down
2 changes: 1 addition & 1 deletion powercraft/laser/gui/PCla_GuiLaserBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import powercraft.api.gres.PC_IGresGui;
import powercraft.api.gres.layout.PC_GresLayoutVertical;
import powercraft.laser.container.PCla_ContainerLaserBuilder;
import powercraft.laser.tileEntity.PCla_TileEntityLaserBuilder;
import powercraft.laser.tileentity.PCla_TileEntityLaserBuilder;


public class PCla_GuiLaserBuilder extends PCla_ContainerLaserBuilder implements PC_IGresGui {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -82,7 +82,6 @@ public PCla_TileEntityLaserBuilder() {
}
}

@SuppressWarnings("unused")
@Override
public void onTick() {
super.onTick();
Expand Down Expand Up @@ -181,7 +180,6 @@ public boolean canRotate() {
@Override
@SideOnly(Side.CLIENT)
public boolean renderWorldBlock(int modelId, RenderBlocks renderer) {

PC_Direction dir = get3DRotation().getSidePosition(PC_Direction.NORTH);

PCla_LaserRenderer.renderLaser(this.worldObj, this.xCoord, this.yCoord, this.zCoord, dir, renderer, PCla_BlockLaserBuilder.side, PCla_BlockLaserBuilder.inside, PCla_BlockLaserBuilder.black, PCla_BlockLaserBuilder.white);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
Expand Down Expand Up @@ -47,8 +47,7 @@ public boolean isDifficultyScaled() {
}

}

@SuppressWarnings("unused")

@Override
public void onTick() {
super.onTick();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
Expand All @@ -21,8 +21,7 @@
import cpw.mods.fml.relauncher.SideOnly;

public class PCla_TileEntityLaserHarvester extends PC_TileEntityRotateable implements PCla_IBeamHandler {

@SuppressWarnings("unused")

@Override
public void onTick() {
super.onTick();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
Expand All @@ -20,8 +20,7 @@
import cpw.mods.fml.relauncher.SideOnly;

public class PCla_TileEntityLaserPusher extends PC_TileEntityRotateable implements PCla_IBeamHandler {

@SuppressWarnings("unused")

@Override
public void onTick() {
super.onTick();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
Expand All @@ -20,12 +20,11 @@
import cpw.mods.fml.relauncher.SideOnly;

public class PCla_TileEntityLaserTractor extends PC_TileEntityRotateable implements PCla_IBeamHandler {

@SuppressWarnings("unused")

@Override
public void onTick() {
super.onTick();
if(get3DRotation()==null)
if(get3DRotation() == null)
return;
PC_Direction dir = get3DRotation().getSidePosition(PC_Direction.NORTH);
PC_Vec3 vec = new PC_Vec3(dir.offsetX, dir.offsetY, dir.offsetZ);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package powercraft.laser.tileEntity;
package powercraft.laser.tileentity;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCma_TileEntityAutomaticWorkbench.class;
}

@SuppressWarnings("hiding")
@Override
public IIcon getIcon(PC_Direction side, int metadata) {
if(side==PC_Direction.EAST){
Expand Down
3 changes: 1 addition & 2 deletions powercraft/machines/block/PCma_BlockFurnace.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCma_TileEntityFurnace.class;
}

@SuppressWarnings("hiding")
@Override
public IIcon getIcon(PC_Direction side, int metadata) {
if(side==PC_Direction.EAST){
if(side == PC_Direction.EAST){
return front;
}
return PCma_BlockFurnace.side;
Expand Down
1 change: 0 additions & 1 deletion powercraft/machines/block/PCma_BlockRoaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public Class<? extends PC_TileEntity> getTileEntityClass() {
return PCma_TileEntityRoaster.class;
}

@SuppressWarnings("hiding")
@Override
public IIcon getIcon(PC_Direction side, int metadata) {
if(side==PC_Direction.UP){
Expand Down
Loading