mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-22 14:00:47 +00:00
yankee with no brim
This commit is contained in:
parent
a56397c8c7
commit
8087582519
@ -20,6 +20,7 @@
|
|||||||
* Increased the power draw on the osmiridium welding recipe
|
* Increased the power draw on the osmiridium welding recipe
|
||||||
* Bullet casings now make sounds when falling to the ground
|
* Bullet casings now make sounds when falling to the ground
|
||||||
* Most ammo types now have QMAW pages, including information on whether or not they are a war crime
|
* Most ammo types now have QMAW pages, including information on whether or not they are a war crime
|
||||||
|
* Both assembly and chemical factories now have four special ports that only allow items inserted to go into one recipe group
|
||||||
|
|
||||||
# Fixed
|
# Fixed
|
||||||
* Potentially fixed yet another issue regarding crates
|
* Potentially fixed yet another issue regarding crates
|
||||||
@ -34,3 +35,4 @@
|
|||||||
* Fixed arc furnace IO slots stacking items with incompatible NBT
|
* Fixed arc furnace IO slots stacking items with incompatible NBT
|
||||||
* Fixed a bounding box issue with casing particles, causing them to slide sideways on the first tick, making trajectories weird
|
* Fixed a bounding box issue with casing particles, causing them to slide sideways on the first tick, making trajectories weird
|
||||||
* Fixed some turrets not using the more modern casing spawner system which allows casings to have a smoke trail
|
* Fixed some turrets not using the more modern casing spawner system which allows casings to have a smoke trail
|
||||||
|
* Fixed incorrect tooltip on the upgrade stat screen for assembly factories
|
||||||
|
|||||||
@ -74,6 +74,7 @@ public class MachineAssemblyFactory extends BlockDummyable implements ITooltipPr
|
|||||||
TileEntityMachineAssemblyFactory assemfac = (TileEntityMachineAssemblyFactory) te;
|
TileEntityMachineAssemblyFactory assemfac = (TileEntityMachineAssemblyFactory) te;
|
||||||
|
|
||||||
DirPos[] cool = assemfac.getCoolPos();
|
DirPos[] cool = assemfac.getCoolPos();
|
||||||
|
DirPos[] io = assemfac.getIOPos();
|
||||||
|
|
||||||
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
@ -84,5 +85,15 @@ public class MachineAssemblyFactory extends BlockDummyable implements ITooltipPr
|
|||||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < io.length; i++) {
|
||||||
|
DirPos port = io[i];
|
||||||
|
if(port.compare(x + port.getDir().offsetX, y, z + port.getDir().offsetZ)) {
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add(EnumChatFormatting.YELLOW + "-> " + EnumChatFormatting.RESET + "Recipe field [" + (i + 1) + "]");
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,7 @@ public class MachineChemicalFactory extends BlockDummyable implements ITooltipPr
|
|||||||
TileEntityMachineChemicalFactory chemfac = (TileEntityMachineChemicalFactory) te;
|
TileEntityMachineChemicalFactory chemfac = (TileEntityMachineChemicalFactory) te;
|
||||||
|
|
||||||
DirPos[] cool = chemfac.getCoolPos();
|
DirPos[] cool = chemfac.getCoolPos();
|
||||||
|
DirPos[] io = chemfac.getIOPos();
|
||||||
|
|
||||||
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
@ -84,5 +85,15 @@ public class MachineChemicalFactory extends BlockDummyable implements ITooltipPr
|
|||||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < io.length; i++) {
|
||||||
|
DirPos port = io[i];
|
||||||
|
if(port.compare(x + port.getDir().offsetX, y, z + port.getDir().offsetZ)) {
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add(EnumChatFormatting.YELLOW + "-> " + EnumChatFormatting.RESET + "Recipe field [" + (i + 1) + "]");
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.render.anim;
|
package com.hbm.render.anim;
|
||||||
|
|
||||||
|
import com.hbm.interfaces.NotableComments;
|
||||||
import com.hbm.util.Clock;
|
import com.hbm.util.Clock;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -7,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
@NotableComments
|
||||||
public class HbmAnimations {
|
public class HbmAnimations {
|
||||||
|
|
||||||
//in flans mod and afaik also MW, there's an issue that there is only one
|
//in flans mod and afaik also MW, there's an issue that there is only one
|
||||||
|
|||||||
@ -139,15 +139,6 @@ public abstract class DoorDecl {
|
|||||||
return super.getBlockBound(x, y, z, open, forCollision);
|
return super.getBlockBound(x, y, z, open, forCollision);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ResourceLocation getTextureForPart(int skinIndex, String partName) { return null; }
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IModelCustomNamed getModel() { return null; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
|
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
|
||||||
@ -412,45 +403,6 @@ public abstract class DoorDecl {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
|
|
||||||
if("bolt".equals(partName)) {
|
|
||||||
set(trans, 0, 0, 0.4F * Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1));
|
|
||||||
} else {
|
|
||||||
set(trans, 0, 0, 0);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getOrigin(String partName, float[] orig) {
|
|
||||||
if("door".equals(partName) || "bolt".equals(partName)) {
|
|
||||||
set(orig, 0.125F, 1.5F, 1.18F);
|
|
||||||
return;
|
|
||||||
} else if("spinny_upper".equals(partName)) {
|
|
||||||
set(orig, 0.041499F, 2.43569F, -0.587849F);
|
|
||||||
return;
|
|
||||||
} else if("spinny_lower".equals(partName)) {
|
|
||||||
set(orig, 0.041499F, 0.571054F, -0.587849F);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
super.getOrigin(partName, orig);
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getRotation(String partName, float openTicks, float[] rot) {
|
|
||||||
if(partName.startsWith("spinny")) {
|
|
||||||
set(rot, Library.smoothstep(getNormTime(openTicks, 0, 30), 0, 1) * 360, 0, 0);
|
|
||||||
return;
|
|
||||||
} else if("door".equals(partName) || "bolt".equals(partName)) {
|
|
||||||
set(rot, 0, Library.smoothstep(getNormTime(openTicks, 30, 60), 0, 1) * -134, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
super.getRotation(partName, openTicks, rot);
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||||
if(!open) {
|
if(!open) {
|
||||||
@ -510,12 +462,6 @@ public abstract class DoorDecl {
|
|||||||
super.getRotation(partName, openTicks, rot);
|
super.getRotation(partName, openTicks, rot);
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean doesRender(String partName, boolean child) {
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override public int timeToOpen() { return 60; };
|
@Override public int timeToOpen() { return 60; };
|
||||||
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 1, 0, 1, -3, 3, 0 }, { 0, 0, 1, -3, 3, 0 }, { -1, 0, 1, -3, 3, 0 } }; }
|
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 1, 0, 1, -3, 3, 0 }, { 0, 0, 1, -3, 3, 0 }, { -1, 0, 1, -3, 3, 0 } }; }
|
||||||
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
|
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
|
||||||
@ -570,12 +516,6 @@ public abstract class DoorDecl {
|
|||||||
super.getRotation(partName, openTicks, rot);
|
super.getRotation(partName, openTicks, rot);
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean doesRender(String partName, boolean child) {
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override public int timeToOpen() { return 60; };
|
@Override public int timeToOpen() { return 60; };
|
||||||
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 2, 0, 1, -3, 3, 0 }, { 1, 0, 2, -5, 3, 0 }, { 0, 0, 2, -5, 3, 0 }, { -1, 0, 2, -5, 3, 0 }, { -2, 0, 1, -3, 3, 0 } }; }
|
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 2, 0, 1, -3, 3, 0 }, { 1, 0, 2, -5, 3, 0 }, { 0, 0, 2, -5, 3, 0 }, { -1, 0, 2, -5, 3, 0 }, { -2, 0, 1, -3, 3, 0 } }; }
|
||||||
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
|
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
|
||||||
@ -627,11 +567,10 @@ public abstract class DoorDecl {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Format: x, y, z, tangent amount 1 (how long the door would be if it moved
|
/** Format: x, y, z, tangent amount 1 (how long the door would be if it moved
|
||||||
// up), tangent amount 2 (door places blocks in this direction), axis (0-x,
|
up), tangent amount 2 (door places blocks in this direction), axis (0-x,
|
||||||
// 1-y, 2-z)
|
1-y, 2-z) */
|
||||||
public abstract int[][] getDoorOpenRanges();
|
public abstract int[][] getDoorOpenRanges();
|
||||||
|
|
||||||
public abstract int[] getDimensions();
|
public abstract int[] getDimensions();
|
||||||
|
|
||||||
public int getBlockOffset() { return 0; }
|
public int getBlockOffset() { return 0; }
|
||||||
@ -664,23 +603,16 @@ public abstract class DoorDecl {
|
|||||||
@SideOnly(Side.CLIENT) public AnimatedModel getAnimatedModel() { return null; }
|
@SideOnly(Side.CLIENT) public AnimatedModel getAnimatedModel() { return null; }
|
||||||
@SideOnly(Side.CLIENT) public Animation getAnim() { return null; }
|
@SideOnly(Side.CLIENT) public Animation getAnim() { return null; }
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT) public void getTranslation(String partName, float openTicks, boolean child, float[] trans) { set(trans, 0, 0, 0); }
|
||||||
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) { set(trans, 0, 0, 0); }
|
@SideOnly(Side.CLIENT) public void getRotation(String partName, float openTicks, float[] rot) { set(rot, 0, 0, 0); }
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT) public void getOrigin(String partName, float[] orig) { set(orig, 0, 0, 0); }
|
||||||
public void getRotation(String partName, float openTicks, float[] rot) { set(rot, 0, 0, 0); }
|
@SideOnly(Side.CLIENT) public boolean doesRender(String partName, boolean child) { return true; }
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getOrigin(String partName, float[] orig) { set(orig, 0, 0, 0); }
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean doesRender(String partName, boolean child) { return true; }
|
|
||||||
|
|
||||||
private static final String[] nothing = new String[] {};
|
private static final String[] nothing = new String[] {};
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT) public String[] getChildren(String partName) { return nothing; }
|
||||||
public String[] getChildren(String partName) { return nothing; }
|
@SideOnly(Side.CLIENT) public double[][] getClippingPlanes() { return new double[][] {}; }
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT) public void doOffsetTransform() { }
|
||||||
public double[][] getClippingPlanes() { return new double[][] {}; }
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void doOffsetTransform() { }
|
|
||||||
|
|
||||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||||
return open ? AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0) : AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
return open ? AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0) : AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import com.hbm.lib.Library;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.module.machine.ModuleMachineAssembler;
|
import com.hbm.module.machine.ModuleMachineAssembler;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
|
import com.hbm.tileentity.IConditionalInvAccess;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -45,7 +46,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
// TODO: make a base class because 90% of this is just copy pasted from the chemfac
|
// TODO: make a base class because 90% of this is just copy pasted from the chemfac
|
||||||
@NotableComments
|
@NotableComments
|
||||||
public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider {
|
public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess {
|
||||||
|
|
||||||
public FluidTank[] allTanks;
|
public FluidTank[] allTanks;
|
||||||
public FluidTank[] inputTanks;
|
public FluidTank[] inputTanks;
|
||||||
@ -122,6 +123,26 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
|||||||
}; // ho boy, a big fucking array of hand-written values, surely this isn't gonna bite me in the ass some day
|
}; // ho boy, a big fucking array of hand-written values, surely this isn't gonna bite me in the ass some day
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// CONDITIONAL ACCESS ///
|
||||||
|
@Override public boolean isItemValidForSlot(int x, int y, int z, int slot, ItemStack stack) { return this.isItemValidForSlot(slot, stack); }
|
||||||
|
@Override public boolean canInsertItem(int x, int y, int z, int slot, ItemStack stack, int side) { return this.canInsertItem(slot, stack, side); }
|
||||||
|
@Override public boolean canExtractItem(int x, int y, int z, int slot, ItemStack stack, int side) { return this.canExtractItem(slot, stack, side); }
|
||||||
|
|
||||||
|
@Override public int[] getAccessibleSlotsFromSide(int x, int y, int z, int side) {
|
||||||
|
DirPos[] io = getIOPos();
|
||||||
|
for(int i = 0; i < io.length; i++) {
|
||||||
|
if(io[i].compare(x + io[i].getDir().offsetX, y, z + io[i].getDir().offsetZ)) {
|
||||||
|
return new int[] {
|
||||||
|
5 + i * 14, 6 + i * 14, 7 + i * 14, 8 + i * 14,
|
||||||
|
9 + i * 14, 10 + i * 14, 11 + i * 14, 12 + i * 14,
|
||||||
|
13 + i * 14, 14 + i * 14, 15 + i * 14, 16 + i * 14,
|
||||||
|
17, 31, 45, 59 // entering flavor town...
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.getAccessibleSlotsFromSide(side);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "container.machineAssemblyFactory";
|
return "container.machineAssemblyFactory";
|
||||||
@ -253,7 +274,6 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public DirPos[] getCoolPos() {
|
public DirPos[] getCoolPos() {
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
@ -266,6 +286,18 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DirPos[] getIOPos() {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
return new DirPos[] {
|
||||||
|
new DirPos(xCoord + dir.offsetX + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ + rot.offsetZ * 3, rot),
|
||||||
|
new DirPos(xCoord - dir.offsetX + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ + rot.offsetZ * 3, rot),
|
||||||
|
new DirPos(xCoord + dir.offsetX - rot.offsetX * 3, yCoord, zCoord + dir.offsetZ - rot.offsetZ * 3, rot.getOpposite()),
|
||||||
|
new DirPos(xCoord - dir.offsetX - rot.offsetX * 3, yCoord, zCoord - dir.offsetZ - rot.offsetZ * 3, rot.getOpposite()),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
super.serialize(buf);
|
super.serialize(buf);
|
||||||
@ -368,7 +400,7 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_chemical_factory));
|
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_assembly_factory));
|
||||||
if(type == UpgradeType.SPEED) {
|
if(type == UpgradeType.SPEED) {
|
||||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(KEY_SPEED, "+" + (level * 100 / 3) + "%"));
|
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(KEY_SPEED, "+" + (level * 100 / 3) + "%"));
|
||||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(KEY_CONSUMPTION, "+" + (level * 50) + "%"));
|
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(KEY_CONSUMPTION, "+" + (level * 50) + "%"));
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import com.hbm.lib.Library;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.module.machine.ModuleMachineChemplant;
|
import com.hbm.module.machine.ModuleMachineChemplant;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
|
import com.hbm.tileentity.IConditionalInvAccess;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -41,7 +42,7 @@ import net.minecraft.util.EnumChatFormatting;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityMachineChemicalFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider {
|
public class TileEntityMachineChemicalFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess {
|
||||||
|
|
||||||
public FluidTank[] allTanks;
|
public FluidTank[] allTanks;
|
||||||
public FluidTank[] inputTanks;
|
public FluidTank[] inputTanks;
|
||||||
@ -121,6 +122,27 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// CONDITIONAL ACCESS ///
|
||||||
|
@Override public boolean isItemValidForSlot(int x, int y, int z, int slot, ItemStack stack) { return this.isItemValidForSlot(slot, stack); }
|
||||||
|
@Override public boolean canInsertItem(int x, int y, int z, int slot, ItemStack stack, int side) { return this.canInsertItem(slot, stack, side); }
|
||||||
|
@Override public boolean canExtractItem(int x, int y, int z, int slot, ItemStack stack, int side) { return this.canExtractItem(slot, stack, side); }
|
||||||
|
|
||||||
|
@Override public int[] getAccessibleSlotsFromSide(int x, int y, int z, int side) {
|
||||||
|
DirPos[] io = getIOPos();
|
||||||
|
for(int i = 0; i < io.length; i++) {
|
||||||
|
if(io[i].compare(x + io[i].getDir().offsetX, y, z + io[i].getDir().offsetZ)) {
|
||||||
|
return new int[] {
|
||||||
|
5 + i * 7, 6 + i * 7, 7 + i * 7,
|
||||||
|
8, 9, 10,
|
||||||
|
15, 16, 17,
|
||||||
|
22, 23, 24,
|
||||||
|
29, 30, 31
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.getAccessibleSlotsFromSide(side);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "container.machineChemicalFactory";
|
return "container.machineChemicalFactory";
|
||||||
@ -289,6 +311,18 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DirPos[] getIOPos() {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
return new DirPos[] {
|
||||||
|
new DirPos(xCoord + dir.offsetX + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ + rot.offsetZ * 3, rot),
|
||||||
|
new DirPos(xCoord - dir.offsetX + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ + rot.offsetZ * 3, rot),
|
||||||
|
new DirPos(xCoord + dir.offsetX - rot.offsetX * 3, yCoord, zCoord + dir.offsetZ - rot.offsetZ * 3, rot.getOpposite()),
|
||||||
|
new DirPos(xCoord - dir.offsetX - rot.offsetX * 3, yCoord, zCoord - dir.offsetZ - rot.offsetZ * 3, rot.getOpposite()),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
super.serialize(buf);
|
super.serialize(buf);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user