Compare commits

...

17 Commits

Author SHA1 Message Date
HbmMods
f01aeb4c65
Merge pull request #2905 from NarekoMichigami810/master
little fix about zh_CN
2026-05-11 18:54:54 +02:00
HbmMods
f3a8077124
Merge pull request #2906 from DTK-MrRaccoon/octhing
OC compat for terminal
2026-05-11 18:54:36 +02:00
HbmMods
292fb752a4
Merge pull request #2908 from WolfEclipses/HeavyOilQmaw
Heavy oil qmaw v2?
2026-05-11 18:40:03 +02:00
HbmMods
a459e274f5
Merge pull request #2910 from hacker-on-steroids/turbines
attempted turbine efficiency fix
2026-05-11 18:39:23 +02:00
assburger
e0a09d66b5 nonlinear turbine spinnan 2026-05-11 17:51:51 +02:00
Boblet
e6ac26abd0 i'll be shitting blood tonight 2026-05-11 16:41:20 +02:00
道神 馴子
4c7abb4be8
Merge branch 'HbmMods:master' into master 2026-05-11 15:38:29 +08:00
Wolf
4a9b402e76 Merge branch 'HeavyOilQmaw' of https://github.com/WolfEclipses/Hbm-s-Nuclear-Tech-GIT into HeavyOilQmaw 2026-05-10 18:35:37 -04:00
Wolf
018f35fa06 test 1 test 2 mic check mic check 1 2 3, balls 2026-05-10 18:35:00 -04:00
WolfEclipses
fba8e7a460
Merge branch 'HbmMods:master' into HeavyOilQmaw 2026-05-10 17:10:52 -04:00
WolfEclipses
e5c63c1134
Merge branch 'HbmMods:master' into HeavyOilQmaw 2026-05-10 17:01:26 -04:00
WolfEclipses
0bb9b8b643
Merge branch 'HbmMods:master' into HeavyOilQmaw 2026-05-10 15:49:33 -04:00
DTK-MrRaccoon
bbc99416e7 code cleanup and improvenents 2026-05-09 18:17:13 +02:00
DTK-MrRaccoon
8ae7ddd99a bug fix 2026-05-09 14:20:57 +02:00
DTK-MrRaccoon
169de9fa1d OC compat for terminal 2026-05-09 12:18:54 +02:00
道神 馴子
970aaad4de
here s to you 2026-05-09 16:57:24 +08:00
Wolf
1b15e3872b Oil should float, this one doesnt 2026-04-08 11:38:50 -04:00
24 changed files with 201 additions and 204 deletions

View File

@ -26,4 +26,5 @@
* Fixed polling option in RoR controllers reading dead signals
* Fixed state change in RoR controllers not allowing repeat commands
* Fixed blast furnace NEI handler not cycling through all valid material shapes
* Fixed RoR transmitter sending empty signals when unused mappings apply
* Fixed RoR transmitter sending empty signals when unused mappings apply
* Fixed hopper IO for battery sockets being entirely broken

View File

@ -1,7 +0,0 @@
package api.hbm.ntl;
@Deprecated
public enum EnumStorageType {
CLUTTER, //potentially unsorted storage (like crates) with many slots that have low capacity
MASS //storage with very few lots (usually 1) and very high capacity
}

View File

@ -8,9 +8,12 @@ public interface ISlotMonitorProvider {
/** Returns an array of available slot monitors, which should ideally mirror the available slots of that container */
public SlotMonitor[] getMonitors();
/** Returns the slot contents of that index, so that the monitors cna detect changes */
/** Returns the slot contents of that index, so that the monitors can detect changes */
public ItemStack getSlotAt(int index);
/** Returns the amount of that slot at that index. Some storages may use int64 datatypes so we have to account for those too somehow, since ItemStacks cannot handle that. */
public long getAmountAt(int index);
/** Whether this storage unit is reachable by the access point on the provided location */
public boolean isAvailableToTerminal(int termX, int termY, int termZ);
}

View File

@ -1,30 +0,0 @@
package api.hbm.ntl;
import net.minecraft.item.ItemStack;
@Deprecated
public interface IStorageComponent {
/**
* @return The type of storage this tile entity represents.
*/
public EnumStorageType getType();
/**
* @return A StorageManifest instance containing all managed stacks
*/
public StorageManifest getManifest();
/**
* @return An integer representing the version of the manifest. The higher the numberm, the more recent the manifest
* (i.e. always count up), the version has to change every time the manifest updates.
*/
public int getManifestVersion();
/**
* @param stack The stack to be stored
* @param simulate Whether the changes should actually be written or if the operation is only for checking
* @return The remainder of the stack after being stored, null if nothing remains
*/
public ItemStack storeStack(ItemStack stack, boolean simulate);
}

View File

@ -1,13 +1,21 @@
package api.hbm.ntl;
import java.util.HashSet;
import api.hbm.ntl.StackCache.CacheSlot;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
public class SlotMonitor {
/** The index of the slot in the inventory this monitor....monitors */
public final int index;
/** The inventory */
public final ISlotMonitorProvider parent;
/** If this monitor detects a change, all cache slots need to be notified */
public HashSet<CacheSlot> viewedBy = new HashSet();
public Item item;
public long stacksize;
public int meta;
@ -17,4 +25,8 @@ public class SlotMonitor {
this.index = index;
this.parent = parent;
}
public void checkUpdate() {
}
}

View File

@ -0,0 +1,29 @@
package api.hbm.ntl;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
public class StackCache {
public LinkedHashMap<Integer, CacheSlot> cacheSlots = new LinkedHashMap();
public class CacheSlot {
public Item item;
public long stacksize;
public int meta;
public NBTTagCompound nbt;
public LinkedHashSet<SlotMonitor> monitors = new LinkedHashSet();
}
public static int getStackIdentity(Item item, int meta, NBTTagCompound nbt) {
int identity = Item.getIdFromItem(item) * 27644437;
identity += meta * 27644437;
if(nbt != null) identity += nbt.toString().hashCode();
return identity;
}
}

View File

@ -1,70 +0,0 @@
package api.hbm.ntl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map.Entry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@Deprecated
public class StorageManifest {
public LinkedHashMap<Integer, MetaNode> itemMeta = new LinkedHashMap();
public void writeStack(ItemStack stack) {
int id = Item.getIdFromItem(stack.getItem());
MetaNode meta = itemMeta.get(id);
if(meta == null) {
meta = new MetaNode();
itemMeta.put(id, meta);
}
NBTNode nbt = meta.metaNBT.get(stack.getItemDamage());
if(nbt == null) {
nbt = new NBTNode();
meta.metaNBT.put(stack.getItemDamage(), nbt);
}
NBTTagCompound compound = stack.hasTagCompound() ? (NBTTagCompound) stack.stackTagCompound.copy() : null;
long amount = nbt.nbtAmount.containsKey(compound) ? nbt.nbtAmount.get(compound) : 0;
amount += stack.stackSize;
nbt.nbtAmount.put(compound, amount);
}
public List<StorageStack> getStacks(boolean sorted) {
List<StorageStack> stacks = new ArrayList();
for(Entry<Integer, MetaNode> itemNode : itemMeta.entrySet()) {
for(Entry<Integer, NBTNode> metaNode : itemNode.getValue().metaNBT.entrySet()) {
for(Entry<NBTTagCompound, Long> nbtNode : metaNode.getValue().nbtAmount.entrySet()) {
ItemStack itemStack = new ItemStack(Item.getItemById(itemNode.getKey()), 1, metaNode.getKey());
itemStack.stackTagCompound = nbtNode.getKey();
StorageStack stack = new StorageStack(itemStack, nbtNode.getValue());
stacks.add(stack);
}
}
}
if(sorted) Collections.sort(stacks);
return stacks;
}
public class MetaNode {
public LinkedHashMap<Integer, NBTNode> metaNBT = new LinkedHashMap();
}
public class NBTNode {
public LinkedHashMap<NBTTagCompound, Long> nbtAmount = new LinkedHashMap();
}
}

View File

@ -1,54 +0,0 @@
package api.hbm.ntl;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@Deprecated
public class StorageStack implements Comparable {
private int cachedItemId;
private ItemStack type;
private long amount;
public StorageStack(ItemStack type) {
this(type, type.stackSize);
this.cachedItemId = Item.getIdFromItem(type.getItem());
}
public StorageStack(ItemStack type, long amount) {
this.type = type.copy();
this.amount = amount;
this.type.stackSize = 0;
}
public ItemStack getType() {
return this.type.copy();
}
public long getAmount() {
return this.amount;
}
@Override
public int compareTo(Object o) {
StorageStack other = (StorageStack) o;
if(this.cachedItemId < other.cachedItemId) return -1;
if(this.cachedItemId > other.cachedItemId) return 1;
if(this.type.getItemDamage() < other.type.getItemDamage()) return -1;
if(this.type.getItemDamage() > other.type.getItemDamage()) return 1;
if(this.type.hasTagCompound() && !other.type.hasTagCompound()) return -1;
if(!this.type.hasTagCompound() && other.type.hasTagCompound()) return 1;
if(this.type.hasTagCompound() && other.type.hasTagCompound()) {
// keyset size comparison should hopefully catch most of the larger NBT cases
if(this.type.stackTagCompound.func_150296_c().size() < other.type.stackTagCompound.func_150296_c().size()) return -1;
if(this.type.stackTagCompound.func_150296_c().size() > other.type.stackTagCompound.func_150296_c().size()) return 1;
int comp = this.type.stackTagCompound.toString().compareTo(other.type.stackTagCompound.toString()); // not terribly performant but hopefully not that common
if(comp != 0) return comp;
}
if(this.type.stackSize < other.type.stackSize) return -1;
if(this.type.stackSize > other.type.stackSize) return 1;
return 0;
}
}

View File

@ -129,7 +129,7 @@ public class GeneralConfig {
preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod",
"The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID});
enableLoadScreenReplacement = config.get(CATEGORY_GENERAL, "1.43_enableLoadScreenReplacement", true, "Tries to replace the vanilla load screen with the 'tip of the day' one, may clash with other mods trying to do the same.").getBoolean(true);
enableMachineGravity = config.get(CATEGORY_GENERAL, "1.44_enableMachineGravity", true, "Requires some large machines to have a proper foundation, or else they tilt and break.").getBoolean(false);
enableMachineGravity = config.get(CATEGORY_GENERAL, "1.44_enableMachineGravity", true, "Requires large large machines to have a proper foundation, or else they tilt and break. Independent from the 528 version of this config, which does the same, but only works with 528 enabled.").getBoolean(false);
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
@ -180,6 +180,7 @@ public class GeneralConfig {
enable528NetherBurn = false;
enable528PressurizedRecipes = false;
enable528ExplosiveEnergistics = false;
enable528MachineGravity = false;
}
}
}

View File

@ -17,6 +17,12 @@ public class ContainerPneumoStorageAccess extends Container {
public ContainerPneumoStorageAccess(InventoryPlayer invPlayer, TileEntityPneumoStorageAccess access) {
this.access = access;
for(int i = 0; i < 6; i++) {
for(int j = 0; j < 8; j++) {
this.addSlotToContainer(new SlotNonRetarded(inventory, j + i * 8, 8 + j * 18, 17 + i * 18));
}
}
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new SlotNonRetarded(invPlayer, j + i * 9 + 9, 8 + j * 18, 169 + i * 18));

View File

@ -106,19 +106,18 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
}
public static enum TiltType {
UNAVOIDABLE, CONFIG_NORMAL, CONFIG_528
UNAVOIDABLE, CONFIG;
}
public void checkTilt(TiltType cfg, boolean extraHeavy) {
boolean doesTilt = false;
if(cfg == TiltType.UNAVOIDABLE) doesTilt = true;
if(cfg == TiltType.CONFIG_NORMAL && GeneralConfig.enableMachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG_NORMAL && GeneralConfig.enable528MachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG_528 && GeneralConfig.enable528MachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG && GeneralConfig.enableMachineGravity) doesTilt = true;
if(cfg == TiltType.CONFIG && GeneralConfig.enable528MachineGravity) doesTilt = true;
if(!doesTilt) { this.tilted = false; return; }
if(this.getFloorCount() <= 0) { this.tilted = false; return; }
if(this.worldObj.getTotalWorldTime() % 20 != 0) return;
if(this.worldObj.getTotalWorldTime() + BlockPos.getIdentity(xCoord, yCoord, zCoord) % 20 != 0) return;
if(this.tiltBlocksChecked >= this.getFloorCount()) {

View File

@ -39,9 +39,11 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
public float lastRotor;
public double spin = 0;
public static double ACCELERATION = 1D / 400D;
public static double FLYWHEEL_MAX_ENERGY = 0.5e8; //aka flywheel mass
public long maxPower = 0;
public long lastPowerTarget = 0;
public long flywheel_energy = 0;
private AudioWrapper audio;
private float audioDesync;
@ -59,7 +61,7 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
@Override
public void writeConfig(JsonWriter writer) throws IOException {
writer.name("INFO").value("industrial steam turbine consumes 20% of availible steam per tick");
writer.name("INFO").value("industrial steam turbine consumes 20% of available steam per tick");
writer.name("I:inputTankSize").value(inputTankSize);
writer.name("I:outputTankSize").value(outputTankSize);
writer.name("D:efficiency").value(efficiency);
@ -80,29 +82,17 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
FT_Coolable trait = tanks[0].getTankType().getTrait(FT_Coolable.class);
double eff = trait.getEfficiency(CoolingType.TURBINE) * getEfficiency();
int maxOps = (int) Math.ceil((tanks[0].getMaxFill() * consumptionPercent()) / trait.amountReq);
this.lastPowerTarget = (long) (maxOps * trait.heatEnergy * eff); // theoretical max output at full blast with this type
double fraction = (double) steamConsumed / (double) (trait.amountReq * maxOps); // % of max steam throughput currently achieved
this.maxPower = (long) (maxOps * trait.heatEnergy * eff);
if(Math.abs(spin - fraction) <= ACCELERATION) {
this.spin = fraction;
} else if(spin < fraction) {
this.spin += ACCELERATION;
} else if(spin > fraction) {
this.spin -= ACCELERATION;
}
this.flywheel_energy += power;
}
@Override
public void onServerTick() {
if(!operational) {
this.spin -= ACCELERATION;
}
if(this.spin <= 0) {
this.spin = 0;
} else {
this.powerBuffer = (long) (this.lastPowerTarget * this.spin);
}
this.spin = (double) flywheel_energy / FLYWHEEL_MAX_ENERGY; //because dense steams have way lower energy output, turbines running them take a lot longer to spool up
this.lastPowerTarget = (long) (this.spin * maxPower);
this.flywheel_energy -= this.lastPowerTarget;
this.powerBuffer = (long) (this.lastPowerTarget);
}
@Override

View File

@ -188,7 +188,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IC
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(TiltType.CONFIG_NORMAL, true);
this.checkTilt(TiltType.CONFIG, true);
if (redstonePowered) {
isOn = true;

View File

@ -98,7 +98,7 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(TiltType.CONFIG_NORMAL, true);
this.checkTilt(TiltType.CONFIG, true);
for(int i = 0; i < 4; i++) {
if(klystronNodes[i] == null || klystronNodes[i].expired) klystronNodes[i] = createNode(KlystronNetworkProvider.THE_PROVIDER, ForgeDirection.getOrientation(i + 2));

View File

@ -105,7 +105,7 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(TiltType.CONFIG_528, false);
this.checkTilt(TiltType.CONFIG, false);
this.fluidUsed = 0;
this.output = 0;

View File

@ -133,7 +133,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
public void updateEntity() {
if(!worldObj.isRemote) {
this.checkTilt(TiltType.CONFIG_528, false);
this.checkTilt(TiltType.CONFIG, false);
this.isOn = false;

View File

@ -4,6 +4,7 @@ import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.handler.CompatHandler;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.gui.GUIScreenRBMKTerminal;
import com.hbm.tileentity.IGUIProvider;
@ -11,23 +12,35 @@ import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.tileentity.network.RTTYSystem;
import com.hbm.util.BufferUtil;
import cpw.mods.fml.common.Optional;
import io.netty.buffer.ByteBuf;
import li.cil.oc.api.machine.Arguments;
import li.cil.oc.api.machine.Callback;
import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUIProvider, IControlReceiver {
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUIProvider, IControlReceiver, SimpleComponent, CompatHandler.OCComponent {
public String[] history = new String[17];
public String channel = "";
public String repeatCmd = "";
public boolean doesRepeat = false;
public boolean ocMode = false;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(ocMode) {
this.networkPackNT(10);
return;
}
if(!this.channel.isEmpty() && !this.repeatCmd.isEmpty())
RTTYSystem.broadcast(worldObj, this.channel, this.repeatCmd + "");
@ -38,6 +51,12 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI
public void eval(String cmd) {
if(cmd == null) return;
if(ocMode) {
push(cmd);
this.markChanged();
return;
}
push(cmd);
if(cmd.isEmpty()) return;
@ -127,16 +146,23 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.channel = nbt.getString("channel");
if(this.channel != null && this.channel.equals(" ")) this.channel = "";
this.repeatCmd = nbt.getString("repeatCmd");
for(int i = 0; i < history.length; i++) this.history[i] = nbt.getString("history" + i);
if(this.repeatCmd != null && this.repeatCmd.equals(" ")) this.repeatCmd = "";
this.ocMode = nbt.getBoolean("ocMode");
for(int i = 0; i < history.length; i++) {
this.history[i] = nbt.getString("history" + i);
if(this.history[i] != null && this.history[i].equals(" ")) this.history[i] = "";
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setString("channel", channel);
nbt.setString("repeatCmd", repeatCmd);
for(int i = 0; i < history.length; i++) nbt.setString("history" + i, history[i]);
nbt.setString("channel", channel.isEmpty() ? " " : channel);
nbt.setString("repeatCmd", repeatCmd.isEmpty() ? " " : repeatCmd);
nbt.setBoolean("ocMode", ocMode);
for(int i = 0; i < history.length; i++) nbt.setString("history" + i, history[i] == null || history[i].isEmpty() ? " " : history[i]);
}
@Override
@ -154,4 +180,73 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }
@Override public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIScreenRBMKTerminal(this); }
// OpenComputers methods
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_terminal";
}
@Callback(direct = true, limit = 2)
@Optional.Method(modid = "OpenComputers")
public Object[] enableOCMode(Context context, Arguments args) {
ocMode = args.checkBoolean(0);
if(ocMode) {
for(int i = 0; i < history.length; i++) history[i] = "";
push("OC MODE ENABLED");
push("Terminal ready.");
}
markDirty();
return new Object[] {true};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] isOCMode(Context context, Arguments args) {
return new Object[] {ocMode};
}
@Callback(direct = true, limit = 2)
@Optional.Method(modid = "OpenComputers")
public Object[] write(Context context, Arguments args) {
if(!ocMode) return new Object[] {false, "OC mode not enabled"};
push(args.checkString(0));
return new Object[] {true};
}
@Callback(direct = true, limit = 3)
@Optional.Method(modid = "OpenComputers")
public Object[] writeln(Context context, Arguments args) {
if(!ocMode) return new Object[] {false, "OC mode not enabled"};
push(args.checkString(0));
return new Object[] {true};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] readInput(Context context, Arguments args) {
if(!ocMode) return new Object[] {"", "OC mode not enabled"};
return new Object[] {history[0] != null ? history[0] : ""};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getAllHistory(Context context, Arguments args) {
if(!ocMode) return new Object[] {null, "OC mode not enabled"};
String[] copy = new String[history.length];
for(int i = 0; i < history.length; i++) {
copy[i] = history[i] != null ? history[i] : "";
}
return new Object[] {copy};
}
@Callback(direct = true, limit = 2)
@Optional.Method(modid = "OpenComputers")
public Object[] clearScreen(Context context, Arguments args) {
if(!ocMode) return new Object[] {false, "OC mode not enabled"};
for(int i = 0; i < history.length; i++) history[i] = "";
markDirty();
return new Object[] {true};
}
}

View File

@ -210,12 +210,14 @@ public class TileEntityBatterySocket extends TileEntityBatteryBase implements IR
@Override
public boolean canExtractItem(int i, ItemStack stack, int j) {
if(stack.getItem() instanceof IBatteryItem) {
if(i == mode_input && ((IBatteryItem)stack.getItem()).getCharge(stack) == 0) return true;
if(i == mode_output && ((IBatteryItem)stack.getItem()).getCharge(stack) == ((IBatteryItem)stack.getItem()).getMaxCharge(stack)) return true;
if(i == mode_output && ((IBatteryItem)stack.getItem()).getCharge(stack) == 0) return true;
if(i == mode_input && ((IBatteryItem)stack.getItem()).getCharge(stack) == ((IBatteryItem)stack.getItem()).getMaxCharge(stack)) return true;
}
return false;
}
@Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return stack.getItem() instanceof IBatteryItem; }
@Override public int[] getAccessibleSlotsFromSide(int side) { return new int[] {0}; }
@Override public long getPower() {

View File

@ -11,17 +11,21 @@ import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.ntl.IPneumaticConnector;
import api.hbm.ntl.StackCache;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
// throwing the towel - for now. there's a test i could run, but it's a lot of work and will likely just confirm my suspicions about performance
// this demands another sidequest: fucking multi threading
public class TileEntityPneumoStorageAccess extends TileEntity implements IPneumaticConnector, IGUIProvider {
protected PneumaticNode node;
public StackCache cache;
public TileEntityPneumoStorageAccess() {
this.cache = new StackCache();
}
@Override
public void updateEntity() {

View File

@ -106,6 +106,7 @@ public class TileEntityPneumoStorageClutter extends TileEntityMachineBase implem
@Override public SlotMonitor[] getMonitors() { return monitors; }
@Override public ItemStack getSlotAt(int index) { return this.getStackInSlot(index); }
@Override public long getAmountAt(int index) { ItemStack stack = getSlotAt(index); return stack != null ? stack.stackSize : 0; }
@Override
public boolean isAvailableToTerminal(int termX, int termY, int termZ) {

View File

@ -3918,7 +3918,7 @@ item.scrap.name=废料
item.scrap_nuclear.name=放射性废料
item.scrap_oil.name=油性废料
item.scrap_plastic.name=塑料废料
item.scraps.name=废料
item.scraps.name=%s 废料
item.screwdriver.name=螺丝刀
item.screwdriver.desc=可以用来代替保险丝……
item.screwdriver_desh.name=Desh螺丝刀

View File

@ -0,0 +1,15 @@
{
"name": "Heavy Oil",
"icon": ["hbm:item.fluid_icon", 1, 12],
"trigger": [["hbm:item.fluid_icon", 1, 12]],
"title": {
"en_US": "Heavy Oil",
"ru_RU": "Тяжёлая нефть",
"zh_CN": "重油"
},
"content": {
"en_US": "Obtained after [[refining|Oil Refinery]] [[heated|Boiler]] crude oil. Heavy oil is a byproduct that is typically voided early on or used in the later production of [[tar|Oil Tar]], [[coke|Petroleum Coke]], [[engine lubricant|Engine Lubricant]] or to be further refined to create asphalt.<br><br>See also:<br>[[Basic Oil Processing]]<br>[[Advanced Oil Processing]]<br>[[Vacuum Oil Processing]]",
"ru_RU": "Получается после [[переработки|Oil Refinery]] [[нагретой|Boiler]] сырой нефти. Тяжёлая нефть является побочным продуктом, который на начальном этапе обычно утилизируется, а позже используется для производства [[смолы|Oil Tar]], [[кокса|Petroleum Coke]], [[моторной смазки|Engine Lubricant]], либо подвергается дальнейшей переработке для получения асфальта.<br><br>См. также:<br>[[Базовая нефтепереработка|Basic Oil Processing]]<br>[[Продвинутая нефтепереработка|Advanced Oil Processing]]<br>[[Вакуумная нефтепереработка|Vacuum Oil Processing]]",
"zh_CN": "在[[炼油厂|Oil Refinery]][[加热|Boiler]]原油后获得。重油是一种副产品,在早期通常被废弃,在后期则用于生产[[焦油|Oil Tar]]、[[焦炭|Petroleum Coke]]、[[发动机润滑油|Engine Lubricant]],也可进一步精炼以制造沥青。<br><br>另见:<br>[[基础石油处理|Basic Oil Processing]]<br>[[高级石油处理|Advanced Oil Processing]]<br>[[真空石油处理|Vacuum Oil Processing]]"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B