Update to 1.21.9
THANK FUCKING GOD
This commit is contained in:
+3
-3
@@ -4,13 +4,13 @@ org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21.6
|
||||
yarn_mappings=1.21.6+build.1
|
||||
minecraft_version=1.21.9
|
||||
yarn_mappings=1.21.9+build.1
|
||||
loader_version=0.18.4
|
||||
loom_version=1.15-SNAPSHOT
|
||||
|
||||
# Fabric API
|
||||
fabric_version=0.128.2+1.21.6
|
||||
fabric_version=0.134.1+1.21.9
|
||||
|
||||
# Mod Properties
|
||||
mod_version=2.0.0
|
||||
|
||||
@@ -8,3 +8,5 @@ Wildfire Particles missing
|
||||
Particles not on server???
|
||||
|
||||
Fren is broken
|
||||
|
||||
Combustible LEmon will not render
|
||||
@@ -51,7 +51,7 @@ public class EntropicEntangler extends BlockWithEntity implements BlockEntityPro
|
||||
@Override
|
||||
protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
NamedScreenHandlerFactory screenHandlerFactory = ((EntropicEntanglerEntity) world.getBlockEntity(pos));
|
||||
if (screenHandlerFactory != null) {
|
||||
player.openHandledScreen(screenHandlerFactory);
|
||||
|
||||
@@ -51,7 +51,7 @@ public class EntropicEviscerator extends BlockWithEntity implements BlockEntityP
|
||||
@Override
|
||||
protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
NamedScreenHandlerFactory screenHandlerFactory = ((EntropicEvisceratorEntity) world.getBlockEntity(pos));
|
||||
if (screenHandlerFactory != null) {
|
||||
player.openHandledScreen(screenHandlerFactory);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class EntropicStabilizer extends BlockWithEntity implements BlockEntityPr
|
||||
@Override
|
||||
protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
NamedScreenHandlerFactory screenHandlerFactory = ((EntropicStabilizerEntity) world.getBlockEntity(pos));
|
||||
if (screenHandlerFactory != null) {
|
||||
player.openHandledScreen(screenHandlerFactory);
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public class EntropicEntanglerEntity extends BlockEntity implements EntanglerInv
|
||||
public void setFacing(Direction newFacing) {
|
||||
this.facing = newFacing;
|
||||
// sync to blockstate for rendering
|
||||
if (world != null && !world.isClient) {
|
||||
if (world != null && !world.isClient()) {
|
||||
world.setBlockState(pos, getCachedState().with(EntropicEntangler.FACING, newFacing), 3);
|
||||
markDirty();
|
||||
}
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public class EntropicEvisceratorEntity extends BlockEntity implements Implemente
|
||||
public void setFacing(Direction newFacing) {
|
||||
this.facing = newFacing;
|
||||
// sync to blockstate for rendering
|
||||
if (world != null && !world.isClient) {
|
||||
if (world != null && !world.isClient()) {
|
||||
world.setBlockState(pos, getCachedState().with(EntropicEviscerator.FACING, newFacing), 3);
|
||||
markDirty();
|
||||
}
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented
|
||||
public void setFacing(Direction newFacing) {
|
||||
this.facing = newFacing;
|
||||
// sync to blockstate for rendering
|
||||
if (world != null && !world.isClient) {
|
||||
if (world != null && !world.isClient()) {
|
||||
world.setBlockState(pos, getCachedState().with(EntropicStabilizer.FACING, newFacing), 3);
|
||||
markDirty();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class BrickedUpEffect extends StatusEffect {
|
||||
world.playSound(entity, entity.getBlockPos(), ModSounds.BRICKED_UP, SoundCategory.PLAYERS, 2f, 1f);
|
||||
}
|
||||
else if(durationLeft > idealLen - 120){
|
||||
float p = entity.getWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
|
||||
float p = world.getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
|
||||
float f = entity.isOnGround() ? p * 0.91F : 0.91F;
|
||||
entity.travel(entity.getMovement());
|
||||
Vec3d vec3d6 = entity.getVelocity();
|
||||
@@ -51,7 +51,7 @@ public class BrickedUpEffect extends StatusEffect {
|
||||
// world.playSound(entity, entity.getBlockPos(), ModSounds.FART, SoundCategory.PLAYERS, 5f, 1f);
|
||||
// }
|
||||
else {
|
||||
float p = entity.getWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
|
||||
float p = world.getBlockState(entity.getBlockPos()).getBlock().getSlipperiness();
|
||||
float f = entity.isOnGround() ? p * 0.91F : 0.91F;
|
||||
entity.travel(entity.getMovement());
|
||||
Vec3d vec3d6 = entity.getVelocity();;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class CigaretteEffect extends StatusEffect {
|
||||
if (effect == null) return true;
|
||||
|
||||
// When 1 tick remains, it's about to end
|
||||
if (effect.getDuration() <= 1 && !entity.getWorld().isClient()) {
|
||||
if (effect.getDuration() <= 1 && !world.isClient()) {
|
||||
|
||||
// Apply new effect
|
||||
entity.addStatusEffect(new StatusEffectInstance(
|
||||
@@ -27,7 +27,7 @@ public class CigaretteEffect extends StatusEffect {
|
||||
0 // amplifier
|
||||
));
|
||||
} else {
|
||||
if (!entity.getWorld().isClient()) {
|
||||
if (!world.isClient()) {
|
||||
entity.removeStatusEffect(ModEffects.JITTERY);
|
||||
entity.removeStatusEffect(ModEffects.WITHDRAWAL);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class InfernalFireEffect extends StatusEffect {
|
||||
// double randomVelocityY = r.nextDouble(0.5, 1.0);
|
||||
// double randomVelocityZ = r.nextDouble(-0.5, 0.5);
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
((ServerWorld) world).spawnParticles(
|
||||
ParticleTypes.CAMPFIRE_COSY_SMOKE,
|
||||
entity.getX(),
|
||||
|
||||
@@ -51,7 +51,7 @@ public class JitteryEffect extends StatusEffect {
|
||||
}
|
||||
|
||||
// When 1 tick remains, it's about to end
|
||||
if (effect.getDuration() == 1 && !entity.getWorld().isClient()) {
|
||||
if (effect.getDuration() == 1 && !world.isClient()) {
|
||||
|
||||
// Apply new effect
|
||||
entity.addStatusEffect(new StatusEffectInstance(
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ModEntities {
|
||||
|
||||
UseEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> {
|
||||
|
||||
if (world.isClient) return ActionResult.PASS;
|
||||
if (world.isClient()) return ActionResult.PASS;
|
||||
|
||||
if (!(entity instanceof SkeletonEntity skeleton)) return ActionResult.PASS;
|
||||
|
||||
|
||||
@@ -5,10 +5,12 @@ import com.acethewildfire.acesbs.entity.custom.CombustibleLemonEntity;
|
||||
import net.minecraft.client.render.OverlayTexture;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.command.OrderedRenderCommandQueue;
|
||||
import net.minecraft.client.render.entity.EntityRenderer;
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.render.entity.state.EntityRenderState;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.state.CameraRenderState;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
@@ -28,9 +30,8 @@ public class CombustibleLemonRenderer extends EntityRenderer<CombustibleLemonEnt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(EntityRenderState state, MatrixStack matrices,
|
||||
VertexConsumerProvider vertexConsumers, int light) {
|
||||
matrices.push();
|
||||
public void render(EntityRenderState renderState, MatrixStack matrices, OrderedRenderCommandQueue queue, CameraRenderState cameraState) {
|
||||
// matrices.push();
|
||||
|
||||
// if(!entity.isGrounded()) {
|
||||
// matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(MathHelper.lerp(tickDelta, entity.prevYaw, entity.getYaw())));
|
||||
@@ -42,11 +43,11 @@ public class CombustibleLemonRenderer extends EntityRenderer<CombustibleLemonEnt
|
||||
// matrices.translate(0, -1.0f, 0);
|
||||
// }
|
||||
|
||||
VertexConsumer vertexconsumer = ItemRenderer.getItemGlintConsumer(vertexConsumers,
|
||||
this.model.getLayer(Identifier.of(AcesBS.MOD_ID, "textures/entity/combustible_lemon/combustible_lemon.png")), false, false);
|
||||
this.model.render(matrices, vertexconsumer, light, OverlayTexture.DEFAULT_UV);
|
||||
// VertexConsumer vertexconsumer = ItemRenderer.getItemGlintConsumer(queue,
|
||||
// this.model.getLayer(Identifier.of(AcesBS.MOD_ID, "textures/entity/combustible_lemon/combustible_lemon.png")), false, false);
|
||||
// this.model.render(matrices, vertexconsumer, light, OverlayTexture.DEFAULT_UV);
|
||||
|
||||
matrices.pop();
|
||||
super.render(state, matrices, vertexConsumers, light);
|
||||
// matrices.pop();
|
||||
super.render(renderState, matrices, queue, cameraState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.acethewildfire.acesbs.entity.client;
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import com.acethewildfire.acesbs.entity.custom.FrenEntity;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.command.OrderedRenderCommandQueue;
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.render.entity.MobEntityRenderer;
|
||||
import net.minecraft.client.render.state.CameraRenderState;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
@@ -19,15 +21,14 @@ public class FrenRenderer extends MobEntityRenderer<FrenEntity, FrenState, FrenM
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(FrenState state, MatrixStack matrixStack,
|
||||
VertexConsumerProvider vertexConsumerProvider, int i) {
|
||||
if(state.baby) {
|
||||
public void render(FrenState livingEntityRenderState, MatrixStack matrixStack, OrderedRenderCommandQueue orderedRenderCommandQueue, CameraRenderState cameraRenderState) {
|
||||
if(livingEntityRenderState.baby) {
|
||||
matrixStack.scale(0.5f, 0.5f, 0.5f);
|
||||
} else {
|
||||
matrixStack.scale(1f, 1f, 1f);
|
||||
}
|
||||
|
||||
super.render(state, matrixStack, vertexConsumerProvider, i);
|
||||
super.render(livingEntityRenderState, matrixStack, orderedRenderCommandQueue, cameraRenderState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,8 +45,8 @@ public class CombustibleLemonEntity extends PersistentProjectileEntity {
|
||||
// entity.damage(this.getDamageSources().thrown(this, this.getOwner()), 4);
|
||||
entity.setOnFireFor(20);
|
||||
|
||||
if (!this.getWorld().isClient()) {
|
||||
this.getWorld().sendEntityStatus(this, (byte)3);
|
||||
if (!this.getEntityWorld().isClient()) {
|
||||
this.getEntityWorld().sendEntityStatus(this, (byte)3);
|
||||
this.discard();
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,8 @@ public class CombustibleLemonEntity extends PersistentProjectileEntity {
|
||||
super.onBlockHit(result);
|
||||
|
||||
BlockPos blockPos = result.getBlockPos().offset(result.getSide());
|
||||
if (this.getWorld().isAir(blockPos)) {
|
||||
this.getWorld().setBlockState(blockPos, AbstractFireBlock.getState(this.getWorld(), blockPos));
|
||||
if (this.getEntityWorld().isAir(blockPos)) {
|
||||
this.getEntityWorld().setBlockState(blockPos, AbstractFireBlock.getState(this.getEntityWorld(), blockPos));
|
||||
}
|
||||
|
||||
this.discard();
|
||||
|
||||
@@ -64,7 +64,7 @@ public class FrenEntity extends AnimalEntity {
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
if (this.getWorld().isClient()) {
|
||||
if (this.getEntityWorld().isClient()) {
|
||||
this.setupAnimationStates();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.acethewildfire.acesbs.item.custom.*;
|
||||
import com.acethewildfire.acesbs.potion.ModPotions;
|
||||
import com.acethewildfire.acesbs.sounds.ModSounds;
|
||||
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.component.ComponentType;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
@@ -78,7 +79,7 @@ public class ModItems {
|
||||
public static final Item GREEN_BRICKS = registerItem("green_bricks", setting -> new Item(setting) {
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_up"));
|
||||
}
|
||||
else {
|
||||
@@ -116,7 +117,7 @@ public class ModItems {
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_up"));
|
||||
}
|
||||
else {
|
||||
@@ -154,7 +155,7 @@ public class ModItems {
|
||||
.build())){
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.berserkers_pauldron_desc"));
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_more"));
|
||||
}
|
||||
@@ -173,7 +174,7 @@ public class ModItems {
|
||||
.maxDamage(6)){
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.sovs_plate_carrier_desc"));
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_more"));
|
||||
}
|
||||
@@ -192,7 +193,7 @@ public class ModItems {
|
||||
.maxDamage(EquipmentType.BOOTS.getMaxDamage(15))){
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.wildfire_boots_desc"));
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_more"));
|
||||
}
|
||||
@@ -216,9 +217,9 @@ public class ModItems {
|
||||
public static final Item AQUARIUM_GRAVEL = registerItem("aquarium_gravel", setting -> new AquariumGravel(setting.maxCount(1)));
|
||||
|
||||
public static final Item FREN_SPAWN_EGG = registerItem("fren_spawn_egg",
|
||||
setting -> new SpawnEggItem(ModEntities.FREN, setting));
|
||||
setting -> new SpawnEggItem(setting.spawnEgg(ModEntities.FREN)));
|
||||
public static final Item VULGAR_BONES_SPAWN_EGG = registerItem("vulgar_bones_spawn_egg",
|
||||
setting -> new SpawnEggItem(ModEntities.VULGAR_BONES, setting));
|
||||
setting -> new SpawnEggItem(setting.spawnEgg(ModEntities.VULGAR_BONES)));
|
||||
|
||||
|
||||
|
||||
@@ -235,7 +236,7 @@ public class ModItems {
|
||||
AttackEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> {
|
||||
|
||||
// To you who reads this now, weep, as I did when I created this monster whom I have become
|
||||
if (!world.isClient && entity instanceof LivingEntity target) {
|
||||
if (!world.isClient() && entity instanceof LivingEntity target) {
|
||||
for (ItemStack stack : player.getInventory().getMainStacks()) {
|
||||
if (stack.isOf(ModItems.COMMAND_CORE)) {
|
||||
if (Boolean.TRUE.equals(stack.get(ModDataComponentTypes.COMMAND_ACTIVE))){
|
||||
|
||||
@@ -58,7 +58,7 @@ public class BubblePipe extends Item {
|
||||
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
|
||||
super.usageTick(world, user, stack, remainingUseTicks);
|
||||
|
||||
if (world.isClient) {
|
||||
if (world.isClient()) {
|
||||
|
||||
// Direction player is looking
|
||||
Vec3d look = user.getRotationVec(1.0f);
|
||||
@@ -83,7 +83,7 @@ public class BubblePipe extends Item {
|
||||
}
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient){
|
||||
if (!world.isClient()){
|
||||
if (remainingUseTicks % 40 == 0) {
|
||||
world.playSound(
|
||||
null,
|
||||
@@ -111,7 +111,7 @@ public class BubblePipe extends Item {
|
||||
player.getItemCooldownManager().set(stack, 2400);
|
||||
stack.decrement(1);
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
player.incrementStat(ModStats.CIGARETTES_USED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Cigarette extends Item {
|
||||
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
|
||||
super.usageTick(world, user, stack, remainingUseTicks);
|
||||
|
||||
if (world.isClient) {
|
||||
if (world.isClient()) {
|
||||
|
||||
// Direction player is looking
|
||||
Vec3d look = user.getRotationVec(1.0f);
|
||||
@@ -87,7 +87,7 @@ public class Cigarette extends Item {
|
||||
}
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient){
|
||||
if (!world.isClient()){
|
||||
if (remainingUseTicks % 40 == 0) {
|
||||
world.playSound(
|
||||
null,
|
||||
@@ -116,7 +116,7 @@ public class Cigarette extends Item {
|
||||
player.getItemCooldownManager().set(stack, 2400);
|
||||
stack.decrement(1);
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
player.incrementStat(ModStats.CIGARETTES_USED);
|
||||
player.incrementStat(Stats.USED.getOrCreateStat(ModItems.CIGARETTE));
|
||||
if (player instanceof ServerPlayerEntity s_player){
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CigaretteFunny extends Item {
|
||||
}
|
||||
|
||||
if (user instanceof PlayerEntity player) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
player.incrementStat(ModStats.CIGARETTES_USED);
|
||||
player.incrementStat(Stats.USED.getOrCreateStat(ModItems.CIGARETTE_FUNNY));
|
||||
if (player instanceof ServerPlayerEntity s_player){
|
||||
@@ -86,7 +86,7 @@ public class CigaretteFunny extends Item {
|
||||
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
|
||||
super.usageTick(world, user, stack, remainingUseTicks);
|
||||
|
||||
if (world.isClient) {
|
||||
if (world.isClient()) {
|
||||
|
||||
if (activeSound == null) {
|
||||
activeSound = new PlayerAttachedSound(
|
||||
@@ -121,7 +121,7 @@ public class CigaretteFunny extends Item {
|
||||
}
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
// if (remainingUseTicks % 40 == 0) {
|
||||
// world.playSound(
|
||||
// null,
|
||||
@@ -149,7 +149,7 @@ public class CigaretteFunny extends Item {
|
||||
player.getItemCooldownManager().set(stack, 2400);
|
||||
stack.decrement(1);
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
player.incrementStat(ModStats.CIGARETTES_USED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class CigaretteLemon extends Item {
|
||||
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
|
||||
super.usageTick(world, user, stack, remainingUseTicks);
|
||||
|
||||
if (world.isClient) {
|
||||
if (world.isClient()) {
|
||||
|
||||
// Direction player is looking
|
||||
Vec3d look = user.getRotationVec(1.0f);
|
||||
@@ -87,7 +87,7 @@ public class CigaretteLemon extends Item {
|
||||
}
|
||||
|
||||
// Serverside code
|
||||
if (!world.isClient){
|
||||
if (!world.isClient()){
|
||||
if (remainingUseTicks % 40 == 0) {
|
||||
world.playSound(
|
||||
null,
|
||||
@@ -146,7 +146,7 @@ public class CigaretteLemon extends Item {
|
||||
player.getItemCooldownManager().set(stack, 2400);
|
||||
stack.decrement(1);
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
player.incrementStat(ModStats.CIGARETTES_USED);
|
||||
player.incrementStat(Stats.USED.getOrCreateStat(ModItems.CIGARETTE_LEMON));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CombustibleLemon extends Item {
|
||||
public ActionResult use(World world, PlayerEntity user, Hand hand) {
|
||||
ItemStack itemStack = user.getStackInHand(hand);
|
||||
world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5f, 0.4f / (world.getRandom().nextFloat() * 0.4f + 0.8f));
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
CombustibleLemonEntity c_lemon = new CombustibleLemonEntity(world, user);
|
||||
c_lemon.setVelocity(user, user.getPitch(), user.getYaw(), 0.0f, 1.5f, 0f);
|
||||
world.spawnEntity(c_lemon);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class CommandCore extends Item {
|
||||
itemStack.set(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE, true);
|
||||
}
|
||||
} else {
|
||||
if (world.isClient) {
|
||||
if (world.isClient()) {
|
||||
// Open the selection screen client-side
|
||||
MinecraftClient.getInstance().setScreen(
|
||||
new CommandCoreScreen(itemStack)
|
||||
@@ -57,7 +57,7 @@ public class CommandCore extends Item {
|
||||
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_up"));
|
||||
} else {
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.command_core"));
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.acethewildfire.acesbs.block.ModBlocks;
|
||||
import com.acethewildfire.acesbs.component.ModDataComponentTypes;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.component.type.TooltipDisplayComponent;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
@@ -59,7 +60,7 @@ public class Wand extends Item {
|
||||
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
if(!MinecraftClient.getInstance().isShiftPressed()){
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.generic.shift_up"));
|
||||
} else {
|
||||
textConsumer.accept(Text.translatable("tooltip.acesbs.wand"));
|
||||
|
||||
@@ -23,9 +23,9 @@ public abstract class CreeperInteractMixin {
|
||||
// === Here is the item check ===
|
||||
if (itemStack.isOf(ModItems.STABLE_ENTROPY)) {
|
||||
CreeperEntity creeper = (CreeperEntity) (Object) this;
|
||||
World world = creeper.getWorld();
|
||||
World world = creeper.getEntityWorld();
|
||||
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
|
||||
CreeperTransformAccess access = (CreeperTransformAccess) creeper;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class CreeperTickMixin {
|
||||
|
||||
if (!access.aces_bravo_sierra_template_1_21$isTransforming()) return;
|
||||
|
||||
World world = creeper.getWorld();
|
||||
World world = creeper.getEntityWorld();
|
||||
|
||||
((ServerWorld) world).spawnParticles(
|
||||
ParticleTypes.ENCHANT,
|
||||
@@ -43,7 +43,7 @@ public class CreeperTickMixin {
|
||||
int t = access.aces_bravo_sierra_template_1_21$getTransformTimer() + 1;
|
||||
access.aces_bravo_sierra_template_1_21$setTransformTimer(t);
|
||||
|
||||
if (t >= 20 && !world.isClient) {
|
||||
if (t >= 20 && !world.isClient()) {
|
||||
|
||||
world.playSound(null, creeper.getBlockPos(),
|
||||
SoundEvents.ENTITY_ZOMBIE_VILLAGER_CURE,
|
||||
|
||||
@@ -3,19 +3,18 @@ package com.acethewildfire.acesbs.particle;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.particle.SimpleParticleType;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class GreenFlame extends AbstractSlowingParticle {
|
||||
public GreenFlame(ClientWorld clientWorld, double x, double y, double z,
|
||||
SpriteProvider spriteProvider, double xSpeed, double ySpeed, double zSpeed) {
|
||||
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed);
|
||||
|
||||
this.setSpriteForAge(spriteProvider);
|
||||
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed, spriteProvider.getFirst());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleTextureSheet getType() {
|
||||
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
|
||||
protected RenderType getRenderType() {
|
||||
return RenderType.PARTICLE_ATLAS_TRANSLUCENT;
|
||||
}
|
||||
|
||||
public static class Factory implements ParticleFactory<SimpleParticleType> {
|
||||
@@ -27,7 +26,7 @@ public class GreenFlame extends AbstractSlowingParticle {
|
||||
|
||||
@Override
|
||||
public @Nullable Particle createParticle(SimpleParticleType parameters, ClientWorld world,
|
||||
double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
|
||||
double x, double y, double z, double velocityX, double velocityY, double velocityZ, Random random) {
|
||||
return new GreenFlame(world, x, y, z, this.spriteProvider, velocityX, velocityY, velocityZ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,19 +3,18 @@ package com.acethewildfire.acesbs.particle;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.particle.SimpleParticleType;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class PurpleFlame extends AbstractSlowingParticle {
|
||||
public PurpleFlame(ClientWorld clientWorld, double x, double y, double z,
|
||||
SpriteProvider spriteProvider, double xSpeed, double ySpeed, double zSpeed) {
|
||||
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed);
|
||||
|
||||
this.setSpriteForAge(spriteProvider);
|
||||
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed, spriteProvider.getFirst());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleTextureSheet getType() {
|
||||
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
|
||||
protected RenderType getRenderType() {
|
||||
return RenderType.PARTICLE_ATLAS_TRANSLUCENT;
|
||||
}
|
||||
|
||||
public static class Factory implements ParticleFactory<SimpleParticleType> {
|
||||
@@ -27,7 +26,7 @@ public class PurpleFlame extends AbstractSlowingParticle {
|
||||
|
||||
@Override
|
||||
public @Nullable Particle createParticle(SimpleParticleType parameters, ClientWorld world,
|
||||
double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
|
||||
double x, double y, double z, double velocityX, double velocityY, double velocityZ, Random random) {
|
||||
return new PurpleFlame(world, x, y, z, this.spriteProvider, velocityX, velocityY, velocityZ);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class EntropicEntanglerScreenHandler extends ScreenHandler {
|
||||
public final EntropicEntanglerEntity blockEntity;
|
||||
|
||||
public EntropicEntanglerScreenHandler(int syncId, PlayerInventory playerInventory, BlockPos pos) {
|
||||
this(syncId, playerInventory, playerInventory.player.getWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
this(syncId, playerInventory, playerInventory.player.getEntityWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
}
|
||||
|
||||
public EntropicEntanglerScreenHandler(int syncId, PlayerInventory playerInventory, BlockEntity blockEntity, PropertyDelegate arrayPropertyDelegate) {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public class EntropicEvisceratorScreenHandler extends ScreenHandler {
|
||||
public final EntropicEvisceratorEntity blockEntity;
|
||||
|
||||
public EntropicEvisceratorScreenHandler(int syncId, PlayerInventory playerInventory, BlockPos pos) {
|
||||
this(syncId, playerInventory, playerInventory.player.getWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
this(syncId, playerInventory, playerInventory.player.getEntityWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
}
|
||||
|
||||
public EntropicEvisceratorScreenHandler(int syncId, PlayerInventory playerInventory, BlockEntity blockEntity, PropertyDelegate arrayPropertyDelegate) {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ public class EntropicStabilizerScreenHandler extends ScreenHandler {
|
||||
public final EntropicStabilizerEntity blockEntity;
|
||||
|
||||
public EntropicStabilizerScreenHandler(int syncId, PlayerInventory playerInventory, BlockPos pos) {
|
||||
this(syncId, playerInventory, playerInventory.player.getWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
this(syncId, playerInventory, playerInventory.player.getEntityWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4));
|
||||
}
|
||||
|
||||
public EntropicStabilizerScreenHandler(int syncId, PlayerInventory playerInventory, BlockEntity blockEntity, PropertyDelegate arrayPropertyDelegate) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ConversionManager {
|
||||
|
||||
conversions.add(new ConversionEntry(
|
||||
skeleton.getUuid(),
|
||||
skeleton.getWorld().getRegistryKey(),
|
||||
skeleton.getEntityWorld().getRegistryKey(),
|
||||
ticks
|
||||
));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ModStats {
|
||||
public static void grantAdvancement(ServerPlayerEntity player, String id) {
|
||||
|
||||
AdvancementEntry advancement =
|
||||
Objects.requireNonNull(player.getServer()).getAdvancementLoader().get(Identifier.ofVanilla(id));
|
||||
Objects.requireNonNull(player.getEntityWorld().getServer()).getAdvancementLoader().get(Identifier.ofVanilla(id));
|
||||
|
||||
if (advancement == null) {
|
||||
AcesBS.LOGGER.info("Granting null");
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
],
|
||||
"client": [
|
||||
"com.acethewildfire.acesbs.AcesBSClient"
|
||||
],
|
||||
"rei_client": [
|
||||
"com.acethewildfire.acesbs.compat.AcesBSREIClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
@@ -34,7 +31,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.18.4",
|
||||
"minecraft": "~1.21.3",
|
||||
"minecraft": "~1.21.9",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user