mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fix heisei dream being completely broken
This commit is contained in:
1 parent
4ac196eae3
commit
7db49dae78
2 files changed
+5
-3
No files matched your search
+4
-3
@@ -63,8 +63,8 @@ public class SubTileHeiseiDream extends SubTileFunctional {
|
||||
while(newTarget == entity);
|
||||
|
||||
if(newTarget instanceof EntityLiving) {
|
||||
List<EntityAITaskEntry> entries = new ArrayList(entity.tasks.taskEntries);
|
||||
entries.addAll(new ArrayList(entity.targetTasks.taskEntries));
|
||||
List<EntityAITaskEntry> entries = new ArrayList<>(entity.tasks.taskEntries);
|
||||
entries.addAll(new ArrayList<>(entity.targetTasks.taskEntries));
|
||||
|
||||
for(EntityAITaskEntry entry : entries)
|
||||
if(entry.action instanceof EntityAINearestAttackableTarget) {
|
||||
@@ -84,7 +84,8 @@ public class SubTileHeiseiDream extends SubTileFunctional {
|
||||
}
|
||||
|
||||
private static void messWithGetTargetAI(EntityAINearestAttackableTarget aiEntry, EntityLivingBase target) {
|
||||
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, IMob.class, LibObfuscation.TARGET_CLASS);
|
||||
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, Entity.class, LibObfuscation.TARGET_CLASS);
|
||||
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, Predicates.equalTo(target), LibObfuscation.TARGET_ENTITY_SELECTOR); // todo 1.8 will this leak `target`?
|
||||
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, target, LibObfuscation.TARGET_ENTITY);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ public final class LibObfuscation {
|
||||
// EntityAINearestAttackableTarget
|
||||
public static final String[] TARGET_CLASS = new String[] { "targetClass", "field_75307_b", "a" };
|
||||
public static final String[] TARGET_ENTITY = new String[] { "targetEntity", "field_75309_a", "d" };
|
||||
public static final String[] TARGET_ENTITY_SELECTOR = new String[] { "targetEntitySelector", "field_82643_g", "c" };
|
||||
|
||||
// EntityAIAttackOnCollide
|
||||
public static final String[] CLASS_TARGET = new String[] { "classTarget", "field_75444_h", "g" };
|
||||
|
||||
Reference in new issue
Block a user