update
This commit is contained in:
parent
56e64cde5b
commit
64021bb0dc
2 changed files with 6 additions and 3 deletions
|
@ -5,9 +5,8 @@ import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
||||||
import com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState;
|
import com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState;
|
||||||
import me.tofaa.entitylib.meta.Metadata;
|
import me.tofaa.entitylib.meta.Metadata;
|
||||||
import me.tofaa.entitylib.meta.types.MobMeta;
|
import me.tofaa.entitylib.meta.types.MobMeta;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class EndermanMeta extends MobMeta {
|
public class EndermanMeta extends MobMeta {
|
||||||
|
|
||||||
|
@ -33,6 +32,10 @@ public class EndermanMeta extends MobMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCarriedBlockState(WrappedBlockState blockState) {
|
public void setCarriedBlockState(WrappedBlockState blockState) {
|
||||||
|
if (blockState == null) {
|
||||||
|
setCarriedBlockID(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
setCarriedBlockID(blockState.getGlobalId());
|
setCarriedBlockID(blockState.getGlobalId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class FallingBlockMeta extends EntityMeta implements ObjectData {
|
||||||
return WrappedBlockState.getByGlobalId(PacketEvents.getAPI().getServerManager().getVersion().toClientVersion(), getBlockStateId());
|
return WrappedBlockState.getByGlobalId(PacketEvents.getAPI().getServerManager().getVersion().toClientVersion(), getBlockStateId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBlockStateId(WrappedBlockState blockState) {
|
public void setBlockState(WrappedBlockState blockState) {
|
||||||
setBlockStateId(blockState.getGlobalId());
|
setBlockStateId(blockState.getGlobalId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue