Compare commits

...
10 Commits
Author SHA1 Message Date
Martin Robertz 02490e306c update BS 2022-12-16 09:01:05 +01:00
Martin Robertz 58615af80d Merge remote-tracking branch 'asdflj/fluidBuffer' into dev 2022-12-16 08:59:45 +01:00
Martin Robertz b9ecf92fa3 Merge pull request #44 from GTNewHorizons/fixs
add contents display on cells and fix pattern terminal encode overflow
2022-12-05 18:20:25 +01:00
Yang Xizhi 3cd9aef9a1 Merge pull request #46 from GTNewHorizons/fixs-spotless-fixes
Spotless apply for branch fixs for #44
2022-12-06 00:41:13 +08:00
GitHub GTNH Actions c2e91139b2 spotlessApply 2022-12-05 16:40:38 +00:00
Yang Xizhi 66e51a1ba8 Merge 31d5e89144 into e67ac46197 2022-12-05 16:39:27 +00:00
Yang Xizhi 31d5e89144 Merge branch 'master' into fixs 2022-12-06 00:39:24 +08:00
Yang Xizhi 52e3e0baaa use ctrl 2022-12-06 00:37:43 +08:00
Martin Robertz e67ac46197 Merge pull request #45 from asdflj/master
fix tooltip format
2022-12-05 15:42:24 +01:00
GlodBlock c087930016 add contents display on cells and fix pattern terminal encode overflow 2022-12-03 13:58:00 +08:00
9 changed files with 52 additions and 6 deletions

No files matched your search

+16 -5
View File
@@ -1,4 +1,4 @@
//version: 1669411416
//version: 1670779107
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -31,7 +31,7 @@ buildscript {
url 'https://maven.minecraftforge.net'
}
maven {
// GTNH ForgeGradle Fork
// GTNH ForgeGradle and ASM Fork
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
@@ -45,6 +45,8 @@ buildscript {
}
}
dependencies {
//Overwrite the current ASM version to fix shading newer than java 8 applicatations.
classpath 'org.ow2.asm:asm-debug-all-custom:5.0.3'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.11'
}
}
@@ -330,6 +332,12 @@ repositories {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
if (usesMixinDebug.toBoolean()) {
maven {
name = "Fabric Maven"
url = "https://maven.fabricmc.net/"
}
}
}
}
@@ -338,10 +346,13 @@ dependencies {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
annotationProcessor('com.google.guava:guava:24.1.1-jre')
annotationProcessor('com.google.code.gson:gson:2.8.6')
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.1:processor')
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.3:processor')
if (usesMixinDebug.toBoolean()) {
runtimeOnly('org.jetbrains:intellij-fernflower:1.2.1.16')
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
compile('com.gtnewhorizon:gtnhmixins:2.1.1')
compile('com.gtnewhorizon:gtnhmixins:2.1.3')
}
}
@@ -694,7 +705,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
}
}
if (usesMixins.toBoolean()) {
addModrinthDep("required", "version", "gtnhmixins")
addModrinthDep("required", "project", "gtnhmixins")
}
tasks.modrinth.dependsOn(build)
tasks.publish.dependsOn(tasks.modrinth)
@@ -387,6 +387,7 @@ public class FCBasePartContainer extends FCBaseMonitorContain
if (i != null) {
i.writeToNBT(c);
c.setInteger("Count", i.stackSize);
}
return c;
@@ -357,6 +357,7 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain
if (i != null) {
i.writeToNBT(c);
c.setInteger("Count", i.stackSize);
}
return c;
@@ -17,6 +17,7 @@ import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
import appeng.util.ReadableNumberConverter;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.common.Config;
import com.glodblock.github.common.storage.CellType;
@@ -50,8 +51,10 @@ public class ItemBasicFluidStorageCell extends AEBaseItem implements IStorageFlu
private final int totalBytes;
private final int perType;
private final double idleDrain;
private final ReadableNumberConverter format = ReadableNumberConverter.INSTANCE;
private static final HashMap<Integer, IIcon> icon = new HashMap<>();
@SuppressWarnings("Guava")
public ItemBasicFluidStorageCell(final CellType whichCell, final int kilobytes) {
super(Optional.of(kilobytes + "k"));
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + kilobytes);
@@ -137,6 +140,20 @@ public class ItemBasicFluidStorageCell extends AEBaseItem implements IStorageFlu
lines.add(cellInventory.getStoredFluidTypes() + " " + GuiText.Of.getLocal() + ' '
+ cellInventory.getTotalFluidTypes() + ' ' + GuiText.Types.getLocal());
if (GuiScreen.isCtrlKeyDown()) {
if (cellInventory.getStoredFluidTypes() > 0) {
lines.add(StatCollector.translateToLocal(NameConst.TT_CELL_CONTENTS));
for (IAEFluidStack fluid : cellInventory.getContents()) {
if (fluid != null) {
lines.add(String.format(
" %s x%smB",
fluid.getFluidStack().getLocalizedName(),
format.toWideReadableForm(fluid.getStackSize())));
}
}
}
}
if (handler.isPreformatted()) {
final String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST
? GuiText.Included
@@ -11,6 +11,8 @@ import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IItemList;
import appeng.util.Platform;
import appeng.util.item.AEFluidStack;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -409,10 +411,18 @@ public class FluidCellInventory implements IFluidCellInventory {
for (final IAEFluidStack i : this.getCellItems()) {
out.add(i);
}
return out;
}
@Override
public List<IAEFluidStack> getContents() {
List<IAEFluidStack> ret = new ArrayList<>();
for (IAEFluidStack fluid : this.getCellItems()) {
ret.add(fluid);
}
return ret;
}
@Override
public StorageChannel getChannel() {
return StorageChannel.FLUIDS;
@@ -2,6 +2,7 @@ package com.glodblock.github.common.storage;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.data.IAEFluidStack;
import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@@ -70,4 +71,6 @@ public interface IFluidCellInventory extends IMEInventory<IAEFluidStack> {
long getStoredFluidTypes();
long getTotalFluidTypes();
List<IAEFluidStack> getContents();
}
@@ -35,6 +35,7 @@ public class NameConst {
public static final String TT_DUMP_TANK = TT_KEY + "dump_tank";
public static final String TT_REQUEST_SIZE = TT_KEY + "request_size";
public static final String TT_BATCH_SIZE = TT_KEY + "batch_size";
public static final String TT_CELL_CONTENTS = TT_KEY + "cell_contents";
public static final String WAILA_KEY = FluidCraft.MODID + ".waila.";
public static final String WAILA_ENABLE = WAILA_KEY + "enable";
@@ -38,6 +38,7 @@ ae2fc.waila.disable=Disable
ae2fc.tooltip.request_size=Amount to Maintain
ae2fc.tooltip.batch_size=Crafting Batch Size
ae2fc.tooltip.cell_contents=Contains Fluid:
ae2fc.tooltip.fluid_terminal=uh So we don't need EC2 anymore?
ae2fc.tooltip.invalid_fluid=Invalid fluid!
ae2fc.tooltip.encode_pattern=Encode Patter
@@ -38,6 +38,7 @@ ae2fc.waila.disable=禁用
ae2fc.tooltip.request_size=缓存量
ae2fc.tooltip.batch_size=批量制作数量
ae2fc.tooltip.cell_contents=内含流体:
ae2fc.tooltip.fluid_terminal=我们不再需要EC2了吗?
ae2fc.tooltip.invalid_fluid=流体无效!
ae2fc.tooltip.encode_pattern=编写样板