diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/CraftingDead.java b/crafting-dead-core/src/main/java/com/craftingdead/core/CraftingDead.java index 8eded21f9..a7cd4e927 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/CraftingDead.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/CraftingDead.java @@ -18,8 +18,6 @@ package com.craftingdead.core; -import java.util.Optional; - import com.craftingdead.core.data.tags.ModBlockTagsProvider; import org.apache.commons.lang3.mutable.MutableInt; import org.slf4j.Logger; @@ -59,7 +57,6 @@ import com.craftingdead.core.trauma.ProtectionConfig; import com.craftingdead.core.event.LivingExtensionEvent; import com.craftingdead.core.world.entity.extension.ClothingProtectionHandler; -import com.craftingdead.core.world.entity.extension.LivingHandlerType; import com.mojang.logging.LogUtils; import io.netty.buffer.Unpooled; import net.minecraft.data.DataGenerator; @@ -103,7 +100,6 @@ import net.minecraftforge.server.ServerLifecycleHooks; import net.minecraftforge.forge.event.lifecycle.GatherDataEvent; import net.minecraftforge.network.PacketDistributor; -import com.craftingdead.core.trauma.TraumaHandler; @Mod(CraftingDead.ID) public class CraftingDead { @@ -160,7 +156,7 @@ public CraftingDead() { GunTriggerPredicates.deferredRegister.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); - MinecraftForge.EVENT_BUS.register(TraumaHandler.INSTANCE); +// MinecraftForge.EVENT_BUS.register(TraumaHandler.INSTANCE); ProtectionConfig.load(); } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/AbstractContainerMenuMixin.java b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/AbstractContainerMenuMixin.java index 47dc9d6c5..fe47ef240 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/AbstractContainerMenuMixin.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/AbstractContainerMenuMixin.java @@ -48,10 +48,9 @@ public class AbstractContainerMenuMixin { private ContainerSynchronizer synchronizer; @SuppressWarnings("unchecked") - @Redirect(method = - "synchronizeSlotToRemote(ILnet/minecraft/world/item/ItemStack;Ljava/util/function/Supplier;)V", - at = @At(value = "INVOKE", - target = "Lnet/minecraft/world/item/ItemStack;matches(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemStack;)Z")) + @Redirect(at = @At(value = "INVOKE", + target = "Lnet/minecraft/world/item/ItemStack;matches(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemStack;)Z"), + method = "synchronizeSlotToRemote") private boolean matches(ItemStack lastStack, ItemStack currentStack, int slotIndex, ItemStack __, Supplier coppiedStack) { diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/InventoryMixin.java b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/InventoryMixin.java index 03ce22334..362be64cc 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/InventoryMixin.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/InventoryMixin.java @@ -19,46 +19,41 @@ package com.craftingdead.core.mixin; import org.spongepowered.asm.mixin.Mixin; -// import org.spongepowered.asm.mixin.injection.At; -// import org.spongepowered.asm.mixin.injection.Inject; -// import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -// import com.craftingdead.core.CraftingDead; -// import com.craftingdead.core.world.entity.extension.PlayerExtension; + import org.spongepowered.asm.mixin.injection.At; + import org.spongepowered.asm.mixin.injection.Inject; + import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + import com.craftingdead.core.CraftingDead; + import com.craftingdead.core.world.entity.extension.PlayerExtension; import net.minecraft.world.entity.player.Inventory; @Mixin(Inventory.class) public class InventoryMixin { - - // DISABLED: The method 'swapPaint' no longer exists in Minecraft 1.18.2 - // The hotbar scrolling behavior in 1.18.2 uses 'swapPaint(double)' which was removed - // This mixin would need to target the new method if this functionality is needed - // Original purpose: Scrolls over empty slots when in combat mode - // @Inject(at = @At("HEAD"), method = "swapPaint", cancellable = true) - // private void swapPaint(double direction, CallbackInfo callbackInfo) { - // if (CraftingDead.getInstance().getClientDist().getPlayerExtension() - // .map(PlayerExtension::isCombatModeEnabled) - // .orElse(false)) { - // callbackInfo.cancel(); - - // Inventory inventory = (Inventory) (Object) this; - - // if (direction > 0.0D) { - // direction = 1.0D; - // } - - // if (direction < 0.0D) { - // direction = -1.0D; - // } - - // do { - // inventory.selected -= direction; - // if (inventory.selected < 0) { - // inventory.selected = 6; - // } else if (inventory.selected > 6) { - // inventory.selected = 0; - // } - // } while (!inventory.isEmpty() && inventory.getSelected().isEmpty()); - // } - // } + @Inject(at = @At("HEAD"), method = "swapPaint", cancellable = true) + private void swapPaint(double direction, CallbackInfo callbackInfo) { + if (CraftingDead.getInstance().getClientDist().getPlayerExtension() + .map(PlayerExtension::isCombatModeEnabled) + .orElse(false)) { + callbackInfo.cancel(); + + Inventory inventory = (Inventory) (Object) this; + + if (direction > 0.0D) { + direction = 1.0D; + } + + if (direction < 0.0D) { + direction = -1.0D; + } + + do { + inventory.selected -= direction; + if (inventory.selected < 0) { + inventory.selected = 6; + } else if (inventory.selected > 6) { + inventory.selected = 0; + } + } while (!inventory.isEmpty() && inventory.getSelected().isEmpty()); + } + } } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/KeyboardHandlerMixin.java b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/KeyboardHandlerMixin.java index 6fb8316df..4a2479b83 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/KeyboardHandlerMixin.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/KeyboardHandlerMixin.java @@ -30,10 +30,8 @@ @Mixin(KeyboardHandler.class) public class KeyboardHandlerMixin { - @SuppressWarnings("unused") - @Inject(method = "keyPress(JIIII)V", at = @At("HEAD"), cancellable = true) - private void onKeyPress(long ignoredWindowPointer, int key, int ignoredScancode, int action, - int ignoredModifiers, + @Inject(method = "keyPress", at = @At("HEAD"), cancellable = true) + private void onKeyPress(long windowPointer, int key, int scancode, int action, int modifiers, CallbackInfo ci) { var minecraft = Minecraft.getInstance(); diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LivingEntityMixin.java b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LivingEntityMixin.java index 3d24ed901..75fe9426d 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LivingEntityMixin.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LivingEntityMixin.java @@ -35,9 +35,6 @@ @Mixin(LivingEntity.class) public abstract class LivingEntityMixin { - // TODO: Fix this mixin - isImmobile() method doesn't exist in 1.18.2 LivingEntity - // The refmap has wrong method signature m_6107_()Z - /* @Inject(at = @At("RETURN"), method = "isImmobile", cancellable = true) private void isImmobile(CallbackInfoReturnable callbackInfo) { var self = (LivingEntity) (Object) this; @@ -47,11 +44,9 @@ private void isImmobile(CallbackInfoReturnable callbackInfo) { } }); } - */ + // TODO - temp until https://github.com/MinecraftForge/MinecraftForge/pull/7630 gets merged - // TODO: Also broken - refmap has wrong method mappings for 1.18.2 - /* @Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;matches(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemStack;)Z"), method = "collectEquipmentChanges") @@ -72,5 +67,4 @@ private boolean matches(ItemStack currentStack, ItemStack lastStack) { } return true; } - */ } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LocalPlayerMixin.java b/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LocalPlayerMixin.java deleted file mode 100644 index cb994d1e5..000000000 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/mixin/LocalPlayerMixin.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Crafting Dead - * Copyright (C) 2022 NexusNode LTD - * - * This Non-Commercial Software License Agreement (the "Agreement") is made between - * you (the "Licensee") and NEXUSNODE (BRAD HUNTER). (the "Licensor"). - * By installing or otherwise using Crafting Dead (the "Software"), you agree to be - * bound by the terms and conditions of this Agreement as may be revised from time - * to time at Licensor's sole discretion. - * - * If you do not agree to the terms and conditions of this Agreement do not download, - * copy, reproduce or otherwise use any of the source code available online at any time. - * - * https://github.com/nexusnode/crafting-dead/blob/1.18.x/LICENSE.txt - * - * https://craftingdead.net/terms.php - */ - -package com.craftingdead.core.mixin; - -import com.craftingdead.core.world.entity.extension.PlayerExtension; -import net.minecraft.client.player.LocalPlayer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(LocalPlayer.class) -public class LocalPlayerMixin { - - /** - * Scrolls over empty slots when in combat mode. - */ - @Inject(method = "selectHotbarSlot", at = @At("HEAD"), cancellable = true) - private void onHotbarScroll(double direction, CallbackInfo ci) { - var minecraft = net.minecraft.client.Minecraft.getInstance(); - - if (minecraft.player == null) return; - - var ext = PlayerExtension.get(minecraft.player); - if (ext == null || !ext.isCombatModeEnabled()) return; - - ci.cancel(); - - var inventory = minecraft.player.getInventory(); - - // Normalize scroll direction - if (direction > 0) direction = 1; - if (direction < 0) direction = -1; - - do { - inventory.selected -= direction; - - if (inventory.selected < 0) { - inventory.selected = 8; - } else if (inventory.selected > 8) { - inventory.selected = 0; - } - } - while (!inventory.isEmpty() && inventory.getSelected().isEmpty()); - } -} diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/network/NetworkChannel.java b/crafting-dead-core/src/main/java/com/craftingdead/core/network/NetworkChannel.java index 18740c664..ad3d62788 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/network/NetworkChannel.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/network/NetworkChannel.java @@ -19,6 +19,7 @@ package com.craftingdead.core.network; import com.craftingdead.core.CraftingDead; +import com.craftingdead.core.network.message.play.BlockDestroyParticleMessage; import com.craftingdead.core.network.message.play.BlockDestroyActionMessage; import com.craftingdead.core.network.message.play.CancelActionMessage; import com.craftingdead.core.network.message.play.CrouchMessage; @@ -199,7 +200,14 @@ public void registerMessages(SimpleChannel simpleChannel) { .add(); simpleChannel - .messageBuilder(BlockDestroyActionMessage.class, 0x16, NetworkDirection.PLAY_TO_SERVER) + .messageBuilder(BlockDestroyParticleMessage.class, 0x16, NetworkDirection.PLAY_TO_CLIENT) + .encoder(BlockDestroyParticleMessage::encode) + .decoder(BlockDestroyParticleMessage::decode) + .consumer(BlockDestroyParticleMessage::handle) + .add(); + + simpleChannel + .messageBuilder(BlockDestroyActionMessage.class, 0x17, NetworkDirection.PLAY_TO_SERVER) .encoder(BlockDestroyActionMessage::encode) .decoder(BlockDestroyActionMessage::decode) .consumer(BlockDestroyActionMessage::handle) diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyActionMessage.java b/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyActionMessage.java index 5a3aaee4a..408c74bc1 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyActionMessage.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyActionMessage.java @@ -18,12 +18,13 @@ package com.craftingdead.core.network.message.play; +import com.craftingdead.core.network.NetworkChannel; import java.util.function.Supplier; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.PacketDistributor; public record BlockDestroyActionMessage(BlockPos pos) { @@ -38,13 +39,14 @@ public static BlockDestroyActionMessage decode(FriendlyByteBuf buf) { public static void handle(BlockDestroyActionMessage msg, Supplier ctx) { ctx.get().enqueueWork(() -> { var player = ctx.get().getSender(); - if (player == null) { - return; - } - var state = player.getLevel().getBlockState(msg.pos); - if (!state.isAir()) { - player.getLevel().levelEvent(2001, msg.pos, Block.getId(state)); - player.getLevel().setBlock(msg.pos, Blocks.AIR.defaultBlockState(), 3); + if (player != null) { + var level = player.getLevel(); + var state = level.getBlockState(msg.pos); + if (!state.isAir()) { + NetworkChannel.PLAY.getSimpleChannel().send(PacketDistributor.TRACKING_CHUNK.with(() -> + level.getChunkAt(msg.pos())), new BlockDestroyParticleMessage(msg.pos(), state)); + player.getLevel().setBlock(msg.pos, Blocks.AIR.defaultBlockState(), 3); + } } }); ctx.get().setPacketHandled(true); diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyParticleMessage.java b/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyParticleMessage.java new file mode 100644 index 000000000..33ab760e9 --- /dev/null +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/network/message/play/BlockDestroyParticleMessage.java @@ -0,0 +1,50 @@ +/* + * Crafting Dead + * Copyright (C) 2022 NexusNode LTD + * + * This Non-Commercial Software License Agreement (the "Agreement") is made between + * you (the "Licensee") and NEXUSNODE (BRAD HUNTER). (the "Licensor"). + * By installing or otherwise using Crafting Dead (the "Software"), you agree to be + * bound by the terms and conditions of this Agreement as may be revised from time + * to time at Licensor's sole discretion. + * + * If you do not agree to the terms and conditions of this Agreement do not download, + * copy, reproduce or otherwise use any of the source code available online at any time. + * + * https://github.com/nexusnode/crafting-dead/blob/1.18.x/LICENSE.txt + * + * https://craftingdead.net/terms.php + */ + +package com.craftingdead.core.network.message.play; + +import java.util.function.Supplier; +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.network.NetworkEvent; + +public record BlockDestroyParticleMessage(BlockPos pos, BlockState state) { + + public static void encode(BlockDestroyParticleMessage msg, FriendlyByteBuf buf) { + buf.writeBlockPos(msg.pos()); + buf.writeVarInt(Block.getId(msg.state())); + } + + public static BlockDestroyParticleMessage decode(FriendlyByteBuf buf) { + return new BlockDestroyParticleMessage(buf.readBlockPos(), Block.stateById(buf.readVarInt())); + } + + public static void handle(BlockDestroyParticleMessage msg, Supplier ctx) { + ctx.get().enqueueWork(() -> { + var player = Minecraft.getInstance().player; + if (player != null) { + var state = player.getLevel().getBlockState(msg.pos); + player.level.addDestroyBlockEffect(msg.pos, state); + } + }); + ctx.get().setPacketHandled(true); + } +} diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/server/ServerDist.java b/crafting-dead-core/src/main/java/com/craftingdead/core/server/ServerDist.java index 14169119c..0f6b8a00e 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/server/ServerDist.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/server/ServerDist.java @@ -20,18 +20,10 @@ import com.craftingdead.core.ModDist; import net.minecraft.core.RegistryAccess; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.server.ServerLifecycleHooks; public class ServerDist implements ModDist { - public ServerDist() { - // Auto-updater moved to crafting-dead-updater mod (separate optional mod) - // Server-side updater is now handled by the crafting-dead-updater mod - // This keeps the main Crafting Dead mods CurseForge-compliant - } - @SuppressWarnings("deprecation") @Override public RegistryAccess registryAccess() { diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/trauma/TraumaHandler.java b/crafting-dead-core/src/main/java/com/craftingdead/core/trauma/TraumaHandler.java index d7879a4be..a6dd4f7e0 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/trauma/TraumaHandler.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/trauma/TraumaHandler.java @@ -44,46 +44,46 @@ public final class TraumaHandler { private TraumaHandler() { } - @SubscribeEvent - public void handleGunEntityDamaged(GunEvent.EntityDamaged event) { - if (!event.headshot() || !(event.target() instanceof LivingEntity living)) { - return; - } - if (living.getLevel().isClientSide()) { - return; - } - - var target = LivingExtension.get(living); - if (target == null) { - return; - } - - var config = ProtectionConfig.get(); - var settings = config.headTrauma(); - if (!settings.enabled()) { - return; - } - - float incomingEnergy = Math.max(0.0F, event.damage() * settings.damageToEnergyScale()); - var result = ProtectionLookup.INSTANCE.resolveHeadshot(target, incomingEnergy); - - if (LOGGER.isDebugEnabled()) { - logHeadshotDebug(event, living, target, incomingEnergy, result); - } - - var effect = result.effect(); - if (result.severity() == TraumaSeverity.NONE || effect.isEmpty()) { - return; - } - - applyMobEffects(living, effect); - - if (living instanceof ServerPlayer player) { - NetworkChannel.PLAY.getSimpleChannel().send( - PacketDistributor.PLAYER.with(() -> player), - new TraumaPacket(result.severity(), effect.aimSwayTicks(), effect.aimSwayStrength())); - } - } +// @SubscribeEvent +// public void handleGunEntityDamaged(GunEvent.EntityDamaged event) { +// if (!event.headshot() || !(event.target() instanceof LivingEntity living)) { +// return; +// } +// if (living.getLevel().isClientSide()) { +// return; +// } +// +// var target = LivingExtension.get(living); +// if (target == null) { +// return; +// } +// +// var config = ProtectionConfig.get(); +// var settings = config.headTrauma(); +// if (!settings.enabled()) { +// return; +// } +// +// float incomingEnergy = Math.max(0.0F, event.damage() * settings.damageToEnergyScale()); +// var result = ProtectionLookup.INSTANCE.resolveHeadshot(target, incomingEnergy); +// +// if (LOGGER.isDebugEnabled()) { +// logHeadshotDebug(event, living, target, incomingEnergy, result); +// } +// +// var effect = result.effect(); +// if (result.severity() == TraumaSeverity.NONE || effect.isEmpty()) { +// return; +// } +// +// applyMobEffects(living, effect); +// +// if (living instanceof ServerPlayer player) { +// NetworkChannel.PLAY.getSimpleChannel().send( +// PacketDistributor.PLAYER.with(() -> player), +// new TraumaPacket(result.severity(), effect.aimSwayTicks(), effect.aimSwayStrength())); +// } +// } private void applyMobEffects(LivingEntity living, ProtectionConfig.TraumaEffect effect) { if (effect.blindnessTicks() > 0) { diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/RemoveMagazineAction.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/RemoveMagazineAction.java index 5044385f7..1c69a7e20 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/RemoveMagazineAction.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/RemoveMagazineAction.java @@ -36,6 +36,8 @@ public class RemoveMagazineAction extends TimedAction { private final Gun gun; + protected final int slot; + private final ItemStack oldMagazineStack; private final MagazineAmmoProvider ammoProvider; @@ -45,6 +47,11 @@ public class RemoveMagazineAction extends TimedAction { public RemoveMagazineAction(LivingExtension performer) { this.performer = performer; + if (this.performer.entity() instanceof Player player) { + this.slot = player.getInventory().selected; + } else { + this.slot = -1; + } this.gun = performer.mainHandGun() .orElseThrow(() -> new IllegalStateException("Performer not holding gun")); AmmoProvider ammoProvider = this.gun.getAmmoProvider(); @@ -89,10 +96,13 @@ public boolean start(boolean simulate) { @Override public boolean tick() { - if (!this.performer().level().isClientSide() && - (this.performer.mainHandItem().isEmpty() || - !this.performer.mainHandItem().is(this.gun.getItemStack().getItem()) || - this.performer().entity().isSprinting())) { + if (!this.performer().level().isClientSide() + && (this.performer.mainHandItem().isEmpty() + || !this.performer.mainHandItem().is(this.gun.getItemStack().getItem()) + || (this.slot != -1 + && this.performer().entity() instanceof Player player + && player.getInventory().selected != this.slot) + || this.performer().entity().isSprinting())) { this.performer().cancelAction(true); return false; } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/item/ItemActionType.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/item/ItemActionType.java index 4f2f867b0..3ab47ec32 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/item/ItemActionType.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/item/ItemActionType.java @@ -48,6 +48,8 @@ public abstract class ItemActionType private final Supplier resultItem; @Nullable private final Supplier finishSound; + private final float finishSoundVolume; + private final float finishSoundPitch; private final boolean consumeItemInCreative; private final boolean useResultItemInCreative; @@ -60,6 +62,8 @@ protected ItemActionType(Builder builder) { this.usageDamage = builder.usageDamage; this.resultItem = builder.resultItem; this.finishSound = builder.finishSound; + this.finishSoundVolume = builder.finishSoundVolume; + this.finishSoundPitch = builder.finishSoundPitch; this.consumeItemInCreative = builder.consumeItemInCreative; this.useResultItemInCreative = builder.useResultItemInCreative; } @@ -92,6 +96,14 @@ public Optional getFinishSound() { return Optional.ofNullable(this.finishSound).map(Supplier::get); } + public float getFinishSoundVolume() { + return finishSoundVolume; + } + + public float getFinishSoundPitch() { + return finishSoundPitch; + } + public boolean shouldConsumeItemInCreative() { return this.consumeItemInCreative; } @@ -132,6 +144,8 @@ public static abstract class Builder> { private Supplier resultItem; @Nullable private Supplier finishSound; + private float finishSoundVolume = 1.0F; + private float finishSoundPitch = 1.0F; private boolean consumeItemInCreative; @@ -181,11 +195,20 @@ public SELF resultItem(Supplier resultItem) { } public SELF finishSound(SoundEvent finishSound) { - return this.finishSound(() -> finishSound); + return this.finishSound(finishSound, this.finishSoundVolume, this.finishSoundPitch); + } + + public SELF finishSound(SoundEvent finishSound, float volume, float pitch) { + this.finishSound = () -> finishSound; + this.finishSoundVolume = volume; + this.finishSoundPitch = pitch; + return this.self(); } - public SELF finishSound(Supplier finishSound) { + public SELF finishSound(Supplier finishSound, float volume, float pitch) { this.finishSound = finishSound; + this.finishSoundVolume = volume; + this.finishSoundPitch = pitch; return this.self(); } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/reload/AbstractReloadAction.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/reload/AbstractReloadAction.java index 7434dec3e..77fb34def 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/reload/AbstractReloadAction.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/action/reload/AbstractReloadAction.java @@ -18,6 +18,7 @@ package com.craftingdead.core.world.action.reload; +import net.minecraft.world.entity.player.Player; import org.jetbrains.annotations.Nullable; import com.craftingdead.core.ServerConfig; import com.craftingdead.core.client.animation.Animation; @@ -35,6 +36,8 @@ public abstract class AbstractReloadAction extends TimedAction { protected final Gun gun; + protected final int slot; + protected final ItemStack oldMagazineStack; @Nullable @@ -42,6 +45,11 @@ public abstract class AbstractReloadAction extends TimedAction { public AbstractReloadAction(LivingExtension performer) { this.performer = performer; + if (this.performer.entity() instanceof Player player) { + this.slot = player.getInventory().selected; + } else { + this.slot = -1; + } this.gun = performer.mainHandItem().getCapability(Gun.CAPABILITY) .orElseThrow(() -> new IllegalStateException("Performer not holding gun")); this.oldMagazineStack = this.gun.getAmmoProvider().getMagazineStack(); @@ -88,8 +96,11 @@ public boolean start(boolean simulate) { @Override public boolean tick() { if (!this.performer().level().isClientSide() - && (!this.performer.mainHandItem().is(this.gun.getItemStack().getItem()) - || this.performer().mainHandItem().isEmpty() + && (this.performer().mainHandItem().isEmpty() + || !this.performer.mainHandItem().is(this.gun.getItemStack().getItem()) + || (this.slot != -1 + && this.performer().entity() instanceof Player player + && player.getInventory().selected != this.slot) || this.performer().entity().isSprinting())) { this.performer.cancelAction(true); return false; diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ClothingItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ClothingItem.java index 352f654a6..84f1a533b 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ClothingItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ClothingItem.java @@ -22,10 +22,8 @@ import com.craftingdead.core.world.action.item.ItemActionType; import com.craftingdead.core.world.entity.extension.LivingExtension; import com.craftingdead.core.world.entity.extension.PlayerExtension; -import com.craftingdead.core.world.item.equipment.ClothingProtection; import com.craftingdead.core.world.item.equipment.Equipment.Slot; import java.util.List; -import java.util.Locale; import java.util.Objects; import java.util.UUID; import java.util.function.Supplier; @@ -47,7 +45,6 @@ import net.minecraft.ChatFormatting; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.ai.attributes.Attribute; @@ -97,179 +94,26 @@ public ClothingType getClothingType() { @Override public void appendHoverText(ItemStack stack, Level world, List lines, TooltipFlag tooltipFlag) { super.appendHoverText(stack, world, lines, tooltipFlag); - - // Clothing tier display switch (this.clothingType) { case CASUAL -> lines.add(new TranslatableComponent("clothing.protection.level") .withStyle(ChatFormatting.GRAY) .append(" ") .append(new TranslatableComponent("clothing.casual") - .withStyle(ChatFormatting.WHITE))); + .withStyle(ChatFormatting.RED))); case UTILITY -> lines.add(new TranslatableComponent("clothing.protection.level") .withStyle(ChatFormatting.GRAY) .append(" ") .append(new TranslatableComponent("clothing.utility") - .withStyle(ChatFormatting.GREEN))); + .withStyle(ChatFormatting.RED))); case MILITARY -> lines.add(new TranslatableComponent("clothing.protection.level") .withStyle(ChatFormatting.GRAY) .append(" ") .append(new TranslatableComponent("clothing.military") - .withStyle(ChatFormatting.AQUA))); - case HEAVY -> lines.add(new TranslatableComponent("clothing.protection.level") - .withStyle(ChatFormatting.GRAY) - .append(" ") - .append(new TranslatableComponent("clothing.heavy") - .withStyle(ChatFormatting.GOLD))); + .withStyle(ChatFormatting.RED))); } - - // Fire immunity indicator if (this.fireImmunity) { - lines.add(new TextComponent("※ ") - .withStyle(ChatFormatting.GOLD) - .append(new TranslatableComponent("clothing.immune_to_fire") - .withStyle(ChatFormatting.GOLD))); - } - - // Add blank line for separation - lines.add(TextComponent.EMPTY); - - // Protection Stats Header - lines.add(new TranslatableComponent("clothing.protection.stats") - .withStyle(ChatFormatting.YELLOW, ChatFormatting.BOLD)); - - // Get protection values from NBT if available, otherwise show config defaults - float biteProtection = ClothingProtection.getBiteProtection(stack); - float stabResistance = ClothingProtection.getStabResistance(stack); - float bluntResistance = ClothingProtection.getBluntResistance(stack); - float weightModifier = ClothingProtection.getWeightModifier(stack); - - // Get legacy values - float damageReductionPct = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingDamageReduction.get().floatValue() * 100.0F; - case UTILITY -> ServerConfig.instance.utilityClothingDamageReduction.get().floatValue() * 100.0F; - case MILITARY -> ServerConfig.instance.militaryClothingDamageReduction.get().floatValue() * 100.0F; - case HEAVY -> ServerConfig.instance.militaryClothingDamageReduction.get().floatValue() * 100.0F; - }; - - float bleedReductionPct = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingBleedAndInfectionReduction.get().floatValue() * 100.0F; - case UTILITY -> ServerConfig.instance.utilityClothingBleedAndInfectionReduction.get().floatValue() * 100.0F; - case MILITARY -> ServerConfig.instance.militaryClothingBleedAndInfectionReduction.get().floatValue() * 100.0F; - case HEAVY -> ServerConfig.instance.militaryClothingBleedAndInfectionReduction.get().floatValue() * 100.0F; - }; - - // If no NBT data yet, show what values will be applied - if (!ClothingProtection.hasProtectionAttributes(stack)) { - biteProtection = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingBiteProtection.get().floatValue(); - case UTILITY -> ServerConfig.instance.utilityClothingBiteProtection.get().floatValue(); - case MILITARY -> ServerConfig.instance.militaryClothingBiteProtection.get().floatValue(); - case HEAVY -> ServerConfig.instance.heavyClothingBiteProtection.get().floatValue(); - }; - stabResistance = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingStabResistance.get().floatValue(); - case UTILITY -> ServerConfig.instance.utilityClothingStabResistance.get().floatValue(); - case MILITARY -> ServerConfig.instance.militaryClothingStabResistance.get().floatValue(); - case HEAVY -> ServerConfig.instance.heavyClothingStabResistance.get().floatValue(); - }; - bluntResistance = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingBluntResistance.get().floatValue(); - case UTILITY -> ServerConfig.instance.utilityClothingBluntResistance.get().floatValue(); - case MILITARY -> ServerConfig.instance.militaryClothingBluntResistance.get().floatValue(); - case HEAVY -> ServerConfig.instance.heavyClothingBluntResistance.get().floatValue(); - }; - weightModifier = switch (this.clothingType) { - case CASUAL -> ServerConfig.instance.casualClothingWeightModifier.get().floatValue(); - case UTILITY -> ServerConfig.instance.utilityClothingWeightModifier.get().floatValue(); - case MILITARY -> ServerConfig.instance.militaryClothingWeightModifier.get().floatValue(); - case HEAVY -> ServerConfig.instance.heavyClothingWeightModifier.get().floatValue(); - }; - } - - // General Damage Reduction (if any) - if (damageReductionPct > 0.0F) { - var damageText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", damageReductionPct)) - .withStyle(ChatFormatting.GREEN); - lines.add(new TextComponent("■ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.general_damage") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(damageText)); - } - - // Bite Protection (zombies) - if (biteProtection > 0.0F) { - var biteText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", biteProtection * 100.0F)) - .withStyle(ChatFormatting.GREEN); - lines.add(new TextComponent("☠ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.bite") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(biteText)); - } - - // Stab Resistance (knives, blades) - if (stabResistance > 0.0F) { - var stabText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", stabResistance * 100.0F)) - .withStyle(ChatFormatting.GREEN); - lines.add(new TextComponent("† ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.stab") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(stabText)); - } - - // Blunt Resistance (clubs, fists) - if (bluntResistance > 0.0F) { - var bluntText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", bluntResistance * 100.0F)) - .withStyle(ChatFormatting.GREEN); - lines.add(new TextComponent("◆ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.blunt") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(bluntText)); - } - - // Bullet Resistance (minimal for clothing, use vests for real protection) - float bulletProtection = Math.max(biteProtection, stabResistance) * 0.1F; - if (bulletProtection > 0.001F) { - var bulletText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", bulletProtection * 100.0F)) - .withStyle(ChatFormatting.DARK_GREEN); - lines.add(new TextComponent("✖ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.bullet") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(bulletText)); - } - - // Infection Resistance - if (bleedReductionPct > 0.0F) { - var infectionText = new TextComponent(String.format(Locale.ROOT, "%.0f%%", bleedReductionPct)) - .withStyle(ChatFormatting.GREEN); - lines.add(new TextComponent("✦ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.infection") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(infectionText)); - } - - // Weight Modifier (affects movement speed) - if (Math.abs(weightModifier) > 0.001F) { - var weightColor = weightModifier < 0 ? ChatFormatting.RED : ChatFormatting.GREEN; - var weightText = new TextComponent(String.format(Locale.ROOT, "%+.0f%%", weightModifier * 100.0F)) - .withStyle(weightColor); - lines.add(new TextComponent("» ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("clothing.protection.weight") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(weightText)); + lines.add(new TranslatableComponent("clothing.immune_to_fire") + .withStyle(ChatFormatting.GRAY)); } } @@ -377,9 +221,7 @@ public float calculateDamage(float damage) { casualClothingDamageReduction.get().floatValue(); case UTILITY -> 1.00F - ServerConfig.instance. utilityClothingDamageReduction.get().floatValue(); - case MILITARY -> 1.00F - ServerConfig.instance. - militaryClothingDamageReduction.get().floatValue(); - case HEAVY -> 1.00F - ServerConfig.instance. + case MILITARY, HEAVY -> 1.00F - ServerConfig.instance. militaryClothingDamageReduction.get().floatValue(); }; return damage * reductionFactor; @@ -391,9 +233,7 @@ public float calculateBleedAndInfectionChance(float baseChance) { casualClothingBleedAndInfectionReduction.get().floatValue(); case UTILITY -> 1.00F - ServerConfig.instance. utilityClothingBleedAndInfectionReduction.get().floatValue(); - case MILITARY -> 1.00F - ServerConfig.instance. - militaryClothingBleedAndInfectionReduction.get().floatValue(); - case HEAVY -> 1.00F - ServerConfig.instance. + case MILITARY, HEAVY -> 1.00F - ServerConfig.instance. militaryClothingBleedAndInfectionReduction.get().floatValue(); }; return baseChance * reductionFactor; diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/GunItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/GunItem.java index 94d9ba2e2..c640e457e 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/GunItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/GunItem.java @@ -146,12 +146,7 @@ public GunConfiguration getConfiguration(RegistryAccess registryAccess) { } public GunConfiguration getConfiguration(Registry registry) { - var baseConfig = registry.get(this.configurationKey); - // Apply config overrides if available - return com.craftingdead.core.world.item.gun.GunConfigOverrides.isLoaded() - ? com.craftingdead.core.world.item.gun.GunConfigOverrides.applyOverride(baseConfig, - this.configurationKey.location()) - : baseConfig; + return registry.get(this.configurationKey); } @Override @@ -172,67 +167,48 @@ public void appendHoverText(ItemStack itemStack, @Nullable Level level, if (level != null) { var configuration = this.getConfiguration(level.registryAccess()); - - lines.add(TextComponent.EMPTY); - lines.add(new TranslatableComponent("gun.stats_header") - .withStyle(ChatFormatting.YELLOW, ChatFormatting.BOLD)); - - if (configuration.getRoundsPerShot() > 1) { - var pelletsText = new TextComponent(String.valueOf(configuration.getRoundsPerShot())) - .withStyle(ChatFormatting.RED); - - lines.add(new TextComponent("◆ ") - .withStyle(ChatFormatting.GOLD) - .append(new TranslatableComponent("gun.pellets_shot") - .withStyle(ChatFormatting.GRAY) - .append(pelletsText))); - } - - var rpmText = - new TextComponent(String.valueOf(configuration.getFireRateRPM())) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("» ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("gun.rpm") - .withStyle(ChatFormatting.GRAY) - .append(rpmText))); - var damageText = new TextComponent(String.valueOf(configuration.getDamage())) .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("✖ ") - .withStyle(ChatFormatting.RED) - .append(new TranslatableComponent("gun.damage") - .withStyle(ChatFormatting.GRAY) - .append(damageText))); - var headshotDamageText = new TextComponent( String.valueOf((int) (configuration.getDamage() * ServerConfig.instance.headshotBonusDamage.get()))) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("◈ ") - .withStyle(ChatFormatting.GOLD) - .append(new TranslatableComponent("gun.headshot_damage") - .withStyle(ChatFormatting.GRAY) - .append(headshotDamageText))); - + .withStyle(ChatFormatting.RED); var accuracyText = new TextComponent((int) (configuration.getAccuracyPercent() * 100.0F) + "%") .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("+ ") - .withStyle(ChatFormatting.GREEN) - .append(new TranslatableComponent("gun.accuracy") - .withStyle(ChatFormatting.GRAY) - .append(accuracyText))); - + var rpmText = + new TextComponent(String.valueOf(configuration.getFireRateRPM())) + .withStyle(ChatFormatting.RED); var rangeText = new TextComponent(configuration.getRange() + " blocks") .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("─ ") - .withStyle(ChatFormatting.AQUA) - .append(new TranslatableComponent("gun.range") - .withStyle(ChatFormatting.GRAY) - .append(rangeText))); + if (configuration.getRoundsPerShot() > 1) { + var pelletsText = new TextComponent(String.valueOf(configuration.getRoundsPerShot())) + .withStyle(ChatFormatting.RED); + + lines.add(new TranslatableComponent("gun.pellets_shot") + .withStyle(ChatFormatting.GRAY) + .append(pelletsText)); + } + + lines.add(new TranslatableComponent("gun.rpm") + .withStyle(ChatFormatting.GRAY) + .append(rpmText)); + + lines.add(new TranslatableComponent("gun.damage") + .withStyle(ChatFormatting.GRAY) + .append(damageText)); + lines.add(new TranslatableComponent("gun.headshot_damage") + .withStyle(ChatFormatting.GRAY) + .append(headshotDamageText)); + + lines.add(new TranslatableComponent("gun.accuracy") + .withStyle(ChatFormatting.GRAY) + .append(accuracyText)); + lines.add(new TranslatableComponent("gun.range") + .withStyle(ChatFormatting.GRAY) + .append(rangeText)); } itemStack.getCapability(Gun.CAPABILITY).ifPresent(gun -> { @@ -240,21 +216,17 @@ public void appendHoverText(ItemStack itemStack, @Nullable Level level, .map(Magazine::getSize) .orElse(0))).withStyle(ChatFormatting.RED); - lines.add(new TextComponent("■ ") - .withStyle(ChatFormatting.YELLOW) - .append(new TranslatableComponent("gun.ammo_amount") - .withStyle(ChatFormatting.GRAY) - .append(ammoCount))); + lines.add(new TranslatableComponent("gun.ammo_amount") + .withStyle(ChatFormatting.GRAY) + .append(ammoCount)); for (var attachment : gun.getAttachments().values()) { Component attachmentName = attachment.getDescription() .plainCopy() .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("◊ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("gun.attachment") - .withStyle(ChatFormatting.GRAY) - .append(attachmentName))); + lines.add(new TranslatableComponent("gun.attachment") + .withStyle(ChatFormatting.GRAY) + .append(attachmentName)); } }); } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/HatItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/HatItem.java index 6b7a7a5a0..87977b63f 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/HatItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/HatItem.java @@ -19,12 +19,9 @@ package com.craftingdead.core.world.item; import java.util.List; -import java.util.Locale; -import java.util.Objects; import java.util.UUID; -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; import com.craftingdead.core.capability.CapabilityUtil; -import com.craftingdead.core.trauma.ProtectionConfig; import com.craftingdead.core.world.item.equipment.Equipment; import com.craftingdead.core.world.item.equipment.SimpleHat; import com.google.common.collect.ImmutableMultimap; @@ -40,7 +37,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.common.capabilities.ICapabilityProvider; public class HatItem extends EquipmentItem { @@ -74,88 +70,26 @@ public HatItem(Properties properties) { public void appendHoverText(ItemStack stack, @Nullable Level world, List lines, TooltipFlag tooltipFlag) { super.appendHoverText(stack, world, lines, tooltipFlag); - - // Special abilities with Unicode symbols if (this.headshotReductionPercentage > 0.0F) { Component percentageText = - new TextComponent(Objects.requireNonNull(String.format(Locale.ROOT, "%.0f%%", - this.headshotReductionPercentage * 100.0F))).withStyle(ChatFormatting.RED); - - lines.add(new TextComponent("◈ ") - .withStyle(ChatFormatting.GOLD) - .append(new TranslatableComponent("hat.headshot_reduction") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(percentageText)))); + new TextComponent(String.format("%.0f", this.headshotReductionPercentage * 100.0F) + "%") + .withStyle(ChatFormatting.RED); + + lines.add(new TranslatableComponent("hat.headshot_reduction") + .withStyle(ChatFormatting.GRAY) + .append(percentageText)); } - if (this.immuneToFlashes) { - lines.add(new TextComponent("✦ ") - .withStyle(ChatFormatting.YELLOW) - .append(new TranslatableComponent("hat.immune_to_flashes") - .withStyle(ChatFormatting.GRAY))); + lines.add(new TranslatableComponent("hat.immune_to_flashes") + .withStyle(ChatFormatting.GRAY)); } - if (this.immuneToGas) { - lines.add(new TextComponent("☁ ") - .withStyle(ChatFormatting.GREEN) - .append(new TranslatableComponent("hat.immune_to_gas") - .withStyle(ChatFormatting.GRAY))); + lines.add(new TranslatableComponent("hat.immune_to_gas") + .withStyle(ChatFormatting.GRAY)); } - if (this.nightVision) { - lines.add(new TextComponent("★ ") - .withStyle(ChatFormatting.AQUA) - .append(new TranslatableComponent("hat.has_night_vision") - .withStyle(ChatFormatting.GRAY))); - } - - // Ballistic protection stats - var itemId = ForgeRegistries.ITEMS.getKey(stack.getItem()); - if (itemId != null) { - var profile = ProtectionConfig.get().helmetProfile(itemId); - if (!profile.isEmpty()) { - lines.add(TextComponent.EMPTY); - lines.add(new TranslatableComponent("equipment.ballistic_stats") - .withStyle(ChatFormatting.YELLOW, ChatFormatting.BOLD)); - - Component absorptionText = - new TextComponent(Objects.requireNonNull(String.format(Locale.ROOT, "%.0f%%", - profile.absorption() * 100.0F))).withStyle(ChatFormatting.RED); - lines.add(new TextComponent("▣ ") - .withStyle(ChatFormatting.BLUE) - .append(new TranslatableComponent("equipment.absorption") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(absorptionText)))); - - Component stoppingPowerText = - new TextComponent(Objects.requireNonNull(String.format(Locale.ROOT, "%.0f", - profile.stoppingPower()))).withStyle(ChatFormatting.RED); - lines.add(new TextComponent("⚙ ") - .withStyle(ChatFormatting.GRAY) - .append(new TranslatableComponent("equipment.stopping_power") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(stoppingPowerText)))); - - if (profile.stunThreshold() > 0.0F) { - Component stunThresholdText = - new TextComponent(Objects.requireNonNull(String.format(Locale.ROOT, "%.0f", - profile.stunThreshold()))).withStyle(ChatFormatting.RED); - lines.add(new TextComponent("✖ ") - .withStyle(ChatFormatting.YELLOW) - .append(new TranslatableComponent("equipment.stun_threshold") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(stunThresholdText)))); - } - - Component durabilityText = - new TextComponent(Objects.requireNonNull(String.format(Locale.ROOT, "%.2f", - profile.durabilityPerEnergy()))).withStyle(ChatFormatting.RED); - lines.add(new TextComponent("◊ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("equipment.durability_per_energy") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(durabilityText)))); - } + lines.add(new TranslatableComponent("hat.has_night_vision") + .withStyle(ChatFormatting.GRAY)); } } @@ -182,9 +116,7 @@ public static class Properties extends Item.Properties { private boolean waterBreathing; public Properties attributeModifier(Attribute attribute, AttributeModifier modifier) { - this.attributeModifiers.put( - Objects.requireNonNull(attribute), - Objects.requireNonNull(modifier)); + this.attributeModifiers.put(attribute, modifier); return this; } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MagazineItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MagazineItem.java index 07880f153..def8f8cd9 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MagazineItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MagazineItem.java @@ -105,20 +105,16 @@ public void appendHoverText(ItemStack stack, Level level, List lines, Component amountText = new TextComponent(currentAmount + "/" + this.getSize()) .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("■ ") - .withStyle(ChatFormatting.YELLOW) - .append(new TranslatableComponent("magazine.amount") - .withStyle(ChatFormatting.GRAY) - .append(amountText))); + lines.add(new TranslatableComponent("magazine.amount") + .withStyle(ChatFormatting.GRAY) + .append(amountText)); } if (this.armorPenetration > 0) { - lines.add(new TextComponent("▣ ") - .withStyle(ChatFormatting.BLUE) - .append(new TranslatableComponent("magazine.armor_penetration") - .withStyle(ChatFormatting.GRAY) - .append(new TextComponent(String.format("%.0f%%", this.armorPenetration)) - .withStyle(ChatFormatting.RED)))); + lines.add(new TranslatableComponent("magazine.armor_penetration") + .withStyle(ChatFormatting.GRAY) + .append(new TextComponent(String.format("%.0f%%", this.armorPenetration)) + .withStyle(ChatFormatting.RED))); } } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MeleeWeaponItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MeleeWeaponItem.java index ae347f393..530e7fc3a 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MeleeWeaponItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/MeleeWeaponItem.java @@ -70,53 +70,15 @@ public Multimap getAttributeModifiers( @Override public void appendHoverText(ItemStack stack, Level world, List tooltip, @NotNull TooltipFlag flag) { - super.appendHoverText(stack, world, tooltip, flag); - - // Calculate attack speed (convert from modifier to actual attacks per second) - double attackSpeed = 4.0D; // Base attack speed - for (var modifier : this.attributeModifiers.get(Attributes.ATTACK_SPEED)) { - attackSpeed += modifier.getAmount(); - } - - // Melee Stats Header - tooltip.add(new TranslatableComponent("melee.stats") - .withStyle(ChatFormatting.YELLOW, ChatFormatting.BOLD)); - - // Damage - tooltip.add(new TranslatableComponent("✖ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("melee.damage") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(new TranslatableComponent(String.valueOf(this.attackDamage)) - .withStyle(ChatFormatting.RED))); - - // Attack Speed - String attacksPerSecond = String.format("%.1f", attackSpeed); - tooltip.add(new TranslatableComponent("» ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("melee.attack_speed") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(new TranslatableComponent(attacksPerSecond) - .withStyle(ChatFormatting.AQUA))); - - // Durability - int durability = stack.getMaxDamage() - stack.getDamageValue(); - int maxDurability = stack.getMaxDamage(); - ChatFormatting durabilityColor = durability > maxDurability * 0.5 - ? ChatFormatting.GREEN - : durability > maxDurability * 0.25 - ? ChatFormatting.YELLOW - : ChatFormatting.RED; - - tooltip.add(new TranslatableComponent("◆ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("melee.durability") - .withStyle(ChatFormatting.GRAY)) - .append(": ") - .append(new TranslatableComponent(durability + "/" + maxDurability) - .withStyle(durabilityColor))); + tooltip.add(new TranslatableComponent("item.craftingdead.damage").append(" ").append( + new TranslatableComponent(String.valueOf(this.attackDamage)) + .withStyle(style -> style.withColor(ChatFormatting.RED))) + .withStyle(style -> style.withColor(ChatFormatting.GRAY))); + + tooltip.add(new TranslatableComponent("item.craftingdead.durability").append(" ").append( + new TranslatableComponent(String.valueOf(stack.getMaxDamage() - stack.getDamageValue())) + .withStyle(style -> style.withColor(ChatFormatting.RED))) + .withStyle(style -> style.withColor(ChatFormatting.GRAY))); } @Override diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ModItems.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ModItems.java index d074eaf61..e8439efa5 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ModItems.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/ModItems.java @@ -44,7 +44,6 @@ import com.craftingdead.core.world.item.gun.attachment.Attachments; import com.craftingdead.core.world.item.gun.minigun.MinigunItem; import com.craftingdead.core.world.item.gun.skin.Skins; -import com.craftingdead.core.world.item.MedicalItem; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.TranslatableComponent; @@ -1131,7 +1130,7 @@ public ItemStack makeIcon() { .tab(COMBAT_TAB))); public static final RegistryObject SLEDGEHAMMER = deferredRegister.register("sledgehammer", - () -> new ModPickaxeItem(Tiers.IRON, 1.0F, 10, -2.4F, + () -> new ModPickaxeItem(Tiers.IRON, 0.55F, 10, -2.4F, new Item.Properties() .durability(110) .tab(COMBAT_TAB))); @@ -1173,7 +1172,7 @@ public ItemStack makeIcon() { .tab(COMBAT_TAB))); public static final RegistryObject PICKAXE = deferredRegister.register("pickaxe", - () -> new ModPickaxeItem(Tiers.IRON, 1.5F, 10, -2.4F, new Item.Properties() + () -> new ModPickaxeItem(Tiers.IRON, 0.8F, 10, -2.4F, new Item.Properties() .durability(210) .tab(COMBAT_TAB))); @@ -1637,7 +1636,7 @@ public ItemStack makeIcon() { .stacksTo(1) .tab(COSMETICS_TAB), ActionTypes.SHRED_CLOTHING, - ClothingType.HEAVY)); + ClothingType.MILITARY)); public static final RegistryObject FIREMAN_CLOTHING = deferredRegister.register("fireman_clothing", @@ -1965,9 +1964,9 @@ public static void contributeProtectionMappings(ProtectionConfig.Builder builder public static final RegistryObject FIRST_AID_KIT = deferredRegister.register("first_aid_kit", - () -> new MedicalItem(ActionTypes.USE_FIRST_AID_KIT, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_FIRST_AID_KIT, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.FIRST_AID_KIT)); + .tab(MEDICAL_TAB))); public static final RegistryObject DIRTY_RAG = deferredRegister.register("dirty_rag", @@ -1983,33 +1982,33 @@ public static void contributeProtectionMappings(ProtectionConfig.Builder builder public static final RegistryObject CLEAN_RAG = deferredRegister.register("clean_rag", - () -> new MedicalItem(ActionTypes.USE_CLEAN_RAG, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_CLEAN_RAG, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.CLEAN_RAG)); + .tab(MEDICAL_TAB))); public static final RegistryObject ADRENALINE_SYRINGE = deferredRegister.register("adrenaline_syringe", - () -> new MedicalItem(ActionTypes.USE_ADRENALINE_SYRINGE, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_ADRENALINE_SYRINGE, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.ADRENALINE_SYRINGE)); + .tab(MEDICAL_TAB))); public static final RegistryObject SYRINGE = deferredRegister.register("syringe", - () -> new MedicalItem(ActionTypes.USE_SYRINGE, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_SYRINGE, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.SYRINGE)); + .tab(MEDICAL_TAB))); public static final RegistryObject BLOOD_SYRINGE = deferredRegister.register("blood_syringe", - () -> new MedicalItem(ActionTypes.USE_BLOOD_SYRINGE, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_BLOOD_SYRINGE, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.BLOOD_SYRINGE)); + .tab(MEDICAL_TAB))); public static final RegistryObject BANDAGE = deferredRegister.register("bandage", - () -> new MedicalItem(ActionTypes.USE_BANDAGE, new Item.Properties() + () -> new ActionItem(ActionTypes.USE_BANDAGE, new Item.Properties() .stacksTo(3) - .tab(MEDICAL_TAB), MedicalItem.MedicalItemType.BANDAGE)); + .tab(MEDICAL_TAB))); // ================================================================================ // Backpacks @@ -2126,6 +2125,7 @@ private static StorageItem smallBackpack() { .slot(Equipment.Slot.BACKPACK) .itemRows(2) .menuConstructor(GenericMenu::createSmallBackpack) + .toolTip(new TranslatableComponent("small_backpack.information")) .stacksTo(1) .tab(COSMETICS_TAB)); } @@ -2135,6 +2135,7 @@ private static StorageItem mediumBackpack() { .slot(Equipment.Slot.BACKPACK) .itemRows(3) .menuConstructor(GenericMenu::createMediumBackpack) + .toolTip(new TranslatableComponent("medium_backpack.information")) .stacksTo(1) .tab(COSMETICS_TAB)); } @@ -2144,6 +2145,7 @@ private static StorageItem largeBackpack() { .slot(Equipment.Slot.BACKPACK) .itemRows(4) .menuConstructor(GenericMenu::createLargeBackpack) + .toolTip(new TranslatableComponent("large_backpack.information")) .stacksTo(1) .tab(COSMETICS_TAB)); } @@ -2153,6 +2155,7 @@ private static StorageItem gunBag() { .slot(Equipment.Slot.BACKPACK) .itemRows(2) .menuConstructor(GenericMenu::createGunBag) + .toolTip(new TranslatableComponent("gunbag.information")) .stacksTo(1) .tab(COSMETICS_TAB)); } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/PaintItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/PaintItem.java index 82e084209..3ae05dc7d 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/PaintItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/PaintItem.java @@ -19,6 +19,7 @@ package com.craftingdead.core.world.item; import java.util.List; +import java.util.Objects; import java.util.OptionalInt; import java.util.concurrent.ThreadLocalRandom; import org.jetbrains.annotations.Nullable; @@ -59,22 +60,30 @@ public PaintItem(ResourceKey skin, Properties properties) { @Override public ICapabilityProvider initCapabilities(ItemStack itemStack, @Nullable CompoundTag nbt) { return CapabilityUtil.provider(() -> Paint.of(this.skin, this.multipaint - ? OptionalInt.of( + ? OptionalInt.of( DyeColor.values()[ThreadLocalRandom.current().nextInt(DyeColor.values().length)] .getTextColor()) - : OptionalInt.empty()), + : OptionalInt.empty()), Paint.CAPABILITY); } @Override public void appendHoverText(ItemStack itemStack, @Nullable Level level, List lines, TooltipFlag flag) { + var skins = Skins.REGISTRY.get(this.skin).getAcceptedGuns(); + if (skins == null || skins.isEmpty()) { + lines.add(new TranslatableComponent("paint.no_guns") + .withStyle(ChatFormatting.GRAY)); + return; + } lines.add(new TranslatableComponent("paint.accepted_guns") .withStyle(ChatFormatting.GRAY)); - Skins.REGISTRY.get(this.skin).getAcceptedGuns().stream() + skins.stream() .map(ForgeRegistries.ITEMS::getValue) + .filter(Objects::nonNull) .map(Item::getDescription) .map(text -> text.copy().withStyle(ChatFormatting.RED)) .forEach(lines::add); } + } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/StorageItem.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/StorageItem.java index 3d51db5dd..4bd4bf8c6 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/StorageItem.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/StorageItem.java @@ -20,11 +20,8 @@ import java.util.List; -import java.util.Locale; -import java.util.Objects; import java.util.UUID; import org.jetbrains.annotations.Nullable; -import com.craftingdead.core.trauma.ProtectionConfig; import com.craftingdead.core.world.item.equipment.Equipment; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; @@ -52,7 +49,6 @@ import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemStackHandler; -import net.minecraftforge.registries.ForgeRegistries; public class StorageItem extends EquipmentItem { @@ -65,6 +61,7 @@ public class StorageItem extends EquipmentItem { private final Equipment.Slot slot; private final int itemRows; private final ItemHandlerMenuConstructor menuConstructor; + private final TranslatableComponent component; public StorageItem(Properties properties) { super(properties); @@ -72,6 +69,7 @@ public StorageItem(Properties properties) { this.slot = properties.slot; this.itemRows = properties.itemRows; this.menuConstructor = properties.menuConstructor; + this.component = properties.component; } @Override @@ -115,54 +113,8 @@ public void appendHoverText(ItemStack itemStack, Level world, List li TooltipFlag tooltipFlag) { super.appendHoverText(itemStack, world, lines, tooltipFlag); - if (this.slot == Equipment.Slot.VEST) { - var itemId = ForgeRegistries.ITEMS.getKey(itemStack.getItem()); - if (itemId != null) { - var profile = ProtectionConfig.get().vestProfile(itemId); - if (!profile.isEmpty()) { - lines.add(TextComponent.EMPTY); - lines.add(new TranslatableComponent("equipment.ballistic_stats") - .withStyle(ChatFormatting.YELLOW, ChatFormatting.BOLD)); - - var absorptionText = new TextComponent(Objects.requireNonNull( - String.format(Locale.ROOT, "%.0f%%", profile.absorption() * 100.0F))) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("▣ ") - .withStyle(ChatFormatting.BLUE) - .append(new TranslatableComponent("equipment.absorption") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(absorptionText)))); - - var stoppingPowerText = new TextComponent(Objects.requireNonNull( - String.format(Locale.ROOT, "%.0f", profile.stoppingPower()))) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("⚙ ") - .withStyle(ChatFormatting.GRAY) - .append(new TranslatableComponent("equipment.stopping_power") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(stoppingPowerText)))); - - if (profile.stunThreshold() > 0.0F) { - var stunThresholdText = new TextComponent(Objects.requireNonNull( - String.format(Locale.ROOT, "%.0f", profile.stunThreshold()))) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("✖ ") - .withStyle(ChatFormatting.YELLOW) - .append(new TranslatableComponent("equipment.stun_threshold") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(stunThresholdText)))); - } - - var durabilityText = new TextComponent(Objects.requireNonNull( - String.format(Locale.ROOT, "%.2f", profile.durabilityPerEnergy()))) - .withStyle(ChatFormatting.RED); - lines.add(new TextComponent("◊ ") - .withStyle(ChatFormatting.DARK_GRAY) - .append(new TranslatableComponent("equipment.durability_per_energy") - .withStyle(ChatFormatting.GRAY) - .append(Objects.requireNonNull(durabilityText)))); - } - } + if (this.component != null) { + lines.add(this.component.copy().withStyle(ChatFormatting.GRAY)); } itemStack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) @@ -221,16 +173,15 @@ public void readShareTag(ItemStack stack, @Nullable CompoundTag tag) { public static class Properties extends Item.Properties { - private ImmutableMultimap.Builder attributeModifiers = + private final ImmutableMultimap.Builder attributeModifiers = ImmutableMultimap.builder(); private Equipment.Slot slot; private int itemRows; private ItemHandlerMenuConstructor menuConstructor; + private TranslatableComponent component; public Properties attributeModifier(Attribute attribute, AttributeModifier modifier) { - this.attributeModifiers.put( - Objects.requireNonNull(attribute), - Objects.requireNonNull(modifier)); + this.attributeModifiers.put(attribute, modifier); return this; } @@ -248,6 +199,11 @@ public Properties menuConstructor(ItemHandlerMenuConstructor menuConstructor) { this.menuConstructor = menuConstructor; return this; } + + public Properties toolTip(TranslatableComponent component) { + this.component = component; + return this; + } } @FunctionalInterface diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/equipment/ClothingProtectionInitializer.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/equipment/ClothingProtectionInitializer.java index 4607b5a2c..71d941688 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/equipment/ClothingProtectionInitializer.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/equipment/ClothingProtectionInitializer.java @@ -41,37 +41,37 @@ public class ClothingProtectionInitializer { * Applies protection attributes to clothing items when they enter the world. * This ensures loot, mob drops, and spawned items get protection values. */ - @SubscribeEvent - public static void onItemEntitySpawn(EntityJoinWorldEvent event) { - if (event.getWorld().isClientSide()) { - return; // Only process on server side - } - - Entity entity = event.getEntity(); - if (entity instanceof ItemEntity itemEntity) { - ItemStack itemStack = itemEntity.getItem(); - initializeClothingProtection(itemStack); - } - } +// @SubscribeEvent +// public static void onItemEntitySpawn(EntityJoinWorldEvent event) { +// if (event.getWorld().isClientSide()) { +// return; // Only process on server side +// } +// +// Entity entity = event.getEntity(); +// if (entity instanceof ItemEntity itemEntity) { +// ItemStack itemStack = itemEntity.getItem(); +// initializeClothingProtection(itemStack); +// } +// } /** * Applies protection attributes when players craft clothing items. */ - @SubscribeEvent - public static void onItemCrafted(PlayerEvent.ItemCraftedEvent event) { - ItemStack itemStack = event.getCrafting(); - initializeClothingProtection(itemStack); - } +// @SubscribeEvent +// public static void onItemCrafted(PlayerEvent.ItemCraftedEvent event) { +// ItemStack itemStack = event.getCrafting(); +// initializeClothingProtection(itemStack); +// } /** * Applies protection attributes when players pick up clothing items. * This is a backup to ensure all clothing gets initialized. */ - @SubscribeEvent - public static void onItemPickup(EntityItemPickupEvent event) { - ItemStack itemStack = event.getItem().getItem(); - initializeClothingProtection(itemStack); - } +// @SubscribeEvent +// public static void onItemPickup(EntityItemPickupEvent event) { +// ItemStack itemStack = event.getItem().getItem(); +// initializeClothingProtection(itemStack); +// } /** * Initializes protection attributes on a clothing item if it doesn't have them yet. diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/AbstractGun.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/AbstractGun.java index 021cdf727..227d30af4 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/AbstractGun.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/AbstractGun.java @@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; +import net.minecraft.sounds.SoundEvents; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import com.craftingdead.core.ServerConfig; @@ -689,7 +690,12 @@ private void hitEntity(LivingExtension living, Entity hitEntity, Vec3 hitP .map(Hat.class::cast) .map(Hat::headshotReductionPercentage) .orElse(0.0F); - damage *= headshotDamagePercent * ServerConfig.instance.headshotBonusDamage.get(); + damage *= (float) (headshotDamagePercent * ServerConfig.instance.headshotBonusDamage.get()); + if (entity instanceof ServerPlayer player) { + player.playNotifySound(SoundEvents.ITEM_BREAK, player.getSoundSource(), 0.65F, 1.5F); + } + hitEntity.level.playSound(null, hitEntity.getX(), hitEntity.getY(), hitEntity.getZ(), + SoundEvents.ITEM_BREAK, hitEntity.getSoundSource(), 0.65F, 1.5F); } } @@ -775,6 +781,8 @@ private void npcHitEntity(LivingExtension living, Entity hitEntity, Vec3 h .map(Hat::headshotReductionPercentage) .orElse(0.0F); damage *= (float) (headshotDamagePercent * ServerConfig.instance.headshotBonusDamage.get()); + hitEntity.level.playSound(null, hitEntity.getX(), hitEntity.getY(), hitEntity.getZ(), + SoundEvents.ITEM_BREAK, hitEntity.getSoundSource(), 0.65F, 1.5F); } } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/ammoprovider/RefillableAmmoProvider.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/ammoprovider/RefillableAmmoProvider.java index 6ee281d02..9642649d2 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/ammoprovider/RefillableAmmoProvider.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/ammoprovider/RefillableAmmoProvider.java @@ -123,7 +123,7 @@ public void encode(FriendlyByteBuf out, boolean writeAll) { } else { out.writeBoolean(false); } - this.getMagazine().ifPresent(magazine -> magazine.encode(out, writeAll)); + this.getExpectedMagazine().encode(out, writeAll); out.writeVarInt(this.reserveSize); this.reserveSizeChanged = false; @@ -136,7 +136,7 @@ public void decode(FriendlyByteBuf in) { this.infiniteAmmo = in.readBoolean(); } - this.getMagazine().ifPresent(magazine -> magazine.decode(in)); + this.getExpectedMagazine().decode(in); this.reserveSize = in.readVarInt(); } diff --git a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/skin/Skins.java b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/skin/Skins.java index 7e3101ddc..f602ea895 100644 --- a/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/skin/Skins.java +++ b/crafting-dead-core/src/main/java/com/craftingdead/core/world/item/gun/skin/Skins.java @@ -96,25 +96,24 @@ public class Skins { static { register(VULCAN, ModItems.AK47); - register(ASMO, ModItems.AK47, ModItems.AWP, ModItems.M4A1, ModItems.P250, ModItems.P90, - ModItems.SCARL); - register(CANDY_APPLE, ModItems.AS50, ModItems.M107); - register(CYREX, ModItems.M4A1, ModItems.M9); - register(DIAMOND, ModItems.AS50, ModItems.DMR, ModItems.M107, ModItems.M4A1); + register(ASMO, ModItems.AK47, ModItems.AWP); // M4A1, P250, P90, SCAR-L + register(CANDY_APPLE); // AS50, M107 + register(CYREX); // M4A1, M9 + register(DIAMOND); // AS50, DMR, M107, M4A1 register(DRAGON, ModItems.AWP); - register(FADE, ModItems.G18, ModItems.MAC10); - register(FURY, ModItems.MINIGUN); - register(GEM, ModItems.P90); - register(INFERNO, ModItems.DESERT_EAGLE, ModItems.M4A1); - register(RUBY, ModItems.P90); - register(SCORCHED, ModItems.AWP, ModItems.DESERT_EAGLE, ModItems.DMR, ModItems.M4A1); - register(SLAUGHTER, ModItems.VECTOR); - register(UV, ModItems.MAC10); - register(HYPER_BEAST, ModItems.M4A1); - register(EMPEROR_DRAGON, ModItems.M4A1); + register(FADE); // G18, MAC-10 + register(FURY); // Minigun + register(GEM); // P90 + register(INFERNO, ModItems.DESERT_EAGLE); // M4A1 + register(RUBY); // P90 + register(SCORCHED, ModItems.AWP, ModItems.DESERT_EAGLE); // DMR, M4A1 + register(SLAUGHTER); // Vector + register(UV); // MAC-10 + register(HYPER_BEAST); // M4A1 + register(EMPEROR_DRAGON); // M4A1 register(NUCLEAR_WINTER, ModItems.DESERT_EAGLE); register(MONARCH, ModItems.AWP); - register(LOVELACE, ModItems.DESERT_EAGLE, ModItems.M4A1); + register(LOVELACE, ModItems.DESERT_EAGLE); // M4A1 } private static ResourceKey> createRegistryKey(String name) { @@ -123,9 +122,9 @@ private static ResourceKey> createRegistryKey(String name) { private static void register(ResourceKey location, RegistryObject... guns) { REGISTRY.register(location, new Skin(location.location(), - Arrays.stream(guns) - .map(RegistryObject::getId) - .collect(Collectors.toList())), + Arrays.stream(guns) + .map(RegistryObject::getId) + .collect(Collectors.toList())), Lifecycle.stable()); } } diff --git a/crafting-dead-core/src/main/resources/META-INF/mods.toml b/crafting-dead-core/src/main/resources/META-INF/mods.toml index 0707f2237..ded688d3b 100644 --- a/crafting-dead-core/src/main/resources/META-INF/mods.toml +++ b/crafting-dead-core/src/main/resources/META-INF/mods.toml @@ -14,13 +14,6 @@ displayURL = "www.craftingdead.com" modId = "craftingdead" version = "${file.jarVersion}" -[[dependencies.craftingdead]] -mandatory = true -modId = "craftingdeadanticheat" -ordering = "AFTER" -side = "BOTH" -versionRange = "[1.0,)" - [[dependencies.craftingdead]] mandatory = true modId = "forge" diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/lang/en_us.json b/crafting-dead-core/src/main/resources/assets/craftingdead/lang/en_us.json index f60376959..b7cf640d7 100644 --- a/crafting-dead-core/src/main/resources/assets/craftingdead/lang/en_us.json +++ b/crafting-dead-core/src/main/resources/assets/craftingdead/lang/en_us.json @@ -468,6 +468,7 @@ "clothing_item.water_breathing": "Gives water breathing ability", "clothing_item.water_speed": "Increases swimming speed", "paint.accepted_guns":"Use with:", + "paint.no_guns": "Coming soon...", "attachment_multiplier_type.damage": "Damage", "attachment_multiplier_type.accuracy": "Accuracy", @@ -492,6 +493,10 @@ "bloody_rag.information": "Stained cloth", "clean_rag.information": "Stops bleeding", "parachute.information": "Slows descent for safe landing", + "small_backpack.information": "Compact backpack for light travel", + "medium_backpack.information": "Reliable backpack for everyday adventuring", + "large_backpack.information": "Heavy-duty backpack built for long journeys", + "gunbag.information": "Specialized carry bag for firearms", "medical.use_duration": "Use Time:", "medical.healing": "Healing:", diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/acog_sight_reddot.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/acog_sight_reddot.png index c218954e2..1758359b8 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/acog_sight_reddot.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/acog_sight_reddot.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/eotech_reddot.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/eotech_reddot.png index 257c8224b..96a1e67fc 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/eotech_reddot.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/eotech_reddot.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/red_dot_sight_reddot.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/red_dot_sight_reddot.png index 86de2dd12..912737381 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/red_dot_sight_reddot.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/attachment/red_dot_sight_reddot.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/crafting.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/crafting.png index 0c215beef..a832a18c5 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/crafting.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/crafting.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/equipment.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/equipment.png index d69e7b1fc..8d6338091 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/equipment.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/equipment.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/generic_54.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/generic_54.png index 821defdf8..8e57aef23 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/generic_54.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/generic_54.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/widgets.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/widgets.png deleted file mode 100644 index b9395fbd9..000000000 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/gui/container/widgets.png and /dev/null differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acog_sight.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acog_sight.png index ed8d8aa3b..4097287d4 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acog_sight.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acog_sight.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acr_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acr_magazine.png index 09ec7a96f..33128a8e0 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acr_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/acr_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/ak47_30_round_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/ak47_30_round_magazine.png index 027626a8e..e22be4945 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/ak47_30_round_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/ak47_30_round_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/as50_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/as50_magazine.png index 08b6ca8f4..3aa407808 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/as50_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/as50_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/awp_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/awp_magazine.png index 2ad08a623..0b18bcd97 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/awp_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/awp_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bandage.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bandage.png index 553e19302..6fb206bc7 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bandage.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bandage.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bipod.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bipod.png index c61d45046..ba26d6180 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bipod.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/bipod.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/desert_eagle_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/desert_eagle_magazine.png index 8e91f0636..8b0826c4d 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/desert_eagle_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/desert_eagle_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/dmr_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/dmr_magazine.png index 94a223cb9..feb3e7400 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/dmr_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/dmr_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/eotech_sight.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/eotech_sight.png index 029dc216b..a427cc54a 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/eotech_sight.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/eotech_sight.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fn57_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fn57_magazine.png index 394f21020..82a093151 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fn57_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fn57_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fnfal_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fnfal_magazine.png index 6c2a2199b..581d1a4f5 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fnfal_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/fnfal_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g18_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g18_magazine.png index 1c9e419a7..22c998fc9 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g18_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g18_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g36c_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g36c_magazine.png index 8ff84d471..23e25dd46 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g36c_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/g36c_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hk417_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hk417_magazine.png index 994d5b789..7dda8ca29 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hk417_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hk417_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hp_scope.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hp_scope.png index c5d6fe3e6..5c8555965 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hp_scope.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/hp_scope.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/lp_scope.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/lp_scope.png index 93173d3f8..cd38ec4f8 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/lp_scope.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/lp_scope.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m107_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m107_magazine.png index 708817668..466b5e4d9 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m107_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m107_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m1911_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m1911_magazine.png index 51b507839..aedd7e3c1 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m1911_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m1911_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m240b_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m240b_magazine.png index 4c2c650fb..bad81c00f 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m240b_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m240b_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m9_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m9_magazine.png index 219d75920..181565b54 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m9_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/m9_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_extended_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_extended_magazine.png index 29982e7a5..e79c080f8 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_extended_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_extended_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_magazine.png index 87e3f59a1..894ff5b1a 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mac10_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/magnum_ammunition.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/magnum_ammunition.png index dc1cb65c9..8de8728f2 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/magnum_ammunition.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/magnum_ammunition.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/minigun_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/minigun_magazine.png index 12e723332..e98185c7f 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/minigun_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/minigun_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mk48mod_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mk48mod_magazine.png index e401d577c..62f24cf1a 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mk48mod_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mk48mod_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mossberg_shells.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mossberg_shells.png index 147e8acc1..055ff7344 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mossberg_shells.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mossberg_shells.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_21_round_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_21_round_magazine.png index 317f316a2..3c0de246b 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_21_round_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_21_round_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_35_round_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_35_round_magazine.png index 26c73c103..a08511076 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_35_round_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mp5a5_35_round_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mpt55_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mpt55_magazine.png index 896f0c6ed..de47f11de 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mpt55_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/mpt55_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p250_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p250_magazine.png index 1eb089443..2b22f6836 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p250_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p250_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p90_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p90_magazine.png index 711f19d91..fd0adcd1e 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p90_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/p90_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/red_dot_sight.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/red_dot_sight.png index 34fb1d516..d2a8f1ed9 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/red_dot_sight.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/red_dot_sight.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_drum_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_drum_magazine.png index 1556b9d97..d23940fe9 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_drum_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_drum_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_magazine.png index 3c8a1edaf..b5279a553 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/rpk_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/sporter22_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/sporter22_magazine.png index 6bfe13e23..32d95590e 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/sporter22_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/sporter22_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_20_round_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_20_round_magazine.png index 8b99b6b33..5f4cc10b9 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_20_round_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_20_round_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_30_round_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_30_round_magazine.png index 85e65d4a3..65caf9b7d 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_30_round_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_30_round_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_box_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_box_magazine.png index 5b87d666c..90d317396 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_box_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_box_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_drum_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_drum_magazine.png index 99995cf1d..9ac8f66a2 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_drum_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/stanag_drum_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/suppressor.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/suppressor.png index e103d6084..8996c07d2 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/suppressor.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/suppressor.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/tactical_grip.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/tactical_grip.png index 559e776ba..8481f9575 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/tactical_grip.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/tactical_grip.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/taser_cartridge.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/taser_cartridge.png index adece0f69..c09ec202f 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/taser_cartridge.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/taser_cartridge.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/trench_gun_shells.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/trench_gun_shells.png index e5ddc43ef..ae0096dae 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/trench_gun_shells.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/trench_gun_shells.png differ diff --git a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/vector_magazine.png b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/vector_magazine.png index 1b8414ce1..c7c050862 100644 Binary files a/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/vector_magazine.png and b/crafting-dead-core/src/main/resources/assets/craftingdead/textures/item/vector_magazine.png differ diff --git a/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/crafting_table.png b/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/crafting_table.png index b2dc9ec93..b2db993f8 100644 Binary files a/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/crafting_table.png and b/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/crafting_table.png differ diff --git a/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/generic_54.png b/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/generic_54.png index 822bd8a8a..5f34ade81 100644 Binary files a/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/generic_54.png and b/crafting-dead-core/src/main/resources/assets/minecraft/textures/gui/container/generic_54.png differ diff --git a/crafting-dead-core/src/main/resources/craftingdead.mixins.json b/crafting-dead-core/src/main/resources/craftingdead.mixins.json index b79eecbd7..87c166551 100644 --- a/crafting-dead-core/src/main/resources/craftingdead.mixins.json +++ b/crafting-dead-core/src/main/resources/craftingdead.mixins.json @@ -5,6 +5,7 @@ "minVersion": "0.8", "refmap": "craftingdead.refmap.json", "mixins": [ + "AbstractContainerMenuMixin", "EntityMixin", "ItemEntityMixin", "ExplosionMixin", @@ -18,6 +19,7 @@ "ModelBakeryMixin", "MouseHandlerMixin", "KeyboardHandlerMixin", + "InventoryMixin", "PlayerRendererMixin" ], "injectors": { diff --git a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/action/SurvivalActionTypes.java b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/action/SurvivalActionTypes.java index 7dd96ba35..d723f1539 100644 --- a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/action/SurvivalActionTypes.java +++ b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/action/SurvivalActionTypes.java @@ -33,6 +33,7 @@ import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.monster.Zombie; +import net.minecraft.world.level.block.Blocks; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.RegistryObject; @@ -88,7 +89,7 @@ public class SurvivalActionTypes { .durationSeconds(3) .forFluid(FluidTags.WATER) .forItem(SurvivalItems.EMPTY_WATER_CANTEEN) - .finishSound(SoundEvents.BOTTLE_FILL) + .finishSound(SoundEvents.BOTTLE_FILL, 1.0F, 1.0F) .resultItem(SurvivalItems.WATER_CANTEEN) .consumeItemInCreative(true) .build()); @@ -96,12 +97,13 @@ public class SurvivalActionTypes { public static final RegistryObject> FILL_WATER_CANTEEN_FROM_PUMP = deferredRegister.register("fill_water_canteen_from_pump", () -> BlockItemActionType.builder() - .durationSeconds(0.5F) + .durationSeconds(5) .forBlock(blockState -> blockState.getBlock().getRegistryName() != null && (blockState.getBlock().getRegistryName().toString().equals("craftingdeadimmerse:water_pump") || blockState.getBlock().getRegistryName().toString().equals("craftingdeadimmerse:water_pump_tall") || blockState.getBlock().getRegistryName().toString().equals("craftingdeadimmerse:water_pump_rusted") - || blockState.getBlock().getRegistryName().toString().equals("craftingdeadimmerse:water_pump_tall_rusted"))) + || blockState.getBlock().getRegistryName().toString().equals("craftingdeadimmerse:water_pump_tall_rusted") + || blockState.getBlock().equals(Blocks.DIRT))) .forItem(SurvivalItems.EMPTY_WATER_CANTEEN) .finishSound(SoundEvents.BOTTLE_FILL) .resultItem(SurvivalItems.WATER_CANTEEN) @@ -114,7 +116,7 @@ public class SurvivalActionTypes { .durationSeconds(3) .forFluid(FluidTags.WATER) .forItem(SurvivalItems.EMPTY_FLASK) - .finishSound(SoundEvents.BOTTLE_FILL) + .finishSound(SoundEvents.BOTTLE_FILL, 1.0F, 1.0F) .resultItem(SurvivalItems.FLASK) .consumeItemInCreative(true) .build()); diff --git a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/entity/SupplyDrop.java b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/entity/SupplyDrop.java index c05181fe5..70faf1ca5 100644 --- a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/entity/SupplyDrop.java +++ b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/entity/SupplyDrop.java @@ -107,6 +107,11 @@ public void tick() { } } + if (this.dropActive) { + var motion = this.getDeltaMovement(); + this.setDeltaMovement(0.0D, Math.min(motion.y, 0.0D), 0.0D); + } + if (!this.isNoGravity()) { this.setDeltaMovement(this.getDeltaMovement().add(0.0D, -0.0025D, 0.0D)); } diff --git a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/ConsumableItem.java b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/ConsumableItem.java index f0a1dbb82..c04f04e1e 100644 --- a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/ConsumableItem.java +++ b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/ConsumableItem.java @@ -83,8 +83,8 @@ private static ICapabilityProvider createHydrationProvider(int water) { public @NotNull InteractionResultHolder use(@NotNull Level level, @NotNull Player player, @NotNull InteractionHand hand) { boolean canConsume = (this.type == Type.ONLY_FOOD && this.canEat(player)) || (this.type == Type.FOOD_AND_DRINK && ( - this.canEat(player) || this.canDrink(player))) || (this.type == Type.ONLY_DRINK && this.canDrink(player) - && CraftingDeadSurvival.instance().isImmerseLoaded()); + this.canEat(player) || this.canDrink(player))) || (this.type == Type.ONLY_DRINK && this.canDrink(player) + && CraftingDeadSurvival.instance().isImmerseLoaded()); return canConsume ? ItemUtils.startUsingInstantly(level, player, hand) : InteractionResultHolder.fail(player.getItemInHand(hand)); } @@ -175,11 +175,11 @@ public void appendHoverText(@NotNull ItemStack itemStack, @Nullable Level level, @NotNull List tooltip, @NotNull TooltipFlag flag) { if (this.foodProperties != null) { tooltip.add(new TranslatableComponent("item.craftingdeadsurvival.consumable.food_info").withStyle( - ChatFormatting.GRAY).append(new TextComponent(" " + this.foodProperties.getNutrition()).withStyle(ChatFormatting.RED))); + ChatFormatting.GRAY).append(new TextComponent(" " + this.foodProperties.getNutrition()).withStyle(ChatFormatting.RED))); } if (this.water > 0) { tooltip.add(new TranslatableComponent("item.craftingdeadsurvival.consumable.water_info").withStyle( - ChatFormatting.GRAY).append(new TextComponent(" " + this.water).withStyle(ChatFormatting.RED))); + ChatFormatting.GRAY).append(new TextComponent(" " + this.water).withStyle(ChatFormatting.RED))); } } } diff --git a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/SurvivalItems.java b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/SurvivalItems.java index 795b8b66c..2bc7d57fb 100644 --- a/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/SurvivalItems.java +++ b/crafting-dead-survival/src/main/java/com/craftingdead/survival/world/item/SurvivalItems.java @@ -31,7 +31,9 @@ import com.craftingdead.survival.world.item.ConsumableItem.Type; import com.craftingdead.survival.world.level.block.SurvivalBlocks; import com.craftingdead.survival.world.level.storage.loot.BuiltInLootTables; +import java.util.List; import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; @@ -39,10 +41,13 @@ import net.minecraft.world.item.Item.Properties; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Rarity; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; import net.minecraftforge.common.ForgeSpawnEggItem; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; +import org.jetbrains.annotations.NotNull; public class SurvivalItems { @@ -273,9 +278,7 @@ public ItemStack makeIcon() { public static final RegistryObject EMPTY_WATER_BOTTLE = deferredRegister.register("empty_water_bottle", - () -> new MultiActionItem(new Item.Properties().tab(TAB).stacksTo(3), - SurvivalActionTypes.FILL_WATER_BOTTLE_FROM_PUMP, - SurvivalActionTypes.FILL_WATER_BOTTLE)); + () -> new Item(new Item.Properties().tab(TAB).stacksTo(3))); public static final RegistryObject WATER_BOTTLE = deferredRegister.register("water_bottle", @@ -284,9 +287,8 @@ public ItemStack makeIcon() { public static final RegistryObject EMPTY_WATER_CANTEEN = deferredRegister.register("empty_water_canteen", - () -> new MultiActionItem(new Item.Properties().tab(TAB).stacksTo(3), - SurvivalActionTypes.FILL_WATER_CANTEEN_FROM_PUMP, - SurvivalActionTypes.FILL_WATER_CANTEEN)); + () -> new ActionItem(SurvivalActionTypes.FILL_WATER_CANTEEN, + new Item.Properties().tab(TAB).stacksTo(3))); public static final RegistryObject WATER_CANTEEN = deferredRegister.register("water_canteen", @@ -295,9 +297,8 @@ public ItemStack makeIcon() { public static final RegistryObject EMPTY_FLASK = deferredRegister.register("empty_flask", - () -> new MultiActionItem(new Item.Properties().tab(TAB).stacksTo(3), - SurvivalActionTypes.FILL_FLASK_FROM_PUMP, - SurvivalActionTypes.FILL_FLASK)); + () -> new ActionItem(SurvivalActionTypes.FILL_FLASK, + new Item.Properties().tab(TAB).stacksTo(3))); public static final RegistryObject FLASK = deferredRegister.register("flask", @@ -632,6 +633,15 @@ public ItemStack getContainerItem(ItemStack itemStack) { copy.setDamageValue(copy.getDamageValue() + 1); return copy.getDamageValue() >= copy.getMaxDamage() ? ItemStack.EMPTY : copy; } + + @Override + public void appendHoverText(ItemStack stack, Level world, List tooltip, + @NotNull TooltipFlag flag) { + tooltip.add(new TranslatableComponent("item.craftingdead.durability").append(" ").append( + new TranslatableComponent(String.valueOf(stack.getMaxDamage() - stack.getDamageValue())) + .withStyle(style -> style.withColor(ChatFormatting.RED))) + .withStyle(style -> style.withColor(ChatFormatting.GRAY))); + } }); public static final RegistryObject SCREWDRIVER = @@ -658,6 +668,15 @@ public ItemStack getContainerItem(ItemStack itemStack) { copy.setDamageValue(copy.getDamageValue() + 1); return copy.getDamageValue() >= copy.getMaxDamage() ? ItemStack.EMPTY : copy; } + + @Override + public void appendHoverText(ItemStack stack, Level world, List tooltip, + @NotNull TooltipFlag flag) { + tooltip.add(new TranslatableComponent("item.craftingdead.durability").append(" ").append( + new TranslatableComponent(String.valueOf(stack.getMaxDamage() - stack.getDamageValue())) + .withStyle(style -> style.withColor(ChatFormatting.RED))) + .withStyle(style -> style.withColor(ChatFormatting.GRAY))); + } }); public static final RegistryObject MULTI_TOOL = @@ -697,83 +716,15 @@ public ItemStack getContainerItem(ItemStack itemStack) { .tab(TAB))); static { + var canOpenerTooltip = new TranslatableComponent("can_opener.information") + .withStyle(ChatFormatting.GRAY); var cannedFoodTooltip = new TranslatableComponent("canned_food.information") .withStyle(ChatFormatting.GRAY); var emptyCanteenFlaskTooltip = new TranslatableComponent("empty_canteen_flask.information") - .withStyle(ChatFormatting.AQUA); - - // Tools - ArbitraryTooltips.registerTooltip(CAN_OPENER, - new TranslatableComponent("can_opener.information") - .withStyle(ChatFormatting.YELLOW)); - ArbitraryTooltips.registerTooltip(SCREWDRIVER, - new TranslatableComponent("screwdriver.information") - .withStyle(ChatFormatting.YELLOW)); - ArbitraryTooltips.registerTooltip(MULTI_TOOL, - new TranslatableComponent("multi_tool.information") - .withStyle(ChatFormatting.YELLOW)); - ArbitraryTooltips.registerTooltip(ROPE, - new TranslatableComponent("rope.information") - .withStyle(ChatFormatting.GRAY)); - - // Medical items - ArbitraryTooltips.registerTooltip(SPLINT, - new TranslatableComponent("splint.information") - .withStyle(ChatFormatting.GREEN)); - ArbitraryTooltips.registerTooltip(MORPHINE_SYRINGE, - new TranslatableComponent("morphine_syringe.information") - .withStyle(ChatFormatting.GREEN)); - ArbitraryTooltips.registerTooltip(RBI_SYRINGE, - new TranslatableComponent("rbi_syringe.information") - .withStyle(ChatFormatting.RED)); - ArbitraryTooltips.registerTooltip(CURE_SYRINGE, - new TranslatableComponent("cure_syringe.information") - .withStyle(ChatFormatting.GREEN)); - - // Explosives and radios - ArbitraryTooltips.registerTooltip(PIPE_BOMB, - new TranslatableComponent("pipe_bomb.information") - .withStyle(ChatFormatting.RED)); - ArbitraryTooltips.registerTooltip(MEDICAL_DROP_RADIO, - new TranslatableComponent("medical_drop_radio.information") - .withStyle(ChatFormatting.GREEN)); - ArbitraryTooltips.registerTooltip(MILITARY_DROP_RADIO, - new TranslatableComponent("military_drop_radio.information") - .withStyle(ChatFormatting.GOLD)); - - // Loot blocks - ArbitraryTooltips.registerTooltip(MILITARY_LOOT_ITEM, - new TranslatableComponent("military_loot.information") - .withStyle(ChatFormatting.DARK_GREEN)); - ArbitraryTooltips.registerTooltip(MILITARY_LOOT_GEN_ITEM, - new TranslatableComponent("military_loot_gen.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(POLICE_LOOT_ITEM, - new TranslatableComponent("police_loot.information") - .withStyle(ChatFormatting.BLUE)); - ArbitraryTooltips.registerTooltip(POLICE_LOOT_GEN_ITEM, - new TranslatableComponent("police_loot_gen.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(MEDIC_LOOT_ITEM, - new TranslatableComponent("medic_loot.information") - .withStyle(ChatFormatting.LIGHT_PURPLE)); - ArbitraryTooltips.registerTooltip(MEDIC_LOOT_GEN_ITEM, - new TranslatableComponent("medic_loot_gen.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(CIVILIAN_LOOT_ITEM, - new TranslatableComponent("civilian_loot.information") - .withStyle(ChatFormatting.WHITE)); - ArbitraryTooltips.registerTooltip(CIVILIAN_LOOT_GEN_ITEM, - new TranslatableComponent("civilian_loot_gen.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(CIVILIAN_RARE_LOOT_ITEM, - new TranslatableComponent("civilian_rare_loot.information") - .withStyle(ChatFormatting.YELLOW)); - ArbitraryTooltips.registerTooltip(CIVILIAN_RARE_LOOT_GEN_ITEM, - new TranslatableComponent("civilian_rare_loot_gen.information") - .withStyle(ChatFormatting.DARK_GRAY)); - - // Canned foods (need to be opened) + .withStyle(ChatFormatting.GRAY); + ArbitraryTooltips.registerTooltip(CAN_OPENER, canOpenerTooltip); + ArbitraryTooltips.registerTooltip(SCREWDRIVER, canOpenerTooltip); + ArbitraryTooltips.registerTooltip(MULTI_TOOL, canOpenerTooltip); ArbitraryTooltips.registerTooltip(CANNED_SWEETCORN, cannedFoodTooltip); ArbitraryTooltips.registerTooltip(CANNED_BEANS, cannedFoodTooltip); ArbitraryTooltips.registerTooltip(CANNED_TUNA, cannedFoodTooltip); @@ -784,12 +735,8 @@ public ItemStack getContainerItem(ItemStack itemStack) { ArbitraryTooltips.registerTooltip(CANNED_PICKLES, cannedFoodTooltip); ArbitraryTooltips.registerTooltip(CANNED_DOG_FOOD, cannedFoodTooltip); ArbitraryTooltips.registerTooltip(CANNED_TOMATO_SOUP, cannedFoodTooltip); - - // Empty containers ArbitraryTooltips.registerTooltip(EMPTY_WATER_CANTEEN, emptyCanteenFlaskTooltip); ArbitraryTooltips.registerTooltip(EMPTY_FLASK, emptyCanteenFlaskTooltip); - - // Medical items ArbitraryTooltips.registerTooltip(SPLINT, new TranslatableComponent("splint.information") .withStyle(ChatFormatting.GRAY)); @@ -802,156 +749,8 @@ public ItemStack getContainerItem(ItemStack itemStack) { ArbitraryTooltips.registerTooltip(CURE_SYRINGE, new TranslatableComponent("cure_syringe.information") .withStyle(ChatFormatting.GRAY)); - - // Drinks - ArbitraryTooltips.registerTooltip(WATER_BOTTLE, - new TranslatableComponent("water_bottle.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(WATER_CANTEEN, - new TranslatableComponent("water_canteen.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(FLASK, - new TranslatableComponent("flask.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(ICED_TEA, - new TranslatableComponent("iced_tea.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(IRON_BREW, - new TranslatableComponent("iron_brew.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(JUICE_POUCH, - new TranslatableComponent("juice_pouch.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(LEMON_SODA, - new TranslatableComponent("lemon_soda.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(MILK_CARTON, - new TranslatableComponent("milk_carton.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(ORANGE_SODA, - new TranslatableComponent("orange_soda.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(PEPE_SODA, - new TranslatableComponent("pepe_soda.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(SPRITE, - new TranslatableComponent("sprite.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(COLA, - new TranslatableComponent("cola.information") - .withStyle(ChatFormatting.AQUA)); - ArbitraryTooltips.registerTooltip(ZOMBIE_ENERGY, - new TranslatableComponent("zombie_energy.information") - .withStyle(ChatFormatting.AQUA)); - - // Snacks and packaged food - ArbitraryTooltips.registerTooltip(POWER_BAR, - new TranslatableComponent("power_bar.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(CANDY_BAR, - new TranslatableComponent("candy_bar.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(CEREAL, - new TranslatableComponent("cereal.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(NUTTY_CEREAL, - new TranslatableComponent("nutty_cereal.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(EMERALD_CEREAL, - new TranslatableComponent("emerald_cereal.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(FLAKE_CEREAL, - new TranslatableComponent("flake_cereal.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(CHIPS, - new TranslatableComponent("chips.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(RANCH_CHIPS, - new TranslatableComponent("ranch_chips.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(CHEESY_CHIPS, - new TranslatableComponent("cheesy_chips.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(SALTED_CHIPS, - new TranslatableComponent("salted_chips.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(POPCORN, - new TranslatableComponent("popcorn.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(RICE_BAG, - new TranslatableComponent("rice_bag.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(NOODLES, - new TranslatableComponent("noodles.information") - .withStyle(ChatFormatting.GOLD)); - - // Fresh and rotten fruits - ArbitraryTooltips.registerTooltip(ORANGE, - new TranslatableComponent("orange.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(ROTTEN_ORANGE, - new TranslatableComponent("rotten_orange.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(PEAR, - new TranslatableComponent("pear.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(ROTTEN_PEAR, - new TranslatableComponent("rotten_pear.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(ROTTEN_APPLE, - new TranslatableComponent("rotten_apple.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(BLUEBERRY, - new TranslatableComponent("blueberry.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(ROTTEN_BLUEBERRY, - new TranslatableComponent("rotten_blueberry.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(RASPBERRY, - new TranslatableComponent("raspberry.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(ROTTEN_RASPBERRY, - new TranslatableComponent("rotten_raspberry.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(ROTTEN_MELON_SLICE, - new TranslatableComponent("rotten_melon_slice.information") - .withStyle(ChatFormatting.DARK_GRAY)); - - // MRE - ArbitraryTooltips.registerTooltip(MRE, - new TranslatableComponent("mre.information") - .withStyle(ChatFormatting.GOLD)); - - // Opened canned foods - ArbitraryTooltips.registerTooltip(OPEN_CANNED_SWEETCORN, - new TranslatableComponent("open_canned_sweetcorn.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_BEANS, - new TranslatableComponent("open_canned_beans.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_TUNA, - new TranslatableComponent("open_canned_tuna.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_PEACHES, - new TranslatableComponent("open_canned_peaches.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_PASTA, - new TranslatableComponent("open_canned_pasta.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_CORNED_BEEF, - new TranslatableComponent("open_canned_corned_beef.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_CUSTARD, - new TranslatableComponent("open_canned_custard.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_PICKLES, - new TranslatableComponent("open_canned_pickles.information") - .withStyle(ChatFormatting.GOLD)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_DOG_FOOD, - new TranslatableComponent("open_canned_dog_food.information") - .withStyle(ChatFormatting.DARK_GRAY)); - ArbitraryTooltips.registerTooltip(OPEN_CANNED_TOMATO_SOUP, - new TranslatableComponent("open_canned_tomato_soup.information") - .withStyle(ChatFormatting.GOLD)); + ArbitraryTooltips.registerTooltip(ROPE, + new TranslatableComponent("rope.information") + .withStyle(ChatFormatting.GRAY)); } } diff --git a/crafting-dead-survival/src/main/resources/META-INF/mods.toml b/crafting-dead-survival/src/main/resources/META-INF/mods.toml index 4edaee965..dca7ff10d 100644 --- a/crafting-dead-survival/src/main/resources/META-INF/mods.toml +++ b/crafting-dead-survival/src/main/resources/META-INF/mods.toml @@ -11,13 +11,6 @@ displayURL = "www.craftingdead.com" modId = "craftingdeadsurvival" version = "${file.jarVersion}" -[[dependencies.craftingdeadsurvival]] -mandatory = true -modId = "craftingdeadanticheat" -ordering = "AFTER" -side = "BOTH" -versionRange = "[1.0,)" - [[dependencies.craftingdeadsurvival]] mandatory = true modId = "craftingdead" diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/lang/en_us.json b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/lang/en_us.json index 2b18a2ceb..1f3242ea8 100644 --- a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/lang/en_us.json +++ b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/lang/en_us.json @@ -251,16 +251,14 @@ "item.craftingdeadsurvival.consumable.food_info": "Food", "item.craftingdeadsurvival.consumable.water_info": "Water", - "can_opener.information": "🔧 Opens canned goods", - "screwdriver.information": "🔧 Opens canned goods", - "multi_tool.information": "🔪 Opens cans • Melee weapon", - "rope.information": "🪢 Useful for crafting", - "canned_food.information": "🥫 Requires can opener or tool", - "empty_canteen_flask.information": "💧 Refill at water sources", - "splint.information": "🩹 Fixes broken legs • Restores mobility", - "morphine_syringe.information": "💉 Pain relief • Movement boost", - "rbi_syringe.information": "☠ Infects target • Dangerous", - "cure_syringe.information": "💚 Cures RBI infection • Life-saving", + "can_opener.information": "Opens canned goods", + "canned_food.information": "Open it using the right tool", + "empty_canteen_flask.information": "Can be refilled with water", + "splint.information": "Stabilizes broken limbs", + "morphine_syringe.information": "Relieves severe pain", + "rope.information": "Useful for crafting", + "rbi_syringe.information": "Causes infection", + "cure_syringe.information": "Cures infection", "pipe_bomb.information": "💣 Improvised explosive • High damage", "medical_drop_radio.information": "📻 Calls medical supply drop", "military_drop_radio.information": "📻 Calls military supply drop", diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_beans.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_beans.png index a006b394d..b478a01d1 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_beans.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_beans.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_corned_beef.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_corned_beef.png index 3dfd7d3a6..736ae1bce 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_corned_beef.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_corned_beef.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_custard.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_custard.png index a7edd13fb..2946eccb1 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_custard.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_custard.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_dog_food.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_dog_food.png index 173fc02a5..916a19eab 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_dog_food.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_dog_food.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pasta.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pasta.png index b3b2c5348..6d9b1952e 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pasta.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pasta.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_peaches.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_peaches.png index e48458360..f756cbddf 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_peaches.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_peaches.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pickles.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pickles.png index db46ac973..f205200a8 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pickles.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_pickles.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_sweetcorn.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_sweetcorn.png index 592424306..7ebf09a24 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_sweetcorn.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_sweetcorn.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tomato_soup.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tomato_soup.png index 5e6bbb26a..71a99ad56 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tomato_soup.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tomato_soup.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tuna.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tuna.png index dd1d95fa1..5e65c2ecc 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tuna.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/canned_tuna.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/cereal.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/cereal.png index 18416a513..fa991e474 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/cereal.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/cereal.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/emerald_cereal.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/emerald_cereal.png index 4f8a23513..88d230b8b 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/emerald_cereal.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/emerald_cereal.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_milk_carton.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_milk_carton.png index 99a3963fd..0f25ba86b 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_milk_carton.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_milk_carton.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_water_bottle.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_water_bottle.png index 74b9031f0..a6e813ad9 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_water_bottle.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/empty_water_bottle.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/flake_cereal.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/flake_cereal.png index 4df60da92..c8bd71f35 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/flake_cereal.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/flake_cereal.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/medical_drop_radio.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/medical_drop_radio.png index 0b75bfdbb..e5e138f0f 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/medical_drop_radio.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/medical_drop_radio.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/military_drop_radio.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/military_drop_radio.png index 0a823381a..cc5fe6822 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/military_drop_radio.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/military_drop_radio.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/milk_carton.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/milk_carton.png index d68ecd702..39d515c80 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/milk_carton.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/milk_carton.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/nutty_cereal.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/nutty_cereal.png index 5d5aa8994..aa21429d0 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/nutty_cereal.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/nutty_cereal.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_beans.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_beans.png index 2aa8af98c..610ddb6bc 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_beans.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_beans.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_corned_beef.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_corned_beef.png index 316b978b1..99bae362c 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_corned_beef.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_corned_beef.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_custard.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_custard.png index 1e8e5922b..1e1fdd49c 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_custard.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_custard.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_dog_food.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_dog_food.png index bddebe14a..54452af7d 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_dog_food.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_dog_food.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pasta.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pasta.png index 622acc074..fce7e5e2c 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pasta.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pasta.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_peaches.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_peaches.png index ce6a71cc7..c1399fd7f 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_peaches.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_peaches.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pickles.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pickles.png index 31f896b03..558cb178f 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pickles.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_pickles.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_sweetcorn.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_sweetcorn.png index b738418f4..58e50c797 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_sweetcorn.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_sweetcorn.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tomato_soup.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tomato_soup.png index 0c9ace407..8d6c962f3 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tomato_soup.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tomato_soup.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tuna.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tuna.png index 63044bbc8..0a1c1d5ca 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tuna.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/open_canned_tuna.png differ diff --git a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/water_bottle.png b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/water_bottle.png index b29a09550..3432e406f 100644 Binary files a/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/water_bottle.png and b/crafting-dead-survival/src/main/resources/assets/craftingdeadsurvival/textures/item/water_bottle.png differ