From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sat, 31 Oct 2020 19:21:42 -0500
Subject: [PATCH] Airplane MC Dev Fixes

Airplane
Copyright (C) 2020 Technove LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
index 375409f4b72edc7990da90460b30486fb2980fb6..ab692de8a5b1411e37251fb545e6f579a9929f91 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
@@ -54,7 +54,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
     public int conversionTicks = 0;
     public boolean cannotBeHunted = false;
     protected static final ImmutableList<? extends SensorType<? extends Sensor<? super EntityHoglin>>> bo = ImmutableList.of(SensorType.c, SensorType.d, SensorType.n, SensorType.m);
-    protected static final ImmutableList<? extends MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED});
+    protected static final ImmutableList<MemoryModuleType<?>> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); // Airplane - decompile error
 
     public EntityHoglin(EntityTypes<? extends EntityHoglin> entitytypes, World world) {
         super(entitytypes, world);
@@ -118,13 +118,13 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
 
     @Override
     public BehaviorController<EntityHoglin> getBehaviorController() {
-        return super.getBehaviorController();
+        return (BehaviorController<EntityHoglin>) super.getBehaviorController(); // Airplane - decompile error
     }
 
     @Override
     protected void mobTick() {
         this.world.getMethodProfiler().enter("hoglinBrain");
-        this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
+        this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error
         this.world.getMethodProfiler().exit();
         HoglinAI.a(this);
         if (this.isConverting()) {
@@ -300,7 +300,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
 
     @Override
     protected SoundEffect getSoundAmbient() {
-        return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse((Object) null);
+        return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse(null); // Airplane - decompile error
     }
 
     @Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
index f2f65dc0612cc232009ea7ff12f5c1ba4e6b15ea..d100b39c420e2326e869aa4059fc800d4c2fc0e4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
@@ -188,7 +188,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
 
     @Override
     public BehaviorController<EntityPiglin> getBehaviorController() {
-        return super.getBehaviorController();
+        return (BehaviorController<EntityPiglin>) super.getBehaviorController(); // Airplane - compile error
     }
 
     @Override
@@ -247,7 +247,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
     @Override
     protected void mobTick() {
         this.world.getMethodProfiler().enter("piglinBrain");
-        this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
+        this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // Airplane - compile error
         this.world.getMethodProfiler().exit();
         PiglinAI.b(this);
         super.mobTick();
@@ -386,7 +386,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow {
 
     @Override
     protected SoundEffect getSoundAmbient() {
-        return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse((Object) null);
+        return this.world.isClientSide ? null : (SoundEffect) PiglinAI.d(this).orElse(null); // Airplane - compile error
     }
 
     @Override
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
index 95d0c9f22d79194ca83ca6f6a8e6d91180a3c8da..5c712af849abf1e5f58a7760b19c543474559f77 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
@@ -62,7 +62,7 @@ public class LootTableInfo {
 
     @Nullable
     public <T> T getContextParameter(LootContextParameter<T> lootcontextparameter) {
-        return this.h.get(lootcontextparameter);
+        return (T) this.h.get(lootcontextparameter); // Airplane - compile error
     }
 
     public boolean a(LootTable loottable) {
@@ -216,7 +216,7 @@ public class LootTableInfo {
         }
 
         public <T> T a(LootContextParameter<T> lootcontextparameter) {
-            T t0 = this.b.get(lootcontextparameter);
+            T t0 = (T) this.b.get(lootcontextparameter); // Airplane - compile error
 
             if (t0 == null) {
                 throw new IllegalArgumentException("No parameter " + lootcontextparameter);
@@ -227,7 +227,7 @@ public class LootTableInfo {
 
         @Nullable
         public <T> T b(LootContextParameter<T> lootcontextparameter) {
-            return this.b.get(lootcontextparameter);
+            return (T) this.b.get(lootcontextparameter); // Airplane - compile error
         }
 
         public LootTableInfo build(LootContextParameterSet lootcontextparameterset) {
