Fixed code, changed textures, and more logic!
@ -18,6 +18,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public class GuiEnderCoreGenerator extends GuiContainer {
|
||||
|
||||
int scaledtobar, scaledtopercentage, scaledtofueltransfer, currentcooldown, currentpower;
|
||||
|
||||
private ResourceLocation resource = new ResourceLocation(ModInfo.MODID + ":" + "textures/gui/GuiCoreGenerator.png");
|
||||
private TileEntityEnderCoreGenerator tileentity;
|
||||
|
||||
@ -58,11 +60,11 @@ public class GuiEnderCoreGenerator extends GuiContainer {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
|
||||
this.mc.getTextureManager().bindTexture(resource);
|
||||
int scaledtobar = this.tileentity.powerScaled(100);
|
||||
int scaledtopercentage = this.tileentity.powerScaled(100);
|
||||
int scaledtofueltransfer = this.tileentity.genscaled(100);
|
||||
int cooldown = this.tileentity.cooldownscaled(100);
|
||||
int currentpower = this.tileentity.currentPower;
|
||||
scaledtobar = this.tileentity.powerScaled(100);
|
||||
scaledtopercentage = this.tileentity.powerScaled(100);
|
||||
scaledtofueltransfer = this.tileentity.genscaled(100);
|
||||
currentcooldown = this.tileentity.cooldownscaled(100);
|
||||
currentpower = this.tileentity.currentPower;
|
||||
int percentagefontcolor;
|
||||
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
@ -70,7 +72,7 @@ public class GuiEnderCoreGenerator extends GuiContainer {
|
||||
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8, 0, 149, scaledtobar, 16);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12, 100, 149, scaledtofueltransfer, 4);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12 + 3, 100, 149 + 4, cooldown, 3);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12 + 3, 100, 149 + 4, currentcooldown, 3);
|
||||
|
||||
|
||||
drawCenteredString(fontRendererObj, "Ender Core Generator", guiLeft+90, guiTop-10, 0xFFFFFF);
|
||||
@ -83,15 +85,10 @@ public class GuiEnderCoreGenerator extends GuiContainer {
|
||||
|
||||
drawString(fontRendererObj, scaledtofueltransfer + "% fuel", guiLeft+40, guiTop+38, percentagefontcolor);
|
||||
|
||||
if (mx >= guiLeft+7 && mx <= guiLeft +7+100 && my >= guiTop + 8 && my <= guiTop + 16 + 8) {
|
||||
if (mx >= guiLeft+7 && mx <= guiLeft +7+100 && my >= guiTop +8 && my <= guiTop + 16 +8) {
|
||||
|
||||
drawString(fontRendererObj, "Current MoE: " + currentpower, mx+10, my, 0xa8a8a8);
|
||||
drawString(fontRendererObj, "MoE: " + currentpower + "/" + tileentity.maxpower, guiLeft+12, guiTop+12, 0xa8a8a8);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mx, int my) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiNetherCoreGenerator extends GuiContainer {
|
||||
int scaledtobar, scaledtopercentage, scaledtofueltransfer, currentcooldown, currentpower;
|
||||
|
||||
private ResourceLocation resource = new ResourceLocation(ModInfo.MODID + ":" + "textures/gui/GUICoreGenerator.png");
|
||||
private TileEntityNetherCoreGenerator tileentity;
|
||||
|
||||
@ -56,24 +58,23 @@ public class GuiNetherCoreGenerator extends GuiContainer {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
|
||||
this.mc.getTextureManager().bindTexture(resource);
|
||||
int scaledtobar = this.tileentity.powerScaled(100);
|
||||
int scaledtopercentage = this.tileentity.powerScaled(100);
|
||||
int scaledtofueltransfer = this.tileentity.genscaled(100);
|
||||
int cooldown = this.tileentity.cooldownscaled(100);
|
||||
int currentpower = this.tileentity.currentPower;
|
||||
scaledtobar = this.tileentity.powerScaled(100);
|
||||
scaledtopercentage = this.tileentity.powerScaled(100);
|
||||
scaledtofueltransfer = this.tileentity.genscaled(100);
|
||||
currentcooldown = this.tileentity.cooldownscaled(100);
|
||||
currentpower = this.tileentity.currentPower;
|
||||
int percentagefontcolor;
|
||||
int White;
|
||||
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8, 0, 149, scaledtobar, 16);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12, 100, 149, scaledtofueltransfer, 4);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12 + 3, 100, 149 + 4, cooldown, 3);
|
||||
drawTexturedModalRect(guiLeft+7, guiTop+8 + 12 + 3, 100, 149 + 4, currentcooldown, 3);
|
||||
|
||||
|
||||
drawCenteredString(fontRendererObj, "Nether Core Generator", guiLeft+90, guiTop-10, 0xFFFFFF);
|
||||
if (currentpower ==0) {
|
||||
if (currentpower == 0) {
|
||||
percentagefontcolor = 0xFF0000;
|
||||
} else {
|
||||
percentagefontcolor = 1111111;
|
||||
@ -83,8 +84,7 @@ public class GuiNetherCoreGenerator extends GuiContainer {
|
||||
drawString(fontRendererObj, scaledtofueltransfer + "% fuel", guiLeft+40, guiTop+38, percentagefontcolor);
|
||||
|
||||
if (mx >= guiLeft+7 && mx <= guiLeft +7+100 && my >= guiTop +8 && my <= guiTop + 16 +8) {
|
||||
|
||||
drawString(fontRendererObj, "Current MoE: " + currentpower + "/" + tileentity.maxpower, mx+10, my, 0xa8a8a8);
|
||||
drawString(fontRendererObj, "MoE: " + currentpower + "/" + tileentity.maxpower, guiLeft+12, guiTop+12, 0xa8a8a8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,26 +61,13 @@ public class CoreStabilizer extends ModMachineBlock {
|
||||
}
|
||||
|
||||
public void isMultBlock(World world, int x, int y, int z) {
|
||||
|
||||
if (world.getTileEntity(x, y+1, z) instanceof TileEntityCoreGenerator) {
|
||||
world.scheduleBlockUpdate(x, y+1, z, world.getBlock(x, y+1, z), 0);
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).version = 2;
|
||||
if (((TileEntityCoreGenerator)world.getTileEntity(x, y+1, z)).multiblock == true) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).multiblock = true;
|
||||
} else {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).multiblock = false;
|
||||
}
|
||||
} else if (world.getTileEntity(x, y-1, z) instanceof TileEntityCoreGenerator) {
|
||||
world.scheduleBlockUpdate(x, y-1, z, world.getBlock(x, y-1, z), 0);
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).version = 1;
|
||||
if (((TileEntityCoreGenerator)world.getTileEntity(x, y-1, z)).multiblock == true) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).multiblock = true;
|
||||
} else {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).multiblock = false;
|
||||
}
|
||||
} else {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y, z)).version = 0;
|
||||
}
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.AdvancedSatelliteUtilization;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modGUIs.ModGUIs;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityCoreStabilizer;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityEnderCoreGenerator;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems.ModItems;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.ModCreativeTabs;
|
||||
@ -41,6 +42,12 @@ public class EnderCoreGenerator extends ModMachineBlock {
|
||||
this.isBlockContainer = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
((TileEntityCoreGenerator)world.getTileEntity(x, y, z)).setCoords(x, y, z);
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int var) {
|
||||
return new TileEntityEnderCoreGenerator();
|
||||
@ -81,8 +88,22 @@ public class EnderCoreGenerator extends ModMachineBlock {
|
||||
public void isMultiBlock(World world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y+1, z) == ModBlocks.CoreStabilizer && world.getBlock(x, y-1, z) == ModBlocks.CoreStabilizer && world.getBlock(x, y-2, z) == ModBlocks.blockofashadwithquaridium && world.getBlock(x, y+2, z) == ModBlocks.blockofashadwithquaridium) {
|
||||
((TileEntityEnderCoreGenerator)world.getTileEntity(x, y, z)).multiblock = true;
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y+1, z)).multiblock = true;
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y-1, z)).multiblock = true;
|
||||
world.markBlockForUpdate(x, y+1, z);
|
||||
world.markBlockForUpdate(x, y-1, z);
|
||||
} else {
|
||||
((TileEntityEnderCoreGenerator)world.getTileEntity(x, y, z)).multiblock = false;
|
||||
if (world.getTileEntity(x, y+1, z) instanceof TileEntityCoreStabilizer) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y+1, z)).multiblock = false;
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y+1, z)).version = 0;
|
||||
world.markBlockForUpdate(x, y+1, z);
|
||||
}
|
||||
if (world.getTileEntity(x, y-1, z) instanceof TileEntityCoreStabilizer) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y-1, z)).multiblock = false;
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y-1, z)).version = 0;
|
||||
world.markBlockForUpdate(x, y-1, z);
|
||||
}
|
||||
}
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.AdvancedSatelliteUtilization;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modGUIs.ModGUIs;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityCoreStabilizer;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityEnderCoreGenerator;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities.TileEntityNetherCoreGenerator;
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems.ModItems;
|
||||
@ -37,7 +38,6 @@ public class NetherCoreGenerator extends ModMachineBlock {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int var) {
|
||||
// TODO Auto-generated method stub
|
||||
return new TileEntityNetherCoreGenerator();
|
||||
}
|
||||
|
||||
@ -53,6 +53,12 @@ public class NetherCoreGenerator extends ModMachineBlock {
|
||||
super.updateTick(world, x, y, z, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
((TileEntityCoreGenerator)world.getTileEntity(x, y, z)).setCoords(x, y, z);
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == ModItems.wrench) {
|
||||
@ -74,9 +80,20 @@ public class NetherCoreGenerator extends ModMachineBlock {
|
||||
public void isMultiBlock(World world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y+1, z) == ModBlocks.CoreStabilizer && world.getBlock(x, y-1, z) == ModBlocks.CoreStabilizer && world.getBlock(x, y-2, z) == ModBlocks.blockofashadwithquaridium && world.getBlock(x, y+2, z) == ModBlocks.blockofashadwithquaridium) {
|
||||
((TileEntityNetherCoreGenerator)world.getTileEntity(x, y, z)).multiblock = true;
|
||||
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y+1, z)).multiblock = true;
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y-1, z)).multiblock = true;
|
||||
world.markBlockForUpdate(x, y+1, z);
|
||||
world.markBlockForUpdate(x, y-1, z);
|
||||
} else {
|
||||
((TileEntityNetherCoreGenerator)world.getTileEntity(x, y, z)).multiblock = false;
|
||||
if (world.getTileEntity(x, y+1, z) instanceof TileEntityCoreStabilizer) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y+1, z)).multiblock = false;
|
||||
world.markBlockForUpdate(x, y+1, z);
|
||||
}
|
||||
if (world.getTileEntity(x, y-1, z) instanceof TileEntityCoreStabilizer) {
|
||||
((TileEntityCoreStabilizer)world.getTileEntity(x, y-1, z)).multiblock = false;
|
||||
world.markBlockForUpdate(x, y-1, z);
|
||||
}
|
||||
}
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.bitbucket.alltra101ify.advancedsatelliteutilization.modblocks.tileentities;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
@ -9,10 +8,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityCoreStabilizer extends TileEntity {
|
||||
World world;
|
||||
|
||||
public TileEntityCoreStabilizer(World world) {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public TileEntityCoreStabilizer() {
|
||||
@ -21,29 +18,18 @@ public class TileEntityCoreStabilizer extends TileEntity {
|
||||
public float rotationY;
|
||||
float speed;
|
||||
|
||||
|
||||
|
||||
public boolean onOff = false;
|
||||
|
||||
public boolean multiblock;
|
||||
|
||||
public byte version;
|
||||
|
||||
public boolean multiblock;
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if (!multiblock && onOff) {
|
||||
onOff = false;
|
||||
}
|
||||
|
||||
rotationY += speed;
|
||||
if (rotationY >= 6.3f) {
|
||||
rotationY = 0f;
|
||||
}
|
||||
|
||||
if (onOff && speed < 0.055f) {
|
||||
if (multiblock && speed < 0.08f) {
|
||||
speed += 0.001f;
|
||||
} else if (onOff == false && speed > 0f) {
|
||||
} else if (multiblock == false && speed > 0f) {
|
||||
speed -= 0.001f;
|
||||
}
|
||||
|
||||
@ -53,7 +39,7 @@ public class TileEntityCoreStabilizer extends TileEntity {
|
||||
public void readFromNBT(NBTTagCompound var1) {
|
||||
this.rotationY = var1.getFloat("rotationY");
|
||||
this.speed = var1.getFloat("speed");
|
||||
this.onOff = var1.getBoolean("onOff");
|
||||
this.multiblock = var1.getBoolean("multiblock");
|
||||
super.readFromNBT(var1);
|
||||
}
|
||||
|
||||
@ -61,7 +47,7 @@ public class TileEntityCoreStabilizer extends TileEntity {
|
||||
public void writeToNBT(NBTTagCompound var1) {
|
||||
var1.setFloat("rotationY", this.rotationY);
|
||||
var1.setFloat("speed", this.speed);
|
||||
var1.setBoolean("onOff", this.onOff);
|
||||
var1.setBoolean("multiblock", this.multiblock);
|
||||
super.writeToNBT(var1);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
public class TileEntityEnderCoreGenerator extends TileEntityCoreGenerator implements ISidedInventory {
|
||||
int[] fuelqueue;
|
||||
|
||||
public TileEntityEnderCoreGenerator() {
|
||||
fuelqueue = new int[1];
|
||||
fuelqueue[0] = 100;
|
||||
|
@ -13,15 +13,13 @@ public class TileEntityNetherCoreGenerator extends TileEntityCoreGenerator imple
|
||||
Item[] item;
|
||||
int[] fuel;
|
||||
public TileEntityNetherCoreGenerator() {
|
||||
|
||||
fuel = new int[1];
|
||||
item = new Item[1];
|
||||
fuel[0] = 110;
|
||||
item[0] = Items.blaze_rod;
|
||||
|
||||
setParticle("flame");
|
||||
configureVars(fuel, 30000, 125);
|
||||
ItemValidityByItem(item);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,35 +27,13 @@ public class Wrench extends Item {
|
||||
setCreativeTab(ModCreativeTabs.TabASU);
|
||||
setUnlocalizedName("WrenchUtility");
|
||||
setMaxStackSize(1);
|
||||
setTextureName(ModInfo.MODID + ":" + getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
iconArray = new IIcon[2];
|
||||
|
||||
for (int i = 0; i < iconArray.length; ++i) {
|
||||
iconArray[i] = register.registerIcon(ModInfo.MODID + ":" + "WrenchUtility/" + getUnlocalizedName().substring(5) + i);
|
||||
}
|
||||
|
||||
this.itemIcon = iconArray[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.getByte("Mode") == -1) {
|
||||
return iconArray[0];
|
||||
} else if (stack.stackTagCompound != null && stack.stackTagCompound.getByte("Mode") != -1) {
|
||||
return iconArray[1];
|
||||
}
|
||||
return iconArray[0];
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
NBTSetup(itemstack, world, player);
|
||||
|
@ -45,7 +45,7 @@ public class ASUCoreTogglePacket implements IMessage {
|
||||
@Override
|
||||
public IMessage onMessage(ASUCoreTogglePacket message, MessageContext ctx) {
|
||||
TileEntity tileentity = ctx.getServerHandler().playerEntity.getEntityWorld().getTileEntity(message.x, message.y, message.z);
|
||||
if (message.toggle == 1) {
|
||||
if (tileentity instanceof TileEntityCoreGenerator && message.toggle == 1) {
|
||||
((TileEntityCoreGenerator)tileentity).toggle = true;
|
||||
} else {
|
||||
((TileEntityCoreGenerator)tileentity).toggle = false;
|
||||
|
@ -1,5 +1,7 @@
|
||||
package org.bitbucket.alltra101ify.advancedsatelliteutilization.reference.moditemblockreference;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bitbucket.alltra101ify.advancedsatelliteutilization.moditems.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -15,38 +17,13 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityCoreGenerator extends TileEntity implements ISidedInventory {
|
||||
protected ItemStack[] items = new ItemStack[4];
|
||||
|
||||
public boolean inputItems;
|
||||
public boolean outputPower;
|
||||
|
||||
public boolean toggle;
|
||||
|
||||
public boolean multiblock;
|
||||
|
||||
public boolean toggle, multiblock;
|
||||
protected String customName;
|
||||
|
||||
protected int currentfuelqueue;
|
||||
|
||||
private int fuelqueue[];
|
||||
|
||||
public float rotationY;
|
||||
|
||||
public float rotationX;
|
||||
|
||||
public int maxpower;
|
||||
|
||||
public int currentPower;
|
||||
|
||||
protected float speed;
|
||||
|
||||
protected float speedSlower;
|
||||
|
||||
protected int cooldown;
|
||||
|
||||
public int currentcooldown;
|
||||
|
||||
public int currentfuelqueue, maxpower, currentPower, cooldown, currentcooldown, fuelqueue[];
|
||||
public float rotationX, rotationY, speed, speedSlower;
|
||||
Item[] validItemByItem;
|
||||
String validItemByString;
|
||||
String validItemByString, particle;
|
||||
protected int x, y, z;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
@ -74,11 +51,9 @@ public class TileEntityCoreGenerator extends TileEntity implements ISidedInvento
|
||||
}
|
||||
|
||||
if (currentPower >= maxpower) {
|
||||
inputItems = false;
|
||||
currentPower = maxpower;
|
||||
}
|
||||
if (currentPower <= 0) {
|
||||
outputPower = false;
|
||||
currentPower = 0;
|
||||
}
|
||||
|
||||
@ -86,7 +61,7 @@ public class TileEntityCoreGenerator extends TileEntity implements ISidedInvento
|
||||
//Register fuel and such using item and fuel index system
|
||||
if (items[0] != null && this.validItemByItem != null) {
|
||||
for (int i = 0; i < validItemByItem.length; i++) {
|
||||
if (currentfuelqueue <= maxpower - fuelqueue[i] && currentcooldown == 0 && items[0].getItem() == validItemByItem[i]) {
|
||||
if (currentcooldown == 0 && currentfuelqueue <= maxpower - fuelqueue[i] && items[0].getItem() == validItemByItem[i]) {
|
||||
if (items[0].stackSize == 1) {
|
||||
this.items[0] = null;
|
||||
} else {
|
||||
@ -145,7 +120,6 @@ public class TileEntityCoreGenerator extends TileEntity implements ISidedInvento
|
||||
|
||||
} else if (toggle == false && speed > 0f) {
|
||||
speed -= 0.0005f;
|
||||
|
||||
speedSlower -= 0.00007f;
|
||||
|
||||
}
|
||||
@ -352,5 +326,21 @@ public class TileEntityCoreGenerator extends TileEntity implements ISidedInvento
|
||||
this.validItemByString = string;
|
||||
}
|
||||
|
||||
}
|
||||
public int RetrievePower (int amountofpower) {
|
||||
if (currentPower >= amountofpower) {
|
||||
currentPower = currentPower - amountofpower;
|
||||
}
|
||||
return amountofpower;
|
||||
}
|
||||
|
||||
public void setCoords(int x, int y, int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public void setParticle(String particle) {
|
||||
this.particle = particle;
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,7 @@ public class RenderCoreStabilizer extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glTranslatef((float) x + 0.5f, (float) y + 1.5f, (float) z + 0.5f);
|
||||
GL11.glRotatef(180, 0f, 0f, 1f);
|
||||
this.bindTexture(texture[tileentity.version]);
|
||||
this.bindTexture(texture[1]);
|
||||
|
||||
modelASU.renderModel(0.0625f);
|
||||
|
||||
@ -35,9 +35,9 @@ public class RenderCoreStabilizer extends TileEntitySpecialRenderer {
|
||||
}
|
||||
|
||||
public RenderCoreStabilizer() {
|
||||
texture[0] = new ResourceLocation(ModInfo.MODID + ":" + "/textures/models/CoreStabilizer/ModelCoreStabilizer0.png");
|
||||
texture[1] = new ResourceLocation(ModInfo.MODID + ":" + "/textures/models/CoreStabilizer/ModelCoreStabilizer1.png");
|
||||
texture[2] = new ResourceLocation(ModInfo.MODID + ":" + "/textures/models/CoreStabilizer/ModelCoreStabilizer2.png");
|
||||
for (int i = 0; i < texture.length; i++) {
|
||||
texture[i] = new ResourceLocation(ModInfo.MODID + ":" + "/textures/models/CoreStabilizer/ModelCoreStabilizer" + i +".png");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 261 B |
BIN
src/main/resources/assets/asu/textures/items/WrenchUtility.png
Normal file
After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 1.9 KiB |
@ -1,38 +0,0 @@
|
||||
{
|
||||
"animation": {
|
||||
"frames": [
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15
|
||||
]
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 262 B |