From 88d7e247e4e7fd1af146c802de09c5e7aa004cbd Mon Sep 17 00:00:00 2001 From: OmerBenGera Date: Sat, 15 Jun 2024 14:13:33 +0300 Subject: [PATCH] Fix errors when using Folia about missing method (#101) --- .../nms/v1_19/loader/ChunkLoaderBlockEntityTicker.java | 5 +++++ .../nms/v1_20_1/loader/ChunkLoaderBlockEntityTicker.java | 5 +++++ .../nms/v1_20_2/loader/ChunkLoaderBlockEntityTicker.java | 5 +++++ .../nms/v1_20_3/loader/ChunkLoaderBlockEntityTicker.java | 5 +++++ .../nms/v1_20_4/loader/ChunkLoaderBlockEntityTicker.java | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/NMS/v1_19/src/main/java/com/bgsoftware/wildloaders/nms/v1_19/loader/ChunkLoaderBlockEntityTicker.java b/NMS/v1_19/src/main/java/com/bgsoftware/wildloaders/nms/v1_19/loader/ChunkLoaderBlockEntityTicker.java index 00e2ed0..1926a87 100644 --- a/NMS/v1_19/src/main/java/com/bgsoftware/wildloaders/nms/v1_19/loader/ChunkLoaderBlockEntityTicker.java +++ b/NMS/v1_19/src/main/java/com/bgsoftware/wildloaders/nms/v1_19/loader/ChunkLoaderBlockEntityTicker.java @@ -1,6 +1,7 @@ package com.bgsoftware.wildloaders.nms.v1_19.loader; import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.TickingBlockEntity; @@ -27,4 +28,8 @@ public record ChunkLoaderBlockEntityTicker( return BlockEntityType.getKey(chunkLoaderBlockEntity.getType()) + ""; } + public BlockEntity getTileEntity() { + return chunkLoaderBlockEntity; + } + } diff --git a/NMS/v1_20_1/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_1/loader/ChunkLoaderBlockEntityTicker.java b/NMS/v1_20_1/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_1/loader/ChunkLoaderBlockEntityTicker.java index 0728c87..bbc368a 100644 --- a/NMS/v1_20_1/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_1/loader/ChunkLoaderBlockEntityTicker.java +++ b/NMS/v1_20_1/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_1/loader/ChunkLoaderBlockEntityTicker.java @@ -1,6 +1,7 @@ package com.bgsoftware.wildloaders.nms.v1_20_1.loader; import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.TickingBlockEntity; @@ -27,4 +28,8 @@ public record ChunkLoaderBlockEntityTicker( return BlockEntityType.getKey(chunkLoaderBlockEntity.getType()) + ""; } + public BlockEntity getTileEntity() { + return chunkLoaderBlockEntity; + } + } diff --git a/NMS/v1_20_2/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_2/loader/ChunkLoaderBlockEntityTicker.java b/NMS/v1_20_2/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_2/loader/ChunkLoaderBlockEntityTicker.java index 3535452..159b244 100644 --- a/NMS/v1_20_2/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_2/loader/ChunkLoaderBlockEntityTicker.java +++ b/NMS/v1_20_2/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_2/loader/ChunkLoaderBlockEntityTicker.java @@ -1,6 +1,7 @@ package com.bgsoftware.wildloaders.nms.v1_20_2.loader; import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.TickingBlockEntity; @@ -27,4 +28,8 @@ public record ChunkLoaderBlockEntityTicker( return BlockEntityType.getKey(chunkLoaderBlockEntity.getType()) + ""; } + public BlockEntity getTileEntity() { + return chunkLoaderBlockEntity; + } + } diff --git a/NMS/v1_20_3/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_3/loader/ChunkLoaderBlockEntityTicker.java b/NMS/v1_20_3/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_3/loader/ChunkLoaderBlockEntityTicker.java index f919777..68bde49 100644 --- a/NMS/v1_20_3/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_3/loader/ChunkLoaderBlockEntityTicker.java +++ b/NMS/v1_20_3/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_3/loader/ChunkLoaderBlockEntityTicker.java @@ -1,6 +1,7 @@ package com.bgsoftware.wildloaders.nms.v1_20_3.loader; import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.TickingBlockEntity; @@ -27,4 +28,8 @@ public record ChunkLoaderBlockEntityTicker( return BlockEntityType.getKey(chunkLoaderBlockEntity.getType()) + ""; } + public BlockEntity getTileEntity() { + return chunkLoaderBlockEntity; + } + } diff --git a/NMS/v1_20_4/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_4/loader/ChunkLoaderBlockEntityTicker.java b/NMS/v1_20_4/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_4/loader/ChunkLoaderBlockEntityTicker.java index 3023867..1510fbb 100644 --- a/NMS/v1_20_4/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_4/loader/ChunkLoaderBlockEntityTicker.java +++ b/NMS/v1_20_4/src/main/java/com/bgsoftware/wildloaders/nms/v1_20_4/loader/ChunkLoaderBlockEntityTicker.java @@ -1,6 +1,7 @@ package com.bgsoftware.wildloaders.nms.v1_20_4.loader; import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.TickingBlockEntity; @@ -27,4 +28,8 @@ public record ChunkLoaderBlockEntityTicker( return BlockEntityType.getKey(chunkLoaderBlockEntity.getType()) + ""; } + public BlockEntity getTileEntity() { + return chunkLoaderBlockEntity; + } + }