Skip to content

Commit

Permalink
move chest tooltip to super
Browse files Browse the repository at this point in the history
remove addinfo super call in qtank
  • Loading branch information
ghzdude committed Aug 5, 2023
1 parent d0fc69b commit e9023fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ protected void addDisplayInformation(List<ITextComponent> textList) {
@Override
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) {
super.addInformation(stack, player, tooltip, advanced);
tooltip.add(I18n.format("gregtech.machine.quantum_chest.tooltip"));
tooltip.add(I18n.format("gregtech.universal.tooltip.item_storage_total", maxStoredItems));

NBTTagCompound compound = stack.getTagCompound();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.client.renderer.texture.Textures;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class MetaTileEntityQuantumExtender extends MetaTileEntityQuantumStorage<IDualHandler> {
public MetaTileEntityQuantumExtender(ResourceLocation metaTileEntityId) {
Expand Down Expand Up @@ -57,9 +50,4 @@ public IDualHandler getTypeValue() {
return null;
}

@Override
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip, boolean advanced) {
tooltip.add(I18n.format("gregtech.machine.quantum_chest.tooltip"));
tooltip.add(I18n.format("gregtech.machine.quantum_storage_proxy.tooltip"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,4 @@ public IDualHandler getTypeValue() {
if (getController() == null) return null;
return getController().getHandler();
}

@Override
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip, boolean advanced) {
tooltip.add(I18n.format("gregtech.machine.quantum_chest.tooltip"));
tooltip.add(I18n.format("gregtech.machine.quantum_storage_proxy.tooltip"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.util.GTLog;
import gregtech.api.util.GTUtility;
import net.minecraft.client.resources.I18n;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.lang.ref.WeakReference;
import java.util.List;

import static gregtech.api.capability.GregtechDataCodes.UPDATE_CONTROLLER_POS;
import static gregtech.api.capability.GregtechDataCodes.REMOVE_CONTROLLER;
Expand Down Expand Up @@ -176,4 +182,9 @@ public void readFromNBT(NBTTagCompound data) {
this.controllerPos = BlockPos.fromLong(data.getLong("ControllerPos"));
}
}

@Override
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip, boolean advanced) {
tooltip.add(I18n.format("gregtech.machine.quantum_chest.tooltip"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ public Pair<TextureAtlasSprite, Integer> getParticleTexture() {

@Override
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) {
super.addInformation(stack, player, tooltip, advanced);
tooltip.add(I18n.format("gregtech.machine.quantum_tank.tooltip"));
tooltip.add(I18n.format("gregtech.universal.tooltip.fluid_storage_capacity", maxFluidCapacity));
NBTTagCompound tag = stack.getTagCompound();
Expand Down

0 comments on commit e9023fc

Please sign in to comment.