Attempt to fix rtp
This commit is contained in:
parent
8eb93ff176
commit
11864385e4
9 changed files with 93 additions and 184 deletions
|
@ -24,6 +24,7 @@ import net.minecraft.commands.Commands;
|
|||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -74,8 +75,10 @@ public class SetHomeCommand {
|
|||
Vec2 rot = p.getRotationVector();
|
||||
|
||||
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel());
|
||||
|
||||
BlockState bs = p.getLevel().getBlockState(dest.Position.moveDown().asBlockPos());
|
||||
|
||||
Home newhome = new Home(p, homeName, dest, new ItemStack(p.getFeetBlockState().getBlock().asItem()));
|
||||
Home newhome = new Home(p, homeName, dest, new ItemStack(bs.getBlock().asItem()));
|
||||
AriasEssentials.player_homes.get(p.getUUID()).add(newhome);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue