mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix wrong position in Level#hasChunk() call in IForgeBlockGetter (#8654)
This commit is contained in:
1 parent
4285c931e7
commit
c48698f680
1 file changed
+2
-1
@@ -6,6 +6,7 @@
|
||||
package net.minecraftforge.common.extensions;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@@ -29,7 +30,7 @@ public interface IForgeBlockGetter
|
||||
{
|
||||
if (this instanceof Level level)
|
||||
{
|
||||
if (!level.hasChunk(pos.getX(), pos.getZ()))
|
||||
if (!level.hasChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user