Skip to content

Commit 1bbe5e2

Browse files
committed
Initial 1.21.9 port
1 parent 754b7d1 commit 1bbe5e2

File tree

64 files changed

+531
-448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+531
-448
lines changed

common/src/generated/resources/pack.mcmeta

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
},
156156
"pack": {
157157
"description": "Adorn resources.",
158-
"pack_format": 81
158+
"max_format": 88,
159+
"min_format": 88
159160
}
160161
}

common/src/main/java/juuxel/adorn/block/BrewerBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public BlockState getPlacementState(ItemPlacementContext ctx) {
5959

6060
@Override
6161
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
62-
if (world.isClient) return ActionResult.SUCCESS;
62+
if (world.isClient()) return ActionResult.SUCCESS;
6363

6464
if (world.getBlockEntity(pos) instanceof BrewerBlockEntity brewer) {
6565
player.openMenu(brewer);
@@ -114,7 +114,7 @@ public boolean hasComparatorOutput(BlockState state) {
114114
}
115115

116116
@Override
117-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
117+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
118118
return world.getBlockEntity(pos) instanceof BrewerBlockEntity brewer ? brewer.calculateComparatorOutput() : 0;
119119
}
120120

common/src/main/java/juuxel/adorn/block/ChairBlock.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import net.minecraft.util.shape.VoxelShapes;
3232
import net.minecraft.world.BlockView;
3333
import net.minecraft.world.World;
34-
import net.minecraft.world.WorldAccess;
3534
import net.minecraft.world.WorldView;
3635
import net.minecraft.world.tick.ScheduledTickView;
3736
import org.jetbrains.annotations.Nullable;
@@ -126,7 +125,7 @@ public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
126125

127126
@Override
128127
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
129-
if (!world.isClient && player.isCreative()) {
128+
if (!world.isClient() && player.isCreative()) {
130129
TallPlantBlock.onBreakInCreative(world, pos, state, player);
131130
}
132131

common/src/main/java/juuxel/adorn/block/DrawerBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public BlockState getPlacementState(ItemPlacementContext ctx) {
6666

6767
@Override
6868
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
69-
if (world.isClient) return ActionResult.SUCCESS;
69+
if (world.isClient()) return ActionResult.SUCCESS;
7070

7171
if (world.getBlockEntity(pos) instanceof DrawerBlockEntity drawer) {
7272
PlatformBridges.get().getMenus().open(player, drawer, pos);;
@@ -102,7 +102,7 @@ public boolean hasComparatorOutput(BlockState state) {
102102
}
103103

104104
@Override
105-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
105+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
106106
return Menu.calculateComparatorOutput(world.getBlockEntity(pos));
107107
}
108108

common/src/main/java/juuxel/adorn/block/KitchenCupboardBlock.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import juuxel.adorn.block.entity.KitchenCupboardBlockEntity;
44
import juuxel.adorn.block.entity.SimpleContainerBlockEntity;
5-
import juuxel.adorn.block.variant.BlockVariant;
65
import juuxel.adorn.lib.AdornStats;
76
import juuxel.adorn.platform.PlatformBridges;
87
import net.minecraft.block.AbstractBlock;
@@ -16,6 +15,7 @@
1615
import net.minecraft.util.ItemScatterer;
1716
import net.minecraft.util.hit.BlockHitResult;
1817
import net.minecraft.util.math.BlockPos;
18+
import net.minecraft.util.math.Direction;
1919
import net.minecraft.util.math.random.Random;
2020
import net.minecraft.world.World;
2121
import org.jetbrains.annotations.Nullable;
@@ -34,7 +34,7 @@ public String getDescriptionKey() {
3434

3535
@Override
3636
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
37-
if (world.isClient) return ActionResult.SUCCESS;
37+
if (world.isClient()) return ActionResult.SUCCESS;
3838

3939
if (world.getBlockEntity(pos) instanceof KitchenCupboardBlockEntity cupboard) {
4040
PlatformBridges.get().getMenus().open(player, cupboard, pos);
@@ -55,7 +55,7 @@ public boolean hasComparatorOutput(BlockState state) {
5555
}
5656

5757
@Override
58-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
58+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
5959
return Menu.calculateComparatorOutput(world.getBlockEntity(pos));
6060
}
6161

common/src/main/java/juuxel/adorn/block/KitchenSinkBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public boolean hasComparatorOutput(BlockState state) {
8585
}
8686

8787
@Override
88-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
88+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
8989
return world.getBlockEntity(pos) instanceof KitchenSinkBlockEntity sink ? sink.calculateComparatorOutput() : 0;
9090
}
9191

common/src/main/java/juuxel/adorn/block/SeatBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ protected ActionResult onUse(BlockState state, World world, BlockPos pos, Player
5151
var occupied = actualState.get(OCCUPIED);
5252

5353
if (!occupied) {
54-
if (!world.isClient) {
54+
if (!world.isClient()) {
5555
var entity = new SeatEntity(AdornEntities.SEAT.get(), world);
5656
entity.setPos(actualPos);
5757
world.spawnEntity(entity);
5858
world.setBlockState(actualPos, actualState.with(OCCUPIED, true));
59-
player.startRiding(entity, true);
59+
player.startRiding(entity);
6060

6161
var sittingStat = getSittingStat();
6262
if (sittingStat != null) {

common/src/main/java/juuxel/adorn/block/ShelfBlock.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World wo
117117
copy.setCount(1);
118118
inventory.setStack(slot, copy);
119119
be.markDirty();
120-
if (!world.isClient) {
120+
if (!world.isClient()) {
121121
PlatformBridges.get().getNetwork().syncBlockEntity(be);
122122
player.incrementStat(AdornStats.INTERACT_WITH_SHELF);
123123
}
@@ -127,7 +127,7 @@ protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World wo
127127
}
128128
}
129129
} else {
130-
if (!world.isClient) {
130+
if (!world.isClient()) {
131131
if (player.getStackInHand(hand).isEmpty()) {
132132
player.setStackInHand(hand, existing);
133133
} else {
@@ -136,7 +136,7 @@ protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World wo
136136
}
137137
inventory.setStack(slot, ItemStack.EMPTY);
138138
be.markDirty();
139-
if (!world.isClient) {
139+
if (!world.isClient()) {
140140
PlatformBridges.get().getNetwork().syncBlockEntity(be);
141141
player.incrementStat(AdornStats.INTERACT_WITH_SHELF);
142142
}
@@ -201,7 +201,7 @@ public boolean hasComparatorOutput(BlockState state) {
201201
}
202202

203203
@Override
204-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
204+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
205205
return Menu.calculateComparatorOutput(world.getBlockEntity(pos));
206206
}
207207

common/src/main/java/juuxel/adorn/block/SofaBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World wo
7979
world.setBlockState(pos, AdornBlocks.SOFAS.getEager(dye.getColor()).getStateWithProperties(state));
8080
world.playSound(player, pos, SoundEvents.BLOCK_WOOL_PLACE, SoundCategory.BLOCKS, 1f, 0.8f);
8181
if (!player.getAbilities().creativeMode) stack.decrement(1);
82-
if (!world.isClient) player.incrementStat(AdornStats.DYE_SOFA);
82+
if (!world.isClient()) player.incrementStat(AdornStats.DYE_SOFA);
8383
return ActionResult.SUCCESS;
8484
}
8585

@@ -96,7 +96,7 @@ public ActionResult onSneakClick(BlockState state, World world, BlockPos pos, Pl
9696
}
9797

9898
if (BedBlock.isBedWorking(world) && sleepingDirection != null) {
99-
if (!world.isClient) {
99+
if (!world.isClient()) {
100100
player.trySleep(pos).ifLeft(reason -> {
101101
if (reason.getMessage() != null) {
102102
player.sendMessage(reason.getMessage(), true);

common/src/main/java/juuxel/adorn/block/TableLampBlock.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World wo
7878
world.setBlockState(pos, AdornBlocks.TABLE_LAMPS.getEager(dye.getColor()).getStateWithProperties(state));
7979
world.playSound(player, pos, SoundEvents.BLOCK_WOOL_PLACE, SoundCategory.BLOCKS, 1f, 0.8f);
8080
if (!player.getAbilities().creativeMode) stack.decrement(1);
81-
if (!world.isClient) player.incrementStat(AdornStats.DYE_TABLE_LAMP);
81+
if (!world.isClient()) player.incrementStat(AdornStats.DYE_TABLE_LAMP);
8282
} else {
8383
var wasLit = state.get(LIT);
8484
world.setBlockState(pos, state.with(LIT, !wasLit));
8585
var pitch = wasLit ? 0.5f : 0.6f;
8686
world.playSound(player, pos, SoundEvents.BLOCK_LEVER_CLICK, SoundCategory.BLOCKS, 0.3f, pitch);
87-
if (!world.isClient) player.incrementStat(AdornStats.INTERACT_WITH_TABLE_LAMP);
87+
if (!world.isClient()) player.incrementStat(AdornStats.INTERACT_WITH_TABLE_LAMP);
8888
}
8989
return ActionResult.SUCCESS;
9090
}
@@ -112,7 +112,7 @@ public boolean hasComparatorOutput(BlockState state) {
112112
}
113113

114114
@Override
115-
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
115+
protected int getComparatorOutput(BlockState state, World world, BlockPos pos, Direction direction) {
116116
return state.get(LIT) ? 15 : 0;
117117
}
118118

0 commit comments

Comments
 (0)