the lord yeeteth
and the lord yoinketh away
@ -100,7 +100,7 @@ public interface IEnergyConnector extends ILoadedTile {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = true;
|
||||
public static final boolean particleDebug = false;
|
||||
|
||||
public default Vec3 getDebugParticlePos() {
|
||||
TileEntity te = (TileEntity) this;
|
||||
|
||||
@ -87,5 +87,5 @@ public interface IFluidConnector {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = true;
|
||||
public static final boolean particleDebug = false;
|
||||
}
|
||||
|
||||
@ -277,8 +277,6 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
||||
MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + x + " / " + y + " / " + z + " to " + xCoord + " / " + zCoord + "!");
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
}
|
||||
|
||||
if(entity.slots[0] != null && entity.slots[0].getItem() == ModItems.missile_carrier && entity.power >= 75000) {
|
||||
|
||||
@ -8,6 +8,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineAssemfac extends BlockDummyable {
|
||||
|
||||
@ -36,4 +37,27 @@ public class MachineAssemfac extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX * 2, y, z + dir.offsetZ * 3 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX * 3, y, z + dir.offsetZ * 3 - rot.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 + rot.offsetX * 2, y, z - dir.offsetZ * 4 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 - rot.offsetX * 3, y, z - dir.offsetZ * 4 - rot.offsetZ * 3);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * 2, y, z + rot.offsetZ * 3 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 - dir.offsetX * 3, y, z + rot.offsetZ * 3 - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * 2, y, z - rot.offsetZ * 4 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 - dir.offsetX * 3, y, z - rot.offsetZ * 4 - dir.offsetZ * 3);
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ public class GeneralConfig {
|
||||
|
||||
final String CATEGORY_LBSM = CommonConfig.CATEGORY_LBSM;
|
||||
|
||||
config.addCustomCategoryComment(CATEGORY_528,
|
||||
config.addCustomCategoryComment(CATEGORY_LBSM,
|
||||
"Will most likely break standard progression!\n"
|
||||
+ "However, the game gets generally easier and more enjoyable for casual players.\n"
|
||||
+ "Progression-braking recipes are usually not too severe, so the mode is generally server-friendly!");
|
||||
@ -109,7 +109,7 @@ public class GeneralConfig {
|
||||
enableLBSMUnlockAnvil = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeUnlockAnvil", "When enabled, all anvil recipes are available at tier 1", true);
|
||||
enableLBSMSimpleCrafting = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleCrafting", "When enabled, some uncraftable or more expansive items get simple crafting recipes. Scorched uranium also becomes washable", true);
|
||||
enableLBSMSimpleMedicineRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleMedicine", "When enabled, makes some medicine recipes (line ones that require bismuth) much more affordable", true);
|
||||
schrabRate = CommonConfig.createConfigInt(config, CATEGORY_528, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20);
|
||||
schrabRate = CommonConfig.createConfigInt(config, CATEGORY_LBSM, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20);
|
||||
|
||||
if(enable528) enableLBSM = false;
|
||||
}
|
||||
|
||||
@ -29,6 +29,11 @@ public class GUIAssemfac extends GuiInfoContainer {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 164, 16, 52, assemfac.power, assemfac.getMaxPower());
|
||||
|
||||
assemfac.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 209, guiTop + 181, 9, 54);
|
||||
assemfac.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 218, guiTop + 181, 9, 54);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
|
||||
@ -67,8 +72,8 @@ public class GUIAssemfac extends GuiInfoContainer {
|
||||
if(assemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 150, 0, 219, 9, 12);
|
||||
|
||||
assemfac.water.renderTank(guiLeft + 234, guiTop + 161, this.zLevel, 7, 52);
|
||||
assemfac.steam.renderTank(guiLeft + 243, guiTop + 161, this.zLevel, 7, 52);
|
||||
assemfac.water.renderTank(guiLeft + 210, guiTop + 234, this.zLevel, 7, 52);
|
||||
assemfac.steam.renderTank(guiLeft + 219, guiTop + 234, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
|
||||
@ -84,6 +84,7 @@ public class ResourceManager {
|
||||
//Turbofan
|
||||
public static final IModelCustom turbofan_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turbofan_body.obj"));
|
||||
public static final IModelCustom turbofan_blades = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turbofan_blades.obj"));
|
||||
public static final IModelCustom turbofan = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/turbofan.obj"));
|
||||
|
||||
//Large Turbine
|
||||
public static final IModelCustom turbine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/turbine.obj"));
|
||||
@ -301,6 +302,7 @@ public class ResourceManager {
|
||||
////Textures TEs
|
||||
|
||||
public static final ResourceLocation universal = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
|
||||
public static final ResourceLocation universal_bright = new ResourceLocation(RefStrings.MODID, "textures/models/turbofan_blades.png");
|
||||
|
||||
public static final ResourceLocation turret_heavy_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turret_heavy_base.png");
|
||||
|
||||
@ -378,8 +380,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation orbus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/orbus.png");
|
||||
|
||||
//Turbofan
|
||||
public static final ResourceLocation turbofan_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turbofan_body.png");
|
||||
public static final ResourceLocation turbofan_blades_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turbofan_blades.png");
|
||||
public static final ResourceLocation turbofan_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/turbofan.png");
|
||||
public static final ResourceLocation turbofan_back_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/turbofan_back.png");
|
||||
|
||||
//Large Turbine
|
||||
public static final ResourceLocation turbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/turbine.png");
|
||||
|
||||
@ -35,7 +35,7 @@ public class RenderBalls extends Render {
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return ResourceManager.turbofan_blades_tex;
|
||||
return ResourceManager.universal_bright;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ public class ItemRenderLibrary {
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.cyclotron_tex); ResourceManager.cyclotron.renderPart("Body");
|
||||
bindTexture(ResourceManager.cyclotron_ashes); ResourceManager.cyclotron.renderPart("B1");
|
||||
bindTexture(ResourceManager.cyclotron_book); ResourceManager.cyclotron.renderPart("B2");
|
||||
bindTexture(ResourceManager.cyclotron_gavel); ResourceManager.cyclotron.renderPart("B3");
|
||||
bindTexture(ResourceManager.cyclotron_coin); ResourceManager.cyclotron.renderPart("B4");
|
||||
bindTexture(ResourceManager.cyclotron_tex); ResourceManager.cyclotron.renderPart("Body");
|
||||
bindTexture(ResourceManager.cyclotron_ashes); ResourceManager.cyclotron.renderPart("B1");
|
||||
bindTexture(ResourceManager.cyclotron_book); ResourceManager.cyclotron.renderPart("B2");
|
||||
bindTexture(ResourceManager.cyclotron_gavel); ResourceManager.cyclotron.renderPart("B3");
|
||||
bindTexture(ResourceManager.cyclotron_coin); ResourceManager.cyclotron.renderPart("B4");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
@ -149,7 +149,7 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.turbine_tex); ResourceManager.turbine.renderPart("Body");
|
||||
bindTexture(ResourceManager.turbofan_blades_tex); ResourceManager.turbine.renderPart("Blades");
|
||||
bindTexture(ResourceManager.universal_bright); ResourceManager.turbine.renderPart("Blades");
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
@ -381,9 +381,13 @@ public class ItemRenderLibrary {
|
||||
GL11.glScaled(2, 2, 2);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.turbofan_body_tex); ResourceManager.turbofan_body.renderAll();
|
||||
GL11.glTranslated(0, 1.5, 0);
|
||||
bindTexture(ResourceManager.turbofan_blades_tex); ResourceManager.turbofan_blades.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.turbofan_tex);
|
||||
ResourceManager.turbofan.renderPart("Body");
|
||||
ResourceManager.turbofan.renderPart("Blades");
|
||||
bindTexture(ResourceManager.turbofan_back_tex);
|
||||
ResourceManager.turbofan.renderPart("Afterburner");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.plasma_heater), new ItemRenderBase() {
|
||||
@ -1286,6 +1290,23 @@ public class ItemRenderLibrary {
|
||||
ResourceManager.charger.renderPart("Slide");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_assemfac), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.assemfac_tex); ResourceManager.assemfac.renderPart("Factory");
|
||||
for(int i = 1; i < 7; i++) {
|
||||
ResourceManager.assemfac.renderPart("Pivot" + i);
|
||||
ResourceManager.assemfac.renderPart("Arm" + i);
|
||||
ResourceManager.assemfac.renderPart("Piston" + i);
|
||||
ResourceManager.assemfac.renderPart("Striker" + i);
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
}
|
||||
|
||||
private static void bindTexture(ResourceLocation res) {
|
||||
|
||||
@ -48,7 +48,7 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hk69_tex);
|
||||
|
||||
if(item.getItem() == ModItems.gun_deagle)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.universal_bright);
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ks23_tex);
|
||||
|
||||
@ -34,8 +34,8 @@ public class RenderAssemfac extends TileEntitySpecialRenderer {
|
||||
bindTexture(ResourceManager.assemfac_tex);
|
||||
ResourceManager.assemfac.renderPart("Factory");
|
||||
|
||||
double rot = Math.sin((double)(System.currentTimeMillis() / 500D)) * 25 - 20;
|
||||
double rot2 = Math.sin((double)(System.currentTimeMillis() / 400D)) * 10;
|
||||
//double rot = Math.sin((double)(System.currentTimeMillis() / 500D)) * 25 - 20;
|
||||
//double rot2 = Math.sin((double)(System.currentTimeMillis() / 400D)) * 10;
|
||||
double hOff;
|
||||
double sOff;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ public class RenderBigTurbine extends TileEntitySpecialRenderer {
|
||||
GL11.glRotatef(turbine.lastRotor + (turbine.rotor - turbine.lastRotor) * f, 0, 0, 1);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
|
||||
bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
bindTexture(ResourceManager.universal_bright);
|
||||
ResourceManager.turbine.renderPart("Blades");
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
@ -9,65 +9,40 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderTurbofan extends TileEntitySpecialRenderer {
|
||||
|
||||
public RenderTurbofan() { }
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
public RenderTurbofan() {
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.turbofan_body_tex);
|
||||
|
||||
ResourceManager.turbofan_body.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderTileEntityAt2(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(tileEntity instanceof TileEntityMachineTurbofan)
|
||||
GL11.glRotatef(((TileEntityMachineTurbofan)tileEntity).spin, 0F, 0F, -1F);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
|
||||
switch(tileEntity.getBlockMetadata()) {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
ResourceManager.turbofan_blades.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.turbofan_tex);
|
||||
ResourceManager.turbofan.renderPart("Body");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.5, 0);
|
||||
GL11.glRotated(((TileEntityMachineTurbofan) tileEntity).spin, 0, 0, 1);
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
ResourceManager.turbofan.renderPart("Blades");
|
||||
GL11.glPopMatrix();
|
||||
bindTexture(ResourceManager.turbofan_back_tex);
|
||||
ResourceManager.turbofan.renderPart("Afterburner");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ public class ErrorPronter {
|
||||
GL11.glScaled(2, 2, 2);
|
||||
|
||||
GL11.glColor3d(Math.sin(System.currentTimeMillis() % 1000 / 1000D * Math.PI) * 0.5 + 0.5, 0.0, 0.0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.universal_bright);
|
||||
ResourceManager.error.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
@ -11,7 +11,9 @@ import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBase implements IEnergyUser {
|
||||
@ -44,17 +46,8 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
//loadItems(i);
|
||||
//unloadItems(i);
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
|
||||
/*for(FluidTank tank : this.outTanks()) {
|
||||
if(tank.getTankType() != Fluids.NONE && tank.getFill() > 0) {
|
||||
this.fillFluidInit(tank.getTankType());
|
||||
}
|
||||
}*/
|
||||
loadItems(i);
|
||||
unloadItems(i);
|
||||
}
|
||||
|
||||
|
||||
@ -141,6 +134,107 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa
|
||||
InventoryUtil.tryAddItemToInventory(slots, indices[2], indices[2], out.copy());
|
||||
}
|
||||
}
|
||||
|
||||
private void loadItems(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.assembly_template)
|
||||
return;
|
||||
|
||||
List<AStack> recipe = AssemblerRecipes.getRecipeFromTempate(slots[template]);
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
ChunkCoordinates[] positions = getInputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ChunkCoordinates coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
for(AStack ingredient : recipe) {
|
||||
|
||||
if(!InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], ingredient)) {
|
||||
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(ingredient.matchesRecipe(stack, true)) {
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(i, 1);
|
||||
slots[j].stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems(int index) {
|
||||
|
||||
ChunkCoordinates[] positions = getOutputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ChunkCoordinates coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
int i = indices[2];
|
||||
|
||||
ItemStack out = slots[i];
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
ItemStack target = inv.getStackInSlot(j);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
|
||||
if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) {
|
||||
ItemStack copy = out.copy();
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(j, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
|
||||
@ -67,6 +67,10 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im
|
||||
this.speed /= (overLevel + 1);
|
||||
this.consumption *= (overLevel + 1);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.sendFluid(steam.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", this.power);
|
||||
data.setIntArray("progress", this.progress);
|
||||
@ -100,6 +104,22 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im
|
||||
steam.readFromNBT(nbt, "s");
|
||||
}
|
||||
|
||||
private int getWaterRequired() {
|
||||
return 1000 / this.speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canProcess(int index) {
|
||||
return super.canProcess(index) && this.water.getFill() >= getWaterRequired() && this.steam.getFill() + getWaterRequired() <= this.steam.getMaxFill();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void process(int index) {
|
||||
super.process(index);
|
||||
this.water.setFill(this.water.getFill() - getWaterRequired());
|
||||
this.steam.setFill(this.steam.getFill() + getWaterRequired());
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
|
||||
@ -3,11 +3,13 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -42,6 +44,22 @@ public class TileEntityTowerSmall extends TileEntityCondenser {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscribeToAllAround(FluidType type, TileEntity te) {
|
||||
this.trySubscribe(this.tanks[0].getTankType(), worldObj, xCoord + 3, yCoord, zCoord, Library.POS_X);
|
||||
this.trySubscribe(this.tanks[0].getTankType(), worldObj, xCoord - 3, yCoord, zCoord, Library.NEG_X);
|
||||
this.trySubscribe(this.tanks[0].getTankType(), worldObj, xCoord, yCoord, zCoord + 3, Library.POS_Z);
|
||||
this.trySubscribe(this.tanks[0].getTankType(), worldObj, xCoord, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendFluidToAll(FluidType type, TileEntity te) {
|
||||
this.sendFluid(this.tanks[1].getTankType(), worldObj, xCoord + 3, yCoord, zCoord, Library.POS_X);
|
||||
this.sendFluid(this.tanks[1].getTankType(), worldObj, xCoord - 3, yCoord, zCoord, Library.NEG_X);
|
||||
this.sendFluid(this.tanks[1].getTankType(), worldObj, xCoord, yCoord, zCoord + 3, Library.POS_Z);
|
||||
this.sendFluid(this.tanks[1].getTankType(), worldObj, xCoord, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
|
||||
@ -3300,6 +3300,7 @@ tile.machine_arc_furnace_off.name=Lichtbogenofen
|
||||
tile.machine_arc_furnace_on.name=Lichtbogenofen
|
||||
tile.machine_armor_table.name=Rüstungsmodifikationstisch
|
||||
tile.machine_assembler.name=Fertigungsmaschine
|
||||
tile.machine_assemfac.name=Fertigungsfabrik
|
||||
tile.machine_bat9000.name=Big-Ass Tank 9000
|
||||
tile.machine_battery.name=Energiespeicherblock
|
||||
tile.machine_battery_potato.name=Kartoffelbatterieblock
|
||||
|
||||
@ -3692,6 +3692,7 @@ tile.machine_arc_furnace_off.name=Arc Furnace
|
||||
tile.machine_arc_furnace_on.name=Arc Furnace
|
||||
tile.machine_armor_table.name=Armor Modification Table
|
||||
tile.machine_assembler.name=Assembly Machine
|
||||
tile.machine_assemfac.name=Assembly Factory
|
||||
tile.machine_bat9000.name=Big-Ass Tank 9000
|
||||
tile.machine_battery.name=Energy Storage Block
|
||||
tile.machine_battery_potato.name=Potato Battery Block
|
||||
|
||||
9317
src/main/resources/assets/hbm/models/machines/turbofan.obj
Normal file
|
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 234 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 542 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 86 KiB |