Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
added additional info to some blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jul 2, 2024
1 parent b62e214 commit 8f297e3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public List<String> getInfo(boolean simple) {
String addition = AntimatterPlatformUtils.isFabric() && !stack.isEmpty() ? "/" + stack.getFluidAmount() + "droplets" : "";
list.add("Fluid: " + (stack.isEmpty() ? "Empty" : (stack.getFluidAmount() / TesseractGraphWrappers.dropletMultiplier) + "mb" + addition + " of " + FluidPlatformUtils.INSTANCE.getFluidDisplayName(stack).getString()));
});
list.add("Auto Output: " + isOutput());
return list;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.gregtechintergalactical.gtcore.blockentity;

import earth.terrarium.botarium.common.fluid.base.FluidHolder;
import io.github.gregtechintergalactical.gtcore.data.GTCoreTools;
import io.github.gregtechintergalactical.gtcore.data.SlotTypes;
import io.github.gregtechintergalactical.gtcore.item.ItemTape;
Expand All @@ -14,6 +15,7 @@
import muramasa.antimatter.machine.event.IMachineEvent;
import muramasa.antimatter.network.AntimatterNetwork;
import muramasa.antimatter.tool.AntimatterToolType;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import muramasa.antimatter.util.Utils;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
Expand All @@ -34,7 +36,9 @@
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import tesseract.FluidPlatformUtils;
import tesseract.TesseractCapUtils;
import tesseract.TesseractGraphWrappers;
import tesseract.api.item.ExtendedItemContainer;

import java.util.List;
Expand Down Expand Up @@ -373,4 +377,13 @@ public void load(CompoundTag tag) {
output = tag.getBoolean("output");
keepFilter = !tag.contains("keepFilter") || tag.getBoolean("keepFilter");
}

@Override
public List<String> getInfo(boolean simple) {
List<String> list = super.getInfo(simple);
list.add("Auto Outputs: " + output);
list.add("Keeps Filter: " + keepFilter);
list.add("Outputs Overflow: " + outputOverflow);
return list;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class BlockEntityPlasticBin extends BlockEntityMassStorage {
int maxLimit = 128;
public BlockEntityPlasticBin(MassStorageMachine type, BlockPos pos, BlockState state) {
Expand Down Expand Up @@ -89,4 +91,11 @@ public void saveAdditional(CompoundTag tag) {
super.saveAdditional(tag);
tag.putInt("maxLimit", maxLimit);
}

@Override
public List<String> getInfo(boolean simple) {
List<String> list = super.getInfo(simple);
list.add("Max Capacity: " + (maxLimit / 64) + " stacks");
return list;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ public static void doRedstoneUpdate(BlockEntityRedstoneWire<?> aTileEntity) {
@Override
public List<String> getInfo(boolean simple) {
List<String> info = super.getInfo(simple);
info.add("Redstone level " + mRedstone);
if (!simple) {
info.add("Redstone level " + mRedstone);
}
info.add("Vanilla redstone power: " + CodeUtils.bind4(CodeUtils.divup(mRedstone, MAX_RANGE)));
return info;
}

Expand Down

0 comments on commit 8f297e3

Please sign in to comment.