mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 20:45:10 +01:00
Pondering Alone, Part VI
- merge mc1.18/dev again - fix ponder button hitbox
This commit is contained in:
commit
812a6491de
@ -26,8 +26,8 @@ jei_minecraft_version = 1.18.2
|
||||
jei_version = 9.7.0.209
|
||||
curios_minecraft_version = 1.18.2
|
||||
curios_version = 5.0.7.0
|
||||
catnip_version = 0.5.6
|
||||
ponder_version = 0.5.7
|
||||
catnip_version = 0.5.7
|
||||
ponder_version = 0.5.8
|
||||
|
||||
# curseforge information
|
||||
projectId = 328085
|
||||
|
@ -9,7 +9,6 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
||||
import net.createmod.catnip.utility.lang.Components;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket;
|
||||
@ -22,7 +21,7 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public class BackTankUtil {
|
||||
|
||||
@ -105,11 +104,10 @@ public class BackTankUtil {
|
||||
|
||||
// For Air-using tools
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static boolean isBarVisible(ItemStack stack, int usesPerTank) {
|
||||
if (usesPerTank == 0)
|
||||
return false;
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
Player player = DistExecutor.unsafeCallWhenOn(Dist.CLIENT, () -> () -> Minecraft.getInstance().player);
|
||||
if (player == null)
|
||||
return false;
|
||||
ItemStack backtank = get(player);
|
||||
@ -118,11 +116,10 @@ public class BackTankUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static int getBarWidth(ItemStack stack, int usesPerTank) {
|
||||
if (usesPerTank == 0)
|
||||
return 13;
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
Player player = DistExecutor.unsafeCallWhenOn(Dist.CLIENT, () -> () -> Minecraft.getInstance().player);
|
||||
if (player == null)
|
||||
return 13;
|
||||
ItemStack backtank = get(player);
|
||||
@ -132,11 +129,10 @@ public class BackTankUtil {
|
||||
.getBarWidth(backtank);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static int getBarColor(ItemStack stack, int usesPerTank) {
|
||||
if (usesPerTank == 0)
|
||||
return 0;
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
Player player = DistExecutor.unsafeCallWhenOn(Dist.CLIENT, () -> () -> Minecraft.getInstance().player);
|
||||
if (player == null)
|
||||
return 0;
|
||||
ItemStack backtank = get(player);
|
||||
|
Loading…
Reference in New Issue
Block a user