diff --git a/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditions.java b/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditions.java index afb8e82..d470c5e 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditions.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditions.java @@ -17,7 +17,6 @@ public class AstralAdditions implements ModInitializer { @Override public void onInitialize() { - ModFluids.registerFluids(); ModEntities.registerEntities(); ModBlocks.registerBlocks(); diff --git a/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditionsClient.java b/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditionsClient.java index 7bdb75e..4f0e8d3 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditionsClient.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/AstralAdditionsClient.java @@ -1,8 +1,12 @@ package com.github.ethanicuss.astraladditions; +import com.github.ethanicuss.astraladditions.musicplayer.NowPlayingHud; import com.github.ethanicuss.astraladditions.registry.*; import com.github.ethanicuss.astraladditions.playertracker.PlayerTracker; import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; +import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -10,7 +14,6 @@ public class AstralAdditionsClient implements ClientModInitializer { public static final Logger LOGGER = LoggerFactory.getLogger(AstralAdditions.MOD_ID); public static PlayerTracker playerTracker = new PlayerTracker(); - @Override public void onInitializeClient() { ModEntities.registerClient(); @@ -20,5 +23,15 @@ public void onInitializeClient() { ModItemProperties.registerClient(); ModPotion.registerClient(); LOGGER.info("Astral Additions client is active!"); + + //!IDK where to move these to + HudRenderCallback.EVENT.register((matrices, tickDelta) -> { + NowPlayingHud.render(matrices); + }); + + ClientTickEvents.END_CLIENT_TICK.register(client -> { + NowPlayingHud.tick(); + }); + } } \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/items/PylonItem.java b/src/main/java/com/github/ethanicuss/astraladditions/items/PylonItem.java index 7c3b369..04b78d8 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/items/PylonItem.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/items/PylonItem.java @@ -31,166 +31,260 @@ import java.util.function.Predicate; public class PylonItem extends Item { + public static final String X_KEY = "coord_x"; + public static final String Y_KEY = "coord_y"; + public static final String Z_KEY = "coord_z"; - public static final String X_KEY = "coord_x"; - public static final String Y_KEY = "coord_y"; - public static final String Z_KEY = "coord_z"; - - private static final int maxDistance = 128; - private static final float pylonSize = 2.0f; - - private static final Predicate PYLON_PREDICATE = (entity) -> { - return true; - }; - public PylonItem(Item.Settings settings) { - super(settings); - } - - @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - ItemStack itemStack = user.getStackInHand(hand); - NbtCompound nbtCompound = itemStack.getOrCreateNbt(); - - world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.NEUTRAL, 0.5f, 0.3f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); - if (world.isClient()) {//Client - if (!nbtCompound.isEmpty()) {//TP - double i = nbtCompound.getDouble(X_KEY); - double j = nbtCompound.getDouble(Y_KEY); - double k = nbtCompound.getDouble(Z_KEY); - float f = pylonSize; - Box box = new Box((float) i - f, (float) j - f, (float) k - f, (float) (i + 1) + f, (float) (j + 1) + f, (float) (k + 1) + f); - List pylons = user.world.getEntitiesByType(TypeFilter.instanceOf(PylonEntity.class), box, PYLON_PREDICATE); - if (getDistance(user.getX(), user.getY(), user.getZ(), i, j, k) < maxDistance) { - itemStack.setNbt(new NbtCompound());//Clear nbt - user.incrementStat(Stats.USED.getOrCreateStat(this)); - } - else{ - user.sendMessage(new TranslatableText(AstralAdditions.MOD_ID + ".text.pylon_too_far"), true); - } - - return TypedActionResult.success(itemStack, world.isClient()); - } - } else {//Server - if (nbtCompound.isEmpty()){//PLACE - double i = user.getX(); - double j = user.getY(); - double k = user.getZ(); - nbtCompound.putDouble(X_KEY, i); - nbtCompound.putDouble(Y_KEY, j); - nbtCompound.putDouble(Z_KEY, k);//Write user coords - - world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.AMBIENT_UNDERWATER_EXIT, SoundCategory.NEUTRAL, 0.7f, 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); - for (int amount = 0; amount < 5; amount++) { - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.WITCH, user.getX(), user.getY(), user.getZ(), 1, 0.0 + world.getRandom().nextFloat() * 0.4f - 0.2f, 0.2 + world.getRandom().nextFloat() * 0.2f, 0.0 + world.getRandom().nextFloat() * 0.4f - 0.2f, 0); - } - for (int amount = 0; amount < 10; amount++) { - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.GLOW_SQUID_INK, user.getX(), user.getY() + 0.2f, user.getZ(), 1, Math.sin(amount*8.0f)*1.0f, 0, Math.cos(amount*8.0f)*1.0f, 0.1); - } - PylonEntity pylon = new PylonEntity(ModEntities.PYLON, user.world); - pylon.setPlayer(user.getEntityName()); - pylon.setPos(user.getX(), user.getY() + 1, user.getZ()); - pylon.refreshPositionAndAngles(user.getX(), user.getY() + 1, user.getZ(), 0, 0); - world.spawnEntity(pylon);//Place pylon entity - - user.getItemCooldownManager().set(this, 45); - return TypedActionResult.success(itemStack, world.isClient()); - } else{//TP - double i = nbtCompound.getDouble(X_KEY); - double j = nbtCompound.getDouble(Y_KEY); - double k = nbtCompound.getDouble(Z_KEY); - float f = pylonSize; - Box box = new Box((float) i - f, (float) j - f, (float) k - f, (float) (i + 1) + f, (float) (j + 1) + f, (float) (k + 1) + f); - List pylons = user.world.getEntitiesByType(TypeFilter.instanceOf(PylonEntity.class), box, PYLON_PREDICATE); - if (!pylons.isEmpty()) { - PylonEntity pylon = pylons.get(0); - if (getDistance(user.getX(), user.getY(), user.getZ(), i, j, k) < maxDistance) { - if (user.isSneaking()){ - for (int amount = 0; amount < 45; amount++) { - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.GLOW_SQUID_INK, pylon.getX(), pylon.getY() + 0.2f, pylon.getZ(), 1, Math.sin(amount*8.0f)*1.2f, 0, Math.cos(amount*8.0f)*1.2f, 1); - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.SQUID_INK, pylon.getX(), pylon.getY() + 1.2f, pylon.getZ(), 1, Math.sin(amount*8.0f)*1.4f, 0, Math.cos(amount*8.0f)*1.4f, 1); - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.GLOW_SQUID_INK, pylon.getX(), pylon.getY() + 2.2f, pylon.getZ(), 1, Math.sin(amount*8.0f)*1.2f, 0, Math.cos(amount*8.0f)*1.2f, 1); - } - world.playSound(null, pylon.getX(), pylon.getY(), pylon.getZ(), SoundEvents.BLOCK_BELL_USE, SoundCategory.NEUTRAL, 0.5f, 1.5f); - float strength = -0.16f; - float vStrength = 0.05f; - List pl = world.getOtherEntities(pylon, new Box(pylon.getX()-16, pylon.getY()-32, pylon.getZ()-16, pylon.getX()+16, pylon.getY()+32, pylon.getZ()+16)); - if (user.isInRange(pylon, 32)) { - System.out.println("player in range"); - pl.add(user); - } - for (Entity p : pl) { - if (p instanceof LivingEntity){ - int strMult = 1; - if (!(p instanceof PlayerEntity)) { - strMult *= 2; - } - double xdiff = pylon.getX() - p.getX(); - double zdiff = pylon.getZ() - p.getZ(); - double dist = Math.sqrt(Math.pow(xdiff, 2) + Math.pow(zdiff, 2)); - if (dist < 10) { - if (xdiff == 0) { - xdiff = 0.01; - } - if (zdiff == 0) { - zdiff = 0.01; - } - double angleX = Math.atan(Math.abs(zdiff) / xdiff); - double angleZ = Math.atan(Math.abs(xdiff) / zdiff); - double cosX = Math.cos(angleX); - double cosZ = Math.cos(angleZ); - if (cosX == 0) { - cosX = 0.01; - } - if (cosZ == 0) { - cosZ = 0.01; - } - dist = -dist + 10; - - p.addVelocity(dist * cosX * strength * strMult * (Math.abs(angleX) / angleX), Math.abs(dist * vStrength * strMult), dist * cosZ * strength * strMult * (Math.abs(angleZ) / angleZ)); - if (p instanceof PlayerEntity){//i love client-server relationships!!!! - ((PlayerEntity)p).velocityModified = true; - } - } - } - } - } - else{ - for (int amount = 0; amount < 10; amount++) { - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.GLOW_SQUID_INK, user.getX(), user.getY(), user.getZ(), 1, 0.0 + world.getRandom().nextFloat() * 0.2f - 0.1f, 0.3 + world.getRandom().nextFloat() * 0.7f, 0.0 + world.getRandom().nextFloat() * 0.2f - 0.1f, 0); - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.GLOW_SQUID_INK, pylon.getX(), pylon.getY(), pylon.getZ(), 1, 0.0 + world.getRandom().nextFloat() * 0.2f - 0.1f, 0.3 + world.getRandom().nextFloat() * 0.7f, 0.0 + world.getRandom().nextFloat() * 0.2f - 0.1f, 0); - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.WITCH, user.getX(), user.getY(), user.getZ(), 1, 0.0 + world.getRandom().nextFloat() * 0.8f - 0.4f, 0.4 + world.getRandom().nextFloat() * 0.3f, 0.0 + world.getRandom().nextFloat() * 0.8f - 0.4f, 0); - ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.WITCH, pylon.getX(), pylon.getY(), pylon.getZ(), 1, 0.0 + world.getRandom().nextFloat() * 0.8f - 0.4f, 0.4 + world.getRandom().nextFloat() * 0.3f, 0.0 + world.getRandom().nextFloat() * 0.8f - 0.4f, 0); - } - ((ServerPlayerEntity) user).networkHandler.requestTeleport(nbtCompound.getDouble(X_KEY), nbtCompound.getDouble(Y_KEY), nbtCompound.getDouble(Z_KEY), user.getYaw(), user.getPitch(), EnumSet.noneOf(PlayerPositionLookS2CPacket.Flag.class)); - world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.AMBIENT_UNDERWATER_ENTER, SoundCategory.NEUTRAL, 0.7f, 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); - world.playSound(null, pylon.getX(), pylon.getY(), pylon.getZ(), SoundEvents.AMBIENT_UNDERWATER_ENTER, SoundCategory.NEUTRAL, 0.7f, 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); - } - pylon.discard(); - itemStack.setNbt(new NbtCompound()); - } else{ - - world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENTITY_ENDERMAN_HURT, SoundCategory.NEUTRAL, 0.5f, 0.3f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); - } - } - } - } - return TypedActionResult.fail(itemStack); - } - - private double getDistance(double x1, double y1, double z1, double x2, double y2, double z2){ - return Math.sqrt(Math.pow(x1-x2, 2) + Math.pow(y1-y2, 2) + Math.pow(z1-z2, 2)); - } - - @Override - public void appendTooltip(ItemStack itemStack, @Nullable World world, List tooltip, TooltipContext context) { - if (itemStack.hasNbt()) { - NbtCompound nbtCompound = itemStack.getNbt(); - String string = String.join(", ", String.valueOf(Math.round(nbtCompound.getDouble(X_KEY))), String.valueOf(Math.round(nbtCompound.getDouble(Y_KEY))), String.valueOf(Math.round(nbtCompound.getDouble(Z_KEY)))); - if (!StringHelper.isEmpty(string)) { - tooltip.add(new LiteralText(string).formatted(Formatting.DARK_AQUA)); - } - } - } + private static final int maxDistance = 128; + private static final double maxDistanceSqrt = (double) maxDistance * maxDistance; + private static final float pylonSize = 2.0f; + private static final Predicate anyPylon = entity -> true; + + public PylonItem(Settings settings) { + super(settings); + } + + @Override + public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + ItemStack itemStack = user.getStackInHand(hand); + NbtCompound nbtCompound = itemStack.getOrCreateNbt(); + + world.playSound(null, user.getX(), user.getY(), user.getZ(), + SoundEvents.ENTITY_ENDERMAN_TELEPORT, SoundCategory.NEUTRAL, + 0.5f, + 0.3f / (world.getRandom().nextFloat() * 0.4f + 0.8f) + ); + + //?Client + if (world.isClient) { + if (!hasPylonNbt(nbtCompound)) { + return TypedActionResult.success(itemStack, true); + } + + double px = nbtCompound.getDouble(X_KEY); + double py = nbtCompound.getDouble(Y_KEY); + double pz = nbtCompound.getDouble(Z_KEY); + + if (isWithinRangeSq(user, px, py, pz)) { + clearPylonNbt(itemStack); + user.incrementStat(Stats.USED.getOrCreateStat(this)); + } else { + user.sendMessage(new TranslatableText(AstralAdditions.MOD_ID + ".text.pylon_too_far"), true); + } + return TypedActionResult.success(itemStack, true); + } + + //?Server + if (!hasPylonNbt(nbtCompound)) { + placePylon(world, user, itemStack, nbtCompound); + return TypedActionResult.success(itemStack, false); + } + + return tryUseExistingPylon(world, user, itemStack, nbtCompound); + } + + + //?Server logic + private void placePylon(World world, PlayerEntity user, ItemStack stack, NbtCompound nbt) { + nbt.putDouble(X_KEY, user.getX()); + nbt.putDouble(Y_KEY, user.getY()); + nbt.putDouble(Z_KEY, user.getZ()); + + world.playSound(null, user.getX(), user.getY(), user.getZ(), + SoundEvents.AMBIENT_UNDERWATER_EXIT, SoundCategory.NEUTRAL, + 0.7f, + 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f) + ); + + spawnPlaceParticles((ServerWorld) world, user); + + PylonEntity pylon = new PylonEntity(ModEntities.PYLON, world); + pylon.setPlayer(user.getEntityName()); + pylon.refreshPositionAndAngles(user.getX(), user.getY() + 1, user.getZ(), 0, 0); + world.spawnEntity(pylon); + + user.getItemCooldownManager().set(this, 45); + } + + private TypedActionResult tryUseExistingPylon(World world, PlayerEntity user, ItemStack stack, NbtCompound nbt) { + double px = nbt.getDouble(X_KEY); + double py = nbt.getDouble(Y_KEY); + double pz = nbt.getDouble(Z_KEY); + + PylonEntity pylon = findPylon(world, px, py, pz); + if (pylon == null) return TypedActionResult.fail(stack); + + if (!isWithinRangeSq(user, px, py, pz)) { + world.playSound(null, user.getX(), user.getY(), user.getZ(), + SoundEvents.ENTITY_ENDERMAN_HURT, SoundCategory.NEUTRAL, + 0.5f, + 0.3f / (world.getRandom().nextFloat() * 0.4f + 0.8f) + ); + return TypedActionResult.fail(stack); + } + + if (user.isSneaking()) { + doSneakPulse((ServerWorld) world, user, pylon); + + } else { + doTeleport((ServerWorld) world, (ServerPlayerEntity) user, pylon, px, py, pz); + } + + pylon.discard(); + clearPylonNbt(stack); + + return TypedActionResult.success(stack, false); + } + + + //?Helpers + private boolean hasPylonNbt(NbtCompound nbt) { + return nbt != null && nbt.contains(X_KEY) && nbt.contains(Y_KEY) && nbt.contains(Z_KEY); + } + + private void clearPylonNbt(ItemStack stack) { + stack.setNbt(new NbtCompound()); + } + + private boolean isWithinRangeSq(PlayerEntity user, double x, double y, double z) { + return user.squaredDistanceTo(x, y, z) < maxDistanceSqrt; + } + + @Nullable + private PylonEntity findPylon(World world, double x, double y, double z) { + float f = pylonSize; + Box box = new Box( + x - f, y - f, z - f, + (x + 1) + f, (y + 1) + f, (z + 1) + f + ); + + List pylons = world.getEntitiesByType(TypeFilter.instanceOf(PylonEntity.class), box, anyPylon); + return pylons.isEmpty() ? null : pylons.get(0); + } + + private void spawnPlaceParticles(ServerWorld world, PlayerEntity user) { + for (int i = 0; i < 5; i++) { + ModUtils.spawnForcedParticles(world, ParticleTypes.WITCH, + user.getX(), user.getY(), user.getZ(), + 1, + world.getRandom().nextFloat() * 0.4f - 0.2f, + 0.2f + world.getRandom().nextFloat() * 0.2f, + world.getRandom().nextFloat() * 0.4f - 0.2f, + 0 + ); + } + + for (int i = 0; i < 10; i++) { + ModUtils.spawnForcedParticles(world, ParticleTypes.GLOW_SQUID_INK, + user.getX(), user.getY() + 0.2f, user.getZ(), + 1, + Math.sin(i * 8.0f) * 1.0f, + 0, + Math.cos(i * 8.0f) * 1.0f, + 0.1 + ); + } + } + + private void doTeleport(ServerWorld world, ServerPlayerEntity user, PylonEntity pylon, double x, double y, double z) { + for (int i = 0; i < 10; i++) { + spawnTeleportParticles(world, user.getX(), user.getY(), user.getZ()); + spawnTeleportParticles(world, pylon.getX(), pylon.getY(), pylon.getZ()); + } + + user.networkHandler.requestTeleport(x, y, z, user.getYaw(), user.getPitch(), EnumSet.noneOf(PlayerPositionLookS2CPacket.Flag.class)); + + world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.AMBIENT_UNDERWATER_ENTER, SoundCategory.NEUTRAL, 0.7f, 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); + world.playSound(null, pylon.getX(), pylon.getY(), pylon.getZ(), SoundEvents.AMBIENT_UNDERWATER_ENTER, SoundCategory.NEUTRAL, 0.7f, 0.8f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); + } + + private void spawnTeleportParticles(ServerWorld world, double x, double y, double z) { + ModUtils.spawnForcedParticles(world, ParticleTypes.GLOW_SQUID_INK, + x, y, z, 1, + world.getRandom().nextFloat() * 0.2f - 0.1f, + 0.3f + world.getRandom().nextFloat() * 0.7f, + world.getRandom().nextFloat() * 0.2f - 0.1f, + 0 + ); + ModUtils.spawnForcedParticles(world, ParticleTypes.WITCH, x, y, z, 1, + world.getRandom().nextFloat() * 0.8f - 0.4f, + 0.4f + world.getRandom().nextFloat() * 0.3f, + world.getRandom().nextFloat() * 0.8f - 0.4f, + 0 + ); + } + + private void doSneakPulse(ServerWorld world, PlayerEntity user, PylonEntity pylon) { + for (int i = 0; i < 45; i++) { + double sinX = Math.sin(i * 8.0f); + double cosX = Math.cos(i * 8.0f); + + ModUtils.spawnForcedParticles(world, ParticleTypes.GLOW_SQUID_INK, pylon.getX(), pylon.getY() + 0.2f, pylon.getZ(), + 1, sinX * 1.2f, 0, cosX * 1.2f, 1); + + ModUtils.spawnForcedParticles(world, ParticleTypes.SQUID_INK, pylon.getX(), pylon.getY() + 1.2f, pylon.getZ(), + 1, sinX * 1.4f, 0, cosX * 1.4f, 1); + + ModUtils.spawnForcedParticles(world, ParticleTypes.GLOW_SQUID_INK, pylon.getX(), pylon.getY() + 2.2f, pylon.getZ(), + 1, sinX * 1.2f, 0, cosX * 1.2f, 1); + } + + world.playSound(null, pylon.getX(), pylon.getY(), pylon.getZ(), SoundEvents.BLOCK_BELL_USE, SoundCategory.NEUTRAL, 0.5f, 1.5f); + + float strength = -0.16f; + float vStrength = 0.05f; + + List targets = world.getOtherEntities(pylon, new Box(pylon.getX() - 16, pylon.getY() - 32, pylon.getZ() - 16, pylon.getX() + 16, pylon.getY() + 32, pylon.getZ() + 16)); + + if (user.isInRange(pylon, 32)) { + targets.add(user); + } + + for (Entity entity : targets) { + if (!(entity instanceof LivingEntity)) continue; + + int mult = (entity instanceof PlayerEntity) ? 1 : 2; + + double dx = pylon.getX() - entity.getX(); + double dz = pylon.getZ() - entity.getZ(); + double dist = Math.sqrt(dx * dx + dz * dz); + + if (dist >= 10) continue; + + if (dx == 0) dx = 0.01; + if (dz == 0) dz = 0.01; + + double angleX = Math.atan(Math.abs(dz) / dx); + double angleZ = Math.atan(Math.abs(dx) / dz); + + double cosX = Math.cos(angleX); + double cosZ = Math.cos(angleZ); + if (cosX == 0) cosX = 0.01; + if (cosZ == 0) cosZ = 0.01; + + double push = -dist + 10; + + entity.addVelocity(push * cosX * strength * mult * (Math.abs(angleX) / angleX), Math.abs(push * vStrength * mult), push * cosZ * strength * mult * (Math.abs(angleZ) / angleZ)); + + if (entity instanceof PlayerEntity) { + ((PlayerEntity) entity).velocityModified = true; + } + } + } + + @Override + public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { + if (!stack.hasNbt()) return; + + NbtCompound nbt = stack.getNbt(); + if (!hasPylonNbt(nbt)) return; + + String coords = String.join(", ", String.valueOf(Math.round(nbt.getDouble(X_KEY))), String.valueOf(Math.round(nbt.getDouble(Y_KEY))), String.valueOf(Math.round(nbt.getDouble(Z_KEY)))); + + if (!StringHelper.isEmpty(coords)) { + tooltip.add(new LiteralText(coords).formatted(Formatting.DARK_AQUA)); + } + } } \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/items/ShimmerBottleItem.java b/src/main/java/com/github/ethanicuss/astraladditions/items/ShimmerBottleItem.java index f8c5e28..7325ccc 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/items/ShimmerBottleItem.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/items/ShimmerBottleItem.java @@ -24,8 +24,8 @@ public class ShimmerBottleItem extends Item { - StatusEffectInstance glowing = new StatusEffectInstance(StatusEffects.GLOWING, 600); - StatusEffectInstance vision = new StatusEffectInstance(StatusEffects.NIGHT_VISION, 600); + StatusEffectInstance glowing = new StatusEffectInstance(StatusEffects.GLOWING, 600, 0, false, false); + StatusEffectInstance vision = new StatusEffectInstance(StatusEffects.NIGHT_VISION, 600, 0, false, false); private static final int MAX_USE_TIME = 40; @@ -37,8 +37,8 @@ public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user){ ItemStack itemStack = super.finishUsing(stack, world, user); if (!world.isClient) { PlayerEntity player = (PlayerEntity)user; - player.addStatusEffect(new StatusEffectInstance(StatusEffects.GLOWING, 600, 0, false, false)); - player.addStatusEffect(new StatusEffectInstance(StatusEffects.NIGHT_VISION, 600, 0, false, false)); + player.addStatusEffect(glowing); + player.addStatusEffect(vision); player.playSound(SoundEvents.BLOCK_BUBBLE_COLUMN_UPWARDS_INSIDE, SoundCategory.AMBIENT, 0.8f, 0.8f); return user instanceof PlayerEntity && ((PlayerEntity) user).getAbilities().creativeMode ? itemStack : new ItemStack(Items.GLASS_BOTTLE); } @@ -50,7 +50,7 @@ public void appendTooltip(ItemStack stack, @Nullable World world, List too } public int getMaxUseTime(ItemStack stack) { - return 40; + return MAX_USE_TIME; } public UseAction getUseAction(ItemStack stack) { diff --git a/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/AttackKnockbackCompatMixin.java b/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/AttackKnockbackCompatMixin.java new file mode 100644 index 0000000..ae4518c --- /dev/null +++ b/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/AttackKnockbackCompatMixin.java @@ -0,0 +1,20 @@ +package com.github.ethanicuss.astraladditions.mixin.knockback; + +import net.minecraft.entity.attribute.EntityAttribute; +import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.player.PlayerEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(PlayerEntity.class) +public class AttackKnockbackCompatMixin { + + @Redirect(method = "attack(Lnet/minecraft/entity/Entity;)V", + at = @At(value = "FIELD", + target = "Lnet/minecraft/entity/attribute/EntityAttributes;ATTACK_KNOCKBACK:Lnet/minecraft/entity/attribute/EntityAttribute;") + ) + private EntityAttribute redirectAttackKnockbackAttribute() { + return EntityAttributes.GENERIC_ATTACK_KNOCKBACK; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/MobAttackKnockbackCompatMixin.java b/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/MobAttackKnockbackCompatMixin.java new file mode 100644 index 0000000..4f572c9 --- /dev/null +++ b/src/main/java/com/github/ethanicuss/astraladditions/mixin/knockback/MobAttackKnockbackCompatMixin.java @@ -0,0 +1,21 @@ +package com.github.ethanicuss.astraladditions.mixin.knockback; + +import net.minecraft.entity.attribute.EntityAttribute; +import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.mob.MobEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(MobEntity.class) +public class MobAttackKnockbackCompatMixin { + + @Redirect(method = "tryAttack(Lnet/minecraft/entity/Entity;)Z", + at = @At(value = "FIELD", + target = "Lnet/minecraft/entity/attribute/EntityAttributes;ATTACK_KNOCKBACK:Lnet/minecraft/entity/attribute/EntityAttribute;"), + require = 0 + ) + private EntityAttribute redirectAttackKnockbackAttribute() { + return EntityAttributes.GENERIC_ATTACK_KNOCKBACK; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/MusicPlayer.java b/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/MusicPlayer.java index 874676c..31a1a6a 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/MusicPlayer.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/MusicPlayer.java @@ -1,5 +1,6 @@ package com.github.ethanicuss.astraladditions.musicplayer; +import com.github.ethanicuss.astraladditions.AstralAdditions; import com.github.ethanicuss.astraladditions.AstralAdditionsClient; import com.github.ethanicuss.astraladditions.entities.shimmerblaze.ShimmerBlazeEntity; import com.github.ethanicuss.astraladditions.registry.ModMusic; @@ -10,6 +11,8 @@ import net.minecraft.entity.boss.dragon.EnderDragonEntity; import net.minecraft.entity.mob.HostileEntity; import net.minecraft.sound.MusicSound; +import net.minecraft.text.Text; +import net.minecraft.text.TranslatableText; import net.minecraft.util.TypeFilter; import net.minecraft.util.math.Box; @@ -18,6 +21,8 @@ import java.util.function.Predicate; public class MusicPlayer { + private static MusicSound lastShown = null; + private static final Predicate WITHER_PREDICATE = (entity) -> { return true; }; @@ -218,6 +223,25 @@ public static MusicSound findMusic(MusicTracker musicTracker){ } } } + maybeShowNowPlaying(val, musicTracker); return val; } -} + + private static void maybeShowNowPlaying(MusicSound next, MusicTracker tracker) { + if (next == null || next == lastShown) return; + + if (!ModMusic.isCustom(next)) { + lastShown = next; + return; + } + + String key = ModMusic.getTrackKey(next); + if (key != null) { + Text title = new TranslatableText(AstralAdditions.MOD_ID + ".music." + key + ".title"); + Text artist = new TranslatableText(AstralAdditions.MOD_ID + ".music." + key + ".artist"); + NowPlayingHud.show(title, artist); + } + + lastShown = next; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/NowPlayingHud.java b/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/NowPlayingHud.java new file mode 100644 index 0000000..85b2c0d --- /dev/null +++ b/src/main/java/com/github/ethanicuss/astraladditions/musicplayer/NowPlayingHud.java @@ -0,0 +1,63 @@ +package com.github.ethanicuss.astraladditions.musicplayer; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.gui.DrawableHelper; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.text.Text; + +public class NowPlayingHud { + + private static final int showTick = 20*4; + private static final int fadeTick = 20; + + private static Text title = Text.of(""); + private static Text artist = Text.of(""); + private static int ticksLeft = 0; + + private NowPlayingHud() {} + + public static void show(Text titleText, Text artistText) { + title = titleText; + artist = artistText; + ticksLeft = showTick + fadeTick * 2; + } + + public static void tick() { + if (ticksLeft > 0) ticksLeft--; + } + + public static void render(MatrixStack matrices) { + if (ticksLeft <= 0) return; + + MinecraftClient client = MinecraftClient.getInstance(); + if (client.options.hudHidden) return; + + float alpha = 1.0f; + if (ticksLeft > showTick + fadeTick) { + //fading out + int tick = (showTick + fadeTick * 2) - ticksLeft; + alpha = Math.min(1.0f, tick / (float) fadeTick); + } else if (ticksLeft < fadeTick) { + //fading out + alpha = ticksLeft / (float) fadeTick; + } + + int a = ((int)(alpha * 255.0f) & 0xFF) << 24; + + Text line1 = title; + Text line2 = artist; + + TextRenderer textRenderer = client.textRenderer; + int x = 10; + int y = 10; + + int w = Math.max(textRenderer.getWidth(line1), textRenderer.getWidth(line2)); + int h = textRenderer.fontHeight * 2 + 6; + + DrawableHelper.fill(matrices, x - 4, y - 4, x + w + 4, y + h, a | 0x101010); + + textRenderer.drawWithShadow(matrices, line1, x, y, a | 0xFFFFFF); + textRenderer.drawWithShadow(matrices, line2, x, y + textRenderer.fontHeight + 2, a | 0xB0B0B0); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModBlocks.java b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModBlocks.java index 334a840..de62d06 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModBlocks.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModBlocks.java @@ -80,25 +80,11 @@ private static ToIntFunction createLightLevelFromLitBlockState(int l public static final BlockItem JAR_ITEM = new BlockItem(JAR_BLOCK, new FabricItemSettings().group(ItemGroup.DECORATIONS)); public static final BlockEntityType JAR_BLOCKENTITY = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(AstralAdditions.MOD_ID, "jar"), FabricBlockEntityTypeBuilder.create(JarBlockEntity::new, JAR_BLOCK).build()); - public static final Block DESIZER_1 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_2 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_3 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_4 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_6 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_7 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_8 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final Block DESIZER_9 = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); + public static final Block DESIZER_CONTROLLER = new DesizerControllerBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); public static final Block DESIZER_BASE = new DesizerCasingBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3.0f)); - public static final BlockItem DESIZER_1_ITEM = new BlockItem(DESIZER_1, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_2_ITEM = new BlockItem(DESIZER_2, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_3_ITEM = new BlockItem(DESIZER_3, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_4_ITEM = new BlockItem(DESIZER_4, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_6_ITEM = new BlockItem(DESIZER_6, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_7_ITEM = new BlockItem(DESIZER_7, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_8_ITEM = new BlockItem(DESIZER_8, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); - public static final BlockItem DESIZER_9_ITEM = new BlockItem(DESIZER_9, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); + public static final BlockItem DESIZER_CONTROLLER_ITEM = new BlockItem(DESIZER_CONTROLLER, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); public static final BlockItem DESIZER_BASE_ITEM = new BlockItem(DESIZER_BASE, new FabricItemSettings().group(ItemGroup.BUILDING_BLOCKS)); @@ -124,14 +110,7 @@ public static void registerBlocks() { Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "ender_tip"), ENDER_TIP_BLOCK); Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "ender_sprouts"), ENDER_SPROUT_BLOCK); Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "pearl_pod"), PEARL_POD_BLOCK); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_1"), DESIZER_1); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_2"), DESIZER_2); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_3"), DESIZER_3); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_4"), DESIZER_4); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_6"), DESIZER_6); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_7"), DESIZER_7); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_8"), DESIZER_8); - Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_9"), DESIZER_9); + Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_controller"), DESIZER_CONTROLLER); Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "desizer_base"), DESIZER_BASE); Registry.register(Registry.BLOCK, new Identifier(AstralAdditions.MOD_ID, "the_end"), THE_END_BLOCK); @@ -149,14 +128,7 @@ public static void registerBlockItems() { Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "ender_tip"), ENDER_TIP_ITEM); Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "ender_sprouts"), ENDER_SPROUT_ITEM); Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "pearl_pod"), PEARL_POD_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_1"), DESIZER_1_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_2"), DESIZER_2_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_3"), DESIZER_3_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_4"), DESIZER_4_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_6"), DESIZER_6_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_7"), DESIZER_7_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_8"), DESIZER_8_ITEM); - Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_9"), DESIZER_9_ITEM); + Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_controller"), DESIZER_CONTROLLER_ITEM); Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "desizer_base"), DESIZER_BASE_ITEM); Registry.register(Registry.ITEM, new Identifier(AstralAdditions.MOD_ID, "the_end"), THE_END_BLOCK_ITEM); diff --git a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntities.java b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntities.java index af06025..9f11598 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntities.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntities.java @@ -1,7 +1,6 @@ package com.github.ethanicuss.astraladditions.registry; import com.github.ethanicuss.astraladditions.AstralAdditions; -import com.github.ethanicuss.astraladditions.AstralAdditionsClient; import com.github.ethanicuss.astraladditions.entities.blackhole.BlackholeEntity; import com.github.ethanicuss.astraladditions.entities.blackhole.BlackholeEntityRenderer; import com.github.ethanicuss.astraladditions.entities.boomerang.BoomerangEntity; @@ -57,6 +56,7 @@ import net.minecraft.util.registry.Registry; + public class ModEntities { public static final EntityType MOONMAN = Registry.register( Registry.ENTITY_TYPE, @@ -184,7 +184,6 @@ public static void registerEntities() { FabricDefaultAttributeRegistry.register(ENDER_WATCHER, EnderWatcherEntity.createWatcherAttributes()); FabricDefaultAttributeRegistry.register(GLAZER, GlazerEntity.createGlazerAttributes()); FabricDefaultAttributeRegistry.register(BLACKHOLE, BlackholeEntity.createBlackholeAttributes()); - } public static void registerClient() { diff --git a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModItems.java b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModItems.java index 2a7149f..ed683d2 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModItems.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModItems.java @@ -7,7 +7,6 @@ import com.github.ethanicuss.astraladditions.items.tools.ShimmerBlowerItem; import com.github.ethanicuss.astraladditions.items.tools.ShimmerFishingRodItem; import com.github.ethanicuss.astraladditions.items.weapons.*; -import com.simibubi.create.content.equipment.goggles.GogglesItem; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.minecraft.entity.EntityType; import net.minecraft.entity.effect.StatusEffects; diff --git a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModMusic.java b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModMusic.java index eaa5389..0df25e7 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModMusic.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModMusic.java @@ -2,6 +2,10 @@ import net.minecraft.sound.MusicSound; +import javax.annotation.Nullable; +import java.util.IdentityHashMap; +import java.util.Map; + public class ModMusic { private static final int GAME_MIN_DELAY = 12000; private static final int GAME_MAX_DELAY = 24000;//12000, 24000 @@ -28,4 +32,44 @@ public class ModMusic { public static final MusicSound SHIMMER_BLAZE = new MusicSound(ModSounds.MUSIC_SHIMMER_BLAZE, 0, 0, true); public static final MusicSound ASTRAL_LAKES_REMIX = new MusicSound(ModSounds.MUSIC_ASTRAL_LAKES_REMIX, 0, 0, true); + + private static final Map TRACK_KEYS = new IdentityHashMap<>(); + + static { + register(MOON, "moon"); + register(POST_MOON, "post_moon"); + register(DAY, "day"); + register(NIGHT, "night"); + register(OW_DAY, "ow_day"); + register(OW_NIGHT, "ow_night"); + register(OW_CAVE, "ow_cave"); + register(OW_SCARY, "ow_scary"); + register(ORBIT, "orbit"); + register(MERCURY, "mercury"); + register(MARS, "mars"); + register(END, "end"); + register(END_BOSS, "end_boss"); + register(WITHER, "wither"); + register(WITHER_PHASE2, "wither_phase2"); + register(WITHER_SPAWN, "wither_spawn"); + register(WITHER_DEATH, "wither_death"); + register(COMBAT, "combat"); + register(COMBAT_END, "combat_end"); + register(SHIMMER_BLAZE, "shimmer_blaze"); + register(ASTRAL_LAKES_REMIX,"astral_lakes_remix"); + } + + private static void register(MusicSound sound, String key) { + TRACK_KEYS.put(sound, key); + } + + public static boolean isCustom(MusicSound sound) { + return TRACK_KEYS.containsKey(sound); + } + + @Nullable + public static String getTrackKey(MusicSound sound) { + return TRACK_KEYS.get(sound); + } + } \ No newline at end of file diff --git a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModSounds.java b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModSounds.java index 3a9ed5e..7f621a6 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/registry/ModSounds.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/registry/ModSounds.java @@ -50,9 +50,9 @@ public class ModSounds { public static final SoundEvent MUSIC_SHIMMER_BLAZE = new SoundEvent(MUSIC_SHIMMER_BLAZE_ID); public static final Identifier MUSIC_ASTRAL_LAKES_REMIX_ID = new Identifier(AstralAdditions.MOD_ID, "music_astral_lakes_remix"); public static final SoundEvent MUSIC_ASTRAL_LAKES_REMIX = new SoundEvent(MUSIC_ASTRAL_LAKES_REMIX_ID); + public static final Identifier ITEM_EGUITAR_NOTE_ID = new Identifier(AstralAdditions.MOD_ID, "item/note_eguitar"); + public static final SoundEvent ITEM_EGUITAR_NOTE = new SoundEvent(ITEM_EGUITAR_NOTE_ID); - public static final Identifier ITEM_EGUITAR_NOTE_ID = new Identifier(AstralAdditions.MOD_ID, "item/note_eguitar"); - public static final SoundEvent ITEM_EGUITAR_NOTE = new SoundEvent(ITEM_EGUITAR_NOTE_ID); public static void registerSounds() { Registry.register(Registry.SOUND_EVENT, MUSIC_MOON_ID, MUSIC_MOON); Registry.register(Registry.SOUND_EVENT, MUSIC_POST_MOON_ID, MUSIC_POST_MOON); diff --git a/src/main/resources/assets/astraladditions/lang/en_us.json b/src/main/resources/assets/astraladditions/lang/en_us.json index 8f2d4a7..a38c405 100644 --- a/src/main/resources/assets/astraladditions/lang/en_us.json +++ b/src/main/resources/assets/astraladditions/lang/en_us.json @@ -129,6 +129,72 @@ "item.minecraft.lingering_potion.effect.sputum": "Lingering Bottle of Sputum", "item.minecraft.tipped_arrow.effect.sputum": "Arrow of Sputum", - "tooltip.astraladditions.cogfly": "W.I.P for 2.2" + "tooltip.astraladditions.cogfly": "W.I.P for 2.2", + + "astraladditions.music.moon.title": "Moon", + "astraladditions.music.moon.artist": "idk", + + "astraladditions.music.post_moon.title": "Post Moon", + "astraladditions.music.post_moon.artist": "idk", + + "astraladditions.music.day.title": "Day", + "astraladditions.music.day.artist": "idk", + + "astraladditions.music.night.title": "Night", + "astraladditions.music.night.artist": "idk", + + "astraladditions.music.ow_day.title": "Overworld Day", + "astraladditions.music.ow_day.artist": "idk", + + "astraladditions.music.ow_night.title": "Overworld Night", + "astraladditions.music.ow_night.artist": "idk", + + "astraladditions.music.ow_cave.title": "Overworld Cave", + "astraladditions.music.ow_cave.artist": "idk", + + "astraladditions.music.ow_scary.title": "Overworld Scary", + "astraladditions.music.ow_scary.artist": "idk", + + "astraladditions.music.orbit.title": "Orbit", + "astraladditions.music.orbit.artist": "idk", + + "astraladditions.music.mercury.title": "Mercury", + "astraladditions.music.mercury.artist": "idk", + + "astraladditions.music.mars.title": "Mars", + "astraladditions.music.mars.artist": "idk", + + "astraladditions.music.end.title": "End", + "astraladditions.music.end.artist": "idk", + + "astraladditions.music.end_boss.title": "End Boss", + "astraladditions.music.end_boss.artist": "idk", + + "astraladditions.music.wither.title": "Wither", + "astraladditions.music.wither.artist": "idk", + + "astraladditions.music.wither_phase2.title": "Wither Phase 2", + "astraladditions.music.wither_phase2.artist": "idk", + + "astraladditions.music.wither_spawn.title": "Wither Spawn", + "astraladditions.music.wither_spawn.artist": "idk", + + "astraladditions.music.wither_death.title": "Wither Death", + "astraladditions.music.wither_death.artist": "idk", + + "astraladditions.music.combat.title": "Combat", + "astraladditions.music.combat.artist": "idk", + + "astraladditions.music.combat_end.title": "Combat End", + "astraladditions.music.combat_end.artist": "idk", + + "astraladditions.music.shimmer_blaze.title": "Shimmer Blaze", + "astraladditions.music.shimmer_blaze.artist": "idk", + + "astraladditions.music.astral_lakes_remix.title": "Astral Lakes Remix", + "astraladditions.music.astral_lakes_remix.artist": "idk" + + + } \ No newline at end of file diff --git a/src/main/resources/astraladditions.mixins.json b/src/main/resources/astraladditions.mixins.json index 532840b..f8474be 100644 --- a/src/main/resources/astraladditions.mixins.json +++ b/src/main/resources/astraladditions.mixins.json @@ -28,8 +28,10 @@ "fishing.FishingBobberEntityAccessor", "fishing.FishingBobberEntityMixin", - "fishing.BottomlessBucketItemMixin" + "fishing.BottomlessBucketItemMixin", + "knockback.AttackKnockbackCompatMixin", + "knockback.MobAttackKnockbackCompatMixin" ], "client": [