Remove no longer needed Mixins (#1030)
This commit is contained in:
1 parent
19ad8cfbf3
commit
2a391962ff
14 files changed
+8
-175
No files matched your search
@@ -3,7 +3,6 @@ package carpet.script.api;
|
||||
import carpet.CarpetServer;
|
||||
import carpet.fakes.MinecraftServerInterface;
|
||||
import carpet.fakes.ServerWorldInterface;
|
||||
import carpet.fakes.StatTypeInterface;
|
||||
import carpet.fakes.ThreadedAnvilChunkStorageInterface;
|
||||
import carpet.helpers.FeatureGenerator;
|
||||
import carpet.logging.HUDController;
|
||||
@@ -1209,7 +1208,7 @@ public class Auxiliary {
|
||||
private static <T> Stat<T> getStat(StatType<T> type, Identifier id)
|
||||
{
|
||||
T key = type.getRegistry().get(id);
|
||||
if (key == null || !((StatTypeInterface)type).hasStatCreated(key))
|
||||
if (key == null || !type.hasStat(key))
|
||||
return null;
|
||||
return type.getOrCreateStat(key);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import carpet.fakes.ItemEntityInterface;
|
||||
import carpet.fakes.LivingEntityInterface;
|
||||
import carpet.fakes.MemoryInterface;
|
||||
import carpet.fakes.MobEntityInterface;
|
||||
import carpet.fakes.HungerManagerInterface;
|
||||
import carpet.fakes.ServerPlayerEntityInterface;
|
||||
import carpet.fakes.ServerPlayerInteractionManagerInterface;
|
||||
import carpet.helpers.Tracer;
|
||||
@@ -572,7 +571,7 @@ public class EntityValue extends Value
|
||||
});
|
||||
|
||||
put("exhaustion",(e, a)->{
|
||||
if(e instanceof PlayerEntity) return new NumericValue(((HungerManagerInterface)((PlayerEntity) e).getHungerManager()).getExhaustionCM());
|
||||
if(e instanceof PlayerEntity) return new NumericValue(((PlayerEntity) e).getHungerManager().getExhaustion());
|
||||
return Value.NULL;
|
||||
});
|
||||
|
||||
@@ -1464,7 +1463,7 @@ public class EntityValue extends Value
|
||||
});
|
||||
|
||||
put("exhaustion", (e, v)-> {
|
||||
if(e instanceof PlayerEntity) ((HungerManagerInterface) ((PlayerEntity) e).getHungerManager()).setExhaustionCM(NumericValue.asNumber(v).getFloat());
|
||||
if(e instanceof PlayerEntity) ((PlayerEntity) e).getHungerManager().setExhaustion(NumericValue.asNumber(v).getFloat());
|
||||
});
|
||||
|
||||
put("add_exhaustion", (e, v)-> {
|
||||
@@ -1497,7 +1496,7 @@ public class EntityValue extends Value
|
||||
});
|
||||
|
||||
put("saturation", (e, v)-> {
|
||||
if(e instanceof PlayerEntity) ((HungerManagerInterface) ((PlayerEntity) e).getHungerManager()).setSaturationCM(NumericValue.asNumber(v, "saturation").getFloat());
|
||||
if(e instanceof PlayerEntity) ((PlayerEntity) e).getHungerManager().setSaturationLevel(NumericValue.asNumber(v, "saturation").getFloat());
|
||||
});
|
||||
|
||||
put("air", (e, v) -> e.setAir(NumericValue.asNumber(v, "air").getInt()));
|
||||
|
||||
Reference in new issue
Block a user