WOOL
This commit is contained in:
1 parent
c06db6eb0c
commit
b2a72dbcd8
4 files changed
+33
-3
No files matched your search
@@ -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.fakes.PortalForcerInterface;
|
||||
import carpet.fakes.TicketInfoInterface;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.server.world.ChunkTicketType;
|
||||
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
|
||||
map.put(key, ticketInfo);
|
||||
ColumnPos cpos = (ColumnPos)key;
|
||||
BlockPos fakePos = new BlockPos(((ColumnPos) key).x, 0, ((ColumnPos) key).z);
|
||||
world.method_14178().addTicket(ChunkTicketType.PORTAL, new ChunkPos(fakePos), 3, (ColumnPos) key);
|
||||
//((TicketInfoInterface)ticketInfo).getPos();
|
||||
//ColumnPos cpos = (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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user