version 1.21.9
This commit is contained in:
@@ -4,14 +4,14 @@ org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21.8
|
||||
yarn_mappings=1.21.8+build.1
|
||||
minecraft_version=1.21.9
|
||||
yarn_mappings=1.21.9+build.1
|
||||
loader_version=0.17.2
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.21.8.1
|
||||
mod_version=1.21.9.0
|
||||
maven_group=de.jottyfan.quickiemod
|
||||
archives_base_name=quickiemod
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.132.0+1.21.8
|
||||
fabric_version=0.133.14+1.21.9
|
||||
|
@@ -77,7 +77,7 @@ public class BlockItemhoarder extends Block implements BlockEntityProvider {
|
||||
|
||||
@Override
|
||||
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof ItemHoarderBlockEntity) {
|
||||
ItemHoarderBlockEntity ihbe = (ItemHoarderBlockEntity) blockEntity;
|
||||
|
@@ -107,7 +107,7 @@ public class BlockLavahoarder extends Block {
|
||||
|
||||
@Override
|
||||
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
Hand hand = player.getActiveHand();
|
||||
ItemStack handStack = player.getStackInHand(hand);
|
||||
if (handStack != null && Items.BUCKET.equals(handStack.getItem())) {
|
||||
|
@@ -60,7 +60,7 @@ public class BlockMonsterhoarder extends Block {
|
||||
|
||||
@Override
|
||||
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)));
|
||||
List<Entity> entities = world.getOtherEntities(null, box);
|
||||
for (Entity entity : entities) {
|
||||
@@ -80,7 +80,7 @@ public class BlockMonsterhoarder extends Block {
|
||||
|
||||
@Override
|
||||
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.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f);
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ public class BlockPlant extends CropBlock {
|
||||
|
||||
@Override
|
||||
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);
|
||||
world.setBlockState(pos, state.with(AGE, 0));
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ public class BlockStacker extends BlockWithEntity implements BlockEntityProvider
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ public class BlockStackerEntity extends BlockEntity implements NamedScreenHandle
|
||||
}
|
||||
|
||||
public static void tick(World world, BlockPos pos, BlockState state, BlockStackerEntity entity) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
pos.down();
|
||||
BlockStacker block = (BlockStacker) state.getBlock();
|
||||
BlockEntity source = world.getBlockEntity(pos.offset(block.getSourceOffset()));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package de.jottyfan.quickiemod.container;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.ContainerUser;
|
||||
import net.minecraft.inventory.SimpleInventory;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
|
||||
@@ -16,15 +16,15 @@ public class BlockStackerInventory extends SimpleInventory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen(PlayerEntity player) {
|
||||
public void onOpen(ContainerUser player) {
|
||||
super.onOpen(player);
|
||||
player.playSound(SoundEvents.BLOCK_CHEST_OPEN, 1f, 1f);
|
||||
player.asLivingEntity().playSound(SoundEvents.BLOCK_CHEST_OPEN, 1f, 1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(PlayerEntity player) {
|
||||
public void onClose(ContainerUser player) {
|
||||
super.onClose(player);
|
||||
player.playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1f, 1f);
|
||||
player.asLivingEntity().playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1f, 1f);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.NamedScreenHandlerFactory;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
|
||||
|
@@ -35,7 +35,7 @@ public class ToolQuickiepowderShears extends ShearsItem {
|
||||
|
||||
@Override
|
||||
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);
|
||||
if (entity instanceof SheepEntity) {
|
||||
SheepEntity sheep = (SheepEntity) entity;
|
||||
@@ -75,26 +75,26 @@ public class ToolQuickiepowderShears extends ShearsItem {
|
||||
} else if (color.equals(DyeColor.YELLOW)) {
|
||||
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;
|
||||
}
|
||||
} else if (entity instanceof HorseEntity) {
|
||||
HorseEntity horse = (HorseEntity) entity;
|
||||
horse.playAmbientSound();
|
||||
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;
|
||||
} else if (entity instanceof CowEntity) {
|
||||
CowEntity cow = (CowEntity) entity;
|
||||
cow.playAmbientSound();
|
||||
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;
|
||||
} else if (entity instanceof ChickenEntity) {
|
||||
ChickenEntity chicken = (ChickenEntity) entity;
|
||||
chicken.playAmbientSound();
|
||||
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.PASS;
|
||||
|
@@ -49,7 +49,7 @@ public class ToolQuickiepowderShovel extends ShovelItem implements ToolRangeable
|
||||
if (side != Direction.DOWN) {
|
||||
BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock());
|
||||
if (blockState2 != null && world.getBlockState(pos.up()).isAir()) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
world.setBlockState(pos, blockState2, 11);
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ public class ToolSpeedpowderShears extends ShearsItem {
|
||||
|
||||
@Override
|
||||
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);
|
||||
if (entity instanceof SheepEntity) {
|
||||
SheepEntity sheep = (SheepEntity) entity;
|
||||
@@ -75,26 +75,26 @@ public class ToolSpeedpowderShears extends ShearsItem {
|
||||
} else if (color.equals(DyeColor.YELLOW)) {
|
||||
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;
|
||||
}
|
||||
} else if (entity instanceof HorseEntity) {
|
||||
HorseEntity horse = (HorseEntity) entity;
|
||||
horse.playAmbientSound();
|
||||
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;
|
||||
} else if (entity instanceof CowEntity) {
|
||||
CowEntity cow = (CowEntity) entity;
|
||||
cow.playAmbientSound();
|
||||
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;
|
||||
} else if (entity instanceof ChickenEntity) {
|
||||
ChickenEntity chicken = (ChickenEntity) entity;
|
||||
chicken.playAmbientSound();
|
||||
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.PASS;
|
||||
|
@@ -49,7 +49,7 @@ public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
|
||||
if (side != Direction.DOWN) {
|
||||
BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock());
|
||||
if (blockState2 != null && world.getBlockState(pos.up()).isAir()) {
|
||||
if (!world.isClient) {
|
||||
if (!world.isClient()) {
|
||||
world.setBlockState(pos, blockState2, 11);
|
||||
}
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.17.2",
|
||||
"minecraft": "~1.21.8",
|
||||
"minecraft": "~1.21.9",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
|
Reference in New Issue
Block a user