Fixes 2.0.2

This commit is contained in:
Vos
2026-03-16 01:49:33 -05:00
parent db836f943f
commit 3b43a7175e
7 changed files with 59 additions and 37 deletions
+1 -1
View File
@@ -13,6 +13,6 @@ loom_version=1.15-SNAPSHOT
fabric_version=0.134.1+1.21.9 fabric_version=0.134.1+1.21.9
# Mod Properties # Mod Properties
mod_version=2.0.1 mod_version=2.0.2
maven_group=com.acethewildfire.acesbs maven_group=com.acethewildfire.acesbs
archives_base_name=acesbs archives_base_name=acesbs
@@ -1,14 +1,8 @@
Command Core textures broken Command Core textures broken
Command Core Broken Command Core Broken
Bricked Up does not do anything
Wildfire Particles missing
Particles not on server??? Particles not on server???
Fren is broken
Combustible LEmon will not render Combustible LEmon will not render
Pauldron does not skeleton sounds Crafting for the Plate Cariier, Beserkers Pauldron, Wildfire boots
@@ -1,5 +1,6 @@
package com.acethewildfire.acesbs.effect; package com.acethewildfire.acesbs.effect;
import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.sounds.ModSounds; import com.acethewildfire.acesbs.sounds.ModSounds;
import net.minecraft.entity.Flutterer; import net.minecraft.entity.Flutterer;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
@@ -7,6 +8,7 @@ import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectCategory; import net.minecraft.entity.effect.StatusEffectCategory;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -18,21 +20,35 @@ public class BrickedUpEffect extends StatusEffect {
@Override @Override
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
int durationLeft = entity.getStatusEffect(ModEffects.BRICKED_UP).getDuration(); var effect = entity.getStatusEffect(ModEffects.BRICKED_UP);
if (effect == null) return false;
int durationLeft = effect.getDuration();
int idealLen = 160; int idealLen = 160;
if(durationLeft > idealLen - 1){ if(durationLeft >= idealLen - 1){
world.playSound(entity, entity.getBlockPos(), ModSounds.BRICKED_UP, SoundCategory.PLAYERS, 2f, 1f); if (!world.isClient()){
world.playSound(
null,
entity.getBlockPos(),
ModSounds.BRICKED_UP,
SoundCategory.PLAYERS,
2.0f,
1.0f
);
}
} }
else if(durationLeft > idealLen - 120){ else if(durationLeft > idealLen - 120){
float p = world.getBlockState(entity.getBlockPos()).getBlock().getSlipperiness(); Vec3d vel = entity.getVelocity();
float p = entity.getEntityWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
float f = entity.isOnGround() ? p * 0.91F : 0.91F; float f = entity.isOnGround() ? p * 0.91F : 0.91F;
entity.travel(entity.getMovement());
Vec3d vec3d6 = entity.getVelocity(); Vec3d vec3d6 = entity.getVelocity();
double q = vec3d6.y; double q = vec3d6.y;
q += (0.05 * 7.75 - vec3d6.y) * 0.2; q += (0.05 * 10 - vec3d6.y) * 0.2;
entity.setVelocity(vec3d6.x * (double)f, this instanceof Flutterer ? q * (double)f : q * 0.9800000190734863, vec3d6.z * (double)f); entity.setVelocity(vec3d6.x * (double)f, this instanceof Flutterer ? q * (double)f : q * 0.9800000190734863, vec3d6.z * (double)f);
// entity.setVelocity(vel.x, vel.y + 0.08, vel.z);
entity.velocityModified = true;
} }
// else if (durationLeft < idealLen - 80 && durationLeft > idealLen - 120) { // else if (durationLeft < idealLen - 80 && durationLeft > idealLen - 120) {
// //
@@ -51,14 +67,15 @@ public class BrickedUpEffect extends StatusEffect {
// world.playSound(entity, entity.getBlockPos(), ModSounds.FART, SoundCategory.PLAYERS, 5f, 1f); // world.playSound(entity, entity.getBlockPos(), ModSounds.FART, SoundCategory.PLAYERS, 5f, 1f);
// } // }
else { else {
float p = world.getBlockState(entity.getBlockPos()).getBlock().getSlipperiness(); float p = entity.getEntityWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
float f = entity.isOnGround() ? p * 0.91F : 0.91F; float f = entity.isOnGround() ? p * 0.91F : 0.91F;
entity.travel(entity.getMovement()); Vec3d vec3d6 = entity.getVelocity();
Vec3d vec3d6 = entity.getVelocity();;
double q = vec3d6.y; double q = vec3d6.y;
q += (0.05 * 250 - vec3d6.y) * 0.2; q += (0.05 * 250 - vec3d6.y) * 0.2;
entity.setVelocity(vec3d6.x * (double)f, this instanceof Flutterer ? q * (double)f : q * 0.9800000190734863, vec3d6.z * (double)f); entity.setVelocity(vec3d6.x * (double)f, this instanceof Flutterer ? q * (double)f : q * 0.9800000190734863, vec3d6.z * (double)f);
// entity.setVelocity(vel.x, vel.y + 2, vel.z);
entity.velocityModified = true;
} }
@@ -42,6 +42,20 @@ public class AquariumGravel extends Item {
@Override @Override
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) { public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
super.usageTick(world, user, stack, remainingUseTicks); super.usageTick(world, user, stack, remainingUseTicks);
if (remainingUseTicks % 10 == 0){
world.playSound(
null,
user.getX(),
user.getY(),
user.getZ(),
ModSounds.CRUNCH,
SoundCategory.PLAYERS,
1.0F,
1.0F
);
}
} }
@Override @Override
@@ -131,12 +131,10 @@ public class CigaretteFunny extends Item {
double vz = look.z * speed + (world.random.nextDouble() - 0.5) * 0.3; double vz = look.z * speed + (world.random.nextDouble() - 0.5) * 0.3;
world.addParticleClient( world.addParticleClient(
ParticleTypes.CAMPFIRE_COSY_SMOKE, ParticleTypes.CAMPFIRE_COSY_SMOKE,
user.getX() + look.x * 0.3, x, y, z,
user.getEyeY() - 0.15, vx, vy, vz
user.getZ() + look.z * 0.3, );
0.15, 0.1, 0.15
);
} }
} }
} }
@@ -1,5 +1,6 @@
package com.acethewildfire.acesbs.item.custom; package com.acethewildfire.acesbs.item.custom;
import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.item.ModItems; import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.particle.ModParticles; import com.acethewildfire.acesbs.particle.ModParticles;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@@ -32,7 +33,7 @@ public class WildfireArmorItem extends Item {
public void inventoryTick(ItemStack stack, ServerWorld world, Entity entity, @Nullable EquipmentSlot slot) { public void inventoryTick(ItemStack stack, ServerWorld world, Entity entity, @Nullable EquipmentSlot slot) {
if(!world.isClient()) { if(!world.isClient()) {
if(entity instanceof PlayerEntity player) { if(entity instanceof PlayerEntity player) {
ItemStack bootsStack = player.getInventory().getStack(EquipmentSlot.FEET.getIndex()); ItemStack bootsStack = player.getEquippedStack(EquipmentSlot.FEET);
if (!bootsStack.isEmpty() && bootsStack.getItem() == ModItems.WILDFIRE_BOOTS){ if (!bootsStack.isEmpty() && bootsStack.getItem() == ModItems.WILDFIRE_BOOTS){
double x = player.getX(); double x = player.getX();
double y = player.getY(); // feet level double y = player.getY(); // feet level
@@ -79,12 +80,13 @@ public class WildfireArmorItem extends Item {
}; };
} else { } else {
packet = new ParticleS2CPacket( packet = new ParticleS2CPacket(
ParticleTypes.FLAME, ParticleTypes.FLAME,
true, false, true,
(float) x, (float) y + 0.2f, (float) z, false,
0.2f, 0f, 0.2f, x, y + 0.2, z,
0.01f, 0.2f, 0f, 0.2f,
1 0.01f,
1
); );
} }
@@ -34,19 +34,16 @@ public abstract class PlayerEntityMixin{
@Inject(method = "damage", at = @At(value = "TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT, cancellable = true) @Inject(method = "damage", at = @At(value = "TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT, cancellable = true)
private void damageMixin(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) { private void damageMixin(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
Item chestplate = this.inventory.player.getInventory().getStack(EquipmentSlot.CHEST.getIndex()).getItem(); PlayerEntity player = (PlayerEntity)(Object)this;
if (chestplate == ModItems.BERSERKERS_PAULDRON && Objects.equals(this.getName().getLiteralString(), "Tennocraft12")){
PlayerEntity player = (PlayerEntity) (Object) this; ItemStack chest = player.getEquippedStack(EquipmentSlot.CHEST);
if (!chest.isEmpty() && chest.getItem() == ModItems.BERSERKERS_PAULDRON && Objects.equals(this.getName().getLiteralString(), "Tennocraft12")){
if (!world.isClient()) { if (!world.isClient()) {
world.playSound(null, player.getX(),player.getY(), player.getZ(), SoundEvents.ENTITY_SKELETON_HURT, SoundCategory.PLAYERS, 2f, 1f); world.playSound(null, player.getX(),player.getY(), player.getZ(), SoundEvents.ENTITY_SKELETON_HURT, SoundCategory.PLAYERS, 2f, 1f);
} }
cir.setReturnValue(true); cir.setReturnValue(true);
} }
PlayerEntity player = (PlayerEntity)(Object)this;
ItemStack chest = player.getEquippedStack(EquipmentSlot.CHEST);
if (chest.getItem() instanceof SovsPlateCarrierArmorItem) { if (chest.getItem() instanceof SovsPlateCarrierArmorItem) {
int durabilityDamage = 1; int durabilityDamage = 1;