version 1.21.9

This commit is contained in:
Jottyfan
2025-09-30 22:42:14 +02:00
parent 66cc22b7ca
commit 437e2d8e1a
14 changed files with 29 additions and 30 deletions

View File

@@ -4,14 +4,14 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.21.8 minecraft_version=1.21.9
yarn_mappings=1.21.8+build.1 yarn_mappings=1.21.9+build.1
loader_version=0.17.2 loader_version=0.17.2
# Mod Properties # Mod Properties
mod_version=1.21.8.1 mod_version=1.21.9.0
maven_group=de.jottyfan.quickiemod maven_group=de.jottyfan.quickiemod
archives_base_name=quickiemod archives_base_name=quickiemod
# Dependencies # Dependencies
fabric_version=0.132.0+1.21.8 fabric_version=0.133.14+1.21.9

View File

@@ -77,7 +77,7 @@ public class BlockItemhoarder extends Block implements BlockEntityProvider {
@Override @Override
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
if (!world.isClient) { if (!world.isClient()) {
BlockEntity blockEntity = world.getBlockEntity(pos); BlockEntity blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof ItemHoarderBlockEntity) { if (blockEntity instanceof ItemHoarderBlockEntity) {
ItemHoarderBlockEntity ihbe = (ItemHoarderBlockEntity) blockEntity; ItemHoarderBlockEntity ihbe = (ItemHoarderBlockEntity) blockEntity;

View File

@@ -107,7 +107,7 @@ public class BlockLavahoarder extends Block {
@Override @Override
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
if (!world.isClient) { if (!world.isClient()) {
Hand hand = player.getActiveHand(); Hand hand = player.getActiveHand();
ItemStack handStack = player.getStackInHand(hand); ItemStack handStack = player.getStackInHand(hand);
if (handStack != null && Items.BUCKET.equals(handStack.getItem())) { if (handStack != null && Items.BUCKET.equals(handStack.getItem())) {

View File

@@ -60,7 +60,7 @@ public class BlockMonsterhoarder extends Block {
@Override @Override
protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
if (!world.isClient) { if (!world.isClient()) {
Box box = new Box(pos).expand(Double.valueOf(state.get(SUCKRADIUS))); Box box = new Box(pos).expand(Double.valueOf(state.get(SUCKRADIUS)));
List<Entity> entities = world.getOtherEntities(null, box); List<Entity> entities = world.getOtherEntities(null, box);
for (Entity entity : entities) { for (Entity entity : entities) {
@@ -80,7 +80,7 @@ public class BlockMonsterhoarder extends Block {
@Override @Override
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
if (!world.isClient) { if (!world.isClient()) {
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos)); world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
world.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f); world.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f);
} }

View File

@@ -70,7 +70,7 @@ public class BlockPlant extends CropBlock {
@Override @Override
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
if (!world.isClient && isMature(state)) { if (!world.isClient() && isMature(state)) {
spawnHarvested(world, pos, state); spawnHarvested(world, pos, state);
world.setBlockState(pos, state.with(AGE, 0)); world.setBlockState(pos, state.with(AGE, 0));
} }

View File

@@ -112,7 +112,7 @@ public class BlockStacker extends BlockWithEntity implements BlockEntityProvider
} }
@Override @Override
public int getComparatorOutput(BlockState state, World world, BlockPos pos) { protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
return ScreenHandler.calculateComparatorOutput(world.getBlockEntity(pos)); return ScreenHandler.calculateComparatorOutput(world.getBlockEntity(pos));
} }
} }

View File

@@ -104,7 +104,7 @@ public class BlockStackerEntity extends BlockEntity implements NamedScreenHandle
} }
public static void tick(World world, BlockPos pos, BlockState state, BlockStackerEntity entity) { public static void tick(World world, BlockPos pos, BlockState state, BlockStackerEntity entity) {
if (!world.isClient) { if (!world.isClient()) {
pos.down(); pos.down();
BlockStacker block = (BlockStacker) state.getBlock(); BlockStacker block = (BlockStacker) state.getBlock();
BlockEntity source = world.getBlockEntity(pos.offset(block.getSourceOffset())); BlockEntity source = world.getBlockEntity(pos.offset(block.getSourceOffset()));

View File

@@ -1,6 +1,6 @@
package de.jottyfan.quickiemod.container; package de.jottyfan.quickiemod.container;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.ContainerUser;
import net.minecraft.inventory.SimpleInventory; import net.minecraft.inventory.SimpleInventory;
import net.minecraft.sound.SoundEvents; import net.minecraft.sound.SoundEvents;
@@ -16,15 +16,15 @@ public class BlockStackerInventory extends SimpleInventory {
} }
@Override @Override
public void onOpen(PlayerEntity player) { public void onOpen(ContainerUser player) {
super.onOpen(player); super.onOpen(player);
player.playSound(SoundEvents.BLOCK_CHEST_OPEN, 1f, 1f); player.asLivingEntity().playSound(SoundEvents.BLOCK_CHEST_OPEN, 1f, 1f);
} }
@Override @Override
public void onClose(PlayerEntity player) { public void onClose(ContainerUser player) {
super.onClose(player); super.onClose(player);
player.playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1f, 1f); player.asLivingEntity().playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1f, 1f);
} }
} }

View File

@@ -4,7 +4,6 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventory; import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.screen.NamedScreenHandlerFactory;
import net.minecraft.screen.ScreenHandler; import net.minecraft.screen.ScreenHandler;
import net.minecraft.screen.slot.Slot; import net.minecraft.screen.slot.Slot;

View File

@@ -35,7 +35,7 @@ public class ToolQuickiepowderShears extends ShearsItem {
@Override @Override
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) { public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) {
Vec3d pos = entity.getPos(); Vec3d pos = entity.getEntityPos();
Integer amount = 3 + new Random().nextInt(4); Integer amount = 3 + new Random().nextInt(4);
if (entity instanceof SheepEntity) { if (entity instanceof SheepEntity) {
SheepEntity sheep = (SheepEntity) entity; SheepEntity sheep = (SheepEntity) entity;
@@ -75,26 +75,26 @@ public class ToolQuickiepowderShears extends ShearsItem {
} else if (color.equals(DyeColor.YELLOW)) { } else if (color.equals(DyeColor.YELLOW)) {
item = Items.YELLOW_WOOL; item = Items.YELLOW_WOOL;
} }
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(item, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(item, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} }
} else if (entity instanceof HorseEntity) { } else if (entity instanceof HorseEntity) {
HorseEntity horse = (HorseEntity) entity; HorseEntity horse = (HorseEntity) entity;
horse.playAmbientSound(); horse.playAmbientSound();
horse.setBaby(true); horse.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else if (entity instanceof CowEntity) { } else if (entity instanceof CowEntity) {
CowEntity cow = (CowEntity) entity; CowEntity cow = (CowEntity) entity;
cow.playAmbientSound(); cow.playAmbientSound();
cow.setBaby(true); cow.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else if (entity instanceof ChickenEntity) { } else if (entity instanceof ChickenEntity) {
ChickenEntity chicken = (ChickenEntity) entity; ChickenEntity chicken = (ChickenEntity) entity;
chicken.playAmbientSound(); chicken.playAmbientSound();
chicken.setBaby(true); chicken.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.FEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.FEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} }
return ActionResult.PASS; return ActionResult.PASS;

View File

@@ -49,7 +49,7 @@ public class ToolQuickiepowderShovel extends ShovelItem implements ToolRangeable
if (side != Direction.DOWN) { if (side != Direction.DOWN) {
BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock()); BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock());
if (blockState2 != null && world.getBlockState(pos.up()).isAir()) { if (blockState2 != null && world.getBlockState(pos.up()).isAir()) {
if (!world.isClient) { if (!world.isClient()) {
world.setBlockState(pos, blockState2, 11); world.setBlockState(pos, blockState2, 11);
} }
} }

View File

@@ -35,7 +35,7 @@ public class ToolSpeedpowderShears extends ShearsItem {
@Override @Override
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) { public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) {
Vec3d pos = entity.getPos(); Vec3d pos = entity.getEntityPos();
Integer amount = 1 + new Random().nextInt(4); Integer amount = 1 + new Random().nextInt(4);
if (entity instanceof SheepEntity) { if (entity instanceof SheepEntity) {
SheepEntity sheep = (SheepEntity) entity; SheepEntity sheep = (SheepEntity) entity;
@@ -75,26 +75,26 @@ public class ToolSpeedpowderShears extends ShearsItem {
} else if (color.equals(DyeColor.YELLOW)) { } else if (color.equals(DyeColor.YELLOW)) {
item = Items.YELLOW_WOOL; item = Items.YELLOW_WOOL;
} }
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(item, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(item, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} }
} else if (entity instanceof HorseEntity) { } else if (entity instanceof HorseEntity) {
HorseEntity horse = (HorseEntity) entity; HorseEntity horse = (HorseEntity) entity;
horse.playAmbientSound(); horse.playAmbientSound();
horse.setBaby(true); horse.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else if (entity instanceof CowEntity) { } else if (entity instanceof CowEntity) {
CowEntity cow = (CowEntity) entity; CowEntity cow = (CowEntity) entity;
cow.playAmbientSound(); cow.playAmbientSound();
cow.setBaby(true); cow.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else if (entity instanceof ChickenEntity) { } else if (entity instanceof ChickenEntity) {
ChickenEntity chicken = (ChickenEntity) entity; ChickenEntity chicken = (ChickenEntity) entity;
chicken.playAmbientSound(); chicken.playAmbientSound();
chicken.setBaby(true); chicken.setBaby(true);
user.getWorld().spawnEntity(new ItemEntity(user.getWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.FEATHER, amount))); user.getEntityWorld().spawnEntity(new ItemEntity(user.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.FEATHER, amount)));
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} }
return ActionResult.PASS; return ActionResult.PASS;

View File

@@ -49,7 +49,7 @@ public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
if (side != Direction.DOWN) { if (side != Direction.DOWN) {
BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock()); BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock());
if (blockState2 != null && world.getBlockState(pos.up()).isAir()) { if (blockState2 != null && world.getBlockState(pos.up()).isAir()) {
if (!world.isClient) { if (!world.isClient()) {
world.setBlockState(pos, blockState2, 11); world.setBlockState(pos, blockState2, 11);
} }
} }

View File

@@ -29,7 +29,7 @@
], ],
"depends": { "depends": {
"fabricloader": ">=0.17.2", "fabricloader": ">=0.17.2",
"minecraft": "~1.21.8", "minecraft": "~1.21.9",
"java": ">=21", "java": ">=21",
"fabric-api": "*" "fabric-api": "*"
}, },