It compiles

This commit is contained in:
Mariell Hoversholm
2021-03-16 16:50:45 +01:00
parent 908c938d0c
commit 0750bfaf8c
92 changed files with 959 additions and 135 deletions

View File

@@ -113,7 +113,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - Add villager reputation API
+ @Override
+ public Reputation getReputation(UUID uniqueId) {
+ net.minecraft.server.Reputation.a rep = getHandle().getReputation().getReputations().get(uniqueId);
+ net.minecraft.world.entity.ai.gossip.Reputation.a rep = getHandle().getReputation().getReputations().get(uniqueId);
+ if (rep == null) {
+ return new Reputation(Maps.newHashMap());
+ }
@@ -130,10 +130,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public void setReputation(UUID uniqueId, Reputation reputation) {
+ net.minecraft.server.Reputation.a nmsReputation =
+ net.minecraft.world.entity.ai.gossip.Reputation.a nmsReputation =
+ getHandle().getReputation().getReputations().computeIfAbsent(
+ uniqueId,
+ key -> new net.minecraft.server.Reputation.a()
+ key -> new net.minecraft.world.entity.ai.gossip.Reputation.a()
+ );
+ nmsReputation.assignFromPaperReputation(reputation);
+ }