diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/AdvancedSatelliteUtilization.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/AdvancedSatelliteUtilization.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/asuworldgen/WorldGen.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/asuworldgen/WorldGen.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/asuworldgen/oregen/ASUWorldOreGen.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/asuworldgen/oregen/ASUWorldOreGen.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/ASUGuiHandler.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/ASUGuiHandler.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiAdvancedWasteHandler.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiAdvancedWasteHandler.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiEnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiEnderCoreGenerator.java old mode 100644 new mode 100755 index 3d4ca65..5ba9a9d --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiEnderCoreGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiEnderCoreGenerator.java @@ -77,7 +77,7 @@ public class GuiEnderCoreGenerator extends GuiContainer { drawTexturedModalRect(guiLeft+7, guiTop+8 + 12 + 3, 100, 149 + 4, currentcooldown, 3); - drawCenteredString(fontRendererObj, "Ender Core Generator", guiLeft+90, guiTop-10, 0xFFFFFF); + drawCenteredString(fontRendererObj, "Ender Core Generator", guiLeft+90, guiTop+7, 0xFFFFFF); if (currentpower == 0) { percentagefontcolor = 0xFF0000; } else { diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiFrameProjector.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiFrameProjector.java new file mode 100644 index 0000000..8afe88f --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiFrameProjector.java @@ -0,0 +1,18 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.modGUIs; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.inventory.Container; + +public class GuiFrameProjector extends GuiContainer { + + public GuiFrameProjector(Container p_i1072_1_) { + super(p_i1072_1_); + this.xSize = 176; + } + + @Override + protected void drawGuiContainerBackgroundLayer(float f, int mx, int my) { + + } + +} diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiNetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiNetherCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiWrenchOverlay.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiWrenchOverlay.java old mode 100644 new mode 100755 index 49486cd..18dc32e --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiWrenchOverlay.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/GuiWrenchOverlay.java @@ -23,10 +23,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import org.lwjgl.opengl.GL11; -// -// GuiBuffBar implements a simple status bar at the top of the screen which -// shows the current buffs/debuffs applied to the character. -// public class GuiWrenchOverlay extends Gui { private Minecraft mc; @@ -38,7 +34,6 @@ public class GuiWrenchOverlay extends Gui { super(); - // We need this to invoke the render engine. this.mc = mc; } @@ -83,5 +78,5 @@ public class GuiWrenchOverlay extends Gui } else { this.drawTexturedModalRect(xPos-12, yPos, XSTART - 12, YSTART, XSIZE, YSIZE); } - } + } } \ No newline at end of file diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/ModGUIs.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modGUIs/ModGUIs.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ASUPedestal.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ASUPedestal.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/AdvancedWasteHandler.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/AdvancedWasteHandler.java old mode 100644 new mode 100755 index ef8ee6d..9716f3a --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/AdvancedWasteHandler.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/AdvancedWasteHandler.java @@ -6,6 +6,7 @@ import org.bitbucket.alltra101ify.advancedsatelliteutilization.AdvancedSatellite import org.bitbucket.alltra101ify.advancedsatelliteutilization.modGUIs.ModGUIs; import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityAdvancedWasteHandler; import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityEnderCoreGenerator; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityNetherCoreGenerator; import org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems.ModItems; import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModCreativeTabs; import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModInfo; @@ -19,10 +20,12 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; @@ -156,5 +159,41 @@ public class AdvancedWasteHandler extends ModMachineBlock { } super.randomDisplayTick(world, x, y, z, r); } + @Override + public void breakBlock(World world, int x, int y, int z, Block b, int i) { + DropItems(world, x, y, z); + super.breakBlock(world, x, y, z, b, i); + } + public void DropItems(World world, int x, int y, int z) { + Random r = new Random(); + TileEntityAdvancedWasteHandler tileentity = ((TileEntityAdvancedWasteHandler)world.getTileEntity(x, y, z)); + for (int i = 0; i < tileentity.getSizeInventory(); i++) { + ItemStack itemstack = tileentity.getStackInSlot(i); + if (itemstack != null) { + float rand[] = new float[3]; + for (int i1 = 0; i1 < 3; i1++) { + rand[i1] = r.nextFloat() * 0.8F + 0.1F; + } + while (itemstack.stackSize > 0) { + int j1 = r.nextInt(21) + 10; + + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(world, x + rand[0], y + rand[1], z + rand[2], new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + float f3 = 0.05F; + entityitem.motionX = r.nextGaussian() * f3; + entityitem.motionY = r.nextGaussian() * f3 + 0.2f; + entityitem.motionZ = r.nextGaussian() * f3; + world.spawnEntityInWorld(entityitem); + } + } + } + } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/BlockOfASHAD.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/BlockOfASHAD.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/Blocker.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/Blocker.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/CoreStabilizer.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/CoreStabilizer.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/EnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/EnderCoreGenerator.java old mode 100644 new mode 100755 index 45d819b..96b166c --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/EnderCoreGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/EnderCoreGenerator.java @@ -19,9 +19,11 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; @@ -121,5 +123,41 @@ public class EnderCoreGenerator extends ModMachineBlock { public boolean renderAsNormalBlock() { return false; } + @Override + public void breakBlock(World world, int x, int y, int z, Block b, int i) { + DropItems(world, x, y, z); + super.breakBlock(world, x, y, z, b, i); + } + public void DropItems(World world, int x, int y, int z) { + Random r = new Random(); + TileEntityEnderCoreGenerator tileentity = ((TileEntityEnderCoreGenerator)world.getTileEntity(x, y, z)); + for (int i = 0; i < tileentity.getSizeInventory(); i++) { + ItemStack itemstack = tileentity.getStackInSlot(i); + if (itemstack != null) { + float rand[] = new float[3]; + for (int i1 = 0; i1 < 3; i1++) { + rand[i1] = r.nextFloat() * 0.8F + 0.1F; + } + while (itemstack.stackSize > 0) { + int j1 = r.nextInt(21) + 10; + + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(world, x + rand[0], y + rand[1], z + rand[2], new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + float f3 = 0.05F; + entityitem.motionX = r.nextGaussian() * f3; + entityitem.motionY = r.nextGaussian() * f3 + 0.2f; + entityitem.motionZ = r.nextGaussian() * f3; + world.spawnEntityInWorld(entityitem); + } + } + } + } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameProjector.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameProjector.java new file mode 100644 index 0000000..03de082 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameProjector.java @@ -0,0 +1,76 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks; + +import java.util.Random; + +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityFrameProjector; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModCreativeTabs; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModInfo; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference.ModMachineBlock; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class FrameProjector extends ModMachineBlock { + + boolean multiBlock; + + protected FrameProjector(boolean multiBlock) { + super(Material.iron); + this.multiBlock = multiBlock; + if (multiBlock == false) { + setCreativeTab(ModCreativeTabs.TabASU); + } + if (multiBlock == true) { + setLightLevel(0.8f); + } + setBlockName("FrameProjector" + "_" + multiBlock); + setBlockTextureName(ModInfo.MODID + ":" + "FrameProjector/" + getUnlocalizedName().substring(5)); + setResistance(8); + setHardness(8); + setHarvestLevel("pickaxe", 2); + this.isBlockContainer = true; + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityFrameProjector(multiBlock); + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + world.scheduleBlockUpdate(x, y, z, world.getBlock(x, y, z), 1); + } + + @Override + public void updateTick(World world, int x, int y, int z, Random r) { + if (isMultiBlock(world, x, y, z)) { + world.setBlock(x, y, z, ModBlocks.frameProjector_True); + } else { + world.setBlock(x, y, z, ModBlocks.frameProjector_False); + } + } + protected boolean isMultiBlock(World world, int x, int y, int z) { + byte multiBlockCount = 0; + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { + if (world.getBlock(x+i, y, z+j) == ModBlocks.frameSupport) { + multiBlockCount++; + } + } + } + + if (multiBlockCount == 8) { + return true; + } + else { + return false; + } + } + + public boolean isOpaqueCube() { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameSupport.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameSupport.java new file mode 100644 index 0000000..971af22 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/FrameSupport.java @@ -0,0 +1,57 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks; + +import java.util.Random; + +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityFrameSupport; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModCreativeTabs; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModInfo; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference.ModBasicMachineBlock; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference.ModMachineBlock; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class FrameSupport extends ModBasicMachineBlock { + + protected FrameSupport() { + super(Material.rock); + setCreativeTab(ModCreativeTabs.TabASU); + setBlockName("FrameSupport"); + setBlockTextureName(ModInfo.MODID + ":" + getUnlocalizedName().substring(5)); + setResistance(8); + setHardness(8); + setHarvestLevel("pickaxe", 2); + setLightLevel(0.4f); + this.isBlockContainer = true; + + } + + + public boolean isOpaqueCube() { + return false; + } + + @Override + public void updateTick(World world, int x, int y, int z, Random r) { + checkSurrounding(world, x, y, z); + super.updateTick(world, x, y, z, r); + } + + @Override + public void onNeighborBlockChange(World w, int x, int y, int z, Block p_149695_5_) { + w.scheduleBlockUpdate(x, y, z, w.getBlock(x, y, z), 1); + } + + public void checkSurrounding(World world, int x, int y, int z) { + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { + if (world.getBlock(x+i, y, z+j) == ModBlocks.frameProjector_False || world.getBlock(x+i, y, z+j) == ModBlocks.frameProjector_True) { + world.scheduleBlockUpdate(x+i, y, z+j, world.getBlock(x+i, y, z+j), 1); + } + } + } + } + +} diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlockMaterials.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlockMaterials.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlocks.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlocks.java old mode 100644 new mode 100755 index 29f0ed5..e706fd7 --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlocks.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/ModBlocks.java @@ -17,6 +17,9 @@ public class ModBlocks { public static Block quaridiumOre = new QuaridiumOre(Material.iron); public static Block blockofashadwithquaridium = new blockOfASHADWithQuaridium(Material.iron); public static Block netherCoreGenerator = new NetherCoreGenerator(); + public static Block frameSupport = new FrameSupport(); + public static Block frameProjector_False = new FrameProjector(false); + public static Block frameProjector_True = new FrameProjector(true); public static void blockInit() { ASURegistryHelper.registerBlock(blockofashad); ASURegistryHelper.registerBlock(transparentblockofashad); @@ -29,5 +32,8 @@ public class ModBlocks { ASURegistryHelper.registerBlock(netherCoreGenerator); ASURegistryHelper.registerBlock(AdvancedWasteHandler); ASURegistryHelper.registerBlock(AdvancedWasteHandler_active); + ASURegistryHelper.registerBlock(frameSupport); + ASURegistryHelper.registerBlock(frameProjector_False); + ASURegistryHelper.registerBlock(frameProjector_True); } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/NetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/NetherCoreGenerator.java old mode 100644 new mode 100755 index 619107e..05d4c50 --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/NetherCoreGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/NetherCoreGenerator.java @@ -4,8 +4,10 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -110,5 +112,42 @@ public class NetherCoreGenerator extends ModMachineBlock { public boolean renderAsNormalBlock() { return false; } + @Override + public void breakBlock(World world, int x, int y, int z, Block b, int i) { + DropItems(world, x, y, z); + super.breakBlock(world, x, y, z, b, i); + } + + public void DropItems(World world, int x, int y, int z) { + Random r = new Random(); + TileEntityNetherCoreGenerator tileentity = ((TileEntityNetherCoreGenerator)world.getTileEntity(x, y, z)); + for (int i = 0; i < tileentity.getSizeInventory(); i++) { + ItemStack itemstack = tileentity.getStackInSlot(i); + if (itemstack != null) { + float rand[] = new float[3]; + for (int i1 = 0; i1 < 3; i1++) { + rand[i1] = r.nextFloat() * 0.8F + 0.1F; + } + while (itemstack.stackSize > 0) { + int j1 = r.nextInt(21) + 10; + + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(world, x + rand[0], y + rand[1], z + rand[2], new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + + if (itemstack.hasTagCompound()) { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + float f3 = 0.05F; + entityitem.motionX = r.nextGaussian() * f3; + entityitem.motionY = r.nextGaussian() * f3 + 0.2f; + entityitem.motionZ = r.nextGaussian() * f3; + world.spawnEntityInWorld(entityitem); + } + } + } + } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/QuaridiumOre.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/QuaridiumOre.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/TransparentBlockOfASHAD.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/TransparentBlockOfASHAD.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/blockOfASHADWithQuaridium.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/blockOfASHADWithQuaridium.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/ModTileEntities.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/ModTileEntities.java old mode 100644 new mode 100755 index fe0cc89..5e1678b --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/ModTileEntities.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/ModTileEntities.java @@ -11,6 +11,8 @@ public class ModTileEntities { ASURegistryHelper.registerTileEntity(TileEntityNetherCoreGenerator.class, "NetherCore"); ASURegistryHelper.registerTileEntity(TileEntityAdvancedWasteHandler.class, "AdvancedWasteHandler_true"); ASURegistryHelper.registerTileEntity(TileEntityAdvancedWasteHandler.class, "AdvancedWasteHandler_false"); + ASURegistryHelper.registerTileEntity(TileEntityFrameProjector.class, "FrameProjector_false"); + ASURegistryHelper.registerTileEntity(TileEntityFrameProjector.class, "FrameProjector_true"); } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityASUPedestal.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityASUPedestal.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityAdvancedWasteHandler.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityAdvancedWasteHandler.java old mode 100644 new mode 100755 index 4a3c9f4..f369556 --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityAdvancedWasteHandler.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityAdvancedWasteHandler.java @@ -13,7 +13,7 @@ public class TileEntityAdvancedWasteHandler extends TileEntityGenerator implemen Item item[] = new Item[6]; public TileEntityAdvancedWasteHandler() { for (int i = 0; i < fuelqueue.length; i++) { - fuelqueue[i] = 5; + fuelqueue[i] = 3; } item[0] = Items.bone; diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityCoreStabilizer.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityCoreStabilizer.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityEnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityEnderCoreGenerator.java old mode 100644 new mode 100755 index 664382e..c645657 --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityEnderCoreGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityEnderCoreGenerator.java @@ -21,69 +21,5 @@ public class TileEntityEnderCoreGenerator extends TileEntityGenerator implements setUpgradeslotstart(1); setFuelConversionSpeed(15F); } - -// @Override -// public void readFromNBT(NBTTagCompound var1) { -// this.rotationY = var1.getFloat("rotationY"); -// this.rotationX = var1.getFloat("rotationX"); -// this.speed = var1.getFloat("speed"); -// this.toggle = var1.getBoolean("toggle"); -// this.speedSlower = var1.getFloat("speedSlower"); -// this.currentPower = var1.getInteger("currentPower"); -// this.multiblock = var1.getBoolean("multiblock"); -// this.currentPower = var1.getInteger("currentPower"); -// this.currentfuelqueue = var1.getInteger("Fuel"); -// this.currentcooldown = var1.getInteger("currentCooldown"); -// this.cooldown = var1.getInteger("cooldown"); -// -// NBTTagList slots = var1.getTagList("items", 10); -// this.items = new ItemStack[getSizeInventory()]; -// -// for (int i = 0; i < slots.tagCount(); i++) { -// NBTTagCompound item = slots.getCompoundTagAt(i); -// byte itemPos = item.getByte("itemPos"); -// -// if (itemPos >= 0 && itemPos < this.items.length) { -// this.items[itemPos] = ItemStack.loadItemStackFromNBT(item); -// } -// -// if (var1.hasKey("customName")) { -// this.setCustomInventoryName(var1.getString("customName")); -// } -// -// } -// -// super.readFromNBT(var1); -// } -// -// @Override -// public void writeToNBT(NBTTagCompound var1) { -// var1.setFloat("rotationY", this.rotationY); -// var1.setFloat("rotationX", this.rotationX); -// var1.setFloat("speed", this.speed); -// var1.setBoolean("toggle", this.toggle); -// var1.setFloat("speedSlower", this.speedSlower); -// var1.setBoolean("multiblock", this.multiblock); -// var1.setInteger("currentPower", this.currentPower); -// var1.setInteger("Fuel", this.currentfuelqueue); -// var1.setInteger("currentCooldown", this.currentcooldown); -// var1.setInteger("cooldown", this.cooldown); -// -// NBTTagList slots = new NBTTagList(); -// for (int i = 0; i < items.length; i++) { -// if (this.items[i] != null) { -// NBTTagCompound item = new NBTTagCompound(); -// item.setByte("itemPos", (byte) i); -// this.items[i].writeToNBT(item); -// slots.appendTag(item); -// } -// } -// -// if (this.hasCustomInventoryName()) { -// var1.setString("customName", this.customName); -// } -// var1.setTag("items", slots); -// super.writeToNBT(var1); -// -// } + } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameProjector.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameProjector.java new file mode 100644 index 0000000..c7ecb04 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameProjector.java @@ -0,0 +1,122 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityFrameProjector extends TileEntity implements ISidedInventory { + + ItemStack items[]; + + boolean module[]; + boolean multiBlock; + + public TileEntityFrameProjector(boolean multiBlock) { + this.multiBlock = multiBlock; + } + + public boolean getMultiBlock() { + return multiBlock; + } + + public void setModules(boolean module[]) { + this.module = module; + } + + + @Override + public int getSizeInventory() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public ItemStack getStackInSlot(int p_70301_1_) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { + // TODO Auto-generated method stub + + } + + @Override + public String getInventoryName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean hasCustomInventoryName() { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getInventoryStackLimit() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void openInventory() { + // TODO Auto-generated method stub + + } + + @Override + public void closeInventory() { + // TODO Auto-generated method stub + + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + // TODO Auto-generated method stub + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, + int p_102007_3_) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, + int p_102008_3_) { + // TODO Auto-generated method stub + return false; + } + + +} diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameSupport.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameSupport.java new file mode 100644 index 0000000..f0170f2 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityFrameSupport.java @@ -0,0 +1,6 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities; + +import net.minecraft.tileentity.TileEntity; + +public class TileEntityFrameSupport extends TileEntity { +} diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityNetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityNetherCoreGenerator.java old mode 100644 new mode 100755 index ff09dce..58aa32c --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityNetherCoreGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modblocks/tileentities/TileEntityNetherCoreGenerator.java @@ -17,76 +17,10 @@ public class TileEntityNetherCoreGenerator extends TileEntityGenerator implement item = new Item[1]; fuel[0] = 110; item[0] = Items.blaze_rod; - setParticle("flame"); configureVars(fuel, 30000, 125); ItemValidityByItem(item); setItems(new ItemStack[4]); setUpgradeslotstart(1); setFuelConversionSpeed(15F); } - -// @Override -// public void readFromNBT(NBTTagCompound var1) { -// this.rotationY = var1.getFloat("rotationY"); -// this.rotationX = var1.getFloat("rotationX"); -// this.speed = var1.getFloat("speed"); -// this.toggle = var1.getBoolean("toggle"); -// this.speedSlower = var1.getFloat("speedSlower"); -// this.currentPower = var1.getInteger("currentPower"); -// this.multiblock = var1.getBoolean("multiblock"); -// this.currentPower = var1.getInteger("currentPower"); -// this.currentfuelqueue = var1.getInteger("Fuel"); -// this.currentcooldown = var1.getInteger("currentCooldown"); -// this.cooldown = var1.getInteger("cooldown"); -// -// NBTTagList slots = var1.getTagList("items", 10); -// this.items = new ItemStack[getSizeInventory()]; -// -// for (int i = 0; i < slots.tagCount(); i++) { -// NBTTagCompound item = slots.getCompoundTagAt(i); -// byte itemPos = item.getByte("itemPos"); -// -// if (itemPos >= 0 && itemPos < this.items.length) { -// this.items[itemPos] = ItemStack.loadItemStackFromNBT(item); -// } -// -// if (var1.hasKey("customName")) { -// this.setCustomInventoryName(var1.getString("customName")); -// } -// -// } -// -// super.readFromNBT(var1); -// } -// -// @Override -// public void writeToNBT(NBTTagCompound var1) { -// var1.setFloat("rotationY", this.rotationY); -// var1.setFloat("rotationX", this.rotationX); -// var1.setFloat("speed", this.speed); -// var1.setBoolean("toggle", this.toggle); -// var1.setFloat("speedSlower", this.speedSlower); -// var1.setBoolean("multiblock", this.multiblock); -// var1.setInteger("currentPower", this.currentPower); -// var1.setInteger("Fuel", this.currentfuelqueue); -// var1.setInteger("currentCooldown", this.currentcooldown); -// var1.setInteger("cooldown", this.cooldown); -// -// NBTTagList slots = new NBTTagList(); -// for (int i = 0; i < items.length; i++) { -// if (this.items[i] != null) { -// NBTTagCompound item = new NBTTagCompound(); -// item.setByte("itemPos", (byte) i); -// this.items[i].writeToNBT(item); -// slots.appendTag(item); -// } -// } -// -// if (this.hasCustomInventoryName()) { -// var1.setString("customName", this.customName); -// } -// var1.setTag("items", slots); -// super.writeToNBT(var1); -// -// } } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerAdvancedWasteHandler.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerAdvancedWasteHandler.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerEnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerEnderCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerNetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/ContainerNetherCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/modslots/EnderCoreGeneratorSlot.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/modslots/EnderCoreGeneratorSlot.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/modslots/NetherCoreGeneratorSlot.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/modcontainers/modslots/NetherCoreGeneratorSlot.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelASUPedestal.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelASUPedestal.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelCoreStabilizer.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/models/blockmodel/ModelCoreStabilizer.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ASHADBrick.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ASHADBrick.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/AdvancedProcessingChip.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/AdvancedProcessingChip.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/BasicChip.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/BasicChip.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ConversionSpeedUpgrade.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ConversionSpeedUpgrade.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/FanModule.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/FanModule.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/FocusModule.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/FocusModule.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/HumanInterfaceGate.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/HumanInterfaceGate.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ModItems.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ModItems.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/PCBTemplate.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/PCBTemplate.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ProcessingChip.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/ProcessingChip.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/QuaridiumIngot.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/QuaridiumIngot.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/SolderingIron.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/SolderingIron.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/SpacialFocusingModule.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/SpacialFocusingModule.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/Wrench.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/Wrench.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/satelliteFrame.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/satelliteFrame.java new file mode 100644 index 0000000..1c3ce75 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/moditems/satelliteFrame.java @@ -0,0 +1,16 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems; + +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModInfo; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference.ModBasicItemTemplate; + +import net.minecraft.item.Item; + +public class satelliteFrame extends ModBasicItemTemplate { + byte tier; + public satelliteFrame(byte tier) { + this.tier = tier; + + setTextureName(ModInfo.MODID + ":" + getUnlocalizedName().substring(5) + "T" + tier); + } + +} diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/packets/ASUCoreTogglePacket.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/packets/ASUCoreTogglePacket.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/proxy/ClientProxy.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/proxy/ClientProxy.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/proxy/CommonProxy.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/proxy/CommonProxy.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ASUCrafting.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ASUCrafting.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ASURegistryHelper.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ASURegistryHelper.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ModCreativeTabs.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ModCreativeTabs.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ModInfo.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/ModInfo.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ItemBlockMaterial.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ItemBlockMaterial.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModBasicItemTemplate.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModBasicItemTemplate.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModBasicMachineBlock.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModBasicMachineBlock.java new file mode 100644 index 0000000..5429413 --- /dev/null +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModBasicMachineBlock.java @@ -0,0 +1,72 @@ +package org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference; + +import org.bitbucket.alltra101ify.advancedsatelliteutilization.AdvancedSatelliteUtilization; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modGUIs.ModGUIs; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.ModBlocks; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityEnderCoreGenerator; +import org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems.ModItems; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; +import net.minecraft.world.World; + +public abstract class ModBasicMachineBlock extends Block { + protected ModBasicMachineBlock(Material material) { + super(material); + } + /** + * + * @param player EntityPlayer + * @param world world + * @param x x coordinate + * @param y y coordinate + * @param z z coordinate + * @param multiblock if this is a multiblock or not. If does not belong to a multiblock, always true. + * @param currentPower current power of the block. For debugging purposes. + * @param scale percentage of power + * @param itemtogive item to return when using wrench to break + * @return returns 1 on array [1] on servers if it is valid for opening gui while 2 is for destroying and giving item to player. array [0] is to set the new power. + */ + public int[] wrenched(EntityPlayer player, World world, int x, int y, int z, boolean multiblock, int currentPower, byte scale, ItemStack itemtogive) { + int[] info = new int[2]; + info[0] = currentPower; + info[1] = 0; + + if (player.getCurrentEquippedItem().stackTagCompound != null) { + byte mode = player.getCurrentEquippedItem().stackTagCompound.getByte("Mode"); + + switch (mode) { + case 0: + if (!world.isRemote && multiblock == true && world.getTileEntity(x, y, z) != null) { + info[1] = 1; + } + break; + + case 1: info[1] = 2; world.setBlockToAir(x, y, z); world.removeTileEntity(x, y, z); player.inventory.addItemStackToInventory(itemtogive); + break; + + case 2: info[0] += 100; if(world.isRemote) {player.addChatMessage(new ChatComponentText("added 100 power. " + "Current power: " + info[0]));}; + break; + + case 3: if(world.isRemote) {player.addChatMessage(new ChatComponentText("Current power: " + currentPower));} + break; + + case 4: if(world.isRemote) {player.addChatMessage(new ChatComponentText("Current percentage calculation: " + scale));} + break; + + case 5: info[0] -= 100; if(world.isRemote) {player.addChatMessage(new ChatComponentText("removed 100 power. " + "Current power: " + info[0]));}; + break; + } + + } + return info; + } + +} + diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModMachineBlock.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModMachineBlock.java old mode 100644 new mode 100755 index d2b72ff..798f58b --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModMachineBlock.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/ModMachineBlock.java @@ -21,7 +21,6 @@ public abstract class ModMachineBlock extends BlockContainer { super(material); } /** - * * @param player EntityPlayer * @param world world * @param x x coordinate @@ -31,7 +30,7 @@ public abstract class ModMachineBlock extends BlockContainer { * @param currentPower current power of the block. For debugging purposes. * @param scale percentage of power * @param itemtogive item to return when using wrench to break - * @return returns 1 on array [1] on servers if it is valid for opening gui while 2 is for destroying and giving item to player. array [0] is to set the new power. + * @return returns 1 on array [1] on servers if it is valid for opening gui while 2 is for destroying and giving item to player. Array [0] is to set the new power. */ public int[] wrenched(EntityPlayer player, World world, int x, int y, int z, boolean multiblock, int currentPower, byte scale, ItemStack itemtogive) { int[] info = new int[2]; @@ -67,5 +66,4 @@ public abstract class ModMachineBlock extends BlockContainer { } return info; } - } diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/TileEntityGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/TileEntityGenerator.java old mode 100644 new mode 100755 index aebd9c2..b057953 --- a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/TileEntityGenerator.java +++ b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/reference/moditemblockreference/TileEntityGenerator.java @@ -23,7 +23,7 @@ public class TileEntityGenerator extends TileEntity implements ISidedInventory { public float FuelConversionSpeed, currentfuelqueue, currentPower; public float rotationX, rotationY, speed, speedSlower; Item[] validItemByItem; - String validItemByString, particle; + String validItemByString; protected int x, y, z; @Override public void updateEntity() { @@ -333,7 +333,6 @@ public class TileEntityGenerator extends TileEntity implements ISidedInventory { this.validItemByItem = item; } /** - * * @param string (should only be used for testing as there is very little control) Sets what is valid by name of item. */ public void itemValidityByString(String string) { @@ -353,10 +352,6 @@ public class TileEntityGenerator extends TileEntity implements ISidedInventory { this.z = z; } - public void setParticle(String particle) { - this.particle = particle; - } - @Override public void writeToNBT(NBTTagCompound var1) { var1.setFloat("rotationY", this.rotationY); diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderASUPedestal.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderASUPedestal.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderCoreStabilizer.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderCoreStabilizer.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderEnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderEnderCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderNetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/RenderNetherCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderASUPedestal.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderASUPedestal.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderCoreStabilizer.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderCoreStabilizer.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderEnderCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderEnderCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderNetherCoreGenerator.java b/src/main/java/org/bitbucket/alltra101ify/advancedsatelliteutilization/renderer/inventoryrender/ItemRenderNetherCoreGenerator.java old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/lang/en_US.lang b/src/main/resources/assets/asu/lang/en_US.lang old mode 100644 new mode 100755 index 41734ef..e262f14 --- a/src/main/resources/assets/asu/lang/en_US.lang +++ b/src/main/resources/assets/asu/lang/en_US.lang @@ -27,4 +27,6 @@ tile.BlockOfASHADWithQuaridium.name=Block of ASHAD with Quaridium tile.NetherCoreGenerator.name=Nether Core Generator tile.AdvancedWasteHandler_false.name=Advanced Waste Disposer tile.AdvancedWasteHandler_true.name=Advanced Waste Disposer +tile.FrameSupport.name=Frame Support +tile.FrameProjector_false.name=Frame Projector itemGroup.asu=Advanced Satellite Utilization \ No newline at end of file diff --git a/src/main/resources/assets/asu/textures/blocks/ASUPedestal.png b/src/main/resources/assets/asu/textures/blocks/ASUPedestal.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_bottom.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_bottom.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_front.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_front.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_sides.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_sides.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_top.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_false_top.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_bottom.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_bottom.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_front.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_front.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_front.png.mcmeta b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_front.png.mcmeta old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_sides.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_sides.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_sides.png.mcmeta b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_sides.png.mcmeta old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_top.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_top.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_top.png.mcmeta b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/AdvancedWasteHandler_true_top.png.mcmeta old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/BlockOfASHAD.png b/src/main/resources/assets/asu/textures/blocks/AdvancedWasteHandler/BlockOfASHAD.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/B-Lock-er.png b/src/main/resources/assets/asu/textures/blocks/B-Lock-er.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/BlockOfASHAD.png b/src/main/resources/assets/asu/textures/blocks/BlockOfASHAD.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/BlockOfASHADWithQuaridium.png b/src/main/resources/assets/asu/textures/blocks/BlockOfASHADWithQuaridium.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/CoreStabilizer.png b/src/main/resources/assets/asu/textures/blocks/CoreStabilizer.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/EnderCoreGenerator.png b/src/main/resources/assets/asu/textures/blocks/EnderCoreGenerator.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_false.png b/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_false.png new file mode 100644 index 0000000..b6d1602 Binary files /dev/null and b/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_false.png differ diff --git a/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_true.png b/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_true.png new file mode 100644 index 0000000..b431385 Binary files /dev/null and b/src/main/resources/assets/asu/textures/blocks/FrameProjector/FrameProjector_true.png differ diff --git a/src/main/resources/assets/asu/textures/blocks/FrameSupport.png b/src/main/resources/assets/asu/textures/blocks/FrameSupport.png new file mode 100644 index 0000000..65f2eac Binary files /dev/null and b/src/main/resources/assets/asu/textures/blocks/FrameSupport.png differ diff --git a/src/main/resources/assets/asu/textures/blocks/NetherCoreGenerator.png b/src/main/resources/assets/asu/textures/blocks/NetherCoreGenerator.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/QuaridiumOre.png b/src/main/resources/assets/asu/textures/blocks/QuaridiumOre.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/blocks/TransparentBlockOfASHAD.png b/src/main/resources/assets/asu/textures/blocks/TransparentBlockOfASHAD.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/gui/GUICoreGenerator.png b/src/main/resources/assets/asu/textures/gui/GUICoreGenerator.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/gui/GuiAdvancedWasteHandler.png b/src/main/resources/assets/asu/textures/gui/GuiAdvancedWasteHandler.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/gui/WrenchGUI.png b/src/main/resources/assets/asu/textures/gui/WrenchGUI.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/ASHADBrick.png b/src/main/resources/assets/asu/textures/items/ASHADBrick.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/AdvancedProcessingUnit.png b/src/main/resources/assets/asu/textures/items/AdvancedProcessingUnit.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/BasicProcessingChip.png b/src/main/resources/assets/asu/textures/items/BasicProcessingChip.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/ConversionSpeedUpgrade.png b/src/main/resources/assets/asu/textures/items/ConversionSpeedUpgrade.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/EarthTargetingFocus.png b/src/main/resources/assets/asu/textures/items/EarthTargetingFocus.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/IntermediateProcessingChip.png b/src/main/resources/assets/asu/textures/items/IntermediateProcessingChip.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate0.png b/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate0.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate1.png b/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate1.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate2.png b/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate2.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate3.png b/src/main/resources/assets/asu/textures/items/PCBTemplate/PCBTemplate3.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/QuaridiumIngot.png b/src/main/resources/assets/asu/textures/items/QuaridiumIngot.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/SolderingIron.png b/src/main/resources/assets/asu/textures/items/SolderingIron.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/SpacialFocusingModule.png b/src/main/resources/assets/asu/textures/items/SpacialFocusingModule.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/WrenchUtility.png b/src/main/resources/assets/asu/textures/items/WrenchUtility.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/fanModule.png b/src/main/resources/assets/asu/textures/items/fanModule.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/items/humaninterfacegate.png b/src/main/resources/assets/asu/textures/items/humaninterfacegate.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer0.png b/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer0.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer1.png b/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer1.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer2.png b/src/main/resources/assets/asu/textures/models/CoreStabilizer/ModelCoreStabilizer2.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/ModelASUPedestal.png b/src/main/resources/assets/asu/textures/models/ModelASUPedestal.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/ModelEnderCore.png b/src/main/resources/assets/asu/textures/models/ModelEnderCore.png old mode 100644 new mode 100755 diff --git a/src/main/resources/assets/asu/textures/models/ModelNetherCore.png b/src/main/resources/assets/asu/textures/models/ModelNetherCore.png old mode 100644 new mode 100755 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info old mode 100644 new mode 100755