WOOL
This commit is contained in:
1 parent
c06db6eb0c
commit
b2a72dbcd8
4 files changed
+33
-3
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
package carpet.fakes;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public interface TicketInfoInterface
|
||||||
|
{
|
||||||
|
BlockPos getPos();
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.fakes.TicketInfoInterface;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
||||||
|
@Mixin(targets = "net.minecraft.world.PortalForcer$TicketInfo")
|
||||||
|
public class PortalForcerTicketInfo_portalCachingMixin implements TicketInfoInterface
|
||||||
|
{
|
||||||
|
@Shadow @Final public BlockPos pos;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockPos getPos()
|
||||||
|
{
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package carpet.mixins;
|
|||||||
|
|
||||||
import carpet.CarpetSettings;
|
import carpet.CarpetSettings;
|
||||||
import carpet.fakes.PortalForcerInterface;
|
import carpet.fakes.PortalForcerInterface;
|
||||||
|
import carpet.fakes.TicketInfoInterface;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.server.world.ChunkTicketType;
|
import net.minecraft.server.world.ChunkTicketType;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
@@ -58,9 +59,10 @@ public class PortalForcer_portalCachingMixin implements PortalForcerInterface
|
|||||||
{
|
{
|
||||||
// vanilla got removed, but we stored it meaning we not only need to add it but also let it chunkload
|
// vanilla got removed, but we stored it meaning we not only need to add it but also let it chunkload
|
||||||
map.put(key, ticketInfo);
|
map.put(key, ticketInfo);
|
||||||
ColumnPos cpos = (ColumnPos)key;
|
//((TicketInfoInterface)ticketInfo).getPos();
|
||||||
BlockPos fakePos = new BlockPos(((ColumnPos) key).x, 0, ((ColumnPos) key).z);
|
//ColumnPos cpos = (ColumnPos)key;
|
||||||
world.method_14178().addTicket(ChunkTicketType.PORTAL, new ChunkPos(fakePos), 3, (ColumnPos) key);
|
//BlockPos fakePos = new BlockPos(((ColumnPos) key).x, 0, ((ColumnPos) key).z);
|
||||||
|
world.method_14178().addTicket(ChunkTicketType.PORTAL, new ChunkPos( ((TicketInfoInterface)ticketInfo).getPos()), 3, (ColumnPos) key);
|
||||||
}
|
}
|
||||||
return ticketInfo;
|
return ticketInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
|
|
||||||
"PortalForcer_portalCachingMixin",
|
"PortalForcer_portalCachingMixin",
|
||||||
"PortalBlock_portalCachingMixin",
|
"PortalBlock_portalCachingMixin",
|
||||||
|
"PortalForcerTicketInfo_portalCachingMixin",
|
||||||
|
|
||||||
"Entity_portalSuffocationMixin",
|
"Entity_portalSuffocationMixin",
|
||||||
"PortalForcer_portalSuffocationMixin",
|
"PortalForcer_portalSuffocationMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user