Update to 1.20.3-pre1

This commit is contained in:
shedaniel
2023-11-21 13:08:20 +08:00
parent 054b13e63e
commit af9b6d2901
4 changed files with 12 additions and 10 deletions

View File

@@ -136,9 +136,9 @@ public class TestRegistries {
});
public static final RegistrySupplier<Block> TEST_BLOCK = BLOCKS.register("test_block", () ->
new Block(BlockBehaviour.Properties.copy(Blocks.STONE)));
new Block(BlockBehaviour.Properties.ofLegacyCopy(Blocks.STONE)));
public static final RegistrySupplier<Block> COLLISION_BLOCK = BLOCKS.register("collision_block", () ->
new Block(BlockBehaviour.Properties.copy(Blocks.STONE)) {
new Block(BlockBehaviour.Properties.ofLegacyCopy(Blocks.STONE)) {
@Override
public VoxelShape getCollisionShape(BlockState state, BlockGetter bg, BlockPos pos, CollisionContext ctx) {
SINK.accept(EntityHooks.fromCollision(ctx) + " is colliding with " + state);
@@ -151,7 +151,7 @@ public class TestRegistries {
// In example mod the forge class isn't being replaced, this is not required in mods depending on architectury
return (LiquidBlock) Class.forName(!Platform.isForge() ? "dev.architectury.core.block.ArchitecturyLiquidBlock" : "dev.architectury.core.block.forge.imitator.ArchitecturyLiquidBlock")
.getDeclaredConstructor(Supplier.class, BlockBehaviour.Properties.class)
.newInstance(TestRegistries.TEST_FLUID, BlockBehaviour.Properties.copy(Blocks.WATER).noCollission().strength(100.0F).noLootTable());
.newInstance(TestRegistries.TEST_FLUID, BlockBehaviour.Properties.ofLegacyCopy(Blocks.WATER).noCollission().strength(100.0F).noLootTable());
} catch (InstantiationException | ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
throw new RuntimeException(e);