You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StatBase stat = StatBase.stats.get(21);
final int level = DataHelper.getPlayerStatLevel(originalPlayer, stat);
if (stat.isEnabled()) {
newPlayer.getAttribute(Attributes.MAX_HEALTH)
.setBaseValue(20 + stat.getBonus(level));
}
}
}
The text was updated successfully, but these errors were encountered:
Only added a respawn listening event
In the MainClass:
public GokiStats() {
instance = this;
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
eventBus.addListener(this::construct);
GokiPacketHandler.registerMessages();
//add this
private void onPlayerRespawn(PlayerEvent.Clone event) {
if (event.isWasDeath() && event.getOriginal() instanceof ServerPlayerEntity) {
ServerPlayerEntity originalPlayer = (ServerPlayerEntity) event.getOriginal();
ServerPlayerEntity newPlayer = (ServerPlayerEntity) event.getPlayer();
The text was updated successfully, but these errors were encountered: