Skip to content

Commit

Permalink
Merge branch 'master' into yeet-circuit-chemplant
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdoru authored Nov 14, 2024
2 parents a75acba + 7e0f0f6 commit 0f5aab3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/main/java/gregtech/common/blocks/ItemCasings11.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package gregtech.common.blocks;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;

/**
* The casings are split into separate files because they are registered as regular blocks, and a regular block can have
Expand All @@ -11,4 +17,12 @@ public class ItemCasings11 extends ItemCasingsAbstract {
public ItemCasings11(Block block) {
super(block);
}

@Override
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
aList.add(
StatCollector.translateToLocalFormatted(
"gt.casing.tiertooltip",
(EnumChatFormatting.YELLOW + Integer.toString(getDamage(aStack) + 1))));
}
}
14 changes: 12 additions & 2 deletions src/main/java/gregtech/common/blocks/ItemCasings2.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;

/**
* The casings are split into separate files because they are registered as regular blocks, and a regular block can have
Expand All @@ -19,8 +21,16 @@ public ItemCasings2(Block block) {
@Override
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
if (getDamage(aStack) == 8) {
aList.add(this.mBlastProofTooltip);
switch (getDamage(aStack)) {
case 8 -> aList.add(this.mBlastProofTooltip);
case 12 -> aList
.add(StatCollector.translateToLocalFormatted("gt.casing.tiertooltip", EnumChatFormatting.YELLOW + "1"));
case 13 -> aList
.add(StatCollector.translateToLocalFormatted("gt.casing.tiertooltip", EnumChatFormatting.YELLOW + "2"));
case 14 -> aList
.add(StatCollector.translateToLocalFormatted("gt.casing.tiertooltip", EnumChatFormatting.YELLOW + "3"));
case 15 -> aList
.add(StatCollector.translateToLocalFormatted("gt.casing.tiertooltip", EnumChatFormatting.YELLOW + "4"));
}
}
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/gregtech/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ GT5U.coil.MAX=Eternal

GT5U.MS.multismelting=Multi smelting

gt.casing.tiertooltip=Casing Tier: %s

# Machine types
gt.recipe.alloysmelter=Alloy Smelter
gt.recipe.alloysmelter.description=HighTech combination Smelter
Expand Down

0 comments on commit 0f5aab3

Please sign in to comment.