Fixes
This commit is contained in:
@@ -9,4 +9,6 @@ Particles not on server???
|
||||
|
||||
Fren is broken
|
||||
|
||||
Combustible LEmon will not render
|
||||
Combustible LEmon will not render
|
||||
|
||||
Pauldron does not skeleton sounds
|
||||
@@ -40,19 +40,19 @@ public class FrenModel extends EntityModel<FrenState> {
|
||||
public static TexturedModelData getTexturedModelData() {
|
||||
ModelData modelData = new ModelData();
|
||||
ModelPartData modelPartData = modelData.getRoot();
|
||||
ModelPartData root = modelPartData.addChild("root", ModelPartBuilder.create(), ModelTransform.rotation(0.0F, 17.0F, 0.0F));
|
||||
ModelPartData root = modelPartData.addChild("root", ModelPartBuilder.create(), ModelTransform.of(0.0F, 17.0F, 0.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData head = root.addChild("head", ModelPartBuilder.create().uv(0, 0).cuboid(-4.0F, -7.0F, -4.0F, 8.0F, 8.0F, 8.0F, new Dilation(0.0F)), ModelTransform.rotation(0.0F, -12.0F, 0.0F));
|
||||
ModelPartData head = root.addChild("head", ModelPartBuilder.create().uv(0, 0).cuboid(-4.0F, -7.0F, -4.0F, 8.0F, 8.0F, 8.0F, new Dilation(0.0F)), ModelTransform.of(0.0F, -12.0F, 0.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData body = root.addChild("body", ModelPartBuilder.create().uv(16, 16).cuboid(-4.0F, -18.0F, -2.0F, 8.0F, 12.0F, 4.0F, new Dilation(0.0F)), ModelTransform.rotation(0.0F, 7.0F, 0.0F));
|
||||
ModelPartData body = root.addChild("body", ModelPartBuilder.create().uv(16, 16).cuboid(-4.0F, -18.0F, -2.0F, 8.0F, 12.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(0.0F, 7.0F, 0.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData leg1 = root.addChild("leg1", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, 0.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.rotation(-2.0F, 1.0F, 2.0F));
|
||||
ModelPartData leg1 = root.addChild("leg1", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, 0.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(-2.0F, 1.0F, 2.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData leg2 = root.addChild("leg2", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, 0.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.rotation(2.0F, 1.0F, 2.0F));
|
||||
ModelPartData leg2 = root.addChild("leg2", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, 0.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(2.0F, 1.0F, 2.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData leg4 = root.addChild("leg4", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, -4.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.rotation(2.0F, 1.0F, -2.0F));
|
||||
ModelPartData leg4 = root.addChild("leg4", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, -4.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(2.0F, 1.0F, -2.0F, 0f, 0f, 0f));
|
||||
|
||||
ModelPartData leg3 = root.addChild("leg3", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, -4.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.rotation(-2.0F, 1.0F, -2.0F));
|
||||
ModelPartData leg3 = root.addChild("leg3", ModelPartBuilder.create().uv(0, 16).cuboid(-2.0F, 0.0F, -4.0F, 4.0F, 6.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(-2.0F, 1.0F, -2.0F, 0f, 0f, 0f));
|
||||
return TexturedModelData.of(modelData, 64, 32);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,31 +2,18 @@ package com.acethewildfire.acesbs.item;
|
||||
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import net.minecraft.client.render.entity.equipment.EquipmentModel;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.equipment.ArmorMaterial;
|
||||
import net.minecraft.item.equipment.EquipmentAsset;
|
||||
import net.minecraft.item.equipment.EquipmentType;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ModArmorMaterials {
|
||||
public static EquipmentModel PRISMA = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "prisma_steel")).build();
|
||||
public static EquipmentModel ASHEN = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "ashen_steel")).build();
|
||||
public static EquipmentModel WILDFIRE = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "wildfire")).build();
|
||||
public static EquipmentModel PLATES = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "plates")).build();
|
||||
public static EquipmentModel BERSERKERS = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "berserkers")).build();
|
||||
|
||||
static RegistryKey<? extends Registry<EquipmentAsset>> REGISTRY_KEY = RegistryKey.ofRegistry(Identifier.ofVanilla("equipment_asset"));
|
||||
|
||||
public static final RegistryKey<EquipmentAsset> PRISMA_KEY = RegistryKey.of(REGISTRY_KEY, Identifier.of(AcesBS.MOD_ID, "prisma_steel"));
|
||||
|
||||
@@ -16,6 +16,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.consume.UseAction;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.stat.Stats;
|
||||
@@ -32,7 +34,7 @@ public class CigaretteFunny extends Item {
|
||||
}
|
||||
|
||||
// Store the currently playing sound (client only)
|
||||
private static PlayerAttachedSound activeSound;
|
||||
// private static PlayerAttachedSound activeSound;
|
||||
|
||||
@Override
|
||||
public ActionResult use(World world, PlayerEntity user, Hand hand) {
|
||||
@@ -48,10 +50,10 @@ public class CigaretteFunny extends Item {
|
||||
public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) {
|
||||
super.onStoppedUsing(stack, world, user, remainingUseTicks);
|
||||
|
||||
if (activeSound != null) {
|
||||
MinecraftClient.getInstance().getSoundManager().stop(activeSound);
|
||||
activeSound = null;
|
||||
}
|
||||
// if (activeSound != null) {
|
||||
// MinecraftClient.getInstance().getSoundManager().stop(activeSound);
|
||||
// activeSound = null;
|
||||
// }
|
||||
|
||||
if (user instanceof PlayerEntity player) {
|
||||
if (!world.isClient()) {
|
||||
@@ -86,16 +88,32 @@ public class CigaretteFunny extends Item {
|
||||
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
|
||||
super.usageTick(world, user, stack, remainingUseTicks);
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient()){
|
||||
if (remainingUseTicks % 40 == 0) {
|
||||
world.playSound(
|
||||
null,
|
||||
user.getX(),
|
||||
user.getY(),
|
||||
user.getZ(),
|
||||
SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE,
|
||||
SoundCategory.PLAYERS,
|
||||
1.0f,
|
||||
1.0f
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (world.isClient()) {
|
||||
|
||||
if (activeSound == null) {
|
||||
activeSound = new PlayerAttachedSound(
|
||||
((PlayerEntity) user),
|
||||
ModSounds.SMOKING
|
||||
);
|
||||
|
||||
MinecraftClient.getInstance().getSoundManager().play(activeSound);
|
||||
}
|
||||
// if (activeSound == null) {
|
||||
// activeSound = new PlayerAttachedSound(
|
||||
// ((PlayerEntity) user),
|
||||
// ModSounds.SMOKING
|
||||
// );
|
||||
//
|
||||
// MinecraftClient.getInstance().getSoundManager().play(activeSound);
|
||||
// }
|
||||
// Direction player is looking
|
||||
Vec3d look = user.getRotationVec(1.0f);
|
||||
|
||||
@@ -113,28 +131,14 @@ public class CigaretteFunny extends Item {
|
||||
double vz = look.z * speed + (world.random.nextDouble() - 0.5) * 0.3;
|
||||
|
||||
world.addParticleClient(
|
||||
ParticleTypes.CAMPFIRE_COSY_SMOKE,
|
||||
x, y, z,
|
||||
vx, vy, vz
|
||||
);
|
||||
ParticleTypes.CAMPFIRE_COSY_SMOKE,
|
||||
user.getX() + look.x * 0.3,
|
||||
user.getEyeY() - 0.15,
|
||||
user.getZ() + look.z * 0.3,
|
||||
0.15, 0.1, 0.15
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient()) {
|
||||
// if (remainingUseTicks % 40 == 0) {
|
||||
// world.playSound(
|
||||
// null,
|
||||
// user.getX(),
|
||||
// user.getY(),
|
||||
// user.getZ(),
|
||||
// SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE,
|
||||
// SoundCategory.PLAYERS,
|
||||
// 1.0f,
|
||||
// 1.0f
|
||||
// );
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,9 +2,8 @@ package com.acethewildfire.acesbs.item.custom;
|
||||
|
||||
import com.acethewildfire.acesbs.component.ModDataComponentTypes;
|
||||
import com.acethewildfire.acesbs.effect.ModEffects;
|
||||
import com.acethewildfire.acesbs.screen.custom.CommandCoreScreen;
|
||||
//import com.acethewildfire.acesbs.screen.custom.CommandCoreScreen;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.TooltipDisplayComponent;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -43,12 +42,12 @@ public class CommandCore extends Item {
|
||||
itemStack.set(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE, true);
|
||||
}
|
||||
} else {
|
||||
if (world.isClient()) {
|
||||
// Open the selection screen client-side
|
||||
MinecraftClient.getInstance().setScreen(
|
||||
new CommandCoreScreen(itemStack)
|
||||
);
|
||||
}
|
||||
// if (!world.isClient()) {
|
||||
// // Open the selection screen client-side
|
||||
// MinecraftClient.getInstance().setScreen(
|
||||
// new CommandCoreScreen(itemStack)
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -73,28 +73,23 @@ public class ModArmorItem extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasFullSuitOfArmorOn(PlayerEntity player) {
|
||||
ItemStack boots = player.getInventory().getStack(EquipmentSlot.FEET.getIndex());
|
||||
ItemStack leggings = player.getInventory().getStack(EquipmentSlot.LEGS.getIndex());
|
||||
ItemStack chestplate = player.getInventory().getStack(EquipmentSlot.CHEST.getIndex());
|
||||
ItemStack helmet = player.getInventory().getStack(EquipmentSlot.HEAD.getIndex());
|
||||
private boolean hasCorrectArmorOn(ArmorMaterial material, PlayerEntity player) {
|
||||
EquippableComponent equippableComponentBoots = player.getEquippedStack(EquipmentSlot.FEET).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentLeggings = player.getEquippedStack(EquipmentSlot.LEGS).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentBreastplate = player.getEquippedStack(EquipmentSlot.CHEST).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentHelmet = player.getEquippedStack(EquipmentSlot.HEAD).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
|
||||
return !helmet.isEmpty() && !chestplate.isEmpty()
|
||||
return (equippableComponentBoots != null && equippableComponentBoots.assetId().get().equals(material.assetId())) && (equippableComponentLeggings != null && equippableComponentLeggings.assetId().get().equals(material.assetId())) &&
|
||||
(equippableComponentBreastplate != null && equippableComponentBreastplate.assetId().get().equals(material.assetId())) && (equippableComponentHelmet != null && equippableComponentHelmet.assetId().get().equals(material.assetId()));
|
||||
}
|
||||
|
||||
private boolean hasFullSuitOfArmorOn(PlayerEntity player) {
|
||||
ItemStack boots = player.getEquippedStack(EquipmentSlot.FEET);
|
||||
ItemStack leggings = player.getEquippedStack(EquipmentSlot.LEGS);
|
||||
ItemStack breastplate = player.getEquippedStack(EquipmentSlot.CHEST);
|
||||
ItemStack helmet = player.getEquippedStack(EquipmentSlot.HEAD);
|
||||
|
||||
return !helmet.isEmpty() && !breastplate.isEmpty()
|
||||
&& !leggings.isEmpty() && !boots.isEmpty();
|
||||
}
|
||||
|
||||
private boolean hasCorrectArmorOn(ArmorMaterial material, PlayerEntity player) {
|
||||
ItemStack boots = player.getInventory().getStack(EquipmentSlot.FEET.getIndex());
|
||||
ItemStack leggings = player.getInventory().getStack(EquipmentSlot.LEGS.getIndex());
|
||||
ItemStack chestplate = player.getInventory().getStack(EquipmentSlot.CHEST.getIndex());
|
||||
ItemStack helmet = player.getInventory().getStack(EquipmentSlot.HEAD.getIndex());
|
||||
|
||||
EquippableComponent equippableComponentBoots = boots.getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentLeggings = leggings.getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentBreastplate = chestplate.getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentHelmet = helmet.getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
|
||||
return equippableComponentBoots.assetId().get().equals(material.assetId()) && equippableComponentLeggings.assetId().get().equals(material.assetId()) &&
|
||||
equippableComponentBreastplate.assetId().get().equals(material.assetId()) && equippableComponentHelmet.assetId().get().equals(material.assetId());
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
"acesbs.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.18.4",
|
||||
"fabricloader": ">=0.17.3",
|
||||
"minecraft": "~1.21.9",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
|
||||
Reference in New Issue
Block a user