Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.techmage.magetech.handler.event;
- import com.techmage.magetech.entity.ExtendedPlayerProperties;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraftforge.event.entity.player.PlayerEvent;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- public class PlayerCloneEventHandler
- {
- @SubscribeEvent
- public void onClonePlayer(PlayerEvent.Clone event)
- {
- if(event.wasDeath)
- {
- NBTTagCompound nbtTagCompound = new NBTTagCompound();
- ExtendedPlayerProperties.get(event.original).saveNBTData(nbtTagCompound);
- ExtendedPlayerProperties.get(event.entityPlayer).loadNBTData(nbtTagCompound);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment