diff --git a/VERSION.txt b/VERSION.txt index 1216577e..3b7e0e5a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,3 @@ Version:1.0.2 -Snapshot:9 -ReleaseNote:More bug fixes! Hopefully fixed the chaos guardian issues once and for all... +Snapshot:0 +ReleaseNote:1.0.2 finally finished! diff --git a/src/main/java/api/player/client/ClientPlayerAPI.java b/src/main/java/api/player/client/ClientPlayerAPI.java deleted file mode 100644 index d421868b..00000000 --- a/src/main/java/api/player/client/ClientPlayerAPI.java +++ /dev/null @@ -1,7354 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -import java.io.*; -import java.text.*; -import java.util.*; -import java.util.logging.*; -import java.lang.reflect.*; - -public final class ClientPlayerAPI -{ - private final static Class[] Class = new Class[] { ClientPlayerAPI.class }; - private final static Class[] Classes = new Class[] { ClientPlayerAPI.class, String.class }; - - private static boolean isCreated; - private static final Logger logger = Logger.getLogger("ClientPlayerAPI"); - - private static void log(String text) - { - System.out.println(text); - logger.fine(text); - } - - public static void register(String id, Class baseClass) - { - register(id, baseClass, null); - } - - public static void register(String id, Class baseClass, ClientPlayerBaseSorting baseSorting) - { - try - { - register(baseClass, id, baseSorting); - } - catch(RuntimeException exception) - { - if(id != null) - log("Client Player: failed to register id '" + id + "'"); - else - log("Client Player: failed to register ClientPlayerBase"); - - throw exception; - } - } - - private static void register(Class baseClass, String id, ClientPlayerBaseSorting baseSorting) - { - if(!isCreated) - { - try - { - Method mandatory = net.minecraft.client.entity.EntityPlayerSP.class.getMethod("getClientPlayerBase", String.class); - if (mandatory.getReturnType() != ClientPlayerBase.class) - throw new NoSuchMethodException(ClientPlayerBase.class.getName() + " " + net.minecraft.client.entity.EntityPlayerSP.class.getName() + ".getClientPlayerBase(" + String.class.getName() + ")"); - } - catch(NoSuchMethodException exception) - { - String[] errorMessageParts = new String[] - { - "========================================", - "The API \"Client Player\" version " + api.player.forge.PlayerAPIPlugin.Version + " of the mod \"Player API Core " + api.player.forge.PlayerAPIPlugin.Version + "\" can not be created!", - "----------------------------------------", - "Mandatory member method \"{0} getClientPlayerBase({3})\" not found in class \"{1}\".", - "There are three scenarios this can happen:", - "* Minecraft Forge is missing a Player API Core which Minecraft version matches its own.", - " Download and install the latest Player API Core for the Minecraft version you were trying to run.", - "* The code of the class \"{2}\" of Player API Core has been modified beyond recognition by another Minecraft Forge coremod.", - " Try temporary deinstallation of other core mods to find the culprit and deinstall it permanently to fix this specific problem.", - "* Player API Core has not been installed correctly.", - " Deinstall Player API Core and install it again following the installation instructions in the readme file.", - "========================================" - }; - - String baseEntityPlayerSPClassName = ClientPlayerBase.class.getName(); - String targetClassName = net.minecraft.client.entity.EntityPlayerSP.class.getName(); - String targetClassFileName = targetClassName.replace(".", File.separator); - String stringClassName = String.class.getName(); - - for(int i=0; i allreadyRegistered = allBaseConstructors.get(id); - if(allreadyRegistered != null) - throw new IllegalArgumentException("The class '" + baseClass.getName() + "' can not be registered with the id '" + id + "' because the class '" + allreadyRegistered.getDeclaringClass().getName() + "' has allready been registered with the same id"); - - Constructor baseConstructor; - try - { - baseConstructor = baseClass.getDeclaredConstructor(Classes); - } - catch (Throwable t) - { - try - { - baseConstructor = baseClass.getDeclaredConstructor(Class); - } - catch(Throwable s) - { - throw new IllegalArgumentException("Can not find necessary constructor with one argument of type '" + ClientPlayerAPI.class.getName() + "' and eventually a second argument of type 'String' in the class '" + baseClass.getName() + "'", t); - } - } - - allBaseConstructors.put(id, baseConstructor); - - if(baseSorting != null) - { - addSorting(id, allBaseBeforeLocalConstructingSuperiors, baseSorting.getBeforeLocalConstructingSuperiors()); - addSorting(id, allBaseBeforeLocalConstructingInferiors, baseSorting.getBeforeLocalConstructingInferiors()); - addSorting(id, allBaseAfterLocalConstructingSuperiors, baseSorting.getAfterLocalConstructingSuperiors()); - addSorting(id, allBaseAfterLocalConstructingInferiors, baseSorting.getAfterLocalConstructingInferiors()); - - addDynamicSorting(id, allBaseBeforeDynamicSuperiors, baseSorting.getDynamicBeforeSuperiors()); - addDynamicSorting(id, allBaseBeforeDynamicInferiors, baseSorting.getDynamicBeforeInferiors()); - addDynamicSorting(id, allBaseOverrideDynamicSuperiors, baseSorting.getDynamicOverrideSuperiors()); - addDynamicSorting(id, allBaseOverrideDynamicInferiors, baseSorting.getDynamicOverrideInferiors()); - addDynamicSorting(id, allBaseAfterDynamicSuperiors, baseSorting.getDynamicAfterSuperiors()); - addDynamicSorting(id, allBaseAfterDynamicInferiors, baseSorting.getDynamicAfterInferiors()); - - addSorting(id, allBaseBeforeAddExhaustionSuperiors, baseSorting.getBeforeAddExhaustionSuperiors()); - addSorting(id, allBaseBeforeAddExhaustionInferiors, baseSorting.getBeforeAddExhaustionInferiors()); - addSorting(id, allBaseOverrideAddExhaustionSuperiors, baseSorting.getOverrideAddExhaustionSuperiors()); - addSorting(id, allBaseOverrideAddExhaustionInferiors, baseSorting.getOverrideAddExhaustionInferiors()); - addSorting(id, allBaseAfterAddExhaustionSuperiors, baseSorting.getAfterAddExhaustionSuperiors()); - addSorting(id, allBaseAfterAddExhaustionInferiors, baseSorting.getAfterAddExhaustionInferiors()); - - addSorting(id, allBaseBeforeAddMovementStatSuperiors, baseSorting.getBeforeAddMovementStatSuperiors()); - addSorting(id, allBaseBeforeAddMovementStatInferiors, baseSorting.getBeforeAddMovementStatInferiors()); - addSorting(id, allBaseOverrideAddMovementStatSuperiors, baseSorting.getOverrideAddMovementStatSuperiors()); - addSorting(id, allBaseOverrideAddMovementStatInferiors, baseSorting.getOverrideAddMovementStatInferiors()); - addSorting(id, allBaseAfterAddMovementStatSuperiors, baseSorting.getAfterAddMovementStatSuperiors()); - addSorting(id, allBaseAfterAddMovementStatInferiors, baseSorting.getAfterAddMovementStatInferiors()); - - addSorting(id, allBaseBeforeAddStatSuperiors, baseSorting.getBeforeAddStatSuperiors()); - addSorting(id, allBaseBeforeAddStatInferiors, baseSorting.getBeforeAddStatInferiors()); - addSorting(id, allBaseOverrideAddStatSuperiors, baseSorting.getOverrideAddStatSuperiors()); - addSorting(id, allBaseOverrideAddStatInferiors, baseSorting.getOverrideAddStatInferiors()); - addSorting(id, allBaseAfterAddStatSuperiors, baseSorting.getAfterAddStatSuperiors()); - addSorting(id, allBaseAfterAddStatInferiors, baseSorting.getAfterAddStatInferiors()); - - addSorting(id, allBaseBeforeAttackEntityFromSuperiors, baseSorting.getBeforeAttackEntityFromSuperiors()); - addSorting(id, allBaseBeforeAttackEntityFromInferiors, baseSorting.getBeforeAttackEntityFromInferiors()); - addSorting(id, allBaseOverrideAttackEntityFromSuperiors, baseSorting.getOverrideAttackEntityFromSuperiors()); - addSorting(id, allBaseOverrideAttackEntityFromInferiors, baseSorting.getOverrideAttackEntityFromInferiors()); - addSorting(id, allBaseAfterAttackEntityFromSuperiors, baseSorting.getAfterAttackEntityFromSuperiors()); - addSorting(id, allBaseAfterAttackEntityFromInferiors, baseSorting.getAfterAttackEntityFromInferiors()); - - addSorting(id, allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getBeforeAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseBeforeAttackTargetEntityWithCurrentItemInferiors, baseSorting.getBeforeAttackTargetEntityWithCurrentItemInferiors()); - addSorting(id, allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getOverrideAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseOverrideAttackTargetEntityWithCurrentItemInferiors, baseSorting.getOverrideAttackTargetEntityWithCurrentItemInferiors()); - addSorting(id, allBaseAfterAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getAfterAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseAfterAttackTargetEntityWithCurrentItemInferiors, baseSorting.getAfterAttackTargetEntityWithCurrentItemInferiors()); - - addSorting(id, allBaseBeforeCanBreatheUnderwaterSuperiors, baseSorting.getBeforeCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseBeforeCanBreatheUnderwaterInferiors, baseSorting.getBeforeCanBreatheUnderwaterInferiors()); - addSorting(id, allBaseOverrideCanBreatheUnderwaterSuperiors, baseSorting.getOverrideCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseOverrideCanBreatheUnderwaterInferiors, baseSorting.getOverrideCanBreatheUnderwaterInferiors()); - addSorting(id, allBaseAfterCanBreatheUnderwaterSuperiors, baseSorting.getAfterCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseAfterCanBreatheUnderwaterInferiors, baseSorting.getAfterCanBreatheUnderwaterInferiors()); - - addSorting(id, allBaseBeforeCanHarvestBlockSuperiors, baseSorting.getBeforeCanHarvestBlockSuperiors()); - addSorting(id, allBaseBeforeCanHarvestBlockInferiors, baseSorting.getBeforeCanHarvestBlockInferiors()); - addSorting(id, allBaseOverrideCanHarvestBlockSuperiors, baseSorting.getOverrideCanHarvestBlockSuperiors()); - addSorting(id, allBaseOverrideCanHarvestBlockInferiors, baseSorting.getOverrideCanHarvestBlockInferiors()); - addSorting(id, allBaseAfterCanHarvestBlockSuperiors, baseSorting.getAfterCanHarvestBlockSuperiors()); - addSorting(id, allBaseAfterCanHarvestBlockInferiors, baseSorting.getAfterCanHarvestBlockInferiors()); - - addSorting(id, allBaseBeforeCanPlayerEditSuperiors, baseSorting.getBeforeCanPlayerEditSuperiors()); - addSorting(id, allBaseBeforeCanPlayerEditInferiors, baseSorting.getBeforeCanPlayerEditInferiors()); - addSorting(id, allBaseOverrideCanPlayerEditSuperiors, baseSorting.getOverrideCanPlayerEditSuperiors()); - addSorting(id, allBaseOverrideCanPlayerEditInferiors, baseSorting.getOverrideCanPlayerEditInferiors()); - addSorting(id, allBaseAfterCanPlayerEditSuperiors, baseSorting.getAfterCanPlayerEditSuperiors()); - addSorting(id, allBaseAfterCanPlayerEditInferiors, baseSorting.getAfterCanPlayerEditInferiors()); - - addSorting(id, allBaseBeforeCanTriggerWalkingSuperiors, baseSorting.getBeforeCanTriggerWalkingSuperiors()); - addSorting(id, allBaseBeforeCanTriggerWalkingInferiors, baseSorting.getBeforeCanTriggerWalkingInferiors()); - addSorting(id, allBaseOverrideCanTriggerWalkingSuperiors, baseSorting.getOverrideCanTriggerWalkingSuperiors()); - addSorting(id, allBaseOverrideCanTriggerWalkingInferiors, baseSorting.getOverrideCanTriggerWalkingInferiors()); - addSorting(id, allBaseAfterCanTriggerWalkingSuperiors, baseSorting.getAfterCanTriggerWalkingSuperiors()); - addSorting(id, allBaseAfterCanTriggerWalkingInferiors, baseSorting.getAfterCanTriggerWalkingInferiors()); - - addSorting(id, allBaseBeforeCloseScreenSuperiors, baseSorting.getBeforeCloseScreenSuperiors()); - addSorting(id, allBaseBeforeCloseScreenInferiors, baseSorting.getBeforeCloseScreenInferiors()); - addSorting(id, allBaseOverrideCloseScreenSuperiors, baseSorting.getOverrideCloseScreenSuperiors()); - addSorting(id, allBaseOverrideCloseScreenInferiors, baseSorting.getOverrideCloseScreenInferiors()); - addSorting(id, allBaseAfterCloseScreenSuperiors, baseSorting.getAfterCloseScreenSuperiors()); - addSorting(id, allBaseAfterCloseScreenInferiors, baseSorting.getAfterCloseScreenInferiors()); - - addSorting(id, allBaseBeforeDamageEntitySuperiors, baseSorting.getBeforeDamageEntitySuperiors()); - addSorting(id, allBaseBeforeDamageEntityInferiors, baseSorting.getBeforeDamageEntityInferiors()); - addSorting(id, allBaseOverrideDamageEntitySuperiors, baseSorting.getOverrideDamageEntitySuperiors()); - addSorting(id, allBaseOverrideDamageEntityInferiors, baseSorting.getOverrideDamageEntityInferiors()); - addSorting(id, allBaseAfterDamageEntitySuperiors, baseSorting.getAfterDamageEntitySuperiors()); - addSorting(id, allBaseAfterDamageEntityInferiors, baseSorting.getAfterDamageEntityInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIBrewingStandSuperiors, baseSorting.getBeforeDisplayGUIBrewingStandSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIBrewingStandInferiors, baseSorting.getBeforeDisplayGUIBrewingStandInferiors()); - addSorting(id, allBaseOverrideDisplayGUIBrewingStandSuperiors, baseSorting.getOverrideDisplayGUIBrewingStandSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIBrewingStandInferiors, baseSorting.getOverrideDisplayGUIBrewingStandInferiors()); - addSorting(id, allBaseAfterDisplayGUIBrewingStandSuperiors, baseSorting.getAfterDisplayGUIBrewingStandSuperiors()); - addSorting(id, allBaseAfterDisplayGUIBrewingStandInferiors, baseSorting.getAfterDisplayGUIBrewingStandInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIChestSuperiors, baseSorting.getBeforeDisplayGUIChestSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIChestInferiors, baseSorting.getBeforeDisplayGUIChestInferiors()); - addSorting(id, allBaseOverrideDisplayGUIChestSuperiors, baseSorting.getOverrideDisplayGUIChestSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIChestInferiors, baseSorting.getOverrideDisplayGUIChestInferiors()); - addSorting(id, allBaseAfterDisplayGUIChestSuperiors, baseSorting.getAfterDisplayGUIChestSuperiors()); - addSorting(id, allBaseAfterDisplayGUIChestInferiors, baseSorting.getAfterDisplayGUIChestInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIDispenserSuperiors, baseSorting.getBeforeDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIDispenserInferiors, baseSorting.getBeforeDisplayGUIDispenserInferiors()); - addSorting(id, allBaseOverrideDisplayGUIDispenserSuperiors, baseSorting.getOverrideDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIDispenserInferiors, baseSorting.getOverrideDisplayGUIDispenserInferiors()); - addSorting(id, allBaseAfterDisplayGUIDispenserSuperiors, baseSorting.getAfterDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseAfterDisplayGUIDispenserInferiors, baseSorting.getAfterDisplayGUIDispenserInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIEditSignSuperiors, baseSorting.getBeforeDisplayGUIEditSignSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIEditSignInferiors, baseSorting.getBeforeDisplayGUIEditSignInferiors()); - addSorting(id, allBaseOverrideDisplayGUIEditSignSuperiors, baseSorting.getOverrideDisplayGUIEditSignSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIEditSignInferiors, baseSorting.getOverrideDisplayGUIEditSignInferiors()); - addSorting(id, allBaseAfterDisplayGUIEditSignSuperiors, baseSorting.getAfterDisplayGUIEditSignSuperiors()); - addSorting(id, allBaseAfterDisplayGUIEditSignInferiors, baseSorting.getAfterDisplayGUIEditSignInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIEnchantmentSuperiors, baseSorting.getBeforeDisplayGUIEnchantmentSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIEnchantmentInferiors, baseSorting.getBeforeDisplayGUIEnchantmentInferiors()); - addSorting(id, allBaseOverrideDisplayGUIEnchantmentSuperiors, baseSorting.getOverrideDisplayGUIEnchantmentSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIEnchantmentInferiors, baseSorting.getOverrideDisplayGUIEnchantmentInferiors()); - addSorting(id, allBaseAfterDisplayGUIEnchantmentSuperiors, baseSorting.getAfterDisplayGUIEnchantmentSuperiors()); - addSorting(id, allBaseAfterDisplayGUIEnchantmentInferiors, baseSorting.getAfterDisplayGUIEnchantmentInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIFurnaceSuperiors, baseSorting.getBeforeDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIFurnaceInferiors, baseSorting.getBeforeDisplayGUIFurnaceInferiors()); - addSorting(id, allBaseOverrideDisplayGUIFurnaceSuperiors, baseSorting.getOverrideDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIFurnaceInferiors, baseSorting.getOverrideDisplayGUIFurnaceInferiors()); - addSorting(id, allBaseAfterDisplayGUIFurnaceSuperiors, baseSorting.getAfterDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseAfterDisplayGUIFurnaceInferiors, baseSorting.getAfterDisplayGUIFurnaceInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIWorkbenchSuperiors, baseSorting.getBeforeDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIWorkbenchInferiors, baseSorting.getBeforeDisplayGUIWorkbenchInferiors()); - addSorting(id, allBaseOverrideDisplayGUIWorkbenchSuperiors, baseSorting.getOverrideDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIWorkbenchInferiors, baseSorting.getOverrideDisplayGUIWorkbenchInferiors()); - addSorting(id, allBaseAfterDisplayGUIWorkbenchSuperiors, baseSorting.getAfterDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseAfterDisplayGUIWorkbenchInferiors, baseSorting.getAfterDisplayGUIWorkbenchInferiors()); - - addSorting(id, allBaseBeforeDropOneItemSuperiors, baseSorting.getBeforeDropOneItemSuperiors()); - addSorting(id, allBaseBeforeDropOneItemInferiors, baseSorting.getBeforeDropOneItemInferiors()); - addSorting(id, allBaseOverrideDropOneItemSuperiors, baseSorting.getOverrideDropOneItemSuperiors()); - addSorting(id, allBaseOverrideDropOneItemInferiors, baseSorting.getOverrideDropOneItemInferiors()); - addSorting(id, allBaseAfterDropOneItemSuperiors, baseSorting.getAfterDropOneItemSuperiors()); - addSorting(id, allBaseAfterDropOneItemInferiors, baseSorting.getAfterDropOneItemInferiors()); - - addSorting(id, allBaseBeforeDropPlayerItemSuperiors, baseSorting.getBeforeDropPlayerItemSuperiors()); - addSorting(id, allBaseBeforeDropPlayerItemInferiors, baseSorting.getBeforeDropPlayerItemInferiors()); - addSorting(id, allBaseOverrideDropPlayerItemSuperiors, baseSorting.getOverrideDropPlayerItemSuperiors()); - addSorting(id, allBaseOverrideDropPlayerItemInferiors, baseSorting.getOverrideDropPlayerItemInferiors()); - addSorting(id, allBaseAfterDropPlayerItemSuperiors, baseSorting.getAfterDropPlayerItemSuperiors()); - addSorting(id, allBaseAfterDropPlayerItemInferiors, baseSorting.getAfterDropPlayerItemInferiors()); - - addSorting(id, allBaseBeforeDropPlayerItemWithRandomChoiceSuperiors, baseSorting.getBeforeDropPlayerItemWithRandomChoiceSuperiors()); - addSorting(id, allBaseBeforeDropPlayerItemWithRandomChoiceInferiors, baseSorting.getBeforeDropPlayerItemWithRandomChoiceInferiors()); - addSorting(id, allBaseOverrideDropPlayerItemWithRandomChoiceSuperiors, baseSorting.getOverrideDropPlayerItemWithRandomChoiceSuperiors()); - addSorting(id, allBaseOverrideDropPlayerItemWithRandomChoiceInferiors, baseSorting.getOverrideDropPlayerItemWithRandomChoiceInferiors()); - addSorting(id, allBaseAfterDropPlayerItemWithRandomChoiceSuperiors, baseSorting.getAfterDropPlayerItemWithRandomChoiceSuperiors()); - addSorting(id, allBaseAfterDropPlayerItemWithRandomChoiceInferiors, baseSorting.getAfterDropPlayerItemWithRandomChoiceInferiors()); - - addSorting(id, allBaseBeforeFallSuperiors, baseSorting.getBeforeFallSuperiors()); - addSorting(id, allBaseBeforeFallInferiors, baseSorting.getBeforeFallInferiors()); - addSorting(id, allBaseOverrideFallSuperiors, baseSorting.getOverrideFallSuperiors()); - addSorting(id, allBaseOverrideFallInferiors, baseSorting.getOverrideFallInferiors()); - addSorting(id, allBaseAfterFallSuperiors, baseSorting.getAfterFallSuperiors()); - addSorting(id, allBaseAfterFallInferiors, baseSorting.getAfterFallInferiors()); - - addSorting(id, allBaseBeforeGetAIMoveSpeedSuperiors, baseSorting.getBeforeGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseBeforeGetAIMoveSpeedInferiors, baseSorting.getBeforeGetAIMoveSpeedInferiors()); - addSorting(id, allBaseOverrideGetAIMoveSpeedSuperiors, baseSorting.getOverrideGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseOverrideGetAIMoveSpeedInferiors, baseSorting.getOverrideGetAIMoveSpeedInferiors()); - addSorting(id, allBaseAfterGetAIMoveSpeedSuperiors, baseSorting.getAfterGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseAfterGetAIMoveSpeedInferiors, baseSorting.getAfterGetAIMoveSpeedInferiors()); - - addSorting(id, allBaseBeforeGetBedOrientationInDegreesSuperiors, baseSorting.getBeforeGetBedOrientationInDegreesSuperiors()); - addSorting(id, allBaseBeforeGetBedOrientationInDegreesInferiors, baseSorting.getBeforeGetBedOrientationInDegreesInferiors()); - addSorting(id, allBaseOverrideGetBedOrientationInDegreesSuperiors, baseSorting.getOverrideGetBedOrientationInDegreesSuperiors()); - addSorting(id, allBaseOverrideGetBedOrientationInDegreesInferiors, baseSorting.getOverrideGetBedOrientationInDegreesInferiors()); - addSorting(id, allBaseAfterGetBedOrientationInDegreesSuperiors, baseSorting.getAfterGetBedOrientationInDegreesSuperiors()); - addSorting(id, allBaseAfterGetBedOrientationInDegreesInferiors, baseSorting.getAfterGetBedOrientationInDegreesInferiors()); - - addSorting(id, allBaseBeforeGetBrightnessSuperiors, baseSorting.getBeforeGetBrightnessSuperiors()); - addSorting(id, allBaseBeforeGetBrightnessInferiors, baseSorting.getBeforeGetBrightnessInferiors()); - addSorting(id, allBaseOverrideGetBrightnessSuperiors, baseSorting.getOverrideGetBrightnessSuperiors()); - addSorting(id, allBaseOverrideGetBrightnessInferiors, baseSorting.getOverrideGetBrightnessInferiors()); - addSorting(id, allBaseAfterGetBrightnessSuperiors, baseSorting.getAfterGetBrightnessSuperiors()); - addSorting(id, allBaseAfterGetBrightnessInferiors, baseSorting.getAfterGetBrightnessInferiors()); - - addSorting(id, allBaseBeforeGetBrightnessForRenderSuperiors, baseSorting.getBeforeGetBrightnessForRenderSuperiors()); - addSorting(id, allBaseBeforeGetBrightnessForRenderInferiors, baseSorting.getBeforeGetBrightnessForRenderInferiors()); - addSorting(id, allBaseOverrideGetBrightnessForRenderSuperiors, baseSorting.getOverrideGetBrightnessForRenderSuperiors()); - addSorting(id, allBaseOverrideGetBrightnessForRenderInferiors, baseSorting.getOverrideGetBrightnessForRenderInferiors()); - addSorting(id, allBaseAfterGetBrightnessForRenderSuperiors, baseSorting.getAfterGetBrightnessForRenderSuperiors()); - addSorting(id, allBaseAfterGetBrightnessForRenderInferiors, baseSorting.getAfterGetBrightnessForRenderInferiors()); - - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockInferiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockInferiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockInferiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockInferiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockInferiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockInferiors()); - - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockForgeInferiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockForgeInferiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockForgeInferiors()); - - addSorting(id, allBaseBeforeGetDistanceSqSuperiors, baseSorting.getBeforeGetDistanceSqSuperiors()); - addSorting(id, allBaseBeforeGetDistanceSqInferiors, baseSorting.getBeforeGetDistanceSqInferiors()); - addSorting(id, allBaseOverrideGetDistanceSqSuperiors, baseSorting.getOverrideGetDistanceSqSuperiors()); - addSorting(id, allBaseOverrideGetDistanceSqInferiors, baseSorting.getOverrideGetDistanceSqInferiors()); - addSorting(id, allBaseAfterGetDistanceSqSuperiors, baseSorting.getAfterGetDistanceSqSuperiors()); - addSorting(id, allBaseAfterGetDistanceSqInferiors, baseSorting.getAfterGetDistanceSqInferiors()); - - addSorting(id, allBaseBeforeGetDistanceSqToEntitySuperiors, baseSorting.getBeforeGetDistanceSqToEntitySuperiors()); - addSorting(id, allBaseBeforeGetDistanceSqToEntityInferiors, baseSorting.getBeforeGetDistanceSqToEntityInferiors()); - addSorting(id, allBaseOverrideGetDistanceSqToEntitySuperiors, baseSorting.getOverrideGetDistanceSqToEntitySuperiors()); - addSorting(id, allBaseOverrideGetDistanceSqToEntityInferiors, baseSorting.getOverrideGetDistanceSqToEntityInferiors()); - addSorting(id, allBaseAfterGetDistanceSqToEntitySuperiors, baseSorting.getAfterGetDistanceSqToEntitySuperiors()); - addSorting(id, allBaseAfterGetDistanceSqToEntityInferiors, baseSorting.getAfterGetDistanceSqToEntityInferiors()); - - addSorting(id, allBaseBeforeGetFOVMultiplierSuperiors, baseSorting.getBeforeGetFOVMultiplierSuperiors()); - addSorting(id, allBaseBeforeGetFOVMultiplierInferiors, baseSorting.getBeforeGetFOVMultiplierInferiors()); - addSorting(id, allBaseOverrideGetFOVMultiplierSuperiors, baseSorting.getOverrideGetFOVMultiplierSuperiors()); - addSorting(id, allBaseOverrideGetFOVMultiplierInferiors, baseSorting.getOverrideGetFOVMultiplierInferiors()); - addSorting(id, allBaseAfterGetFOVMultiplierSuperiors, baseSorting.getAfterGetFOVMultiplierSuperiors()); - addSorting(id, allBaseAfterGetFOVMultiplierInferiors, baseSorting.getAfterGetFOVMultiplierInferiors()); - - addSorting(id, allBaseBeforeGetHurtSoundSuperiors, baseSorting.getBeforeGetHurtSoundSuperiors()); - addSorting(id, allBaseBeforeGetHurtSoundInferiors, baseSorting.getBeforeGetHurtSoundInferiors()); - addSorting(id, allBaseOverrideGetHurtSoundSuperiors, baseSorting.getOverrideGetHurtSoundSuperiors()); - addSorting(id, allBaseOverrideGetHurtSoundInferiors, baseSorting.getOverrideGetHurtSoundInferiors()); - addSorting(id, allBaseAfterGetHurtSoundSuperiors, baseSorting.getAfterGetHurtSoundSuperiors()); - addSorting(id, allBaseAfterGetHurtSoundInferiors, baseSorting.getAfterGetHurtSoundInferiors()); - - addSorting(id, allBaseBeforeGetItemIconSuperiors, baseSorting.getBeforeGetItemIconSuperiors()); - addSorting(id, allBaseBeforeGetItemIconInferiors, baseSorting.getBeforeGetItemIconInferiors()); - addSorting(id, allBaseOverrideGetItemIconSuperiors, baseSorting.getOverrideGetItemIconSuperiors()); - addSorting(id, allBaseOverrideGetItemIconInferiors, baseSorting.getOverrideGetItemIconInferiors()); - addSorting(id, allBaseAfterGetItemIconSuperiors, baseSorting.getAfterGetItemIconSuperiors()); - addSorting(id, allBaseAfterGetItemIconInferiors, baseSorting.getAfterGetItemIconInferiors()); - - addSorting(id, allBaseBeforeGetSleepTimerSuperiors, baseSorting.getBeforeGetSleepTimerSuperiors()); - addSorting(id, allBaseBeforeGetSleepTimerInferiors, baseSorting.getBeforeGetSleepTimerInferiors()); - addSorting(id, allBaseOverrideGetSleepTimerSuperiors, baseSorting.getOverrideGetSleepTimerSuperiors()); - addSorting(id, allBaseOverrideGetSleepTimerInferiors, baseSorting.getOverrideGetSleepTimerInferiors()); - addSorting(id, allBaseAfterGetSleepTimerSuperiors, baseSorting.getAfterGetSleepTimerSuperiors()); - addSorting(id, allBaseAfterGetSleepTimerInferiors, baseSorting.getAfterGetSleepTimerInferiors()); - - addSorting(id, allBaseBeforeHandleLavaMovementSuperiors, baseSorting.getBeforeHandleLavaMovementSuperiors()); - addSorting(id, allBaseBeforeHandleLavaMovementInferiors, baseSorting.getBeforeHandleLavaMovementInferiors()); - addSorting(id, allBaseOverrideHandleLavaMovementSuperiors, baseSorting.getOverrideHandleLavaMovementSuperiors()); - addSorting(id, allBaseOverrideHandleLavaMovementInferiors, baseSorting.getOverrideHandleLavaMovementInferiors()); - addSorting(id, allBaseAfterHandleLavaMovementSuperiors, baseSorting.getAfterHandleLavaMovementSuperiors()); - addSorting(id, allBaseAfterHandleLavaMovementInferiors, baseSorting.getAfterHandleLavaMovementInferiors()); - - addSorting(id, allBaseBeforeHandleWaterMovementSuperiors, baseSorting.getBeforeHandleWaterMovementSuperiors()); - addSorting(id, allBaseBeforeHandleWaterMovementInferiors, baseSorting.getBeforeHandleWaterMovementInferiors()); - addSorting(id, allBaseOverrideHandleWaterMovementSuperiors, baseSorting.getOverrideHandleWaterMovementSuperiors()); - addSorting(id, allBaseOverrideHandleWaterMovementInferiors, baseSorting.getOverrideHandleWaterMovementInferiors()); - addSorting(id, allBaseAfterHandleWaterMovementSuperiors, baseSorting.getAfterHandleWaterMovementSuperiors()); - addSorting(id, allBaseAfterHandleWaterMovementInferiors, baseSorting.getAfterHandleWaterMovementInferiors()); - - addSorting(id, allBaseBeforeHealSuperiors, baseSorting.getBeforeHealSuperiors()); - addSorting(id, allBaseBeforeHealInferiors, baseSorting.getBeforeHealInferiors()); - addSorting(id, allBaseOverrideHealSuperiors, baseSorting.getOverrideHealSuperiors()); - addSorting(id, allBaseOverrideHealInferiors, baseSorting.getOverrideHealInferiors()); - addSorting(id, allBaseAfterHealSuperiors, baseSorting.getAfterHealSuperiors()); - addSorting(id, allBaseAfterHealInferiors, baseSorting.getAfterHealInferiors()); - - addSorting(id, allBaseBeforeIsEntityInsideOpaqueBlockSuperiors, baseSorting.getBeforeIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseBeforeIsEntityInsideOpaqueBlockInferiors, baseSorting.getBeforeIsEntityInsideOpaqueBlockInferiors()); - addSorting(id, allBaseOverrideIsEntityInsideOpaqueBlockSuperiors, baseSorting.getOverrideIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseOverrideIsEntityInsideOpaqueBlockInferiors, baseSorting.getOverrideIsEntityInsideOpaqueBlockInferiors()); - addSorting(id, allBaseAfterIsEntityInsideOpaqueBlockSuperiors, baseSorting.getAfterIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseAfterIsEntityInsideOpaqueBlockInferiors, baseSorting.getAfterIsEntityInsideOpaqueBlockInferiors()); - - addSorting(id, allBaseBeforeIsInWaterSuperiors, baseSorting.getBeforeIsInWaterSuperiors()); - addSorting(id, allBaseBeforeIsInWaterInferiors, baseSorting.getBeforeIsInWaterInferiors()); - addSorting(id, allBaseOverrideIsInWaterSuperiors, baseSorting.getOverrideIsInWaterSuperiors()); - addSorting(id, allBaseOverrideIsInWaterInferiors, baseSorting.getOverrideIsInWaterInferiors()); - addSorting(id, allBaseAfterIsInWaterSuperiors, baseSorting.getAfterIsInWaterSuperiors()); - addSorting(id, allBaseAfterIsInWaterInferiors, baseSorting.getAfterIsInWaterInferiors()); - - addSorting(id, allBaseBeforeIsInsideOfMaterialSuperiors, baseSorting.getBeforeIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseBeforeIsInsideOfMaterialInferiors, baseSorting.getBeforeIsInsideOfMaterialInferiors()); - addSorting(id, allBaseOverrideIsInsideOfMaterialSuperiors, baseSorting.getOverrideIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseOverrideIsInsideOfMaterialInferiors, baseSorting.getOverrideIsInsideOfMaterialInferiors()); - addSorting(id, allBaseAfterIsInsideOfMaterialSuperiors, baseSorting.getAfterIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseAfterIsInsideOfMaterialInferiors, baseSorting.getAfterIsInsideOfMaterialInferiors()); - - addSorting(id, allBaseBeforeIsOnLadderSuperiors, baseSorting.getBeforeIsOnLadderSuperiors()); - addSorting(id, allBaseBeforeIsOnLadderInferiors, baseSorting.getBeforeIsOnLadderInferiors()); - addSorting(id, allBaseOverrideIsOnLadderSuperiors, baseSorting.getOverrideIsOnLadderSuperiors()); - addSorting(id, allBaseOverrideIsOnLadderInferiors, baseSorting.getOverrideIsOnLadderInferiors()); - addSorting(id, allBaseAfterIsOnLadderSuperiors, baseSorting.getAfterIsOnLadderSuperiors()); - addSorting(id, allBaseAfterIsOnLadderInferiors, baseSorting.getAfterIsOnLadderInferiors()); - - addSorting(id, allBaseBeforeIsPlayerSleepingSuperiors, baseSorting.getBeforeIsPlayerSleepingSuperiors()); - addSorting(id, allBaseBeforeIsPlayerSleepingInferiors, baseSorting.getBeforeIsPlayerSleepingInferiors()); - addSorting(id, allBaseOverrideIsPlayerSleepingSuperiors, baseSorting.getOverrideIsPlayerSleepingSuperiors()); - addSorting(id, allBaseOverrideIsPlayerSleepingInferiors, baseSorting.getOverrideIsPlayerSleepingInferiors()); - addSorting(id, allBaseAfterIsPlayerSleepingSuperiors, baseSorting.getAfterIsPlayerSleepingSuperiors()); - addSorting(id, allBaseAfterIsPlayerSleepingInferiors, baseSorting.getAfterIsPlayerSleepingInferiors()); - - addSorting(id, allBaseBeforeIsSneakingSuperiors, baseSorting.getBeforeIsSneakingSuperiors()); - addSorting(id, allBaseBeforeIsSneakingInferiors, baseSorting.getBeforeIsSneakingInferiors()); - addSorting(id, allBaseOverrideIsSneakingSuperiors, baseSorting.getOverrideIsSneakingSuperiors()); - addSorting(id, allBaseOverrideIsSneakingInferiors, baseSorting.getOverrideIsSneakingInferiors()); - addSorting(id, allBaseAfterIsSneakingSuperiors, baseSorting.getAfterIsSneakingSuperiors()); - addSorting(id, allBaseAfterIsSneakingInferiors, baseSorting.getAfterIsSneakingInferiors()); - - addSorting(id, allBaseBeforeIsSprintingSuperiors, baseSorting.getBeforeIsSprintingSuperiors()); - addSorting(id, allBaseBeforeIsSprintingInferiors, baseSorting.getBeforeIsSprintingInferiors()); - addSorting(id, allBaseOverrideIsSprintingSuperiors, baseSorting.getOverrideIsSprintingSuperiors()); - addSorting(id, allBaseOverrideIsSprintingInferiors, baseSorting.getOverrideIsSprintingInferiors()); - addSorting(id, allBaseAfterIsSprintingSuperiors, baseSorting.getAfterIsSprintingSuperiors()); - addSorting(id, allBaseAfterIsSprintingInferiors, baseSorting.getAfterIsSprintingInferiors()); - - addSorting(id, allBaseBeforeJumpSuperiors, baseSorting.getBeforeJumpSuperiors()); - addSorting(id, allBaseBeforeJumpInferiors, baseSorting.getBeforeJumpInferiors()); - addSorting(id, allBaseOverrideJumpSuperiors, baseSorting.getOverrideJumpSuperiors()); - addSorting(id, allBaseOverrideJumpInferiors, baseSorting.getOverrideJumpInferiors()); - addSorting(id, allBaseAfterJumpSuperiors, baseSorting.getAfterJumpSuperiors()); - addSorting(id, allBaseAfterJumpInferiors, baseSorting.getAfterJumpInferiors()); - - addSorting(id, allBaseBeforeKnockBackSuperiors, baseSorting.getBeforeKnockBackSuperiors()); - addSorting(id, allBaseBeforeKnockBackInferiors, baseSorting.getBeforeKnockBackInferiors()); - addSorting(id, allBaseOverrideKnockBackSuperiors, baseSorting.getOverrideKnockBackSuperiors()); - addSorting(id, allBaseOverrideKnockBackInferiors, baseSorting.getOverrideKnockBackInferiors()); - addSorting(id, allBaseAfterKnockBackSuperiors, baseSorting.getAfterKnockBackSuperiors()); - addSorting(id, allBaseAfterKnockBackInferiors, baseSorting.getAfterKnockBackInferiors()); - - addSorting(id, allBaseBeforeMoveEntitySuperiors, baseSorting.getBeforeMoveEntitySuperiors()); - addSorting(id, allBaseBeforeMoveEntityInferiors, baseSorting.getBeforeMoveEntityInferiors()); - addSorting(id, allBaseOverrideMoveEntitySuperiors, baseSorting.getOverrideMoveEntitySuperiors()); - addSorting(id, allBaseOverrideMoveEntityInferiors, baseSorting.getOverrideMoveEntityInferiors()); - addSorting(id, allBaseAfterMoveEntitySuperiors, baseSorting.getAfterMoveEntitySuperiors()); - addSorting(id, allBaseAfterMoveEntityInferiors, baseSorting.getAfterMoveEntityInferiors()); - - addSorting(id, allBaseBeforeMoveEntityWithHeadingSuperiors, baseSorting.getBeforeMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseBeforeMoveEntityWithHeadingInferiors, baseSorting.getBeforeMoveEntityWithHeadingInferiors()); - addSorting(id, allBaseOverrideMoveEntityWithHeadingSuperiors, baseSorting.getOverrideMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseOverrideMoveEntityWithHeadingInferiors, baseSorting.getOverrideMoveEntityWithHeadingInferiors()); - addSorting(id, allBaseAfterMoveEntityWithHeadingSuperiors, baseSorting.getAfterMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseAfterMoveEntityWithHeadingInferiors, baseSorting.getAfterMoveEntityWithHeadingInferiors()); - - addSorting(id, allBaseBeforeMoveFlyingSuperiors, baseSorting.getBeforeMoveFlyingSuperiors()); - addSorting(id, allBaseBeforeMoveFlyingInferiors, baseSorting.getBeforeMoveFlyingInferiors()); - addSorting(id, allBaseOverrideMoveFlyingSuperiors, baseSorting.getOverrideMoveFlyingSuperiors()); - addSorting(id, allBaseOverrideMoveFlyingInferiors, baseSorting.getOverrideMoveFlyingInferiors()); - addSorting(id, allBaseAfterMoveFlyingSuperiors, baseSorting.getAfterMoveFlyingSuperiors()); - addSorting(id, allBaseAfterMoveFlyingInferiors, baseSorting.getAfterMoveFlyingInferiors()); - - addSorting(id, allBaseBeforeOnDeathSuperiors, baseSorting.getBeforeOnDeathSuperiors()); - addSorting(id, allBaseBeforeOnDeathInferiors, baseSorting.getBeforeOnDeathInferiors()); - addSorting(id, allBaseOverrideOnDeathSuperiors, baseSorting.getOverrideOnDeathSuperiors()); - addSorting(id, allBaseOverrideOnDeathInferiors, baseSorting.getOverrideOnDeathInferiors()); - addSorting(id, allBaseAfterOnDeathSuperiors, baseSorting.getAfterOnDeathSuperiors()); - addSorting(id, allBaseAfterOnDeathInferiors, baseSorting.getAfterOnDeathInferiors()); - - addSorting(id, allBaseBeforeOnLivingUpdateSuperiors, baseSorting.getBeforeOnLivingUpdateSuperiors()); - addSorting(id, allBaseBeforeOnLivingUpdateInferiors, baseSorting.getBeforeOnLivingUpdateInferiors()); - addSorting(id, allBaseOverrideOnLivingUpdateSuperiors, baseSorting.getOverrideOnLivingUpdateSuperiors()); - addSorting(id, allBaseOverrideOnLivingUpdateInferiors, baseSorting.getOverrideOnLivingUpdateInferiors()); - addSorting(id, allBaseAfterOnLivingUpdateSuperiors, baseSorting.getAfterOnLivingUpdateSuperiors()); - addSorting(id, allBaseAfterOnLivingUpdateInferiors, baseSorting.getAfterOnLivingUpdateInferiors()); - - addSorting(id, allBaseBeforeOnKillEntitySuperiors, baseSorting.getBeforeOnKillEntitySuperiors()); - addSorting(id, allBaseBeforeOnKillEntityInferiors, baseSorting.getBeforeOnKillEntityInferiors()); - addSorting(id, allBaseOverrideOnKillEntitySuperiors, baseSorting.getOverrideOnKillEntitySuperiors()); - addSorting(id, allBaseOverrideOnKillEntityInferiors, baseSorting.getOverrideOnKillEntityInferiors()); - addSorting(id, allBaseAfterOnKillEntitySuperiors, baseSorting.getAfterOnKillEntitySuperiors()); - addSorting(id, allBaseAfterOnKillEntityInferiors, baseSorting.getAfterOnKillEntityInferiors()); - - addSorting(id, allBaseBeforeOnStruckByLightningSuperiors, baseSorting.getBeforeOnStruckByLightningSuperiors()); - addSorting(id, allBaseBeforeOnStruckByLightningInferiors, baseSorting.getBeforeOnStruckByLightningInferiors()); - addSorting(id, allBaseOverrideOnStruckByLightningSuperiors, baseSorting.getOverrideOnStruckByLightningSuperiors()); - addSorting(id, allBaseOverrideOnStruckByLightningInferiors, baseSorting.getOverrideOnStruckByLightningInferiors()); - addSorting(id, allBaseAfterOnStruckByLightningSuperiors, baseSorting.getAfterOnStruckByLightningSuperiors()); - addSorting(id, allBaseAfterOnStruckByLightningInferiors, baseSorting.getAfterOnStruckByLightningInferiors()); - - addSorting(id, allBaseBeforeOnUpdateSuperiors, baseSorting.getBeforeOnUpdateSuperiors()); - addSorting(id, allBaseBeforeOnUpdateInferiors, baseSorting.getBeforeOnUpdateInferiors()); - addSorting(id, allBaseOverrideOnUpdateSuperiors, baseSorting.getOverrideOnUpdateSuperiors()); - addSorting(id, allBaseOverrideOnUpdateInferiors, baseSorting.getOverrideOnUpdateInferiors()); - addSorting(id, allBaseAfterOnUpdateSuperiors, baseSorting.getAfterOnUpdateSuperiors()); - addSorting(id, allBaseAfterOnUpdateInferiors, baseSorting.getAfterOnUpdateInferiors()); - - addSorting(id, allBaseBeforePlayStepSoundSuperiors, baseSorting.getBeforePlayStepSoundSuperiors()); - addSorting(id, allBaseBeforePlayStepSoundInferiors, baseSorting.getBeforePlayStepSoundInferiors()); - addSorting(id, allBaseOverridePlayStepSoundSuperiors, baseSorting.getOverridePlayStepSoundSuperiors()); - addSorting(id, allBaseOverridePlayStepSoundInferiors, baseSorting.getOverridePlayStepSoundInferiors()); - addSorting(id, allBaseAfterPlayStepSoundSuperiors, baseSorting.getAfterPlayStepSoundSuperiors()); - addSorting(id, allBaseAfterPlayStepSoundInferiors, baseSorting.getAfterPlayStepSoundInferiors()); - - addSorting(id, allBaseBeforePushOutOfBlocksSuperiors, baseSorting.getBeforePushOutOfBlocksSuperiors()); - addSorting(id, allBaseBeforePushOutOfBlocksInferiors, baseSorting.getBeforePushOutOfBlocksInferiors()); - addSorting(id, allBaseOverridePushOutOfBlocksSuperiors, baseSorting.getOverridePushOutOfBlocksSuperiors()); - addSorting(id, allBaseOverridePushOutOfBlocksInferiors, baseSorting.getOverridePushOutOfBlocksInferiors()); - addSorting(id, allBaseAfterPushOutOfBlocksSuperiors, baseSorting.getAfterPushOutOfBlocksSuperiors()); - addSorting(id, allBaseAfterPushOutOfBlocksInferiors, baseSorting.getAfterPushOutOfBlocksInferiors()); - - addSorting(id, allBaseBeforeRayTraceSuperiors, baseSorting.getBeforeRayTraceSuperiors()); - addSorting(id, allBaseBeforeRayTraceInferiors, baseSorting.getBeforeRayTraceInferiors()); - addSorting(id, allBaseOverrideRayTraceSuperiors, baseSorting.getOverrideRayTraceSuperiors()); - addSorting(id, allBaseOverrideRayTraceInferiors, baseSorting.getOverrideRayTraceInferiors()); - addSorting(id, allBaseAfterRayTraceSuperiors, baseSorting.getAfterRayTraceSuperiors()); - addSorting(id, allBaseAfterRayTraceInferiors, baseSorting.getAfterRayTraceInferiors()); - - addSorting(id, allBaseBeforeReadEntityFromNBTSuperiors, baseSorting.getBeforeReadEntityFromNBTSuperiors()); - addSorting(id, allBaseBeforeReadEntityFromNBTInferiors, baseSorting.getBeforeReadEntityFromNBTInferiors()); - addSorting(id, allBaseOverrideReadEntityFromNBTSuperiors, baseSorting.getOverrideReadEntityFromNBTSuperiors()); - addSorting(id, allBaseOverrideReadEntityFromNBTInferiors, baseSorting.getOverrideReadEntityFromNBTInferiors()); - addSorting(id, allBaseAfterReadEntityFromNBTSuperiors, baseSorting.getAfterReadEntityFromNBTSuperiors()); - addSorting(id, allBaseAfterReadEntityFromNBTInferiors, baseSorting.getAfterReadEntityFromNBTInferiors()); - - addSorting(id, allBaseBeforeRespawnPlayerSuperiors, baseSorting.getBeforeRespawnPlayerSuperiors()); - addSorting(id, allBaseBeforeRespawnPlayerInferiors, baseSorting.getBeforeRespawnPlayerInferiors()); - addSorting(id, allBaseOverrideRespawnPlayerSuperiors, baseSorting.getOverrideRespawnPlayerSuperiors()); - addSorting(id, allBaseOverrideRespawnPlayerInferiors, baseSorting.getOverrideRespawnPlayerInferiors()); - addSorting(id, allBaseAfterRespawnPlayerSuperiors, baseSorting.getAfterRespawnPlayerSuperiors()); - addSorting(id, allBaseAfterRespawnPlayerInferiors, baseSorting.getAfterRespawnPlayerInferiors()); - - addSorting(id, allBaseBeforeSetDeadSuperiors, baseSorting.getBeforeSetDeadSuperiors()); - addSorting(id, allBaseBeforeSetDeadInferiors, baseSorting.getBeforeSetDeadInferiors()); - addSorting(id, allBaseOverrideSetDeadSuperiors, baseSorting.getOverrideSetDeadSuperiors()); - addSorting(id, allBaseOverrideSetDeadInferiors, baseSorting.getOverrideSetDeadInferiors()); - addSorting(id, allBaseAfterSetDeadSuperiors, baseSorting.getAfterSetDeadSuperiors()); - addSorting(id, allBaseAfterSetDeadInferiors, baseSorting.getAfterSetDeadInferiors()); - - addSorting(id, allBaseBeforeSetPlayerSPHealthSuperiors, baseSorting.getBeforeSetPlayerSPHealthSuperiors()); - addSorting(id, allBaseBeforeSetPlayerSPHealthInferiors, baseSorting.getBeforeSetPlayerSPHealthInferiors()); - addSorting(id, allBaseOverrideSetPlayerSPHealthSuperiors, baseSorting.getOverrideSetPlayerSPHealthSuperiors()); - addSorting(id, allBaseOverrideSetPlayerSPHealthInferiors, baseSorting.getOverrideSetPlayerSPHealthInferiors()); - addSorting(id, allBaseAfterSetPlayerSPHealthSuperiors, baseSorting.getAfterSetPlayerSPHealthSuperiors()); - addSorting(id, allBaseAfterSetPlayerSPHealthInferiors, baseSorting.getAfterSetPlayerSPHealthInferiors()); - - addSorting(id, allBaseBeforeSetPositionAndRotationSuperiors, baseSorting.getBeforeSetPositionAndRotationSuperiors()); - addSorting(id, allBaseBeforeSetPositionAndRotationInferiors, baseSorting.getBeforeSetPositionAndRotationInferiors()); - addSorting(id, allBaseOverrideSetPositionAndRotationSuperiors, baseSorting.getOverrideSetPositionAndRotationSuperiors()); - addSorting(id, allBaseOverrideSetPositionAndRotationInferiors, baseSorting.getOverrideSetPositionAndRotationInferiors()); - addSorting(id, allBaseAfterSetPositionAndRotationSuperiors, baseSorting.getAfterSetPositionAndRotationSuperiors()); - addSorting(id, allBaseAfterSetPositionAndRotationInferiors, baseSorting.getAfterSetPositionAndRotationInferiors()); - - addSorting(id, allBaseBeforeSetSneakingSuperiors, baseSorting.getBeforeSetSneakingSuperiors()); - addSorting(id, allBaseBeforeSetSneakingInferiors, baseSorting.getBeforeSetSneakingInferiors()); - addSorting(id, allBaseOverrideSetSneakingSuperiors, baseSorting.getOverrideSetSneakingSuperiors()); - addSorting(id, allBaseOverrideSetSneakingInferiors, baseSorting.getOverrideSetSneakingInferiors()); - addSorting(id, allBaseAfterSetSneakingSuperiors, baseSorting.getAfterSetSneakingSuperiors()); - addSorting(id, allBaseAfterSetSneakingInferiors, baseSorting.getAfterSetSneakingInferiors()); - - addSorting(id, allBaseBeforeSetSprintingSuperiors, baseSorting.getBeforeSetSprintingSuperiors()); - addSorting(id, allBaseBeforeSetSprintingInferiors, baseSorting.getBeforeSetSprintingInferiors()); - addSorting(id, allBaseOverrideSetSprintingSuperiors, baseSorting.getOverrideSetSprintingSuperiors()); - addSorting(id, allBaseOverrideSetSprintingInferiors, baseSorting.getOverrideSetSprintingInferiors()); - addSorting(id, allBaseAfterSetSprintingSuperiors, baseSorting.getAfterSetSprintingSuperiors()); - addSorting(id, allBaseAfterSetSprintingInferiors, baseSorting.getAfterSetSprintingInferiors()); - - addSorting(id, allBaseBeforeSleepInBedAtSuperiors, baseSorting.getBeforeSleepInBedAtSuperiors()); - addSorting(id, allBaseBeforeSleepInBedAtInferiors, baseSorting.getBeforeSleepInBedAtInferiors()); - addSorting(id, allBaseOverrideSleepInBedAtSuperiors, baseSorting.getOverrideSleepInBedAtSuperiors()); - addSorting(id, allBaseOverrideSleepInBedAtInferiors, baseSorting.getOverrideSleepInBedAtInferiors()); - addSorting(id, allBaseAfterSleepInBedAtSuperiors, baseSorting.getAfterSleepInBedAtSuperiors()); - addSorting(id, allBaseAfterSleepInBedAtInferiors, baseSorting.getAfterSleepInBedAtInferiors()); - - addSorting(id, allBaseBeforeSwingItemSuperiors, baseSorting.getBeforeSwingItemSuperiors()); - addSorting(id, allBaseBeforeSwingItemInferiors, baseSorting.getBeforeSwingItemInferiors()); - addSorting(id, allBaseOverrideSwingItemSuperiors, baseSorting.getOverrideSwingItemSuperiors()); - addSorting(id, allBaseOverrideSwingItemInferiors, baseSorting.getOverrideSwingItemInferiors()); - addSorting(id, allBaseAfterSwingItemSuperiors, baseSorting.getAfterSwingItemSuperiors()); - addSorting(id, allBaseAfterSwingItemInferiors, baseSorting.getAfterSwingItemInferiors()); - - addSorting(id, allBaseBeforeUpdateEntityActionStateSuperiors, baseSorting.getBeforeUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseBeforeUpdateEntityActionStateInferiors, baseSorting.getBeforeUpdateEntityActionStateInferiors()); - addSorting(id, allBaseOverrideUpdateEntityActionStateSuperiors, baseSorting.getOverrideUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseOverrideUpdateEntityActionStateInferiors, baseSorting.getOverrideUpdateEntityActionStateInferiors()); - addSorting(id, allBaseAfterUpdateEntityActionStateSuperiors, baseSorting.getAfterUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseAfterUpdateEntityActionStateInferiors, baseSorting.getAfterUpdateEntityActionStateInferiors()); - - addSorting(id, allBaseBeforeUpdateRiddenSuperiors, baseSorting.getBeforeUpdateRiddenSuperiors()); - addSorting(id, allBaseBeforeUpdateRiddenInferiors, baseSorting.getBeforeUpdateRiddenInferiors()); - addSorting(id, allBaseOverrideUpdateRiddenSuperiors, baseSorting.getOverrideUpdateRiddenSuperiors()); - addSorting(id, allBaseOverrideUpdateRiddenInferiors, baseSorting.getOverrideUpdateRiddenInferiors()); - addSorting(id, allBaseAfterUpdateRiddenSuperiors, baseSorting.getAfterUpdateRiddenSuperiors()); - addSorting(id, allBaseAfterUpdateRiddenInferiors, baseSorting.getAfterUpdateRiddenInferiors()); - - addSorting(id, allBaseBeforeWakeUpPlayerSuperiors, baseSorting.getBeforeWakeUpPlayerSuperiors()); - addSorting(id, allBaseBeforeWakeUpPlayerInferiors, baseSorting.getBeforeWakeUpPlayerInferiors()); - addSorting(id, allBaseOverrideWakeUpPlayerSuperiors, baseSorting.getOverrideWakeUpPlayerSuperiors()); - addSorting(id, allBaseOverrideWakeUpPlayerInferiors, baseSorting.getOverrideWakeUpPlayerInferiors()); - addSorting(id, allBaseAfterWakeUpPlayerSuperiors, baseSorting.getAfterWakeUpPlayerSuperiors()); - addSorting(id, allBaseAfterWakeUpPlayerInferiors, baseSorting.getAfterWakeUpPlayerInferiors()); - - addSorting(id, allBaseBeforeWriteEntityToNBTSuperiors, baseSorting.getBeforeWriteEntityToNBTSuperiors()); - addSorting(id, allBaseBeforeWriteEntityToNBTInferiors, baseSorting.getBeforeWriteEntityToNBTInferiors()); - addSorting(id, allBaseOverrideWriteEntityToNBTSuperiors, baseSorting.getOverrideWriteEntityToNBTSuperiors()); - addSorting(id, allBaseOverrideWriteEntityToNBTInferiors, baseSorting.getOverrideWriteEntityToNBTInferiors()); - addSorting(id, allBaseAfterWriteEntityToNBTSuperiors, baseSorting.getAfterWriteEntityToNBTSuperiors()); - addSorting(id, allBaseAfterWriteEntityToNBTInferiors, baseSorting.getAfterWriteEntityToNBTInferiors()); - - } - - addMethod(id, baseClass, beforeLocalConstructingHookTypes, "beforeLocalConstructing", net.minecraft.client.Minecraft.class, net.minecraft.world.World.class, net.minecraft.util.Session.class, int.class); - addMethod(id, baseClass, afterLocalConstructingHookTypes, "afterLocalConstructing", net.minecraft.client.Minecraft.class, net.minecraft.world.World.class, net.minecraft.util.Session.class, int.class); - - - addMethod(id, baseClass, beforeAddExhaustionHookTypes, "beforeAddExhaustion", float.class); - addMethod(id, baseClass, overrideAddExhaustionHookTypes, "addExhaustion", float.class); - addMethod(id, baseClass, afterAddExhaustionHookTypes, "afterAddExhaustion", float.class); - - addMethod(id, baseClass, beforeAddMovementStatHookTypes, "beforeAddMovementStat", double.class, double.class, double.class); - addMethod(id, baseClass, overrideAddMovementStatHookTypes, "addMovementStat", double.class, double.class, double.class); - addMethod(id, baseClass, afterAddMovementStatHookTypes, "afterAddMovementStat", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeAddStatHookTypes, "beforeAddStat", net.minecraft.stats.StatBase.class, int.class); - addMethod(id, baseClass, overrideAddStatHookTypes, "addStat", net.minecraft.stats.StatBase.class, int.class); - addMethod(id, baseClass, afterAddStatHookTypes, "afterAddStat", net.minecraft.stats.StatBase.class, int.class); - - addMethod(id, baseClass, beforeAttackEntityFromHookTypes, "beforeAttackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, overrideAttackEntityFromHookTypes, "attackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, afterAttackEntityFromHookTypes, "afterAttackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - - addMethod(id, baseClass, beforeAttackTargetEntityWithCurrentItemHookTypes, "beforeAttackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideAttackTargetEntityWithCurrentItemHookTypes, "attackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterAttackTargetEntityWithCurrentItemHookTypes, "afterAttackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforeCanBreatheUnderwaterHookTypes, "beforeCanBreatheUnderwater"); - addMethod(id, baseClass, overrideCanBreatheUnderwaterHookTypes, "canBreatheUnderwater"); - addMethod(id, baseClass, afterCanBreatheUnderwaterHookTypes, "afterCanBreatheUnderwater"); - - addMethod(id, baseClass, beforeCanHarvestBlockHookTypes, "beforeCanHarvestBlock", net.minecraft.block.Block.class); - addMethod(id, baseClass, overrideCanHarvestBlockHookTypes, "canHarvestBlock", net.minecraft.block.Block.class); - addMethod(id, baseClass, afterCanHarvestBlockHookTypes, "afterCanHarvestBlock", net.minecraft.block.Block.class); - - addMethod(id, baseClass, beforeCanPlayerEditHookTypes, "beforeCanPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - addMethod(id, baseClass, overrideCanPlayerEditHookTypes, "canPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - addMethod(id, baseClass, afterCanPlayerEditHookTypes, "afterCanPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - - addMethod(id, baseClass, beforeCanTriggerWalkingHookTypes, "beforeCanTriggerWalking"); - addMethod(id, baseClass, overrideCanTriggerWalkingHookTypes, "canTriggerWalking"); - addMethod(id, baseClass, afterCanTriggerWalkingHookTypes, "afterCanTriggerWalking"); - - addMethod(id, baseClass, beforeCloseScreenHookTypes, "beforeCloseScreen"); - addMethod(id, baseClass, overrideCloseScreenHookTypes, "closeScreen"); - addMethod(id, baseClass, afterCloseScreenHookTypes, "afterCloseScreen"); - - addMethod(id, baseClass, beforeDamageEntityHookTypes, "beforeDamageEntity", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, overrideDamageEntityHookTypes, "damageEntity", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, afterDamageEntityHookTypes, "afterDamageEntity", net.minecraft.util.DamageSource.class, float.class); - - addMethod(id, baseClass, beforeDisplayGUIBrewingStandHookTypes, "beforeDisplayGUIBrewingStand", net.minecraft.tileentity.TileEntityBrewingStand.class); - addMethod(id, baseClass, overrideDisplayGUIBrewingStandHookTypes, "displayGUIBrewingStand", net.minecraft.tileentity.TileEntityBrewingStand.class); - addMethod(id, baseClass, afterDisplayGUIBrewingStandHookTypes, "afterDisplayGUIBrewingStand", net.minecraft.tileentity.TileEntityBrewingStand.class); - - addMethod(id, baseClass, beforeDisplayGUIChestHookTypes, "beforeDisplayGUIChest", net.minecraft.inventory.IInventory.class); - addMethod(id, baseClass, overrideDisplayGUIChestHookTypes, "displayGUIChest", net.minecraft.inventory.IInventory.class); - addMethod(id, baseClass, afterDisplayGUIChestHookTypes, "afterDisplayGUIChest", net.minecraft.inventory.IInventory.class); - - addMethod(id, baseClass, beforeDisplayGUIDispenserHookTypes, "beforeDisplayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - addMethod(id, baseClass, overrideDisplayGUIDispenserHookTypes, "displayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - addMethod(id, baseClass, afterDisplayGUIDispenserHookTypes, "afterDisplayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - - addMethod(id, baseClass, beforeDisplayGUIEditSignHookTypes, "beforeDisplayGUIEditSign", net.minecraft.tileentity.TileEntity.class); - addMethod(id, baseClass, overrideDisplayGUIEditSignHookTypes, "displayGUIEditSign", net.minecraft.tileentity.TileEntity.class); - addMethod(id, baseClass, afterDisplayGUIEditSignHookTypes, "afterDisplayGUIEditSign", net.minecraft.tileentity.TileEntity.class); - - addMethod(id, baseClass, beforeDisplayGUIEnchantmentHookTypes, "beforeDisplayGUIEnchantment", int.class, int.class, int.class, String.class); - addMethod(id, baseClass, overrideDisplayGUIEnchantmentHookTypes, "displayGUIEnchantment", int.class, int.class, int.class, String.class); - addMethod(id, baseClass, afterDisplayGUIEnchantmentHookTypes, "afterDisplayGUIEnchantment", int.class, int.class, int.class, String.class); - - addMethod(id, baseClass, beforeDisplayGUIFurnaceHookTypes, "beforeDisplayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - addMethod(id, baseClass, overrideDisplayGUIFurnaceHookTypes, "displayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - addMethod(id, baseClass, afterDisplayGUIFurnaceHookTypes, "afterDisplayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - - addMethod(id, baseClass, beforeDisplayGUIWorkbenchHookTypes, "beforeDisplayGUIWorkbench", int.class, int.class, int.class); - addMethod(id, baseClass, overrideDisplayGUIWorkbenchHookTypes, "displayGUIWorkbench", int.class, int.class, int.class); - addMethod(id, baseClass, afterDisplayGUIWorkbenchHookTypes, "afterDisplayGUIWorkbench", int.class, int.class, int.class); - - addMethod(id, baseClass, beforeDropOneItemHookTypes, "beforeDropOneItem", boolean.class); - addMethod(id, baseClass, overrideDropOneItemHookTypes, "dropOneItem", boolean.class); - addMethod(id, baseClass, afterDropOneItemHookTypes, "afterDropOneItem", boolean.class); - - addMethod(id, baseClass, beforeDropPlayerItemHookTypes, "beforeDropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - addMethod(id, baseClass, overrideDropPlayerItemHookTypes, "dropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - addMethod(id, baseClass, afterDropPlayerItemHookTypes, "afterDropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - - addMethod(id, baseClass, beforeDropPlayerItemWithRandomChoiceHookTypes, "beforeDropPlayerItemWithRandomChoice", net.minecraft.item.ItemStack.class, boolean.class, boolean.class); - addMethod(id, baseClass, overrideDropPlayerItemWithRandomChoiceHookTypes, "dropPlayerItemWithRandomChoice", net.minecraft.item.ItemStack.class, boolean.class, boolean.class); - addMethod(id, baseClass, afterDropPlayerItemWithRandomChoiceHookTypes, "afterDropPlayerItemWithRandomChoice", net.minecraft.item.ItemStack.class, boolean.class, boolean.class); - - addMethod(id, baseClass, beforeFallHookTypes, "beforeFall", float.class); - addMethod(id, baseClass, overrideFallHookTypes, "fall", float.class); - addMethod(id, baseClass, afterFallHookTypes, "afterFall", float.class); - - addMethod(id, baseClass, beforeGetAIMoveSpeedHookTypes, "beforeGetAIMoveSpeed"); - addMethod(id, baseClass, overrideGetAIMoveSpeedHookTypes, "getAIMoveSpeed"); - addMethod(id, baseClass, afterGetAIMoveSpeedHookTypes, "afterGetAIMoveSpeed"); - - addMethod(id, baseClass, beforeGetBedOrientationInDegreesHookTypes, "beforeGetBedOrientationInDegrees"); - addMethod(id, baseClass, overrideGetBedOrientationInDegreesHookTypes, "getBedOrientationInDegrees"); - addMethod(id, baseClass, afterGetBedOrientationInDegreesHookTypes, "afterGetBedOrientationInDegrees"); - - addMethod(id, baseClass, beforeGetBrightnessHookTypes, "beforeGetBrightness", float.class); - addMethod(id, baseClass, overrideGetBrightnessHookTypes, "getBrightness", float.class); - addMethod(id, baseClass, afterGetBrightnessHookTypes, "afterGetBrightness", float.class); - - addMethod(id, baseClass, beforeGetBrightnessForRenderHookTypes, "beforeGetBrightnessForRender", float.class); - addMethod(id, baseClass, overrideGetBrightnessForRenderHookTypes, "getBrightnessForRender", float.class); - addMethod(id, baseClass, afterGetBrightnessForRenderHookTypes, "afterGetBrightnessForRender", float.class); - - addMethod(id, baseClass, beforeGetCurrentPlayerStrVsBlockHookTypes, "beforeGetCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - addMethod(id, baseClass, overrideGetCurrentPlayerStrVsBlockHookTypes, "getCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - addMethod(id, baseClass, afterGetCurrentPlayerStrVsBlockHookTypes, "afterGetCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - - addMethod(id, baseClass, beforeGetCurrentPlayerStrVsBlockForgeHookTypes, "beforeGetCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - addMethod(id, baseClass, overrideGetCurrentPlayerStrVsBlockForgeHookTypes, "getCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - addMethod(id, baseClass, afterGetCurrentPlayerStrVsBlockForgeHookTypes, "afterGetCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - - addMethod(id, baseClass, beforeGetDistanceSqHookTypes, "beforeGetDistanceSq", double.class, double.class, double.class); - addMethod(id, baseClass, overrideGetDistanceSqHookTypes, "getDistanceSq", double.class, double.class, double.class); - addMethod(id, baseClass, afterGetDistanceSqHookTypes, "afterGetDistanceSq", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeGetDistanceSqToEntityHookTypes, "beforeGetDistanceSqToEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideGetDistanceSqToEntityHookTypes, "getDistanceSqToEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterGetDistanceSqToEntityHookTypes, "afterGetDistanceSqToEntity", net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforeGetFOVMultiplierHookTypes, "beforeGetFOVMultiplier"); - addMethod(id, baseClass, overrideGetFOVMultiplierHookTypes, "getFOVMultiplier"); - addMethod(id, baseClass, afterGetFOVMultiplierHookTypes, "afterGetFOVMultiplier"); - - addMethod(id, baseClass, beforeGetHurtSoundHookTypes, "beforeGetHurtSound"); - addMethod(id, baseClass, overrideGetHurtSoundHookTypes, "getHurtSound"); - addMethod(id, baseClass, afterGetHurtSoundHookTypes, "afterGetHurtSound"); - - addMethod(id, baseClass, beforeGetItemIconHookTypes, "beforeGetItemIcon", net.minecraft.item.ItemStack.class, int.class); - addMethod(id, baseClass, overrideGetItemIconHookTypes, "getItemIcon", net.minecraft.item.ItemStack.class, int.class); - addMethod(id, baseClass, afterGetItemIconHookTypes, "afterGetItemIcon", net.minecraft.item.ItemStack.class, int.class); - - addMethod(id, baseClass, beforeGetSleepTimerHookTypes, "beforeGetSleepTimer"); - addMethod(id, baseClass, overrideGetSleepTimerHookTypes, "getSleepTimer"); - addMethod(id, baseClass, afterGetSleepTimerHookTypes, "afterGetSleepTimer"); - - addMethod(id, baseClass, beforeHandleLavaMovementHookTypes, "beforeHandleLavaMovement"); - addMethod(id, baseClass, overrideHandleLavaMovementHookTypes, "handleLavaMovement"); - addMethod(id, baseClass, afterHandleLavaMovementHookTypes, "afterHandleLavaMovement"); - - addMethod(id, baseClass, beforeHandleWaterMovementHookTypes, "beforeHandleWaterMovement"); - addMethod(id, baseClass, overrideHandleWaterMovementHookTypes, "handleWaterMovement"); - addMethod(id, baseClass, afterHandleWaterMovementHookTypes, "afterHandleWaterMovement"); - - addMethod(id, baseClass, beforeHealHookTypes, "beforeHeal", float.class); - addMethod(id, baseClass, overrideHealHookTypes, "heal", float.class); - addMethod(id, baseClass, afterHealHookTypes, "afterHeal", float.class); - - addMethod(id, baseClass, beforeIsEntityInsideOpaqueBlockHookTypes, "beforeIsEntityInsideOpaqueBlock"); - addMethod(id, baseClass, overrideIsEntityInsideOpaqueBlockHookTypes, "isEntityInsideOpaqueBlock"); - addMethod(id, baseClass, afterIsEntityInsideOpaqueBlockHookTypes, "afterIsEntityInsideOpaqueBlock"); - - addMethod(id, baseClass, beforeIsInWaterHookTypes, "beforeIsInWater"); - addMethod(id, baseClass, overrideIsInWaterHookTypes, "isInWater"); - addMethod(id, baseClass, afterIsInWaterHookTypes, "afterIsInWater"); - - addMethod(id, baseClass, beforeIsInsideOfMaterialHookTypes, "beforeIsInsideOfMaterial", net.minecraft.block.material.Material.class); - addMethod(id, baseClass, overrideIsInsideOfMaterialHookTypes, "isInsideOfMaterial", net.minecraft.block.material.Material.class); - addMethod(id, baseClass, afterIsInsideOfMaterialHookTypes, "afterIsInsideOfMaterial", net.minecraft.block.material.Material.class); - - addMethod(id, baseClass, beforeIsOnLadderHookTypes, "beforeIsOnLadder"); - addMethod(id, baseClass, overrideIsOnLadderHookTypes, "isOnLadder"); - addMethod(id, baseClass, afterIsOnLadderHookTypes, "afterIsOnLadder"); - - addMethod(id, baseClass, beforeIsPlayerSleepingHookTypes, "beforeIsPlayerSleeping"); - addMethod(id, baseClass, overrideIsPlayerSleepingHookTypes, "isPlayerSleeping"); - addMethod(id, baseClass, afterIsPlayerSleepingHookTypes, "afterIsPlayerSleeping"); - - addMethod(id, baseClass, beforeIsSneakingHookTypes, "beforeIsSneaking"); - addMethod(id, baseClass, overrideIsSneakingHookTypes, "isSneaking"); - addMethod(id, baseClass, afterIsSneakingHookTypes, "afterIsSneaking"); - - addMethod(id, baseClass, beforeIsSprintingHookTypes, "beforeIsSprinting"); - addMethod(id, baseClass, overrideIsSprintingHookTypes, "isSprinting"); - addMethod(id, baseClass, afterIsSprintingHookTypes, "afterIsSprinting"); - - addMethod(id, baseClass, beforeJumpHookTypes, "beforeJump"); - addMethod(id, baseClass, overrideJumpHookTypes, "jump"); - addMethod(id, baseClass, afterJumpHookTypes, "afterJump"); - - addMethod(id, baseClass, beforeKnockBackHookTypes, "beforeKnockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - addMethod(id, baseClass, overrideKnockBackHookTypes, "knockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - addMethod(id, baseClass, afterKnockBackHookTypes, "afterKnockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - - addMethod(id, baseClass, beforeMoveEntityHookTypes, "beforeMoveEntity", double.class, double.class, double.class); - addMethod(id, baseClass, overrideMoveEntityHookTypes, "moveEntity", double.class, double.class, double.class); - addMethod(id, baseClass, afterMoveEntityHookTypes, "afterMoveEntity", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeMoveEntityWithHeadingHookTypes, "beforeMoveEntityWithHeading", float.class, float.class); - addMethod(id, baseClass, overrideMoveEntityWithHeadingHookTypes, "moveEntityWithHeading", float.class, float.class); - addMethod(id, baseClass, afterMoveEntityWithHeadingHookTypes, "afterMoveEntityWithHeading", float.class, float.class); - - addMethod(id, baseClass, beforeMoveFlyingHookTypes, "beforeMoveFlying", float.class, float.class, float.class); - addMethod(id, baseClass, overrideMoveFlyingHookTypes, "moveFlying", float.class, float.class, float.class); - addMethod(id, baseClass, afterMoveFlyingHookTypes, "afterMoveFlying", float.class, float.class, float.class); - - addMethod(id, baseClass, beforeOnDeathHookTypes, "beforeOnDeath", net.minecraft.util.DamageSource.class); - addMethod(id, baseClass, overrideOnDeathHookTypes, "onDeath", net.minecraft.util.DamageSource.class); - addMethod(id, baseClass, afterOnDeathHookTypes, "afterOnDeath", net.minecraft.util.DamageSource.class); - - addMethod(id, baseClass, beforeOnLivingUpdateHookTypes, "beforeOnLivingUpdate"); - addMethod(id, baseClass, overrideOnLivingUpdateHookTypes, "onLivingUpdate"); - addMethod(id, baseClass, afterOnLivingUpdateHookTypes, "afterOnLivingUpdate"); - - addMethod(id, baseClass, beforeOnKillEntityHookTypes, "beforeOnKillEntity", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, overrideOnKillEntityHookTypes, "onKillEntity", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, afterOnKillEntityHookTypes, "afterOnKillEntity", net.minecraft.entity.EntityLivingBase.class); - - addMethod(id, baseClass, beforeOnStruckByLightningHookTypes, "beforeOnStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - addMethod(id, baseClass, overrideOnStruckByLightningHookTypes, "onStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - addMethod(id, baseClass, afterOnStruckByLightningHookTypes, "afterOnStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - - addMethod(id, baseClass, beforeOnUpdateHookTypes, "beforeOnUpdate"); - addMethod(id, baseClass, overrideOnUpdateHookTypes, "onUpdate"); - addMethod(id, baseClass, afterOnUpdateHookTypes, "afterOnUpdate"); - - addMethod(id, baseClass, beforePlayStepSoundHookTypes, "beforePlayStepSound", int.class, int.class, int.class, net.minecraft.block.Block.class); - addMethod(id, baseClass, overridePlayStepSoundHookTypes, "playStepSound", int.class, int.class, int.class, net.minecraft.block.Block.class); - addMethod(id, baseClass, afterPlayStepSoundHookTypes, "afterPlayStepSound", int.class, int.class, int.class, net.minecraft.block.Block.class); - - addMethod(id, baseClass, beforePushOutOfBlocksHookTypes, "beforePushOutOfBlocks", double.class, double.class, double.class); - addMethod(id, baseClass, overridePushOutOfBlocksHookTypes, "pushOutOfBlocks", double.class, double.class, double.class); - addMethod(id, baseClass, afterPushOutOfBlocksHookTypes, "afterPushOutOfBlocks", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeRayTraceHookTypes, "beforeRayTrace", double.class, float.class); - addMethod(id, baseClass, overrideRayTraceHookTypes, "rayTrace", double.class, float.class); - addMethod(id, baseClass, afterRayTraceHookTypes, "afterRayTrace", double.class, float.class); - - addMethod(id, baseClass, beforeReadEntityFromNBTHookTypes, "beforeReadEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, overrideReadEntityFromNBTHookTypes, "readEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, afterReadEntityFromNBTHookTypes, "afterReadEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - - addMethod(id, baseClass, beforeRespawnPlayerHookTypes, "beforeRespawnPlayer"); - addMethod(id, baseClass, overrideRespawnPlayerHookTypes, "respawnPlayer"); - addMethod(id, baseClass, afterRespawnPlayerHookTypes, "afterRespawnPlayer"); - - addMethod(id, baseClass, beforeSetDeadHookTypes, "beforeSetDead"); - addMethod(id, baseClass, overrideSetDeadHookTypes, "setDead"); - addMethod(id, baseClass, afterSetDeadHookTypes, "afterSetDead"); - - addMethod(id, baseClass, beforeSetPlayerSPHealthHookTypes, "beforeSetPlayerSPHealth", float.class); - addMethod(id, baseClass, overrideSetPlayerSPHealthHookTypes, "setPlayerSPHealth", float.class); - addMethod(id, baseClass, afterSetPlayerSPHealthHookTypes, "afterSetPlayerSPHealth", float.class); - - addMethod(id, baseClass, beforeSetPositionAndRotationHookTypes, "beforeSetPositionAndRotation", double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, overrideSetPositionAndRotationHookTypes, "setPositionAndRotation", double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, afterSetPositionAndRotationHookTypes, "afterSetPositionAndRotation", double.class, double.class, double.class, float.class, float.class); - - addMethod(id, baseClass, beforeSetSneakingHookTypes, "beforeSetSneaking", boolean.class); - addMethod(id, baseClass, overrideSetSneakingHookTypes, "setSneaking", boolean.class); - addMethod(id, baseClass, afterSetSneakingHookTypes, "afterSetSneaking", boolean.class); - - addMethod(id, baseClass, beforeSetSprintingHookTypes, "beforeSetSprinting", boolean.class); - addMethod(id, baseClass, overrideSetSprintingHookTypes, "setSprinting", boolean.class); - addMethod(id, baseClass, afterSetSprintingHookTypes, "afterSetSprinting", boolean.class); - - addMethod(id, baseClass, beforeSleepInBedAtHookTypes, "beforeSleepInBedAt", int.class, int.class, int.class); - addMethod(id, baseClass, overrideSleepInBedAtHookTypes, "sleepInBedAt", int.class, int.class, int.class); - addMethod(id, baseClass, afterSleepInBedAtHookTypes, "afterSleepInBedAt", int.class, int.class, int.class); - - addMethod(id, baseClass, beforeSwingItemHookTypes, "beforeSwingItem"); - addMethod(id, baseClass, overrideSwingItemHookTypes, "swingItem"); - addMethod(id, baseClass, afterSwingItemHookTypes, "afterSwingItem"); - - addMethod(id, baseClass, beforeUpdateEntityActionStateHookTypes, "beforeUpdateEntityActionState"); - addMethod(id, baseClass, overrideUpdateEntityActionStateHookTypes, "updateEntityActionState"); - addMethod(id, baseClass, afterUpdateEntityActionStateHookTypes, "afterUpdateEntityActionState"); - - addMethod(id, baseClass, beforeUpdateRiddenHookTypes, "beforeUpdateRidden"); - addMethod(id, baseClass, overrideUpdateRiddenHookTypes, "updateRidden"); - addMethod(id, baseClass, afterUpdateRiddenHookTypes, "afterUpdateRidden"); - - addMethod(id, baseClass, beforeWakeUpPlayerHookTypes, "beforeWakeUpPlayer", boolean.class, boolean.class, boolean.class); - addMethod(id, baseClass, overrideWakeUpPlayerHookTypes, "wakeUpPlayer", boolean.class, boolean.class, boolean.class); - addMethod(id, baseClass, afterWakeUpPlayerHookTypes, "afterWakeUpPlayer", boolean.class, boolean.class, boolean.class); - - addMethod(id, baseClass, beforeWriteEntityToNBTHookTypes, "beforeWriteEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, overrideWriteEntityToNBTHookTypes, "writeEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, afterWriteEntityToNBTHookTypes, "afterWriteEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - - - addDynamicMethods(id, baseClass); - - addDynamicKeys(id, baseClass, beforeDynamicHookMethods, beforeDynamicHookTypes); - addDynamicKeys(id, baseClass, overrideDynamicHookMethods, overrideDynamicHookTypes); - addDynamicKeys(id, baseClass, afterDynamicHookMethods, afterDynamicHookTypes); - - initialize(); - - for(IClientPlayerAPI instance : getAllInstancesList()) - instance.getClientPlayerAPI().attachClientPlayerBase(id); - - System.out.println("Client Player: registered " + id); - logger.fine("Client Player: registered class '" + baseClass.getName() + "' with id '" + id + "'"); - - initialized = false; - } - - public static boolean unregister(String id) - { - if(id == null) - return false; - - Constructor constructor = allBaseConstructors.remove(id); - if(constructor == null) - return false; - - for(IClientPlayerAPI instance : getAllInstancesList()) - instance.getClientPlayerAPI().detachClientPlayerBase(id); - - beforeLocalConstructingHookTypes.remove(id); - afterLocalConstructingHookTypes.remove(id); - - allBaseBeforeAddExhaustionSuperiors.remove(id); - allBaseBeforeAddExhaustionInferiors.remove(id); - allBaseOverrideAddExhaustionSuperiors.remove(id); - allBaseOverrideAddExhaustionInferiors.remove(id); - allBaseAfterAddExhaustionSuperiors.remove(id); - allBaseAfterAddExhaustionInferiors.remove(id); - - beforeAddExhaustionHookTypes.remove(id); - overrideAddExhaustionHookTypes.remove(id); - afterAddExhaustionHookTypes.remove(id); - - allBaseBeforeAddMovementStatSuperiors.remove(id); - allBaseBeforeAddMovementStatInferiors.remove(id); - allBaseOverrideAddMovementStatSuperiors.remove(id); - allBaseOverrideAddMovementStatInferiors.remove(id); - allBaseAfterAddMovementStatSuperiors.remove(id); - allBaseAfterAddMovementStatInferiors.remove(id); - - beforeAddMovementStatHookTypes.remove(id); - overrideAddMovementStatHookTypes.remove(id); - afterAddMovementStatHookTypes.remove(id); - - allBaseBeforeAddStatSuperiors.remove(id); - allBaseBeforeAddStatInferiors.remove(id); - allBaseOverrideAddStatSuperiors.remove(id); - allBaseOverrideAddStatInferiors.remove(id); - allBaseAfterAddStatSuperiors.remove(id); - allBaseAfterAddStatInferiors.remove(id); - - beforeAddStatHookTypes.remove(id); - overrideAddStatHookTypes.remove(id); - afterAddStatHookTypes.remove(id); - - allBaseBeforeAttackEntityFromSuperiors.remove(id); - allBaseBeforeAttackEntityFromInferiors.remove(id); - allBaseOverrideAttackEntityFromSuperiors.remove(id); - allBaseOverrideAttackEntityFromInferiors.remove(id); - allBaseAfterAttackEntityFromSuperiors.remove(id); - allBaseAfterAttackEntityFromInferiors.remove(id); - - beforeAttackEntityFromHookTypes.remove(id); - overrideAttackEntityFromHookTypes.remove(id); - afterAttackEntityFromHookTypes.remove(id); - - allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseBeforeAttackTargetEntityWithCurrentItemInferiors.remove(id); - allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseOverrideAttackTargetEntityWithCurrentItemInferiors.remove(id); - allBaseAfterAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseAfterAttackTargetEntityWithCurrentItemInferiors.remove(id); - - beforeAttackTargetEntityWithCurrentItemHookTypes.remove(id); - overrideAttackTargetEntityWithCurrentItemHookTypes.remove(id); - afterAttackTargetEntityWithCurrentItemHookTypes.remove(id); - - allBaseBeforeCanBreatheUnderwaterSuperiors.remove(id); - allBaseBeforeCanBreatheUnderwaterInferiors.remove(id); - allBaseOverrideCanBreatheUnderwaterSuperiors.remove(id); - allBaseOverrideCanBreatheUnderwaterInferiors.remove(id); - allBaseAfterCanBreatheUnderwaterSuperiors.remove(id); - allBaseAfterCanBreatheUnderwaterInferiors.remove(id); - - beforeCanBreatheUnderwaterHookTypes.remove(id); - overrideCanBreatheUnderwaterHookTypes.remove(id); - afterCanBreatheUnderwaterHookTypes.remove(id); - - allBaseBeforeCanHarvestBlockSuperiors.remove(id); - allBaseBeforeCanHarvestBlockInferiors.remove(id); - allBaseOverrideCanHarvestBlockSuperiors.remove(id); - allBaseOverrideCanHarvestBlockInferiors.remove(id); - allBaseAfterCanHarvestBlockSuperiors.remove(id); - allBaseAfterCanHarvestBlockInferiors.remove(id); - - beforeCanHarvestBlockHookTypes.remove(id); - overrideCanHarvestBlockHookTypes.remove(id); - afterCanHarvestBlockHookTypes.remove(id); - - allBaseBeforeCanPlayerEditSuperiors.remove(id); - allBaseBeforeCanPlayerEditInferiors.remove(id); - allBaseOverrideCanPlayerEditSuperiors.remove(id); - allBaseOverrideCanPlayerEditInferiors.remove(id); - allBaseAfterCanPlayerEditSuperiors.remove(id); - allBaseAfterCanPlayerEditInferiors.remove(id); - - beforeCanPlayerEditHookTypes.remove(id); - overrideCanPlayerEditHookTypes.remove(id); - afterCanPlayerEditHookTypes.remove(id); - - allBaseBeforeCanTriggerWalkingSuperiors.remove(id); - allBaseBeforeCanTriggerWalkingInferiors.remove(id); - allBaseOverrideCanTriggerWalkingSuperiors.remove(id); - allBaseOverrideCanTriggerWalkingInferiors.remove(id); - allBaseAfterCanTriggerWalkingSuperiors.remove(id); - allBaseAfterCanTriggerWalkingInferiors.remove(id); - - beforeCanTriggerWalkingHookTypes.remove(id); - overrideCanTriggerWalkingHookTypes.remove(id); - afterCanTriggerWalkingHookTypes.remove(id); - - allBaseBeforeCloseScreenSuperiors.remove(id); - allBaseBeforeCloseScreenInferiors.remove(id); - allBaseOverrideCloseScreenSuperiors.remove(id); - allBaseOverrideCloseScreenInferiors.remove(id); - allBaseAfterCloseScreenSuperiors.remove(id); - allBaseAfterCloseScreenInferiors.remove(id); - - beforeCloseScreenHookTypes.remove(id); - overrideCloseScreenHookTypes.remove(id); - afterCloseScreenHookTypes.remove(id); - - allBaseBeforeDamageEntitySuperiors.remove(id); - allBaseBeforeDamageEntityInferiors.remove(id); - allBaseOverrideDamageEntitySuperiors.remove(id); - allBaseOverrideDamageEntityInferiors.remove(id); - allBaseAfterDamageEntitySuperiors.remove(id); - allBaseAfterDamageEntityInferiors.remove(id); - - beforeDamageEntityHookTypes.remove(id); - overrideDamageEntityHookTypes.remove(id); - afterDamageEntityHookTypes.remove(id); - - allBaseBeforeDisplayGUIBrewingStandSuperiors.remove(id); - allBaseBeforeDisplayGUIBrewingStandInferiors.remove(id); - allBaseOverrideDisplayGUIBrewingStandSuperiors.remove(id); - allBaseOverrideDisplayGUIBrewingStandInferiors.remove(id); - allBaseAfterDisplayGUIBrewingStandSuperiors.remove(id); - allBaseAfterDisplayGUIBrewingStandInferiors.remove(id); - - beforeDisplayGUIBrewingStandHookTypes.remove(id); - overrideDisplayGUIBrewingStandHookTypes.remove(id); - afterDisplayGUIBrewingStandHookTypes.remove(id); - - allBaseBeforeDisplayGUIChestSuperiors.remove(id); - allBaseBeforeDisplayGUIChestInferiors.remove(id); - allBaseOverrideDisplayGUIChestSuperiors.remove(id); - allBaseOverrideDisplayGUIChestInferiors.remove(id); - allBaseAfterDisplayGUIChestSuperiors.remove(id); - allBaseAfterDisplayGUIChestInferiors.remove(id); - - beforeDisplayGUIChestHookTypes.remove(id); - overrideDisplayGUIChestHookTypes.remove(id); - afterDisplayGUIChestHookTypes.remove(id); - - allBaseBeforeDisplayGUIDispenserSuperiors.remove(id); - allBaseBeforeDisplayGUIDispenserInferiors.remove(id); - allBaseOverrideDisplayGUIDispenserSuperiors.remove(id); - allBaseOverrideDisplayGUIDispenserInferiors.remove(id); - allBaseAfterDisplayGUIDispenserSuperiors.remove(id); - allBaseAfterDisplayGUIDispenserInferiors.remove(id); - - beforeDisplayGUIDispenserHookTypes.remove(id); - overrideDisplayGUIDispenserHookTypes.remove(id); - afterDisplayGUIDispenserHookTypes.remove(id); - - allBaseBeforeDisplayGUIEditSignSuperiors.remove(id); - allBaseBeforeDisplayGUIEditSignInferiors.remove(id); - allBaseOverrideDisplayGUIEditSignSuperiors.remove(id); - allBaseOverrideDisplayGUIEditSignInferiors.remove(id); - allBaseAfterDisplayGUIEditSignSuperiors.remove(id); - allBaseAfterDisplayGUIEditSignInferiors.remove(id); - - beforeDisplayGUIEditSignHookTypes.remove(id); - overrideDisplayGUIEditSignHookTypes.remove(id); - afterDisplayGUIEditSignHookTypes.remove(id); - - allBaseBeforeDisplayGUIEnchantmentSuperiors.remove(id); - allBaseBeforeDisplayGUIEnchantmentInferiors.remove(id); - allBaseOverrideDisplayGUIEnchantmentSuperiors.remove(id); - allBaseOverrideDisplayGUIEnchantmentInferiors.remove(id); - allBaseAfterDisplayGUIEnchantmentSuperiors.remove(id); - allBaseAfterDisplayGUIEnchantmentInferiors.remove(id); - - beforeDisplayGUIEnchantmentHookTypes.remove(id); - overrideDisplayGUIEnchantmentHookTypes.remove(id); - afterDisplayGUIEnchantmentHookTypes.remove(id); - - allBaseBeforeDisplayGUIFurnaceSuperiors.remove(id); - allBaseBeforeDisplayGUIFurnaceInferiors.remove(id); - allBaseOverrideDisplayGUIFurnaceSuperiors.remove(id); - allBaseOverrideDisplayGUIFurnaceInferiors.remove(id); - allBaseAfterDisplayGUIFurnaceSuperiors.remove(id); - allBaseAfterDisplayGUIFurnaceInferiors.remove(id); - - beforeDisplayGUIFurnaceHookTypes.remove(id); - overrideDisplayGUIFurnaceHookTypes.remove(id); - afterDisplayGUIFurnaceHookTypes.remove(id); - - allBaseBeforeDisplayGUIWorkbenchSuperiors.remove(id); - allBaseBeforeDisplayGUIWorkbenchInferiors.remove(id); - allBaseOverrideDisplayGUIWorkbenchSuperiors.remove(id); - allBaseOverrideDisplayGUIWorkbenchInferiors.remove(id); - allBaseAfterDisplayGUIWorkbenchSuperiors.remove(id); - allBaseAfterDisplayGUIWorkbenchInferiors.remove(id); - - beforeDisplayGUIWorkbenchHookTypes.remove(id); - overrideDisplayGUIWorkbenchHookTypes.remove(id); - afterDisplayGUIWorkbenchHookTypes.remove(id); - - allBaseBeforeDropOneItemSuperiors.remove(id); - allBaseBeforeDropOneItemInferiors.remove(id); - allBaseOverrideDropOneItemSuperiors.remove(id); - allBaseOverrideDropOneItemInferiors.remove(id); - allBaseAfterDropOneItemSuperiors.remove(id); - allBaseAfterDropOneItemInferiors.remove(id); - - beforeDropOneItemHookTypes.remove(id); - overrideDropOneItemHookTypes.remove(id); - afterDropOneItemHookTypes.remove(id); - - allBaseBeforeDropPlayerItemSuperiors.remove(id); - allBaseBeforeDropPlayerItemInferiors.remove(id); - allBaseOverrideDropPlayerItemSuperiors.remove(id); - allBaseOverrideDropPlayerItemInferiors.remove(id); - allBaseAfterDropPlayerItemSuperiors.remove(id); - allBaseAfterDropPlayerItemInferiors.remove(id); - - beforeDropPlayerItemHookTypes.remove(id); - overrideDropPlayerItemHookTypes.remove(id); - afterDropPlayerItemHookTypes.remove(id); - - allBaseBeforeDropPlayerItemWithRandomChoiceSuperiors.remove(id); - allBaseBeforeDropPlayerItemWithRandomChoiceInferiors.remove(id); - allBaseOverrideDropPlayerItemWithRandomChoiceSuperiors.remove(id); - allBaseOverrideDropPlayerItemWithRandomChoiceInferiors.remove(id); - allBaseAfterDropPlayerItemWithRandomChoiceSuperiors.remove(id); - allBaseAfterDropPlayerItemWithRandomChoiceInferiors.remove(id); - - beforeDropPlayerItemWithRandomChoiceHookTypes.remove(id); - overrideDropPlayerItemWithRandomChoiceHookTypes.remove(id); - afterDropPlayerItemWithRandomChoiceHookTypes.remove(id); - - allBaseBeforeFallSuperiors.remove(id); - allBaseBeforeFallInferiors.remove(id); - allBaseOverrideFallSuperiors.remove(id); - allBaseOverrideFallInferiors.remove(id); - allBaseAfterFallSuperiors.remove(id); - allBaseAfterFallInferiors.remove(id); - - beforeFallHookTypes.remove(id); - overrideFallHookTypes.remove(id); - afterFallHookTypes.remove(id); - - allBaseBeforeGetAIMoveSpeedSuperiors.remove(id); - allBaseBeforeGetAIMoveSpeedInferiors.remove(id); - allBaseOverrideGetAIMoveSpeedSuperiors.remove(id); - allBaseOverrideGetAIMoveSpeedInferiors.remove(id); - allBaseAfterGetAIMoveSpeedSuperiors.remove(id); - allBaseAfterGetAIMoveSpeedInferiors.remove(id); - - beforeGetAIMoveSpeedHookTypes.remove(id); - overrideGetAIMoveSpeedHookTypes.remove(id); - afterGetAIMoveSpeedHookTypes.remove(id); - - allBaseBeforeGetBedOrientationInDegreesSuperiors.remove(id); - allBaseBeforeGetBedOrientationInDegreesInferiors.remove(id); - allBaseOverrideGetBedOrientationInDegreesSuperiors.remove(id); - allBaseOverrideGetBedOrientationInDegreesInferiors.remove(id); - allBaseAfterGetBedOrientationInDegreesSuperiors.remove(id); - allBaseAfterGetBedOrientationInDegreesInferiors.remove(id); - - beforeGetBedOrientationInDegreesHookTypes.remove(id); - overrideGetBedOrientationInDegreesHookTypes.remove(id); - afterGetBedOrientationInDegreesHookTypes.remove(id); - - allBaseBeforeGetBrightnessSuperiors.remove(id); - allBaseBeforeGetBrightnessInferiors.remove(id); - allBaseOverrideGetBrightnessSuperiors.remove(id); - allBaseOverrideGetBrightnessInferiors.remove(id); - allBaseAfterGetBrightnessSuperiors.remove(id); - allBaseAfterGetBrightnessInferiors.remove(id); - - beforeGetBrightnessHookTypes.remove(id); - overrideGetBrightnessHookTypes.remove(id); - afterGetBrightnessHookTypes.remove(id); - - allBaseBeforeGetBrightnessForRenderSuperiors.remove(id); - allBaseBeforeGetBrightnessForRenderInferiors.remove(id); - allBaseOverrideGetBrightnessForRenderSuperiors.remove(id); - allBaseOverrideGetBrightnessForRenderInferiors.remove(id); - allBaseAfterGetBrightnessForRenderSuperiors.remove(id); - allBaseAfterGetBrightnessForRenderInferiors.remove(id); - - beforeGetBrightnessForRenderHookTypes.remove(id); - overrideGetBrightnessForRenderHookTypes.remove(id); - afterGetBrightnessForRenderHookTypes.remove(id); - - allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseBeforeGetCurrentPlayerStrVsBlockInferiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockInferiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockInferiors.remove(id); - - beforeGetCurrentPlayerStrVsBlockHookTypes.remove(id); - overrideGetCurrentPlayerStrVsBlockHookTypes.remove(id); - afterGetCurrentPlayerStrVsBlockHookTypes.remove(id); - - allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - - beforeGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - overrideGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - afterGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - - allBaseBeforeGetDistanceSqSuperiors.remove(id); - allBaseBeforeGetDistanceSqInferiors.remove(id); - allBaseOverrideGetDistanceSqSuperiors.remove(id); - allBaseOverrideGetDistanceSqInferiors.remove(id); - allBaseAfterGetDistanceSqSuperiors.remove(id); - allBaseAfterGetDistanceSqInferiors.remove(id); - - beforeGetDistanceSqHookTypes.remove(id); - overrideGetDistanceSqHookTypes.remove(id); - afterGetDistanceSqHookTypes.remove(id); - - allBaseBeforeGetDistanceSqToEntitySuperiors.remove(id); - allBaseBeforeGetDistanceSqToEntityInferiors.remove(id); - allBaseOverrideGetDistanceSqToEntitySuperiors.remove(id); - allBaseOverrideGetDistanceSqToEntityInferiors.remove(id); - allBaseAfterGetDistanceSqToEntitySuperiors.remove(id); - allBaseAfterGetDistanceSqToEntityInferiors.remove(id); - - beforeGetDistanceSqToEntityHookTypes.remove(id); - overrideGetDistanceSqToEntityHookTypes.remove(id); - afterGetDistanceSqToEntityHookTypes.remove(id); - - allBaseBeforeGetFOVMultiplierSuperiors.remove(id); - allBaseBeforeGetFOVMultiplierInferiors.remove(id); - allBaseOverrideGetFOVMultiplierSuperiors.remove(id); - allBaseOverrideGetFOVMultiplierInferiors.remove(id); - allBaseAfterGetFOVMultiplierSuperiors.remove(id); - allBaseAfterGetFOVMultiplierInferiors.remove(id); - - beforeGetFOVMultiplierHookTypes.remove(id); - overrideGetFOVMultiplierHookTypes.remove(id); - afterGetFOVMultiplierHookTypes.remove(id); - - allBaseBeforeGetHurtSoundSuperiors.remove(id); - allBaseBeforeGetHurtSoundInferiors.remove(id); - allBaseOverrideGetHurtSoundSuperiors.remove(id); - allBaseOverrideGetHurtSoundInferiors.remove(id); - allBaseAfterGetHurtSoundSuperiors.remove(id); - allBaseAfterGetHurtSoundInferiors.remove(id); - - beforeGetHurtSoundHookTypes.remove(id); - overrideGetHurtSoundHookTypes.remove(id); - afterGetHurtSoundHookTypes.remove(id); - - allBaseBeforeGetItemIconSuperiors.remove(id); - allBaseBeforeGetItemIconInferiors.remove(id); - allBaseOverrideGetItemIconSuperiors.remove(id); - allBaseOverrideGetItemIconInferiors.remove(id); - allBaseAfterGetItemIconSuperiors.remove(id); - allBaseAfterGetItemIconInferiors.remove(id); - - beforeGetItemIconHookTypes.remove(id); - overrideGetItemIconHookTypes.remove(id); - afterGetItemIconHookTypes.remove(id); - - allBaseBeforeGetSleepTimerSuperiors.remove(id); - allBaseBeforeGetSleepTimerInferiors.remove(id); - allBaseOverrideGetSleepTimerSuperiors.remove(id); - allBaseOverrideGetSleepTimerInferiors.remove(id); - allBaseAfterGetSleepTimerSuperiors.remove(id); - allBaseAfterGetSleepTimerInferiors.remove(id); - - beforeGetSleepTimerHookTypes.remove(id); - overrideGetSleepTimerHookTypes.remove(id); - afterGetSleepTimerHookTypes.remove(id); - - allBaseBeforeHandleLavaMovementSuperiors.remove(id); - allBaseBeforeHandleLavaMovementInferiors.remove(id); - allBaseOverrideHandleLavaMovementSuperiors.remove(id); - allBaseOverrideHandleLavaMovementInferiors.remove(id); - allBaseAfterHandleLavaMovementSuperiors.remove(id); - allBaseAfterHandleLavaMovementInferiors.remove(id); - - beforeHandleLavaMovementHookTypes.remove(id); - overrideHandleLavaMovementHookTypes.remove(id); - afterHandleLavaMovementHookTypes.remove(id); - - allBaseBeforeHandleWaterMovementSuperiors.remove(id); - allBaseBeforeHandleWaterMovementInferiors.remove(id); - allBaseOverrideHandleWaterMovementSuperiors.remove(id); - allBaseOverrideHandleWaterMovementInferiors.remove(id); - allBaseAfterHandleWaterMovementSuperiors.remove(id); - allBaseAfterHandleWaterMovementInferiors.remove(id); - - beforeHandleWaterMovementHookTypes.remove(id); - overrideHandleWaterMovementHookTypes.remove(id); - afterHandleWaterMovementHookTypes.remove(id); - - allBaseBeforeHealSuperiors.remove(id); - allBaseBeforeHealInferiors.remove(id); - allBaseOverrideHealSuperiors.remove(id); - allBaseOverrideHealInferiors.remove(id); - allBaseAfterHealSuperiors.remove(id); - allBaseAfterHealInferiors.remove(id); - - beforeHealHookTypes.remove(id); - overrideHealHookTypes.remove(id); - afterHealHookTypes.remove(id); - - allBaseBeforeIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseBeforeIsEntityInsideOpaqueBlockInferiors.remove(id); - allBaseOverrideIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseOverrideIsEntityInsideOpaqueBlockInferiors.remove(id); - allBaseAfterIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseAfterIsEntityInsideOpaqueBlockInferiors.remove(id); - - beforeIsEntityInsideOpaqueBlockHookTypes.remove(id); - overrideIsEntityInsideOpaqueBlockHookTypes.remove(id); - afterIsEntityInsideOpaqueBlockHookTypes.remove(id); - - allBaseBeforeIsInWaterSuperiors.remove(id); - allBaseBeforeIsInWaterInferiors.remove(id); - allBaseOverrideIsInWaterSuperiors.remove(id); - allBaseOverrideIsInWaterInferiors.remove(id); - allBaseAfterIsInWaterSuperiors.remove(id); - allBaseAfterIsInWaterInferiors.remove(id); - - beforeIsInWaterHookTypes.remove(id); - overrideIsInWaterHookTypes.remove(id); - afterIsInWaterHookTypes.remove(id); - - allBaseBeforeIsInsideOfMaterialSuperiors.remove(id); - allBaseBeforeIsInsideOfMaterialInferiors.remove(id); - allBaseOverrideIsInsideOfMaterialSuperiors.remove(id); - allBaseOverrideIsInsideOfMaterialInferiors.remove(id); - allBaseAfterIsInsideOfMaterialSuperiors.remove(id); - allBaseAfterIsInsideOfMaterialInferiors.remove(id); - - beforeIsInsideOfMaterialHookTypes.remove(id); - overrideIsInsideOfMaterialHookTypes.remove(id); - afterIsInsideOfMaterialHookTypes.remove(id); - - allBaseBeforeIsOnLadderSuperiors.remove(id); - allBaseBeforeIsOnLadderInferiors.remove(id); - allBaseOverrideIsOnLadderSuperiors.remove(id); - allBaseOverrideIsOnLadderInferiors.remove(id); - allBaseAfterIsOnLadderSuperiors.remove(id); - allBaseAfterIsOnLadderInferiors.remove(id); - - beforeIsOnLadderHookTypes.remove(id); - overrideIsOnLadderHookTypes.remove(id); - afterIsOnLadderHookTypes.remove(id); - - allBaseBeforeIsPlayerSleepingSuperiors.remove(id); - allBaseBeforeIsPlayerSleepingInferiors.remove(id); - allBaseOverrideIsPlayerSleepingSuperiors.remove(id); - allBaseOverrideIsPlayerSleepingInferiors.remove(id); - allBaseAfterIsPlayerSleepingSuperiors.remove(id); - allBaseAfterIsPlayerSleepingInferiors.remove(id); - - beforeIsPlayerSleepingHookTypes.remove(id); - overrideIsPlayerSleepingHookTypes.remove(id); - afterIsPlayerSleepingHookTypes.remove(id); - - allBaseBeforeIsSneakingSuperiors.remove(id); - allBaseBeforeIsSneakingInferiors.remove(id); - allBaseOverrideIsSneakingSuperiors.remove(id); - allBaseOverrideIsSneakingInferiors.remove(id); - allBaseAfterIsSneakingSuperiors.remove(id); - allBaseAfterIsSneakingInferiors.remove(id); - - beforeIsSneakingHookTypes.remove(id); - overrideIsSneakingHookTypes.remove(id); - afterIsSneakingHookTypes.remove(id); - - allBaseBeforeIsSprintingSuperiors.remove(id); - allBaseBeforeIsSprintingInferiors.remove(id); - allBaseOverrideIsSprintingSuperiors.remove(id); - allBaseOverrideIsSprintingInferiors.remove(id); - allBaseAfterIsSprintingSuperiors.remove(id); - allBaseAfterIsSprintingInferiors.remove(id); - - beforeIsSprintingHookTypes.remove(id); - overrideIsSprintingHookTypes.remove(id); - afterIsSprintingHookTypes.remove(id); - - allBaseBeforeJumpSuperiors.remove(id); - allBaseBeforeJumpInferiors.remove(id); - allBaseOverrideJumpSuperiors.remove(id); - allBaseOverrideJumpInferiors.remove(id); - allBaseAfterJumpSuperiors.remove(id); - allBaseAfterJumpInferiors.remove(id); - - beforeJumpHookTypes.remove(id); - overrideJumpHookTypes.remove(id); - afterJumpHookTypes.remove(id); - - allBaseBeforeKnockBackSuperiors.remove(id); - allBaseBeforeKnockBackInferiors.remove(id); - allBaseOverrideKnockBackSuperiors.remove(id); - allBaseOverrideKnockBackInferiors.remove(id); - allBaseAfterKnockBackSuperiors.remove(id); - allBaseAfterKnockBackInferiors.remove(id); - - beforeKnockBackHookTypes.remove(id); - overrideKnockBackHookTypes.remove(id); - afterKnockBackHookTypes.remove(id); - - allBaseBeforeMoveEntitySuperiors.remove(id); - allBaseBeforeMoveEntityInferiors.remove(id); - allBaseOverrideMoveEntitySuperiors.remove(id); - allBaseOverrideMoveEntityInferiors.remove(id); - allBaseAfterMoveEntitySuperiors.remove(id); - allBaseAfterMoveEntityInferiors.remove(id); - - beforeMoveEntityHookTypes.remove(id); - overrideMoveEntityHookTypes.remove(id); - afterMoveEntityHookTypes.remove(id); - - allBaseBeforeMoveEntityWithHeadingSuperiors.remove(id); - allBaseBeforeMoveEntityWithHeadingInferiors.remove(id); - allBaseOverrideMoveEntityWithHeadingSuperiors.remove(id); - allBaseOverrideMoveEntityWithHeadingInferiors.remove(id); - allBaseAfterMoveEntityWithHeadingSuperiors.remove(id); - allBaseAfterMoveEntityWithHeadingInferiors.remove(id); - - beforeMoveEntityWithHeadingHookTypes.remove(id); - overrideMoveEntityWithHeadingHookTypes.remove(id); - afterMoveEntityWithHeadingHookTypes.remove(id); - - allBaseBeforeMoveFlyingSuperiors.remove(id); - allBaseBeforeMoveFlyingInferiors.remove(id); - allBaseOverrideMoveFlyingSuperiors.remove(id); - allBaseOverrideMoveFlyingInferiors.remove(id); - allBaseAfterMoveFlyingSuperiors.remove(id); - allBaseAfterMoveFlyingInferiors.remove(id); - - beforeMoveFlyingHookTypes.remove(id); - overrideMoveFlyingHookTypes.remove(id); - afterMoveFlyingHookTypes.remove(id); - - allBaseBeforeOnDeathSuperiors.remove(id); - allBaseBeforeOnDeathInferiors.remove(id); - allBaseOverrideOnDeathSuperiors.remove(id); - allBaseOverrideOnDeathInferiors.remove(id); - allBaseAfterOnDeathSuperiors.remove(id); - allBaseAfterOnDeathInferiors.remove(id); - - beforeOnDeathHookTypes.remove(id); - overrideOnDeathHookTypes.remove(id); - afterOnDeathHookTypes.remove(id); - - allBaseBeforeOnLivingUpdateSuperiors.remove(id); - allBaseBeforeOnLivingUpdateInferiors.remove(id); - allBaseOverrideOnLivingUpdateSuperiors.remove(id); - allBaseOverrideOnLivingUpdateInferiors.remove(id); - allBaseAfterOnLivingUpdateSuperiors.remove(id); - allBaseAfterOnLivingUpdateInferiors.remove(id); - - beforeOnLivingUpdateHookTypes.remove(id); - overrideOnLivingUpdateHookTypes.remove(id); - afterOnLivingUpdateHookTypes.remove(id); - - allBaseBeforeOnKillEntitySuperiors.remove(id); - allBaseBeforeOnKillEntityInferiors.remove(id); - allBaseOverrideOnKillEntitySuperiors.remove(id); - allBaseOverrideOnKillEntityInferiors.remove(id); - allBaseAfterOnKillEntitySuperiors.remove(id); - allBaseAfterOnKillEntityInferiors.remove(id); - - beforeOnKillEntityHookTypes.remove(id); - overrideOnKillEntityHookTypes.remove(id); - afterOnKillEntityHookTypes.remove(id); - - allBaseBeforeOnStruckByLightningSuperiors.remove(id); - allBaseBeforeOnStruckByLightningInferiors.remove(id); - allBaseOverrideOnStruckByLightningSuperiors.remove(id); - allBaseOverrideOnStruckByLightningInferiors.remove(id); - allBaseAfterOnStruckByLightningSuperiors.remove(id); - allBaseAfterOnStruckByLightningInferiors.remove(id); - - beforeOnStruckByLightningHookTypes.remove(id); - overrideOnStruckByLightningHookTypes.remove(id); - afterOnStruckByLightningHookTypes.remove(id); - - allBaseBeforeOnUpdateSuperiors.remove(id); - allBaseBeforeOnUpdateInferiors.remove(id); - allBaseOverrideOnUpdateSuperiors.remove(id); - allBaseOverrideOnUpdateInferiors.remove(id); - allBaseAfterOnUpdateSuperiors.remove(id); - allBaseAfterOnUpdateInferiors.remove(id); - - beforeOnUpdateHookTypes.remove(id); - overrideOnUpdateHookTypes.remove(id); - afterOnUpdateHookTypes.remove(id); - - allBaseBeforePlayStepSoundSuperiors.remove(id); - allBaseBeforePlayStepSoundInferiors.remove(id); - allBaseOverridePlayStepSoundSuperiors.remove(id); - allBaseOverridePlayStepSoundInferiors.remove(id); - allBaseAfterPlayStepSoundSuperiors.remove(id); - allBaseAfterPlayStepSoundInferiors.remove(id); - - beforePlayStepSoundHookTypes.remove(id); - overridePlayStepSoundHookTypes.remove(id); - afterPlayStepSoundHookTypes.remove(id); - - allBaseBeforePushOutOfBlocksSuperiors.remove(id); - allBaseBeforePushOutOfBlocksInferiors.remove(id); - allBaseOverridePushOutOfBlocksSuperiors.remove(id); - allBaseOverridePushOutOfBlocksInferiors.remove(id); - allBaseAfterPushOutOfBlocksSuperiors.remove(id); - allBaseAfterPushOutOfBlocksInferiors.remove(id); - - beforePushOutOfBlocksHookTypes.remove(id); - overridePushOutOfBlocksHookTypes.remove(id); - afterPushOutOfBlocksHookTypes.remove(id); - - allBaseBeforeRayTraceSuperiors.remove(id); - allBaseBeforeRayTraceInferiors.remove(id); - allBaseOverrideRayTraceSuperiors.remove(id); - allBaseOverrideRayTraceInferiors.remove(id); - allBaseAfterRayTraceSuperiors.remove(id); - allBaseAfterRayTraceInferiors.remove(id); - - beforeRayTraceHookTypes.remove(id); - overrideRayTraceHookTypes.remove(id); - afterRayTraceHookTypes.remove(id); - - allBaseBeforeReadEntityFromNBTSuperiors.remove(id); - allBaseBeforeReadEntityFromNBTInferiors.remove(id); - allBaseOverrideReadEntityFromNBTSuperiors.remove(id); - allBaseOverrideReadEntityFromNBTInferiors.remove(id); - allBaseAfterReadEntityFromNBTSuperiors.remove(id); - allBaseAfterReadEntityFromNBTInferiors.remove(id); - - beforeReadEntityFromNBTHookTypes.remove(id); - overrideReadEntityFromNBTHookTypes.remove(id); - afterReadEntityFromNBTHookTypes.remove(id); - - allBaseBeforeRespawnPlayerSuperiors.remove(id); - allBaseBeforeRespawnPlayerInferiors.remove(id); - allBaseOverrideRespawnPlayerSuperiors.remove(id); - allBaseOverrideRespawnPlayerInferiors.remove(id); - allBaseAfterRespawnPlayerSuperiors.remove(id); - allBaseAfterRespawnPlayerInferiors.remove(id); - - beforeRespawnPlayerHookTypes.remove(id); - overrideRespawnPlayerHookTypes.remove(id); - afterRespawnPlayerHookTypes.remove(id); - - allBaseBeforeSetDeadSuperiors.remove(id); - allBaseBeforeSetDeadInferiors.remove(id); - allBaseOverrideSetDeadSuperiors.remove(id); - allBaseOverrideSetDeadInferiors.remove(id); - allBaseAfterSetDeadSuperiors.remove(id); - allBaseAfterSetDeadInferiors.remove(id); - - beforeSetDeadHookTypes.remove(id); - overrideSetDeadHookTypes.remove(id); - afterSetDeadHookTypes.remove(id); - - allBaseBeforeSetPlayerSPHealthSuperiors.remove(id); - allBaseBeforeSetPlayerSPHealthInferiors.remove(id); - allBaseOverrideSetPlayerSPHealthSuperiors.remove(id); - allBaseOverrideSetPlayerSPHealthInferiors.remove(id); - allBaseAfterSetPlayerSPHealthSuperiors.remove(id); - allBaseAfterSetPlayerSPHealthInferiors.remove(id); - - beforeSetPlayerSPHealthHookTypes.remove(id); - overrideSetPlayerSPHealthHookTypes.remove(id); - afterSetPlayerSPHealthHookTypes.remove(id); - - allBaseBeforeSetPositionAndRotationSuperiors.remove(id); - allBaseBeforeSetPositionAndRotationInferiors.remove(id); - allBaseOverrideSetPositionAndRotationSuperiors.remove(id); - allBaseOverrideSetPositionAndRotationInferiors.remove(id); - allBaseAfterSetPositionAndRotationSuperiors.remove(id); - allBaseAfterSetPositionAndRotationInferiors.remove(id); - - beforeSetPositionAndRotationHookTypes.remove(id); - overrideSetPositionAndRotationHookTypes.remove(id); - afterSetPositionAndRotationHookTypes.remove(id); - - allBaseBeforeSetSneakingSuperiors.remove(id); - allBaseBeforeSetSneakingInferiors.remove(id); - allBaseOverrideSetSneakingSuperiors.remove(id); - allBaseOverrideSetSneakingInferiors.remove(id); - allBaseAfterSetSneakingSuperiors.remove(id); - allBaseAfterSetSneakingInferiors.remove(id); - - beforeSetSneakingHookTypes.remove(id); - overrideSetSneakingHookTypes.remove(id); - afterSetSneakingHookTypes.remove(id); - - allBaseBeforeSetSprintingSuperiors.remove(id); - allBaseBeforeSetSprintingInferiors.remove(id); - allBaseOverrideSetSprintingSuperiors.remove(id); - allBaseOverrideSetSprintingInferiors.remove(id); - allBaseAfterSetSprintingSuperiors.remove(id); - allBaseAfterSetSprintingInferiors.remove(id); - - beforeSetSprintingHookTypes.remove(id); - overrideSetSprintingHookTypes.remove(id); - afterSetSprintingHookTypes.remove(id); - - allBaseBeforeSleepInBedAtSuperiors.remove(id); - allBaseBeforeSleepInBedAtInferiors.remove(id); - allBaseOverrideSleepInBedAtSuperiors.remove(id); - allBaseOverrideSleepInBedAtInferiors.remove(id); - allBaseAfterSleepInBedAtSuperiors.remove(id); - allBaseAfterSleepInBedAtInferiors.remove(id); - - beforeSleepInBedAtHookTypes.remove(id); - overrideSleepInBedAtHookTypes.remove(id); - afterSleepInBedAtHookTypes.remove(id); - - allBaseBeforeSwingItemSuperiors.remove(id); - allBaseBeforeSwingItemInferiors.remove(id); - allBaseOverrideSwingItemSuperiors.remove(id); - allBaseOverrideSwingItemInferiors.remove(id); - allBaseAfterSwingItemSuperiors.remove(id); - allBaseAfterSwingItemInferiors.remove(id); - - beforeSwingItemHookTypes.remove(id); - overrideSwingItemHookTypes.remove(id); - afterSwingItemHookTypes.remove(id); - - allBaseBeforeUpdateEntityActionStateSuperiors.remove(id); - allBaseBeforeUpdateEntityActionStateInferiors.remove(id); - allBaseOverrideUpdateEntityActionStateSuperiors.remove(id); - allBaseOverrideUpdateEntityActionStateInferiors.remove(id); - allBaseAfterUpdateEntityActionStateSuperiors.remove(id); - allBaseAfterUpdateEntityActionStateInferiors.remove(id); - - beforeUpdateEntityActionStateHookTypes.remove(id); - overrideUpdateEntityActionStateHookTypes.remove(id); - afterUpdateEntityActionStateHookTypes.remove(id); - - allBaseBeforeUpdateRiddenSuperiors.remove(id); - allBaseBeforeUpdateRiddenInferiors.remove(id); - allBaseOverrideUpdateRiddenSuperiors.remove(id); - allBaseOverrideUpdateRiddenInferiors.remove(id); - allBaseAfterUpdateRiddenSuperiors.remove(id); - allBaseAfterUpdateRiddenInferiors.remove(id); - - beforeUpdateRiddenHookTypes.remove(id); - overrideUpdateRiddenHookTypes.remove(id); - afterUpdateRiddenHookTypes.remove(id); - - allBaseBeforeWakeUpPlayerSuperiors.remove(id); - allBaseBeforeWakeUpPlayerInferiors.remove(id); - allBaseOverrideWakeUpPlayerSuperiors.remove(id); - allBaseOverrideWakeUpPlayerInferiors.remove(id); - allBaseAfterWakeUpPlayerSuperiors.remove(id); - allBaseAfterWakeUpPlayerInferiors.remove(id); - - beforeWakeUpPlayerHookTypes.remove(id); - overrideWakeUpPlayerHookTypes.remove(id); - afterWakeUpPlayerHookTypes.remove(id); - - allBaseBeforeWriteEntityToNBTSuperiors.remove(id); - allBaseBeforeWriteEntityToNBTInferiors.remove(id); - allBaseOverrideWriteEntityToNBTSuperiors.remove(id); - allBaseOverrideWriteEntityToNBTInferiors.remove(id); - allBaseAfterWriteEntityToNBTSuperiors.remove(id); - allBaseAfterWriteEntityToNBTInferiors.remove(id); - - beforeWriteEntityToNBTHookTypes.remove(id); - overrideWriteEntityToNBTHookTypes.remove(id); - afterWriteEntityToNBTHookTypes.remove(id); - - for(IClientPlayerAPI instance : getAllInstancesList()) - instance.getClientPlayerAPI().updateClientPlayerBases(); - - Iterator iterator = keysToVirtualIds.keySet().iterator(); - while(iterator.hasNext()) - { - String key = iterator.next(); - if(keysToVirtualIds.get(key).equals(id)) - keysToVirtualIds.remove(key); - } - - boolean otherFound = false; - Class type = constructor.getDeclaringClass(); - - iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String otherId = iterator.next(); - Class otherType = allBaseConstructors.get(otherId).getDeclaringClass(); - if(!otherId.equals(id) && otherType.equals(type)) - { - otherFound = true; - break; - } - } - - if(!otherFound) - { - dynamicTypes.remove(type); - - virtualDynamicHookMethods.remove(type); - - beforeDynamicHookMethods.remove(type); - overrideDynamicHookMethods.remove(type); - afterDynamicHookMethods.remove(type); - } - - removeDynamicHookTypes(id, beforeDynamicHookTypes); - removeDynamicHookTypes(id, overrideDynamicHookTypes); - removeDynamicHookTypes(id, afterDynamicHookTypes); - - allBaseBeforeDynamicSuperiors.remove(id); - allBaseBeforeDynamicInferiors.remove(id); - allBaseOverrideDynamicSuperiors.remove(id); - allBaseOverrideDynamicInferiors.remove(id); - allBaseAfterDynamicSuperiors.remove(id); - allBaseAfterDynamicInferiors.remove(id); - - log("ClientPlayerAPI: unregistered id '" + id + "'"); - - return true; - } - - public static void removeDynamicHookTypes(String id, Map> map) - { - Iterator keys = map.keySet().iterator(); - while(keys.hasNext()) - map.get(keys.next()).remove(id); - } - - public static Set getRegisteredIds() - { - return unmodifiableAllIds; - } - - private static void addSorting(String id, Map map, String[] values) - { - if(values != null && values.length > 0) - map.put(id, values); - } - - private static void addDynamicSorting(String id, Map> map, Map values) - { - if(values != null && values.size() > 0) - map.put(id, values); - } - - private static boolean addMethod(String id, Class baseClass, List list, String methodName, Class... _parameterTypes) - { - try - { - Method method = baseClass.getMethod(methodName, _parameterTypes); - boolean isOverridden = method.getDeclaringClass() != ClientPlayerBase.class; - if(isOverridden) - list.add(id); - return isOverridden; - } - catch(Exception e) - { - throw new RuntimeException("Can not reflect method '" + methodName + "' of class '" + baseClass.getName() + "'", e); - } - } - - private static void addDynamicMethods(String id, Class baseClass) - { - if(!dynamicTypes.add(baseClass)) - return; - - Map virtuals = null; - Map befores = null; - Map overrides = null; - Map afters = null; - - Method[] methods = baseClass.getDeclaredMethods(); - for(int i=0; i= 8 && name.substring(0, 8).equalsIgnoreCase("override")) - { - name = name.substring(8); - override = true; - } - else if(name.length() >= 6 && name.substring(0, 6).equalsIgnoreCase("before")) - { - before = true; - name = name.substring(6); - } - else if(name.length() >= 5 && name.substring(0, 5).equalsIgnoreCase("after")) - { - after = true; - name = name.substring(5); - } - } - - if(name.length() >= 1 && (before || virtual || override || after)) - name = name.substring(0,1).toLowerCase() + name.substring(1); - - while(name.charAt(0) == '_') - name = name.substring(1); - - if(name.length() == 0) - throw new RuntimeException("Can not process dynamic hook method with no key"); - - keys.add(name); - - if(virtual) - { - if(keysToVirtualIds.containsKey(name)) - throw new RuntimeException("Can not process more than one dynamic virtual method"); - - keysToVirtualIds.put(name, id); - virtuals = addDynamicMethod(name, method, virtuals); - } - else if(before) - befores = addDynamicMethod(name, method, befores); - else if(after) - afters = addDynamicMethod(name, method, afters); - else - overrides = addDynamicMethod(name, method, overrides); - } - - if(virtuals != null) - virtualDynamicHookMethods.put(baseClass, virtuals); - if(befores != null) - beforeDynamicHookMethods.put(baseClass, befores); - if(overrides != null) - overrideDynamicHookMethods.put(baseClass, overrides); - if(afters != null) - afterDynamicHookMethods.put(baseClass, afters); - } - - private static void addDynamicKeys(String id, Class baseClass, Map, Map> dynamicHookMethods, Map> dynamicHookTypes) - { - Map methods = dynamicHookMethods.get(baseClass); - if(methods == null || methods.size() == 0) - return; - - Iterator keys = methods.keySet().iterator(); - while(keys.hasNext()) - { - String key = keys.next(); - if(!dynamicHookTypes.containsKey(key)) - dynamicHookTypes.put(key, new ArrayList(1)); - dynamicHookTypes.get(key).add(id); - } - } - - private static Map addDynamicMethod(String key, Method method, Map methods) - { - if(methods == null) - methods = new HashMap(); - if(methods.containsKey(key)) - throw new RuntimeException("method with key '" + key + "' allready exists"); - methods.put(key, method); - return methods; - } - - public static ClientPlayerAPI create(IClientPlayerAPI clientPlayer) - { - if(allBaseConstructors.size() > 0 && !initialized) - initialize(); - return new ClientPlayerAPI(clientPlayer); - } - - private static void initialize() - { - sortBases(beforeLocalConstructingHookTypes, allBaseBeforeLocalConstructingSuperiors, allBaseBeforeLocalConstructingInferiors, "beforeLocalConstructing"); - sortBases(afterLocalConstructingHookTypes, allBaseAfterLocalConstructingSuperiors, allBaseAfterLocalConstructingInferiors, "afterLocalConstructing"); - - Iterator keyIterator = keys.iterator(); - while(keyIterator.hasNext()) - { - String key = keyIterator.next(); - sortDynamicBases(beforeDynamicHookTypes, allBaseBeforeDynamicSuperiors, allBaseBeforeDynamicInferiors, key); - sortDynamicBases(overrideDynamicHookTypes, allBaseOverrideDynamicSuperiors, allBaseOverrideDynamicInferiors, key); - sortDynamicBases(afterDynamicHookTypes, allBaseAfterDynamicSuperiors, allBaseAfterDynamicInferiors, key); - } - - sortBases(beforeAddExhaustionHookTypes, allBaseBeforeAddExhaustionSuperiors, allBaseBeforeAddExhaustionInferiors, "beforeAddExhaustion"); - sortBases(overrideAddExhaustionHookTypes, allBaseOverrideAddExhaustionSuperiors, allBaseOverrideAddExhaustionInferiors, "overrideAddExhaustion"); - sortBases(afterAddExhaustionHookTypes, allBaseAfterAddExhaustionSuperiors, allBaseAfterAddExhaustionInferiors, "afterAddExhaustion"); - - sortBases(beforeAddMovementStatHookTypes, allBaseBeforeAddMovementStatSuperiors, allBaseBeforeAddMovementStatInferiors, "beforeAddMovementStat"); - sortBases(overrideAddMovementStatHookTypes, allBaseOverrideAddMovementStatSuperiors, allBaseOverrideAddMovementStatInferiors, "overrideAddMovementStat"); - sortBases(afterAddMovementStatHookTypes, allBaseAfterAddMovementStatSuperiors, allBaseAfterAddMovementStatInferiors, "afterAddMovementStat"); - - sortBases(beforeAddStatHookTypes, allBaseBeforeAddStatSuperiors, allBaseBeforeAddStatInferiors, "beforeAddStat"); - sortBases(overrideAddStatHookTypes, allBaseOverrideAddStatSuperiors, allBaseOverrideAddStatInferiors, "overrideAddStat"); - sortBases(afterAddStatHookTypes, allBaseAfterAddStatSuperiors, allBaseAfterAddStatInferiors, "afterAddStat"); - - sortBases(beforeAttackEntityFromHookTypes, allBaseBeforeAttackEntityFromSuperiors, allBaseBeforeAttackEntityFromInferiors, "beforeAttackEntityFrom"); - sortBases(overrideAttackEntityFromHookTypes, allBaseOverrideAttackEntityFromSuperiors, allBaseOverrideAttackEntityFromInferiors, "overrideAttackEntityFrom"); - sortBases(afterAttackEntityFromHookTypes, allBaseAfterAttackEntityFromSuperiors, allBaseAfterAttackEntityFromInferiors, "afterAttackEntityFrom"); - - sortBases(beforeAttackTargetEntityWithCurrentItemHookTypes, allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors, allBaseBeforeAttackTargetEntityWithCurrentItemInferiors, "beforeAttackTargetEntityWithCurrentItem"); - sortBases(overrideAttackTargetEntityWithCurrentItemHookTypes, allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors, allBaseOverrideAttackTargetEntityWithCurrentItemInferiors, "overrideAttackTargetEntityWithCurrentItem"); - sortBases(afterAttackTargetEntityWithCurrentItemHookTypes, allBaseAfterAttackTargetEntityWithCurrentItemSuperiors, allBaseAfterAttackTargetEntityWithCurrentItemInferiors, "afterAttackTargetEntityWithCurrentItem"); - - sortBases(beforeCanBreatheUnderwaterHookTypes, allBaseBeforeCanBreatheUnderwaterSuperiors, allBaseBeforeCanBreatheUnderwaterInferiors, "beforeCanBreatheUnderwater"); - sortBases(overrideCanBreatheUnderwaterHookTypes, allBaseOverrideCanBreatheUnderwaterSuperiors, allBaseOverrideCanBreatheUnderwaterInferiors, "overrideCanBreatheUnderwater"); - sortBases(afterCanBreatheUnderwaterHookTypes, allBaseAfterCanBreatheUnderwaterSuperiors, allBaseAfterCanBreatheUnderwaterInferiors, "afterCanBreatheUnderwater"); - - sortBases(beforeCanHarvestBlockHookTypes, allBaseBeforeCanHarvestBlockSuperiors, allBaseBeforeCanHarvestBlockInferiors, "beforeCanHarvestBlock"); - sortBases(overrideCanHarvestBlockHookTypes, allBaseOverrideCanHarvestBlockSuperiors, allBaseOverrideCanHarvestBlockInferiors, "overrideCanHarvestBlock"); - sortBases(afterCanHarvestBlockHookTypes, allBaseAfterCanHarvestBlockSuperiors, allBaseAfterCanHarvestBlockInferiors, "afterCanHarvestBlock"); - - sortBases(beforeCanPlayerEditHookTypes, allBaseBeforeCanPlayerEditSuperiors, allBaseBeforeCanPlayerEditInferiors, "beforeCanPlayerEdit"); - sortBases(overrideCanPlayerEditHookTypes, allBaseOverrideCanPlayerEditSuperiors, allBaseOverrideCanPlayerEditInferiors, "overrideCanPlayerEdit"); - sortBases(afterCanPlayerEditHookTypes, allBaseAfterCanPlayerEditSuperiors, allBaseAfterCanPlayerEditInferiors, "afterCanPlayerEdit"); - - sortBases(beforeCanTriggerWalkingHookTypes, allBaseBeforeCanTriggerWalkingSuperiors, allBaseBeforeCanTriggerWalkingInferiors, "beforeCanTriggerWalking"); - sortBases(overrideCanTriggerWalkingHookTypes, allBaseOverrideCanTriggerWalkingSuperiors, allBaseOverrideCanTriggerWalkingInferiors, "overrideCanTriggerWalking"); - sortBases(afterCanTriggerWalkingHookTypes, allBaseAfterCanTriggerWalkingSuperiors, allBaseAfterCanTriggerWalkingInferiors, "afterCanTriggerWalking"); - - sortBases(beforeCloseScreenHookTypes, allBaseBeforeCloseScreenSuperiors, allBaseBeforeCloseScreenInferiors, "beforeCloseScreen"); - sortBases(overrideCloseScreenHookTypes, allBaseOverrideCloseScreenSuperiors, allBaseOverrideCloseScreenInferiors, "overrideCloseScreen"); - sortBases(afterCloseScreenHookTypes, allBaseAfterCloseScreenSuperiors, allBaseAfterCloseScreenInferiors, "afterCloseScreen"); - - sortBases(beforeDamageEntityHookTypes, allBaseBeforeDamageEntitySuperiors, allBaseBeforeDamageEntityInferiors, "beforeDamageEntity"); - sortBases(overrideDamageEntityHookTypes, allBaseOverrideDamageEntitySuperiors, allBaseOverrideDamageEntityInferiors, "overrideDamageEntity"); - sortBases(afterDamageEntityHookTypes, allBaseAfterDamageEntitySuperiors, allBaseAfterDamageEntityInferiors, "afterDamageEntity"); - - sortBases(beforeDisplayGUIBrewingStandHookTypes, allBaseBeforeDisplayGUIBrewingStandSuperiors, allBaseBeforeDisplayGUIBrewingStandInferiors, "beforeDisplayGUIBrewingStand"); - sortBases(overrideDisplayGUIBrewingStandHookTypes, allBaseOverrideDisplayGUIBrewingStandSuperiors, allBaseOverrideDisplayGUIBrewingStandInferiors, "overrideDisplayGUIBrewingStand"); - sortBases(afterDisplayGUIBrewingStandHookTypes, allBaseAfterDisplayGUIBrewingStandSuperiors, allBaseAfterDisplayGUIBrewingStandInferiors, "afterDisplayGUIBrewingStand"); - - sortBases(beforeDisplayGUIChestHookTypes, allBaseBeforeDisplayGUIChestSuperiors, allBaseBeforeDisplayGUIChestInferiors, "beforeDisplayGUIChest"); - sortBases(overrideDisplayGUIChestHookTypes, allBaseOverrideDisplayGUIChestSuperiors, allBaseOverrideDisplayGUIChestInferiors, "overrideDisplayGUIChest"); - sortBases(afterDisplayGUIChestHookTypes, allBaseAfterDisplayGUIChestSuperiors, allBaseAfterDisplayGUIChestInferiors, "afterDisplayGUIChest"); - - sortBases(beforeDisplayGUIDispenserHookTypes, allBaseBeforeDisplayGUIDispenserSuperiors, allBaseBeforeDisplayGUIDispenserInferiors, "beforeDisplayGUIDispenser"); - sortBases(overrideDisplayGUIDispenserHookTypes, allBaseOverrideDisplayGUIDispenserSuperiors, allBaseOverrideDisplayGUIDispenserInferiors, "overrideDisplayGUIDispenser"); - sortBases(afterDisplayGUIDispenserHookTypes, allBaseAfterDisplayGUIDispenserSuperiors, allBaseAfterDisplayGUIDispenserInferiors, "afterDisplayGUIDispenser"); - - sortBases(beforeDisplayGUIEditSignHookTypes, allBaseBeforeDisplayGUIEditSignSuperiors, allBaseBeforeDisplayGUIEditSignInferiors, "beforeDisplayGUIEditSign"); - sortBases(overrideDisplayGUIEditSignHookTypes, allBaseOverrideDisplayGUIEditSignSuperiors, allBaseOverrideDisplayGUIEditSignInferiors, "overrideDisplayGUIEditSign"); - sortBases(afterDisplayGUIEditSignHookTypes, allBaseAfterDisplayGUIEditSignSuperiors, allBaseAfterDisplayGUIEditSignInferiors, "afterDisplayGUIEditSign"); - - sortBases(beforeDisplayGUIEnchantmentHookTypes, allBaseBeforeDisplayGUIEnchantmentSuperiors, allBaseBeforeDisplayGUIEnchantmentInferiors, "beforeDisplayGUIEnchantment"); - sortBases(overrideDisplayGUIEnchantmentHookTypes, allBaseOverrideDisplayGUIEnchantmentSuperiors, allBaseOverrideDisplayGUIEnchantmentInferiors, "overrideDisplayGUIEnchantment"); - sortBases(afterDisplayGUIEnchantmentHookTypes, allBaseAfterDisplayGUIEnchantmentSuperiors, allBaseAfterDisplayGUIEnchantmentInferiors, "afterDisplayGUIEnchantment"); - - sortBases(beforeDisplayGUIFurnaceHookTypes, allBaseBeforeDisplayGUIFurnaceSuperiors, allBaseBeforeDisplayGUIFurnaceInferiors, "beforeDisplayGUIFurnace"); - sortBases(overrideDisplayGUIFurnaceHookTypes, allBaseOverrideDisplayGUIFurnaceSuperiors, allBaseOverrideDisplayGUIFurnaceInferiors, "overrideDisplayGUIFurnace"); - sortBases(afterDisplayGUIFurnaceHookTypes, allBaseAfterDisplayGUIFurnaceSuperiors, allBaseAfterDisplayGUIFurnaceInferiors, "afterDisplayGUIFurnace"); - - sortBases(beforeDisplayGUIWorkbenchHookTypes, allBaseBeforeDisplayGUIWorkbenchSuperiors, allBaseBeforeDisplayGUIWorkbenchInferiors, "beforeDisplayGUIWorkbench"); - sortBases(overrideDisplayGUIWorkbenchHookTypes, allBaseOverrideDisplayGUIWorkbenchSuperiors, allBaseOverrideDisplayGUIWorkbenchInferiors, "overrideDisplayGUIWorkbench"); - sortBases(afterDisplayGUIWorkbenchHookTypes, allBaseAfterDisplayGUIWorkbenchSuperiors, allBaseAfterDisplayGUIWorkbenchInferiors, "afterDisplayGUIWorkbench"); - - sortBases(beforeDropOneItemHookTypes, allBaseBeforeDropOneItemSuperiors, allBaseBeforeDropOneItemInferiors, "beforeDropOneItem"); - sortBases(overrideDropOneItemHookTypes, allBaseOverrideDropOneItemSuperiors, allBaseOverrideDropOneItemInferiors, "overrideDropOneItem"); - sortBases(afterDropOneItemHookTypes, allBaseAfterDropOneItemSuperiors, allBaseAfterDropOneItemInferiors, "afterDropOneItem"); - - sortBases(beforeDropPlayerItemHookTypes, allBaseBeforeDropPlayerItemSuperiors, allBaseBeforeDropPlayerItemInferiors, "beforeDropPlayerItem"); - sortBases(overrideDropPlayerItemHookTypes, allBaseOverrideDropPlayerItemSuperiors, allBaseOverrideDropPlayerItemInferiors, "overrideDropPlayerItem"); - sortBases(afterDropPlayerItemHookTypes, allBaseAfterDropPlayerItemSuperiors, allBaseAfterDropPlayerItemInferiors, "afterDropPlayerItem"); - - sortBases(beforeDropPlayerItemWithRandomChoiceHookTypes, allBaseBeforeDropPlayerItemWithRandomChoiceSuperiors, allBaseBeforeDropPlayerItemWithRandomChoiceInferiors, "beforeDropPlayerItemWithRandomChoice"); - sortBases(overrideDropPlayerItemWithRandomChoiceHookTypes, allBaseOverrideDropPlayerItemWithRandomChoiceSuperiors, allBaseOverrideDropPlayerItemWithRandomChoiceInferiors, "overrideDropPlayerItemWithRandomChoice"); - sortBases(afterDropPlayerItemWithRandomChoiceHookTypes, allBaseAfterDropPlayerItemWithRandomChoiceSuperiors, allBaseAfterDropPlayerItemWithRandomChoiceInferiors, "afterDropPlayerItemWithRandomChoice"); - - sortBases(beforeFallHookTypes, allBaseBeforeFallSuperiors, allBaseBeforeFallInferiors, "beforeFall"); - sortBases(overrideFallHookTypes, allBaseOverrideFallSuperiors, allBaseOverrideFallInferiors, "overrideFall"); - sortBases(afterFallHookTypes, allBaseAfterFallSuperiors, allBaseAfterFallInferiors, "afterFall"); - - sortBases(beforeGetAIMoveSpeedHookTypes, allBaseBeforeGetAIMoveSpeedSuperiors, allBaseBeforeGetAIMoveSpeedInferiors, "beforeGetAIMoveSpeed"); - sortBases(overrideGetAIMoveSpeedHookTypes, allBaseOverrideGetAIMoveSpeedSuperiors, allBaseOverrideGetAIMoveSpeedInferiors, "overrideGetAIMoveSpeed"); - sortBases(afterGetAIMoveSpeedHookTypes, allBaseAfterGetAIMoveSpeedSuperiors, allBaseAfterGetAIMoveSpeedInferiors, "afterGetAIMoveSpeed"); - - sortBases(beforeGetBedOrientationInDegreesHookTypes, allBaseBeforeGetBedOrientationInDegreesSuperiors, allBaseBeforeGetBedOrientationInDegreesInferiors, "beforeGetBedOrientationInDegrees"); - sortBases(overrideGetBedOrientationInDegreesHookTypes, allBaseOverrideGetBedOrientationInDegreesSuperiors, allBaseOverrideGetBedOrientationInDegreesInferiors, "overrideGetBedOrientationInDegrees"); - sortBases(afterGetBedOrientationInDegreesHookTypes, allBaseAfterGetBedOrientationInDegreesSuperiors, allBaseAfterGetBedOrientationInDegreesInferiors, "afterGetBedOrientationInDegrees"); - - sortBases(beforeGetBrightnessHookTypes, allBaseBeforeGetBrightnessSuperiors, allBaseBeforeGetBrightnessInferiors, "beforeGetBrightness"); - sortBases(overrideGetBrightnessHookTypes, allBaseOverrideGetBrightnessSuperiors, allBaseOverrideGetBrightnessInferiors, "overrideGetBrightness"); - sortBases(afterGetBrightnessHookTypes, allBaseAfterGetBrightnessSuperiors, allBaseAfterGetBrightnessInferiors, "afterGetBrightness"); - - sortBases(beforeGetBrightnessForRenderHookTypes, allBaseBeforeGetBrightnessForRenderSuperiors, allBaseBeforeGetBrightnessForRenderInferiors, "beforeGetBrightnessForRender"); - sortBases(overrideGetBrightnessForRenderHookTypes, allBaseOverrideGetBrightnessForRenderSuperiors, allBaseOverrideGetBrightnessForRenderInferiors, "overrideGetBrightnessForRender"); - sortBases(afterGetBrightnessForRenderHookTypes, allBaseAfterGetBrightnessForRenderSuperiors, allBaseAfterGetBrightnessForRenderInferiors, "afterGetBrightnessForRender"); - - sortBases(beforeGetCurrentPlayerStrVsBlockHookTypes, allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors, allBaseBeforeGetCurrentPlayerStrVsBlockInferiors, "beforeGetCurrentPlayerStrVsBlock"); - sortBases(overrideGetCurrentPlayerStrVsBlockHookTypes, allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors, allBaseOverrideGetCurrentPlayerStrVsBlockInferiors, "overrideGetCurrentPlayerStrVsBlock"); - sortBases(afterGetCurrentPlayerStrVsBlockHookTypes, allBaseAfterGetCurrentPlayerStrVsBlockSuperiors, allBaseAfterGetCurrentPlayerStrVsBlockInferiors, "afterGetCurrentPlayerStrVsBlock"); - - sortBases(beforeGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors, "beforeGetCurrentPlayerStrVsBlockForge"); - sortBases(overrideGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors, "overrideGetCurrentPlayerStrVsBlockForge"); - sortBases(afterGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors, "afterGetCurrentPlayerStrVsBlockForge"); - - sortBases(beforeGetDistanceSqHookTypes, allBaseBeforeGetDistanceSqSuperiors, allBaseBeforeGetDistanceSqInferiors, "beforeGetDistanceSq"); - sortBases(overrideGetDistanceSqHookTypes, allBaseOverrideGetDistanceSqSuperiors, allBaseOverrideGetDistanceSqInferiors, "overrideGetDistanceSq"); - sortBases(afterGetDistanceSqHookTypes, allBaseAfterGetDistanceSqSuperiors, allBaseAfterGetDistanceSqInferiors, "afterGetDistanceSq"); - - sortBases(beforeGetDistanceSqToEntityHookTypes, allBaseBeforeGetDistanceSqToEntitySuperiors, allBaseBeforeGetDistanceSqToEntityInferiors, "beforeGetDistanceSqToEntity"); - sortBases(overrideGetDistanceSqToEntityHookTypes, allBaseOverrideGetDistanceSqToEntitySuperiors, allBaseOverrideGetDistanceSqToEntityInferiors, "overrideGetDistanceSqToEntity"); - sortBases(afterGetDistanceSqToEntityHookTypes, allBaseAfterGetDistanceSqToEntitySuperiors, allBaseAfterGetDistanceSqToEntityInferiors, "afterGetDistanceSqToEntity"); - - sortBases(beforeGetFOVMultiplierHookTypes, allBaseBeforeGetFOVMultiplierSuperiors, allBaseBeforeGetFOVMultiplierInferiors, "beforeGetFOVMultiplier"); - sortBases(overrideGetFOVMultiplierHookTypes, allBaseOverrideGetFOVMultiplierSuperiors, allBaseOverrideGetFOVMultiplierInferiors, "overrideGetFOVMultiplier"); - sortBases(afterGetFOVMultiplierHookTypes, allBaseAfterGetFOVMultiplierSuperiors, allBaseAfterGetFOVMultiplierInferiors, "afterGetFOVMultiplier"); - - sortBases(beforeGetHurtSoundHookTypes, allBaseBeforeGetHurtSoundSuperiors, allBaseBeforeGetHurtSoundInferiors, "beforeGetHurtSound"); - sortBases(overrideGetHurtSoundHookTypes, allBaseOverrideGetHurtSoundSuperiors, allBaseOverrideGetHurtSoundInferiors, "overrideGetHurtSound"); - sortBases(afterGetHurtSoundHookTypes, allBaseAfterGetHurtSoundSuperiors, allBaseAfterGetHurtSoundInferiors, "afterGetHurtSound"); - - sortBases(beforeGetItemIconHookTypes, allBaseBeforeGetItemIconSuperiors, allBaseBeforeGetItemIconInferiors, "beforeGetItemIcon"); - sortBases(overrideGetItemIconHookTypes, allBaseOverrideGetItemIconSuperiors, allBaseOverrideGetItemIconInferiors, "overrideGetItemIcon"); - sortBases(afterGetItemIconHookTypes, allBaseAfterGetItemIconSuperiors, allBaseAfterGetItemIconInferiors, "afterGetItemIcon"); - - sortBases(beforeGetSleepTimerHookTypes, allBaseBeforeGetSleepTimerSuperiors, allBaseBeforeGetSleepTimerInferiors, "beforeGetSleepTimer"); - sortBases(overrideGetSleepTimerHookTypes, allBaseOverrideGetSleepTimerSuperiors, allBaseOverrideGetSleepTimerInferiors, "overrideGetSleepTimer"); - sortBases(afterGetSleepTimerHookTypes, allBaseAfterGetSleepTimerSuperiors, allBaseAfterGetSleepTimerInferiors, "afterGetSleepTimer"); - - sortBases(beforeHandleLavaMovementHookTypes, allBaseBeforeHandleLavaMovementSuperiors, allBaseBeforeHandleLavaMovementInferiors, "beforeHandleLavaMovement"); - sortBases(overrideHandleLavaMovementHookTypes, allBaseOverrideHandleLavaMovementSuperiors, allBaseOverrideHandleLavaMovementInferiors, "overrideHandleLavaMovement"); - sortBases(afterHandleLavaMovementHookTypes, allBaseAfterHandleLavaMovementSuperiors, allBaseAfterHandleLavaMovementInferiors, "afterHandleLavaMovement"); - - sortBases(beforeHandleWaterMovementHookTypes, allBaseBeforeHandleWaterMovementSuperiors, allBaseBeforeHandleWaterMovementInferiors, "beforeHandleWaterMovement"); - sortBases(overrideHandleWaterMovementHookTypes, allBaseOverrideHandleWaterMovementSuperiors, allBaseOverrideHandleWaterMovementInferiors, "overrideHandleWaterMovement"); - sortBases(afterHandleWaterMovementHookTypes, allBaseAfterHandleWaterMovementSuperiors, allBaseAfterHandleWaterMovementInferiors, "afterHandleWaterMovement"); - - sortBases(beforeHealHookTypes, allBaseBeforeHealSuperiors, allBaseBeforeHealInferiors, "beforeHeal"); - sortBases(overrideHealHookTypes, allBaseOverrideHealSuperiors, allBaseOverrideHealInferiors, "overrideHeal"); - sortBases(afterHealHookTypes, allBaseAfterHealSuperiors, allBaseAfterHealInferiors, "afterHeal"); - - sortBases(beforeIsEntityInsideOpaqueBlockHookTypes, allBaseBeforeIsEntityInsideOpaqueBlockSuperiors, allBaseBeforeIsEntityInsideOpaqueBlockInferiors, "beforeIsEntityInsideOpaqueBlock"); - sortBases(overrideIsEntityInsideOpaqueBlockHookTypes, allBaseOverrideIsEntityInsideOpaqueBlockSuperiors, allBaseOverrideIsEntityInsideOpaqueBlockInferiors, "overrideIsEntityInsideOpaqueBlock"); - sortBases(afterIsEntityInsideOpaqueBlockHookTypes, allBaseAfterIsEntityInsideOpaqueBlockSuperiors, allBaseAfterIsEntityInsideOpaqueBlockInferiors, "afterIsEntityInsideOpaqueBlock"); - - sortBases(beforeIsInWaterHookTypes, allBaseBeforeIsInWaterSuperiors, allBaseBeforeIsInWaterInferiors, "beforeIsInWater"); - sortBases(overrideIsInWaterHookTypes, allBaseOverrideIsInWaterSuperiors, allBaseOverrideIsInWaterInferiors, "overrideIsInWater"); - sortBases(afterIsInWaterHookTypes, allBaseAfterIsInWaterSuperiors, allBaseAfterIsInWaterInferiors, "afterIsInWater"); - - sortBases(beforeIsInsideOfMaterialHookTypes, allBaseBeforeIsInsideOfMaterialSuperiors, allBaseBeforeIsInsideOfMaterialInferiors, "beforeIsInsideOfMaterial"); - sortBases(overrideIsInsideOfMaterialHookTypes, allBaseOverrideIsInsideOfMaterialSuperiors, allBaseOverrideIsInsideOfMaterialInferiors, "overrideIsInsideOfMaterial"); - sortBases(afterIsInsideOfMaterialHookTypes, allBaseAfterIsInsideOfMaterialSuperiors, allBaseAfterIsInsideOfMaterialInferiors, "afterIsInsideOfMaterial"); - - sortBases(beforeIsOnLadderHookTypes, allBaseBeforeIsOnLadderSuperiors, allBaseBeforeIsOnLadderInferiors, "beforeIsOnLadder"); - sortBases(overrideIsOnLadderHookTypes, allBaseOverrideIsOnLadderSuperiors, allBaseOverrideIsOnLadderInferiors, "overrideIsOnLadder"); - sortBases(afterIsOnLadderHookTypes, allBaseAfterIsOnLadderSuperiors, allBaseAfterIsOnLadderInferiors, "afterIsOnLadder"); - - sortBases(beforeIsPlayerSleepingHookTypes, allBaseBeforeIsPlayerSleepingSuperiors, allBaseBeforeIsPlayerSleepingInferiors, "beforeIsPlayerSleeping"); - sortBases(overrideIsPlayerSleepingHookTypes, allBaseOverrideIsPlayerSleepingSuperiors, allBaseOverrideIsPlayerSleepingInferiors, "overrideIsPlayerSleeping"); - sortBases(afterIsPlayerSleepingHookTypes, allBaseAfterIsPlayerSleepingSuperiors, allBaseAfterIsPlayerSleepingInferiors, "afterIsPlayerSleeping"); - - sortBases(beforeIsSneakingHookTypes, allBaseBeforeIsSneakingSuperiors, allBaseBeforeIsSneakingInferiors, "beforeIsSneaking"); - sortBases(overrideIsSneakingHookTypes, allBaseOverrideIsSneakingSuperiors, allBaseOverrideIsSneakingInferiors, "overrideIsSneaking"); - sortBases(afterIsSneakingHookTypes, allBaseAfterIsSneakingSuperiors, allBaseAfterIsSneakingInferiors, "afterIsSneaking"); - - sortBases(beforeIsSprintingHookTypes, allBaseBeforeIsSprintingSuperiors, allBaseBeforeIsSprintingInferiors, "beforeIsSprinting"); - sortBases(overrideIsSprintingHookTypes, allBaseOverrideIsSprintingSuperiors, allBaseOverrideIsSprintingInferiors, "overrideIsSprinting"); - sortBases(afterIsSprintingHookTypes, allBaseAfterIsSprintingSuperiors, allBaseAfterIsSprintingInferiors, "afterIsSprinting"); - - sortBases(beforeJumpHookTypes, allBaseBeforeJumpSuperiors, allBaseBeforeJumpInferiors, "beforeJump"); - sortBases(overrideJumpHookTypes, allBaseOverrideJumpSuperiors, allBaseOverrideJumpInferiors, "overrideJump"); - sortBases(afterJumpHookTypes, allBaseAfterJumpSuperiors, allBaseAfterJumpInferiors, "afterJump"); - - sortBases(beforeKnockBackHookTypes, allBaseBeforeKnockBackSuperiors, allBaseBeforeKnockBackInferiors, "beforeKnockBack"); - sortBases(overrideKnockBackHookTypes, allBaseOverrideKnockBackSuperiors, allBaseOverrideKnockBackInferiors, "overrideKnockBack"); - sortBases(afterKnockBackHookTypes, allBaseAfterKnockBackSuperiors, allBaseAfterKnockBackInferiors, "afterKnockBack"); - - sortBases(beforeMoveEntityHookTypes, allBaseBeforeMoveEntitySuperiors, allBaseBeforeMoveEntityInferiors, "beforeMoveEntity"); - sortBases(overrideMoveEntityHookTypes, allBaseOverrideMoveEntitySuperiors, allBaseOverrideMoveEntityInferiors, "overrideMoveEntity"); - sortBases(afterMoveEntityHookTypes, allBaseAfterMoveEntitySuperiors, allBaseAfterMoveEntityInferiors, "afterMoveEntity"); - - sortBases(beforeMoveEntityWithHeadingHookTypes, allBaseBeforeMoveEntityWithHeadingSuperiors, allBaseBeforeMoveEntityWithHeadingInferiors, "beforeMoveEntityWithHeading"); - sortBases(overrideMoveEntityWithHeadingHookTypes, allBaseOverrideMoveEntityWithHeadingSuperiors, allBaseOverrideMoveEntityWithHeadingInferiors, "overrideMoveEntityWithHeading"); - sortBases(afterMoveEntityWithHeadingHookTypes, allBaseAfterMoveEntityWithHeadingSuperiors, allBaseAfterMoveEntityWithHeadingInferiors, "afterMoveEntityWithHeading"); - - sortBases(beforeMoveFlyingHookTypes, allBaseBeforeMoveFlyingSuperiors, allBaseBeforeMoveFlyingInferiors, "beforeMoveFlying"); - sortBases(overrideMoveFlyingHookTypes, allBaseOverrideMoveFlyingSuperiors, allBaseOverrideMoveFlyingInferiors, "overrideMoveFlying"); - sortBases(afterMoveFlyingHookTypes, allBaseAfterMoveFlyingSuperiors, allBaseAfterMoveFlyingInferiors, "afterMoveFlying"); - - sortBases(beforeOnDeathHookTypes, allBaseBeforeOnDeathSuperiors, allBaseBeforeOnDeathInferiors, "beforeOnDeath"); - sortBases(overrideOnDeathHookTypes, allBaseOverrideOnDeathSuperiors, allBaseOverrideOnDeathInferiors, "overrideOnDeath"); - sortBases(afterOnDeathHookTypes, allBaseAfterOnDeathSuperiors, allBaseAfterOnDeathInferiors, "afterOnDeath"); - - sortBases(beforeOnLivingUpdateHookTypes, allBaseBeforeOnLivingUpdateSuperiors, allBaseBeforeOnLivingUpdateInferiors, "beforeOnLivingUpdate"); - sortBases(overrideOnLivingUpdateHookTypes, allBaseOverrideOnLivingUpdateSuperiors, allBaseOverrideOnLivingUpdateInferiors, "overrideOnLivingUpdate"); - sortBases(afterOnLivingUpdateHookTypes, allBaseAfterOnLivingUpdateSuperiors, allBaseAfterOnLivingUpdateInferiors, "afterOnLivingUpdate"); - - sortBases(beforeOnKillEntityHookTypes, allBaseBeforeOnKillEntitySuperiors, allBaseBeforeOnKillEntityInferiors, "beforeOnKillEntity"); - sortBases(overrideOnKillEntityHookTypes, allBaseOverrideOnKillEntitySuperiors, allBaseOverrideOnKillEntityInferiors, "overrideOnKillEntity"); - sortBases(afterOnKillEntityHookTypes, allBaseAfterOnKillEntitySuperiors, allBaseAfterOnKillEntityInferiors, "afterOnKillEntity"); - - sortBases(beforeOnStruckByLightningHookTypes, allBaseBeforeOnStruckByLightningSuperiors, allBaseBeforeOnStruckByLightningInferiors, "beforeOnStruckByLightning"); - sortBases(overrideOnStruckByLightningHookTypes, allBaseOverrideOnStruckByLightningSuperiors, allBaseOverrideOnStruckByLightningInferiors, "overrideOnStruckByLightning"); - sortBases(afterOnStruckByLightningHookTypes, allBaseAfterOnStruckByLightningSuperiors, allBaseAfterOnStruckByLightningInferiors, "afterOnStruckByLightning"); - - sortBases(beforeOnUpdateHookTypes, allBaseBeforeOnUpdateSuperiors, allBaseBeforeOnUpdateInferiors, "beforeOnUpdate"); - sortBases(overrideOnUpdateHookTypes, allBaseOverrideOnUpdateSuperiors, allBaseOverrideOnUpdateInferiors, "overrideOnUpdate"); - sortBases(afterOnUpdateHookTypes, allBaseAfterOnUpdateSuperiors, allBaseAfterOnUpdateInferiors, "afterOnUpdate"); - - sortBases(beforePlayStepSoundHookTypes, allBaseBeforePlayStepSoundSuperiors, allBaseBeforePlayStepSoundInferiors, "beforePlayStepSound"); - sortBases(overridePlayStepSoundHookTypes, allBaseOverridePlayStepSoundSuperiors, allBaseOverridePlayStepSoundInferiors, "overridePlayStepSound"); - sortBases(afterPlayStepSoundHookTypes, allBaseAfterPlayStepSoundSuperiors, allBaseAfterPlayStepSoundInferiors, "afterPlayStepSound"); - - sortBases(beforePushOutOfBlocksHookTypes, allBaseBeforePushOutOfBlocksSuperiors, allBaseBeforePushOutOfBlocksInferiors, "beforePushOutOfBlocks"); - sortBases(overridePushOutOfBlocksHookTypes, allBaseOverridePushOutOfBlocksSuperiors, allBaseOverridePushOutOfBlocksInferiors, "overridePushOutOfBlocks"); - sortBases(afterPushOutOfBlocksHookTypes, allBaseAfterPushOutOfBlocksSuperiors, allBaseAfterPushOutOfBlocksInferiors, "afterPushOutOfBlocks"); - - sortBases(beforeRayTraceHookTypes, allBaseBeforeRayTraceSuperiors, allBaseBeforeRayTraceInferiors, "beforeRayTrace"); - sortBases(overrideRayTraceHookTypes, allBaseOverrideRayTraceSuperiors, allBaseOverrideRayTraceInferiors, "overrideRayTrace"); - sortBases(afterRayTraceHookTypes, allBaseAfterRayTraceSuperiors, allBaseAfterRayTraceInferiors, "afterRayTrace"); - - sortBases(beforeReadEntityFromNBTHookTypes, allBaseBeforeReadEntityFromNBTSuperiors, allBaseBeforeReadEntityFromNBTInferiors, "beforeReadEntityFromNBT"); - sortBases(overrideReadEntityFromNBTHookTypes, allBaseOverrideReadEntityFromNBTSuperiors, allBaseOverrideReadEntityFromNBTInferiors, "overrideReadEntityFromNBT"); - sortBases(afterReadEntityFromNBTHookTypes, allBaseAfterReadEntityFromNBTSuperiors, allBaseAfterReadEntityFromNBTInferiors, "afterReadEntityFromNBT"); - - sortBases(beforeRespawnPlayerHookTypes, allBaseBeforeRespawnPlayerSuperiors, allBaseBeforeRespawnPlayerInferiors, "beforeRespawnPlayer"); - sortBases(overrideRespawnPlayerHookTypes, allBaseOverrideRespawnPlayerSuperiors, allBaseOverrideRespawnPlayerInferiors, "overrideRespawnPlayer"); - sortBases(afterRespawnPlayerHookTypes, allBaseAfterRespawnPlayerSuperiors, allBaseAfterRespawnPlayerInferiors, "afterRespawnPlayer"); - - sortBases(beforeSetDeadHookTypes, allBaseBeforeSetDeadSuperiors, allBaseBeforeSetDeadInferiors, "beforeSetDead"); - sortBases(overrideSetDeadHookTypes, allBaseOverrideSetDeadSuperiors, allBaseOverrideSetDeadInferiors, "overrideSetDead"); - sortBases(afterSetDeadHookTypes, allBaseAfterSetDeadSuperiors, allBaseAfterSetDeadInferiors, "afterSetDead"); - - sortBases(beforeSetPlayerSPHealthHookTypes, allBaseBeforeSetPlayerSPHealthSuperiors, allBaseBeforeSetPlayerSPHealthInferiors, "beforeSetPlayerSPHealth"); - sortBases(overrideSetPlayerSPHealthHookTypes, allBaseOverrideSetPlayerSPHealthSuperiors, allBaseOverrideSetPlayerSPHealthInferiors, "overrideSetPlayerSPHealth"); - sortBases(afterSetPlayerSPHealthHookTypes, allBaseAfterSetPlayerSPHealthSuperiors, allBaseAfterSetPlayerSPHealthInferiors, "afterSetPlayerSPHealth"); - - sortBases(beforeSetPositionAndRotationHookTypes, allBaseBeforeSetPositionAndRotationSuperiors, allBaseBeforeSetPositionAndRotationInferiors, "beforeSetPositionAndRotation"); - sortBases(overrideSetPositionAndRotationHookTypes, allBaseOverrideSetPositionAndRotationSuperiors, allBaseOverrideSetPositionAndRotationInferiors, "overrideSetPositionAndRotation"); - sortBases(afterSetPositionAndRotationHookTypes, allBaseAfterSetPositionAndRotationSuperiors, allBaseAfterSetPositionAndRotationInferiors, "afterSetPositionAndRotation"); - - sortBases(beforeSetSneakingHookTypes, allBaseBeforeSetSneakingSuperiors, allBaseBeforeSetSneakingInferiors, "beforeSetSneaking"); - sortBases(overrideSetSneakingHookTypes, allBaseOverrideSetSneakingSuperiors, allBaseOverrideSetSneakingInferiors, "overrideSetSneaking"); - sortBases(afterSetSneakingHookTypes, allBaseAfterSetSneakingSuperiors, allBaseAfterSetSneakingInferiors, "afterSetSneaking"); - - sortBases(beforeSetSprintingHookTypes, allBaseBeforeSetSprintingSuperiors, allBaseBeforeSetSprintingInferiors, "beforeSetSprinting"); - sortBases(overrideSetSprintingHookTypes, allBaseOverrideSetSprintingSuperiors, allBaseOverrideSetSprintingInferiors, "overrideSetSprinting"); - sortBases(afterSetSprintingHookTypes, allBaseAfterSetSprintingSuperiors, allBaseAfterSetSprintingInferiors, "afterSetSprinting"); - - sortBases(beforeSleepInBedAtHookTypes, allBaseBeforeSleepInBedAtSuperiors, allBaseBeforeSleepInBedAtInferiors, "beforeSleepInBedAt"); - sortBases(overrideSleepInBedAtHookTypes, allBaseOverrideSleepInBedAtSuperiors, allBaseOverrideSleepInBedAtInferiors, "overrideSleepInBedAt"); - sortBases(afterSleepInBedAtHookTypes, allBaseAfterSleepInBedAtSuperiors, allBaseAfterSleepInBedAtInferiors, "afterSleepInBedAt"); - - sortBases(beforeSwingItemHookTypes, allBaseBeforeSwingItemSuperiors, allBaseBeforeSwingItemInferiors, "beforeSwingItem"); - sortBases(overrideSwingItemHookTypes, allBaseOverrideSwingItemSuperiors, allBaseOverrideSwingItemInferiors, "overrideSwingItem"); - sortBases(afterSwingItemHookTypes, allBaseAfterSwingItemSuperiors, allBaseAfterSwingItemInferiors, "afterSwingItem"); - - sortBases(beforeUpdateEntityActionStateHookTypes, allBaseBeforeUpdateEntityActionStateSuperiors, allBaseBeforeUpdateEntityActionStateInferiors, "beforeUpdateEntityActionState"); - sortBases(overrideUpdateEntityActionStateHookTypes, allBaseOverrideUpdateEntityActionStateSuperiors, allBaseOverrideUpdateEntityActionStateInferiors, "overrideUpdateEntityActionState"); - sortBases(afterUpdateEntityActionStateHookTypes, allBaseAfterUpdateEntityActionStateSuperiors, allBaseAfterUpdateEntityActionStateInferiors, "afterUpdateEntityActionState"); - - sortBases(beforeUpdateRiddenHookTypes, allBaseBeforeUpdateRiddenSuperiors, allBaseBeforeUpdateRiddenInferiors, "beforeUpdateRidden"); - sortBases(overrideUpdateRiddenHookTypes, allBaseOverrideUpdateRiddenSuperiors, allBaseOverrideUpdateRiddenInferiors, "overrideUpdateRidden"); - sortBases(afterUpdateRiddenHookTypes, allBaseAfterUpdateRiddenSuperiors, allBaseAfterUpdateRiddenInferiors, "afterUpdateRidden"); - - sortBases(beforeWakeUpPlayerHookTypes, allBaseBeforeWakeUpPlayerSuperiors, allBaseBeforeWakeUpPlayerInferiors, "beforeWakeUpPlayer"); - sortBases(overrideWakeUpPlayerHookTypes, allBaseOverrideWakeUpPlayerSuperiors, allBaseOverrideWakeUpPlayerInferiors, "overrideWakeUpPlayer"); - sortBases(afterWakeUpPlayerHookTypes, allBaseAfterWakeUpPlayerSuperiors, allBaseAfterWakeUpPlayerInferiors, "afterWakeUpPlayer"); - - sortBases(beforeWriteEntityToNBTHookTypes, allBaseBeforeWriteEntityToNBTSuperiors, allBaseBeforeWriteEntityToNBTInferiors, "beforeWriteEntityToNBT"); - sortBases(overrideWriteEntityToNBTHookTypes, allBaseOverrideWriteEntityToNBTSuperiors, allBaseOverrideWriteEntityToNBTInferiors, "overrideWriteEntityToNBT"); - sortBases(afterWriteEntityToNBTHookTypes, allBaseAfterWriteEntityToNBTSuperiors, allBaseAfterWriteEntityToNBTInferiors, "afterWriteEntityToNBT"); - - initialized = true; - } - - private static List getAllInstancesList() - { - List result = new ArrayList(); - Object player; - try - { - Object minecraft = net.minecraft.client.Minecraft.class.getMethod("func_71410_x").invoke(null); - player = minecraft != null ? net.minecraft.client.Minecraft.class.getField("field_71439_g").get(minecraft) : null; - } - catch(Exception obfuscatedException) - { - try - { - Object minecraft = net.minecraft.client.Minecraft.class.getMethod("getMinecraft").invoke(null); - player = minecraft != null ? net.minecraft.client.Minecraft.class.getField("thePlayer").get(minecraft) : null; - } - catch(Exception deobfuscatedException) - { - throw new RuntimeException("Unable to aquire list of current server players.", obfuscatedException); - } - } - if(player != null) - result.add((IClientPlayerAPI)player); - return result; - } - - public static net.minecraft.client.entity.EntityPlayerSP[] getAllInstances() - { - List allInstances = getAllInstancesList(); - return allInstances.toArray(new net.minecraft.client.entity.EntityPlayerSP[allInstances.size()]); - } - - public static void beforeLocalConstructing(IClientPlayerAPI clientPlayer, net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - ClientPlayerAPI clientPlayerAPI = clientPlayer.getClientPlayerAPI(); - if(clientPlayerAPI != null) - clientPlayerAPI.load(); - - if(clientPlayerAPI != null) - clientPlayerAPI.beforeLocalConstructing(paramMinecraft, paramWorld, paramSession, paramInt); - } - - public static void afterLocalConstructing(IClientPlayerAPI clientPlayer, net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - ClientPlayerAPI clientPlayerAPI = clientPlayer.getClientPlayerAPI(); - if(clientPlayerAPI != null) - clientPlayerAPI.afterLocalConstructing(paramMinecraft, paramWorld, paramSession, paramInt); - } - - public static ClientPlayerBase getClientPlayerBase(IClientPlayerAPI clientPlayer, String baseId) - { - ClientPlayerAPI clientPlayerAPI = clientPlayer.getClientPlayerAPI(); - if(clientPlayerAPI != null) - return clientPlayerAPI.getClientPlayerBase(baseId); - return null; - } - - public static Set getClientPlayerBaseIds(IClientPlayerAPI clientPlayer) - { - ClientPlayerAPI clientPlayerAPI = clientPlayer.getClientPlayerAPI(); - Set result = null; - if(clientPlayerAPI != null) - result = clientPlayerAPI.getClientPlayerBaseIds(); - else - result = Collections.emptySet(); - return result; - } - - public static Object dynamic(IClientPlayerAPI clientPlayer, String key, Object[] parameters) - { - ClientPlayerAPI clientPlayerAPI = clientPlayer.getClientPlayerAPI(); - if(clientPlayerAPI != null) - return clientPlayerAPI.dynamic(key, parameters); - return null; - } - - private static void sortBases(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - new ClientPlayerBaseSorter(list, allBaseSuperiors, allBaseInferiors, methodName).Sort(); - } - - private final static Map EmptySortMap = Collections.unmodifiableMap(new HashMap()); - - private static void sortDynamicBases(Map> lists, Map> allBaseSuperiors, Map> allBaseInferiors, String key) - { - List types = lists.get(key); - if(types != null && types.size() > 1) - sortBases(types, getDynamicSorters(key, types, allBaseSuperiors), getDynamicSorters(key, types, allBaseInferiors), key); - } - - private static Map getDynamicSorters(String key, List toSort, Map> allBaseValues) - { - Map superiors = null; - - Iterator ids = toSort.iterator(); - while(ids.hasNext()) - { - String id = ids.next(); - Map idSuperiors = allBaseValues.get(id); - if(idSuperiors == null) - continue; - - String[] keySuperiorIds = idSuperiors.get(key); - if(keySuperiorIds != null && keySuperiorIds.length > 0) - { - if(superiors == null) - superiors = new HashMap(1); - superiors.put(id, keySuperiorIds); - } - } - - return superiors != null ? superiors : EmptySortMap; - } - - private ClientPlayerAPI(IClientPlayerAPI player) - { - this.player = player; - } - - private void load() - { - Iterator iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String id = iterator.next(); - ClientPlayerBase toAttach = createClientPlayerBase(id); - toAttach.beforeBaseAttach(false); - allBaseObjects.put(id, toAttach); - baseObjectsToId.put(toAttach, id); - } - - beforeLocalConstructingHooks = create(beforeLocalConstructingHookTypes); - afterLocalConstructingHooks = create(afterLocalConstructingHookTypes); - - updateClientPlayerBases(); - - iterator = allBaseObjects.keySet().iterator(); - while(iterator.hasNext()) - allBaseObjects.get(iterator.next()).afterBaseAttach(false); - } - - private ClientPlayerBase createClientPlayerBase(String id) - { - Constructor contructor = allBaseConstructors.get(id); - - ClientPlayerBase base; - try - { - if(contructor.getParameterTypes().length == 1) - base = (ClientPlayerBase)contructor.newInstance(this); - else - base = (ClientPlayerBase)contructor.newInstance(this, id); - } - catch (Exception e) - { - throw new RuntimeException("Exception while creating a ClientPlayerBase of type '" + contructor.getDeclaringClass() + "'", e); - } - return base; - } - - private void updateClientPlayerBases() - { - beforeAddExhaustionHooks = create(beforeAddExhaustionHookTypes); - overrideAddExhaustionHooks = create(overrideAddExhaustionHookTypes); - afterAddExhaustionHooks = create(afterAddExhaustionHookTypes); - isAddExhaustionModded = - beforeAddExhaustionHooks != null || - overrideAddExhaustionHooks != null || - afterAddExhaustionHooks != null; - - beforeAddMovementStatHooks = create(beforeAddMovementStatHookTypes); - overrideAddMovementStatHooks = create(overrideAddMovementStatHookTypes); - afterAddMovementStatHooks = create(afterAddMovementStatHookTypes); - isAddMovementStatModded = - beforeAddMovementStatHooks != null || - overrideAddMovementStatHooks != null || - afterAddMovementStatHooks != null; - - beforeAddStatHooks = create(beforeAddStatHookTypes); - overrideAddStatHooks = create(overrideAddStatHookTypes); - afterAddStatHooks = create(afterAddStatHookTypes); - isAddStatModded = - beforeAddStatHooks != null || - overrideAddStatHooks != null || - afterAddStatHooks != null; - - beforeAttackEntityFromHooks = create(beforeAttackEntityFromHookTypes); - overrideAttackEntityFromHooks = create(overrideAttackEntityFromHookTypes); - afterAttackEntityFromHooks = create(afterAttackEntityFromHookTypes); - isAttackEntityFromModded = - beforeAttackEntityFromHooks != null || - overrideAttackEntityFromHooks != null || - afterAttackEntityFromHooks != null; - - beforeAttackTargetEntityWithCurrentItemHooks = create(beforeAttackTargetEntityWithCurrentItemHookTypes); - overrideAttackTargetEntityWithCurrentItemHooks = create(overrideAttackTargetEntityWithCurrentItemHookTypes); - afterAttackTargetEntityWithCurrentItemHooks = create(afterAttackTargetEntityWithCurrentItemHookTypes); - isAttackTargetEntityWithCurrentItemModded = - beforeAttackTargetEntityWithCurrentItemHooks != null || - overrideAttackTargetEntityWithCurrentItemHooks != null || - afterAttackTargetEntityWithCurrentItemHooks != null; - - beforeCanBreatheUnderwaterHooks = create(beforeCanBreatheUnderwaterHookTypes); - overrideCanBreatheUnderwaterHooks = create(overrideCanBreatheUnderwaterHookTypes); - afterCanBreatheUnderwaterHooks = create(afterCanBreatheUnderwaterHookTypes); - isCanBreatheUnderwaterModded = - beforeCanBreatheUnderwaterHooks != null || - overrideCanBreatheUnderwaterHooks != null || - afterCanBreatheUnderwaterHooks != null; - - beforeCanHarvestBlockHooks = create(beforeCanHarvestBlockHookTypes); - overrideCanHarvestBlockHooks = create(overrideCanHarvestBlockHookTypes); - afterCanHarvestBlockHooks = create(afterCanHarvestBlockHookTypes); - isCanHarvestBlockModded = - beforeCanHarvestBlockHooks != null || - overrideCanHarvestBlockHooks != null || - afterCanHarvestBlockHooks != null; - - beforeCanPlayerEditHooks = create(beforeCanPlayerEditHookTypes); - overrideCanPlayerEditHooks = create(overrideCanPlayerEditHookTypes); - afterCanPlayerEditHooks = create(afterCanPlayerEditHookTypes); - isCanPlayerEditModded = - beforeCanPlayerEditHooks != null || - overrideCanPlayerEditHooks != null || - afterCanPlayerEditHooks != null; - - beforeCanTriggerWalkingHooks = create(beforeCanTriggerWalkingHookTypes); - overrideCanTriggerWalkingHooks = create(overrideCanTriggerWalkingHookTypes); - afterCanTriggerWalkingHooks = create(afterCanTriggerWalkingHookTypes); - isCanTriggerWalkingModded = - beforeCanTriggerWalkingHooks != null || - overrideCanTriggerWalkingHooks != null || - afterCanTriggerWalkingHooks != null; - - beforeCloseScreenHooks = create(beforeCloseScreenHookTypes); - overrideCloseScreenHooks = create(overrideCloseScreenHookTypes); - afterCloseScreenHooks = create(afterCloseScreenHookTypes); - isCloseScreenModded = - beforeCloseScreenHooks != null || - overrideCloseScreenHooks != null || - afterCloseScreenHooks != null; - - beforeDamageEntityHooks = create(beforeDamageEntityHookTypes); - overrideDamageEntityHooks = create(overrideDamageEntityHookTypes); - afterDamageEntityHooks = create(afterDamageEntityHookTypes); - isDamageEntityModded = - beforeDamageEntityHooks != null || - overrideDamageEntityHooks != null || - afterDamageEntityHooks != null; - - beforeDisplayGUIBrewingStandHooks = create(beforeDisplayGUIBrewingStandHookTypes); - overrideDisplayGUIBrewingStandHooks = create(overrideDisplayGUIBrewingStandHookTypes); - afterDisplayGUIBrewingStandHooks = create(afterDisplayGUIBrewingStandHookTypes); - isDisplayGUIBrewingStandModded = - beforeDisplayGUIBrewingStandHooks != null || - overrideDisplayGUIBrewingStandHooks != null || - afterDisplayGUIBrewingStandHooks != null; - - beforeDisplayGUIChestHooks = create(beforeDisplayGUIChestHookTypes); - overrideDisplayGUIChestHooks = create(overrideDisplayGUIChestHookTypes); - afterDisplayGUIChestHooks = create(afterDisplayGUIChestHookTypes); - isDisplayGUIChestModded = - beforeDisplayGUIChestHooks != null || - overrideDisplayGUIChestHooks != null || - afterDisplayGUIChestHooks != null; - - beforeDisplayGUIDispenserHooks = create(beforeDisplayGUIDispenserHookTypes); - overrideDisplayGUIDispenserHooks = create(overrideDisplayGUIDispenserHookTypes); - afterDisplayGUIDispenserHooks = create(afterDisplayGUIDispenserHookTypes); - isDisplayGUIDispenserModded = - beforeDisplayGUIDispenserHooks != null || - overrideDisplayGUIDispenserHooks != null || - afterDisplayGUIDispenserHooks != null; - - beforeDisplayGUIEditSignHooks = create(beforeDisplayGUIEditSignHookTypes); - overrideDisplayGUIEditSignHooks = create(overrideDisplayGUIEditSignHookTypes); - afterDisplayGUIEditSignHooks = create(afterDisplayGUIEditSignHookTypes); - isDisplayGUIEditSignModded = - beforeDisplayGUIEditSignHooks != null || - overrideDisplayGUIEditSignHooks != null || - afterDisplayGUIEditSignHooks != null; - - beforeDisplayGUIEnchantmentHooks = create(beforeDisplayGUIEnchantmentHookTypes); - overrideDisplayGUIEnchantmentHooks = create(overrideDisplayGUIEnchantmentHookTypes); - afterDisplayGUIEnchantmentHooks = create(afterDisplayGUIEnchantmentHookTypes); - isDisplayGUIEnchantmentModded = - beforeDisplayGUIEnchantmentHooks != null || - overrideDisplayGUIEnchantmentHooks != null || - afterDisplayGUIEnchantmentHooks != null; - - beforeDisplayGUIFurnaceHooks = create(beforeDisplayGUIFurnaceHookTypes); - overrideDisplayGUIFurnaceHooks = create(overrideDisplayGUIFurnaceHookTypes); - afterDisplayGUIFurnaceHooks = create(afterDisplayGUIFurnaceHookTypes); - isDisplayGUIFurnaceModded = - beforeDisplayGUIFurnaceHooks != null || - overrideDisplayGUIFurnaceHooks != null || - afterDisplayGUIFurnaceHooks != null; - - beforeDisplayGUIWorkbenchHooks = create(beforeDisplayGUIWorkbenchHookTypes); - overrideDisplayGUIWorkbenchHooks = create(overrideDisplayGUIWorkbenchHookTypes); - afterDisplayGUIWorkbenchHooks = create(afterDisplayGUIWorkbenchHookTypes); - isDisplayGUIWorkbenchModded = - beforeDisplayGUIWorkbenchHooks != null || - overrideDisplayGUIWorkbenchHooks != null || - afterDisplayGUIWorkbenchHooks != null; - - beforeDropOneItemHooks = create(beforeDropOneItemHookTypes); - overrideDropOneItemHooks = create(overrideDropOneItemHookTypes); - afterDropOneItemHooks = create(afterDropOneItemHookTypes); - isDropOneItemModded = - beforeDropOneItemHooks != null || - overrideDropOneItemHooks != null || - afterDropOneItemHooks != null; - - beforeDropPlayerItemHooks = create(beforeDropPlayerItemHookTypes); - overrideDropPlayerItemHooks = create(overrideDropPlayerItemHookTypes); - afterDropPlayerItemHooks = create(afterDropPlayerItemHookTypes); - isDropPlayerItemModded = - beforeDropPlayerItemHooks != null || - overrideDropPlayerItemHooks != null || - afterDropPlayerItemHooks != null; - - beforeDropPlayerItemWithRandomChoiceHooks = create(beforeDropPlayerItemWithRandomChoiceHookTypes); - overrideDropPlayerItemWithRandomChoiceHooks = create(overrideDropPlayerItemWithRandomChoiceHookTypes); - afterDropPlayerItemWithRandomChoiceHooks = create(afterDropPlayerItemWithRandomChoiceHookTypes); - isDropPlayerItemWithRandomChoiceModded = - beforeDropPlayerItemWithRandomChoiceHooks != null || - overrideDropPlayerItemWithRandomChoiceHooks != null || - afterDropPlayerItemWithRandomChoiceHooks != null; - - beforeFallHooks = create(beforeFallHookTypes); - overrideFallHooks = create(overrideFallHookTypes); - afterFallHooks = create(afterFallHookTypes); - isFallModded = - beforeFallHooks != null || - overrideFallHooks != null || - afterFallHooks != null; - - beforeGetAIMoveSpeedHooks = create(beforeGetAIMoveSpeedHookTypes); - overrideGetAIMoveSpeedHooks = create(overrideGetAIMoveSpeedHookTypes); - afterGetAIMoveSpeedHooks = create(afterGetAIMoveSpeedHookTypes); - isGetAIMoveSpeedModded = - beforeGetAIMoveSpeedHooks != null || - overrideGetAIMoveSpeedHooks != null || - afterGetAIMoveSpeedHooks != null; - - beforeGetBedOrientationInDegreesHooks = create(beforeGetBedOrientationInDegreesHookTypes); - overrideGetBedOrientationInDegreesHooks = create(overrideGetBedOrientationInDegreesHookTypes); - afterGetBedOrientationInDegreesHooks = create(afterGetBedOrientationInDegreesHookTypes); - isGetBedOrientationInDegreesModded = - beforeGetBedOrientationInDegreesHooks != null || - overrideGetBedOrientationInDegreesHooks != null || - afterGetBedOrientationInDegreesHooks != null; - - beforeGetBrightnessHooks = create(beforeGetBrightnessHookTypes); - overrideGetBrightnessHooks = create(overrideGetBrightnessHookTypes); - afterGetBrightnessHooks = create(afterGetBrightnessHookTypes); - isGetBrightnessModded = - beforeGetBrightnessHooks != null || - overrideGetBrightnessHooks != null || - afterGetBrightnessHooks != null; - - beforeGetBrightnessForRenderHooks = create(beforeGetBrightnessForRenderHookTypes); - overrideGetBrightnessForRenderHooks = create(overrideGetBrightnessForRenderHookTypes); - afterGetBrightnessForRenderHooks = create(afterGetBrightnessForRenderHookTypes); - isGetBrightnessForRenderModded = - beforeGetBrightnessForRenderHooks != null || - overrideGetBrightnessForRenderHooks != null || - afterGetBrightnessForRenderHooks != null; - - beforeGetCurrentPlayerStrVsBlockHooks = create(beforeGetCurrentPlayerStrVsBlockHookTypes); - overrideGetCurrentPlayerStrVsBlockHooks = create(overrideGetCurrentPlayerStrVsBlockHookTypes); - afterGetCurrentPlayerStrVsBlockHooks = create(afterGetCurrentPlayerStrVsBlockHookTypes); - isGetCurrentPlayerStrVsBlockModded = - beforeGetCurrentPlayerStrVsBlockHooks != null || - overrideGetCurrentPlayerStrVsBlockHooks != null || - afterGetCurrentPlayerStrVsBlockHooks != null; - - beforeGetCurrentPlayerStrVsBlockForgeHooks = create(beforeGetCurrentPlayerStrVsBlockForgeHookTypes); - overrideGetCurrentPlayerStrVsBlockForgeHooks = create(overrideGetCurrentPlayerStrVsBlockForgeHookTypes); - afterGetCurrentPlayerStrVsBlockForgeHooks = create(afterGetCurrentPlayerStrVsBlockForgeHookTypes); - isGetCurrentPlayerStrVsBlockForgeModded = - beforeGetCurrentPlayerStrVsBlockForgeHooks != null || - overrideGetCurrentPlayerStrVsBlockForgeHooks != null || - afterGetCurrentPlayerStrVsBlockForgeHooks != null; - - beforeGetDistanceSqHooks = create(beforeGetDistanceSqHookTypes); - overrideGetDistanceSqHooks = create(overrideGetDistanceSqHookTypes); - afterGetDistanceSqHooks = create(afterGetDistanceSqHookTypes); - isGetDistanceSqModded = - beforeGetDistanceSqHooks != null || - overrideGetDistanceSqHooks != null || - afterGetDistanceSqHooks != null; - - beforeGetDistanceSqToEntityHooks = create(beforeGetDistanceSqToEntityHookTypes); - overrideGetDistanceSqToEntityHooks = create(overrideGetDistanceSqToEntityHookTypes); - afterGetDistanceSqToEntityHooks = create(afterGetDistanceSqToEntityHookTypes); - isGetDistanceSqToEntityModded = - beforeGetDistanceSqToEntityHooks != null || - overrideGetDistanceSqToEntityHooks != null || - afterGetDistanceSqToEntityHooks != null; - - beforeGetFOVMultiplierHooks = create(beforeGetFOVMultiplierHookTypes); - overrideGetFOVMultiplierHooks = create(overrideGetFOVMultiplierHookTypes); - afterGetFOVMultiplierHooks = create(afterGetFOVMultiplierHookTypes); - isGetFOVMultiplierModded = - beforeGetFOVMultiplierHooks != null || - overrideGetFOVMultiplierHooks != null || - afterGetFOVMultiplierHooks != null; - - beforeGetHurtSoundHooks = create(beforeGetHurtSoundHookTypes); - overrideGetHurtSoundHooks = create(overrideGetHurtSoundHookTypes); - afterGetHurtSoundHooks = create(afterGetHurtSoundHookTypes); - isGetHurtSoundModded = - beforeGetHurtSoundHooks != null || - overrideGetHurtSoundHooks != null || - afterGetHurtSoundHooks != null; - - beforeGetItemIconHooks = create(beforeGetItemIconHookTypes); - overrideGetItemIconHooks = create(overrideGetItemIconHookTypes); - afterGetItemIconHooks = create(afterGetItemIconHookTypes); - isGetItemIconModded = - beforeGetItemIconHooks != null || - overrideGetItemIconHooks != null || - afterGetItemIconHooks != null; - - beforeGetSleepTimerHooks = create(beforeGetSleepTimerHookTypes); - overrideGetSleepTimerHooks = create(overrideGetSleepTimerHookTypes); - afterGetSleepTimerHooks = create(afterGetSleepTimerHookTypes); - isGetSleepTimerModded = - beforeGetSleepTimerHooks != null || - overrideGetSleepTimerHooks != null || - afterGetSleepTimerHooks != null; - - beforeHandleLavaMovementHooks = create(beforeHandleLavaMovementHookTypes); - overrideHandleLavaMovementHooks = create(overrideHandleLavaMovementHookTypes); - afterHandleLavaMovementHooks = create(afterHandleLavaMovementHookTypes); - isHandleLavaMovementModded = - beforeHandleLavaMovementHooks != null || - overrideHandleLavaMovementHooks != null || - afterHandleLavaMovementHooks != null; - - beforeHandleWaterMovementHooks = create(beforeHandleWaterMovementHookTypes); - overrideHandleWaterMovementHooks = create(overrideHandleWaterMovementHookTypes); - afterHandleWaterMovementHooks = create(afterHandleWaterMovementHookTypes); - isHandleWaterMovementModded = - beforeHandleWaterMovementHooks != null || - overrideHandleWaterMovementHooks != null || - afterHandleWaterMovementHooks != null; - - beforeHealHooks = create(beforeHealHookTypes); - overrideHealHooks = create(overrideHealHookTypes); - afterHealHooks = create(afterHealHookTypes); - isHealModded = - beforeHealHooks != null || - overrideHealHooks != null || - afterHealHooks != null; - - beforeIsEntityInsideOpaqueBlockHooks = create(beforeIsEntityInsideOpaqueBlockHookTypes); - overrideIsEntityInsideOpaqueBlockHooks = create(overrideIsEntityInsideOpaqueBlockHookTypes); - afterIsEntityInsideOpaqueBlockHooks = create(afterIsEntityInsideOpaqueBlockHookTypes); - isIsEntityInsideOpaqueBlockModded = - beforeIsEntityInsideOpaqueBlockHooks != null || - overrideIsEntityInsideOpaqueBlockHooks != null || - afterIsEntityInsideOpaqueBlockHooks != null; - - beforeIsInWaterHooks = create(beforeIsInWaterHookTypes); - overrideIsInWaterHooks = create(overrideIsInWaterHookTypes); - afterIsInWaterHooks = create(afterIsInWaterHookTypes); - isIsInWaterModded = - beforeIsInWaterHooks != null || - overrideIsInWaterHooks != null || - afterIsInWaterHooks != null; - - beforeIsInsideOfMaterialHooks = create(beforeIsInsideOfMaterialHookTypes); - overrideIsInsideOfMaterialHooks = create(overrideIsInsideOfMaterialHookTypes); - afterIsInsideOfMaterialHooks = create(afterIsInsideOfMaterialHookTypes); - isIsInsideOfMaterialModded = - beforeIsInsideOfMaterialHooks != null || - overrideIsInsideOfMaterialHooks != null || - afterIsInsideOfMaterialHooks != null; - - beforeIsOnLadderHooks = create(beforeIsOnLadderHookTypes); - overrideIsOnLadderHooks = create(overrideIsOnLadderHookTypes); - afterIsOnLadderHooks = create(afterIsOnLadderHookTypes); - isIsOnLadderModded = - beforeIsOnLadderHooks != null || - overrideIsOnLadderHooks != null || - afterIsOnLadderHooks != null; - - beforeIsPlayerSleepingHooks = create(beforeIsPlayerSleepingHookTypes); - overrideIsPlayerSleepingHooks = create(overrideIsPlayerSleepingHookTypes); - afterIsPlayerSleepingHooks = create(afterIsPlayerSleepingHookTypes); - isIsPlayerSleepingModded = - beforeIsPlayerSleepingHooks != null || - overrideIsPlayerSleepingHooks != null || - afterIsPlayerSleepingHooks != null; - - beforeIsSneakingHooks = create(beforeIsSneakingHookTypes); - overrideIsSneakingHooks = create(overrideIsSneakingHookTypes); - afterIsSneakingHooks = create(afterIsSneakingHookTypes); - isIsSneakingModded = - beforeIsSneakingHooks != null || - overrideIsSneakingHooks != null || - afterIsSneakingHooks != null; - - beforeIsSprintingHooks = create(beforeIsSprintingHookTypes); - overrideIsSprintingHooks = create(overrideIsSprintingHookTypes); - afterIsSprintingHooks = create(afterIsSprintingHookTypes); - isIsSprintingModded = - beforeIsSprintingHooks != null || - overrideIsSprintingHooks != null || - afterIsSprintingHooks != null; - - beforeJumpHooks = create(beforeJumpHookTypes); - overrideJumpHooks = create(overrideJumpHookTypes); - afterJumpHooks = create(afterJumpHookTypes); - isJumpModded = - beforeJumpHooks != null || - overrideJumpHooks != null || - afterJumpHooks != null; - - beforeKnockBackHooks = create(beforeKnockBackHookTypes); - overrideKnockBackHooks = create(overrideKnockBackHookTypes); - afterKnockBackHooks = create(afterKnockBackHookTypes); - isKnockBackModded = - beforeKnockBackHooks != null || - overrideKnockBackHooks != null || - afterKnockBackHooks != null; - - beforeMoveEntityHooks = create(beforeMoveEntityHookTypes); - overrideMoveEntityHooks = create(overrideMoveEntityHookTypes); - afterMoveEntityHooks = create(afterMoveEntityHookTypes); - isMoveEntityModded = - beforeMoveEntityHooks != null || - overrideMoveEntityHooks != null || - afterMoveEntityHooks != null; - - beforeMoveEntityWithHeadingHooks = create(beforeMoveEntityWithHeadingHookTypes); - overrideMoveEntityWithHeadingHooks = create(overrideMoveEntityWithHeadingHookTypes); - afterMoveEntityWithHeadingHooks = create(afterMoveEntityWithHeadingHookTypes); - isMoveEntityWithHeadingModded = - beforeMoveEntityWithHeadingHooks != null || - overrideMoveEntityWithHeadingHooks != null || - afterMoveEntityWithHeadingHooks != null; - - beforeMoveFlyingHooks = create(beforeMoveFlyingHookTypes); - overrideMoveFlyingHooks = create(overrideMoveFlyingHookTypes); - afterMoveFlyingHooks = create(afterMoveFlyingHookTypes); - isMoveFlyingModded = - beforeMoveFlyingHooks != null || - overrideMoveFlyingHooks != null || - afterMoveFlyingHooks != null; - - beforeOnDeathHooks = create(beforeOnDeathHookTypes); - overrideOnDeathHooks = create(overrideOnDeathHookTypes); - afterOnDeathHooks = create(afterOnDeathHookTypes); - isOnDeathModded = - beforeOnDeathHooks != null || - overrideOnDeathHooks != null || - afterOnDeathHooks != null; - - beforeOnLivingUpdateHooks = create(beforeOnLivingUpdateHookTypes); - overrideOnLivingUpdateHooks = create(overrideOnLivingUpdateHookTypes); - afterOnLivingUpdateHooks = create(afterOnLivingUpdateHookTypes); - isOnLivingUpdateModded = - beforeOnLivingUpdateHooks != null || - overrideOnLivingUpdateHooks != null || - afterOnLivingUpdateHooks != null; - - beforeOnKillEntityHooks = create(beforeOnKillEntityHookTypes); - overrideOnKillEntityHooks = create(overrideOnKillEntityHookTypes); - afterOnKillEntityHooks = create(afterOnKillEntityHookTypes); - isOnKillEntityModded = - beforeOnKillEntityHooks != null || - overrideOnKillEntityHooks != null || - afterOnKillEntityHooks != null; - - beforeOnStruckByLightningHooks = create(beforeOnStruckByLightningHookTypes); - overrideOnStruckByLightningHooks = create(overrideOnStruckByLightningHookTypes); - afterOnStruckByLightningHooks = create(afterOnStruckByLightningHookTypes); - isOnStruckByLightningModded = - beforeOnStruckByLightningHooks != null || - overrideOnStruckByLightningHooks != null || - afterOnStruckByLightningHooks != null; - - beforeOnUpdateHooks = create(beforeOnUpdateHookTypes); - overrideOnUpdateHooks = create(overrideOnUpdateHookTypes); - afterOnUpdateHooks = create(afterOnUpdateHookTypes); - isOnUpdateModded = - beforeOnUpdateHooks != null || - overrideOnUpdateHooks != null || - afterOnUpdateHooks != null; - - beforePlayStepSoundHooks = create(beforePlayStepSoundHookTypes); - overridePlayStepSoundHooks = create(overridePlayStepSoundHookTypes); - afterPlayStepSoundHooks = create(afterPlayStepSoundHookTypes); - isPlayStepSoundModded = - beforePlayStepSoundHooks != null || - overridePlayStepSoundHooks != null || - afterPlayStepSoundHooks != null; - - beforePushOutOfBlocksHooks = create(beforePushOutOfBlocksHookTypes); - overridePushOutOfBlocksHooks = create(overridePushOutOfBlocksHookTypes); - afterPushOutOfBlocksHooks = create(afterPushOutOfBlocksHookTypes); - isPushOutOfBlocksModded = - beforePushOutOfBlocksHooks != null || - overridePushOutOfBlocksHooks != null || - afterPushOutOfBlocksHooks != null; - - beforeRayTraceHooks = create(beforeRayTraceHookTypes); - overrideRayTraceHooks = create(overrideRayTraceHookTypes); - afterRayTraceHooks = create(afterRayTraceHookTypes); - isRayTraceModded = - beforeRayTraceHooks != null || - overrideRayTraceHooks != null || - afterRayTraceHooks != null; - - beforeReadEntityFromNBTHooks = create(beforeReadEntityFromNBTHookTypes); - overrideReadEntityFromNBTHooks = create(overrideReadEntityFromNBTHookTypes); - afterReadEntityFromNBTHooks = create(afterReadEntityFromNBTHookTypes); - isReadEntityFromNBTModded = - beforeReadEntityFromNBTHooks != null || - overrideReadEntityFromNBTHooks != null || - afterReadEntityFromNBTHooks != null; - - beforeRespawnPlayerHooks = create(beforeRespawnPlayerHookTypes); - overrideRespawnPlayerHooks = create(overrideRespawnPlayerHookTypes); - afterRespawnPlayerHooks = create(afterRespawnPlayerHookTypes); - isRespawnPlayerModded = - beforeRespawnPlayerHooks != null || - overrideRespawnPlayerHooks != null || - afterRespawnPlayerHooks != null; - - beforeSetDeadHooks = create(beforeSetDeadHookTypes); - overrideSetDeadHooks = create(overrideSetDeadHookTypes); - afterSetDeadHooks = create(afterSetDeadHookTypes); - isSetDeadModded = - beforeSetDeadHooks != null || - overrideSetDeadHooks != null || - afterSetDeadHooks != null; - - beforeSetPlayerSPHealthHooks = create(beforeSetPlayerSPHealthHookTypes); - overrideSetPlayerSPHealthHooks = create(overrideSetPlayerSPHealthHookTypes); - afterSetPlayerSPHealthHooks = create(afterSetPlayerSPHealthHookTypes); - isSetPlayerSPHealthModded = - beforeSetPlayerSPHealthHooks != null || - overrideSetPlayerSPHealthHooks != null || - afterSetPlayerSPHealthHooks != null; - - beforeSetPositionAndRotationHooks = create(beforeSetPositionAndRotationHookTypes); - overrideSetPositionAndRotationHooks = create(overrideSetPositionAndRotationHookTypes); - afterSetPositionAndRotationHooks = create(afterSetPositionAndRotationHookTypes); - isSetPositionAndRotationModded = - beforeSetPositionAndRotationHooks != null || - overrideSetPositionAndRotationHooks != null || - afterSetPositionAndRotationHooks != null; - - beforeSetSneakingHooks = create(beforeSetSneakingHookTypes); - overrideSetSneakingHooks = create(overrideSetSneakingHookTypes); - afterSetSneakingHooks = create(afterSetSneakingHookTypes); - isSetSneakingModded = - beforeSetSneakingHooks != null || - overrideSetSneakingHooks != null || - afterSetSneakingHooks != null; - - beforeSetSprintingHooks = create(beforeSetSprintingHookTypes); - overrideSetSprintingHooks = create(overrideSetSprintingHookTypes); - afterSetSprintingHooks = create(afterSetSprintingHookTypes); - isSetSprintingModded = - beforeSetSprintingHooks != null || - overrideSetSprintingHooks != null || - afterSetSprintingHooks != null; - - beforeSleepInBedAtHooks = create(beforeSleepInBedAtHookTypes); - overrideSleepInBedAtHooks = create(overrideSleepInBedAtHookTypes); - afterSleepInBedAtHooks = create(afterSleepInBedAtHookTypes); - isSleepInBedAtModded = - beforeSleepInBedAtHooks != null || - overrideSleepInBedAtHooks != null || - afterSleepInBedAtHooks != null; - - beforeSwingItemHooks = create(beforeSwingItemHookTypes); - overrideSwingItemHooks = create(overrideSwingItemHookTypes); - afterSwingItemHooks = create(afterSwingItemHookTypes); - isSwingItemModded = - beforeSwingItemHooks != null || - overrideSwingItemHooks != null || - afterSwingItemHooks != null; - - beforeUpdateEntityActionStateHooks = create(beforeUpdateEntityActionStateHookTypes); - overrideUpdateEntityActionStateHooks = create(overrideUpdateEntityActionStateHookTypes); - afterUpdateEntityActionStateHooks = create(afterUpdateEntityActionStateHookTypes); - isUpdateEntityActionStateModded = - beforeUpdateEntityActionStateHooks != null || - overrideUpdateEntityActionStateHooks != null || - afterUpdateEntityActionStateHooks != null; - - beforeUpdateRiddenHooks = create(beforeUpdateRiddenHookTypes); - overrideUpdateRiddenHooks = create(overrideUpdateRiddenHookTypes); - afterUpdateRiddenHooks = create(afterUpdateRiddenHookTypes); - isUpdateRiddenModded = - beforeUpdateRiddenHooks != null || - overrideUpdateRiddenHooks != null || - afterUpdateRiddenHooks != null; - - beforeWakeUpPlayerHooks = create(beforeWakeUpPlayerHookTypes); - overrideWakeUpPlayerHooks = create(overrideWakeUpPlayerHookTypes); - afterWakeUpPlayerHooks = create(afterWakeUpPlayerHookTypes); - isWakeUpPlayerModded = - beforeWakeUpPlayerHooks != null || - overrideWakeUpPlayerHooks != null || - afterWakeUpPlayerHooks != null; - - beforeWriteEntityToNBTHooks = create(beforeWriteEntityToNBTHookTypes); - overrideWriteEntityToNBTHooks = create(overrideWriteEntityToNBTHookTypes); - afterWriteEntityToNBTHooks = create(afterWriteEntityToNBTHookTypes); - isWriteEntityToNBTModded = - beforeWriteEntityToNBTHooks != null || - overrideWriteEntityToNBTHooks != null || - afterWriteEntityToNBTHooks != null; - - } - - private void attachClientPlayerBase(String id) - { - ClientPlayerBase toAttach = createClientPlayerBase(id); - toAttach.beforeBaseAttach(true); - allBaseObjects.put(id, toAttach); - updateClientPlayerBases(); - toAttach.afterBaseAttach(true); - } - - private void detachClientPlayerBase(String id) - { - ClientPlayerBase toDetach = allBaseObjects.get(id); - toDetach.beforeBaseDetach(true); - allBaseObjects.remove(id); - toDetach.afterBaseDetach(true); - } - - private ClientPlayerBase[] create(List types) - { - if(types.isEmpty()) - return null; - - ClientPlayerBase[] result = new ClientPlayerBase[types.size()]; - for(int i = 0; i < result.length; i++) - result[i] = getClientPlayerBase(types.get(i)); - return result; - } - - private void beforeLocalConstructing(net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - if(beforeLocalConstructingHooks != null) - for(int i = beforeLocalConstructingHooks.length - 1; i >= 0 ; i--) - beforeLocalConstructingHooks[i].beforeLocalConstructing(paramMinecraft, paramWorld, paramSession, paramInt); - beforeLocalConstructingHooks = null; - } - - private void afterLocalConstructing(net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - if(afterLocalConstructingHooks != null) - for(int i = 0; i < afterLocalConstructingHooks.length; i++) - afterLocalConstructingHooks[i].afterLocalConstructing(paramMinecraft, paramWorld, paramSession, paramInt); - afterLocalConstructingHooks = null; - } - - public ClientPlayerBase getClientPlayerBase(String id) - { - return allBaseObjects.get(id); - } - - public Set getClientPlayerBaseIds() - { - return unmodifiableAllBaseIds; - } - - public Object dynamic(String key, Object[] parameters) - { - key = key.replace('.', '_').replace(' ', '_'); - executeAll(key, parameters, beforeDynamicHookTypes, beforeDynamicHookMethods, true); - Object result = dynamicOverwritten(key, parameters, null); - executeAll(key, parameters, afterDynamicHookTypes, afterDynamicHookMethods, false); - return result; - } - - public Object dynamicOverwritten(String key, Object[] parameters, ClientPlayerBase overwriter) - { - List overrideIds = overrideDynamicHookTypes.get(key); - - String id = null; - if(overrideIds != null) - if(overwriter != null) - { - id = baseObjectsToId.get(overwriter); - int index = overrideIds.indexOf(id); - if(index > 0) - id = overrideIds.get(index - 1); - else - id = null; - } - else if(overrideIds.size() > 0) - id = overrideIds.get(overrideIds.size() - 1); - - Map, Map> methodMap; - - if(id == null) - { - id = keysToVirtualIds.get(key); - if(id == null) - return null; - methodMap = virtualDynamicHookMethods; - } - else - methodMap = overrideDynamicHookMethods; - - Map methods = methodMap.get(allBaseConstructors.get(id).getDeclaringClass()); - if(methods == null) - return null; - - Method method = methods.get(key); - if(method == null) - return null; - - return execute(getClientPlayerBase(id), method, parameters); - } - - private void executeAll(String key, Object[] parameters, Map> dynamicHookTypes, Map, Map> dynamicHookMethods, boolean reverse) - { - List beforeIds = dynamicHookTypes.get(key); - if(beforeIds == null) - return; - - for(int i= reverse ? beforeIds.size() - 1 : 0; reverse ? i >= 0 : i < beforeIds.size(); i = i + (reverse ? -1 : 1)) - { - String id = beforeIds.get(i); - ClientPlayerBase base = getClientPlayerBase(id); - Class type = base.getClass(); - - Map methods = dynamicHookMethods.get(type); - if(methods == null) - continue; - - Method method = methods.get(key); - if(method == null) - continue; - - execute(base, method, parameters); - } - } - - private Object execute(ClientPlayerBase base, Method method, Object[] parameters) - { - try - { - return method.invoke(base, parameters); - } - catch(Exception e) - { - throw new RuntimeException("Exception while invoking dynamic method", e); - } - } - - public static void addExhaustion(IClientPlayerAPI target, float paramFloat) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isAddExhaustionModded) - clientPlayerAPI.addExhaustion(paramFloat); - else - target.localAddExhaustion(paramFloat); - } - - private void addExhaustion(float paramFloat) - { - if(beforeAddExhaustionHooks != null) - for(int i = beforeAddExhaustionHooks.length - 1; i >= 0 ; i--) - beforeAddExhaustionHooks[i].beforeAddExhaustion(paramFloat); - - if(overrideAddExhaustionHooks != null) - overrideAddExhaustionHooks[overrideAddExhaustionHooks.length - 1].addExhaustion(paramFloat); - else - player.localAddExhaustion(paramFloat); - - if(afterAddExhaustionHooks != null) - for(int i = 0; i < afterAddExhaustionHooks.length; i++) - afterAddExhaustionHooks[i].afterAddExhaustion(paramFloat); - - } - - protected ClientPlayerBase GetOverwrittenAddExhaustion(ClientPlayerBase overWriter) - { - if (overrideAddExhaustionHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddExhaustionHooks.length; i++) - if(overrideAddExhaustionHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddExhaustionHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddExhaustionHookTypes = new LinkedList(); - private final static List overrideAddExhaustionHookTypes = new LinkedList(); - private final static List afterAddExhaustionHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeAddExhaustionHooks; - private ClientPlayerBase[] overrideAddExhaustionHooks; - private ClientPlayerBase[] afterAddExhaustionHooks; - - public boolean isAddExhaustionModded; - - private static final Map allBaseBeforeAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddExhaustionInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddExhaustionInferiors = new Hashtable(0); - private static final Map allBaseAfterAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddExhaustionInferiors = new Hashtable(0); - - public static void addMovementStat(IClientPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isAddMovementStatModded) - clientPlayerAPI.addMovementStat(paramDouble1, paramDouble2, paramDouble3); - else - target.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - } - - private void addMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeAddMovementStatHooks != null) - for(int i = beforeAddMovementStatHooks.length - 1; i >= 0 ; i--) - beforeAddMovementStatHooks[i].beforeAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - if(overrideAddMovementStatHooks != null) - overrideAddMovementStatHooks[overrideAddMovementStatHooks.length - 1].addMovementStat(paramDouble1, paramDouble2, paramDouble3); - else - player.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - if(afterAddMovementStatHooks != null) - for(int i = 0; i < afterAddMovementStatHooks.length; i++) - afterAddMovementStatHooks[i].afterAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - } - - protected ClientPlayerBase GetOverwrittenAddMovementStat(ClientPlayerBase overWriter) - { - if (overrideAddMovementStatHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddMovementStatHooks.length; i++) - if(overrideAddMovementStatHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddMovementStatHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddMovementStatHookTypes = new LinkedList(); - private final static List overrideAddMovementStatHookTypes = new LinkedList(); - private final static List afterAddMovementStatHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeAddMovementStatHooks; - private ClientPlayerBase[] overrideAddMovementStatHooks; - private ClientPlayerBase[] afterAddMovementStatHooks; - - public boolean isAddMovementStatModded; - - private static final Map allBaseBeforeAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddMovementStatInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddMovementStatInferiors = new Hashtable(0); - private static final Map allBaseAfterAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddMovementStatInferiors = new Hashtable(0); - - public static void addStat(IClientPlayerAPI target, net.minecraft.stats.StatBase paramStatBase, int paramInt) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isAddStatModded) - clientPlayerAPI.addStat(paramStatBase, paramInt); - else - target.localAddStat(paramStatBase, paramInt); - } - - private void addStat(net.minecraft.stats.StatBase paramStatBase, int paramInt) - { - if(beforeAddStatHooks != null) - for(int i = beforeAddStatHooks.length - 1; i >= 0 ; i--) - beforeAddStatHooks[i].beforeAddStat(paramStatBase, paramInt); - - if(overrideAddStatHooks != null) - overrideAddStatHooks[overrideAddStatHooks.length - 1].addStat(paramStatBase, paramInt); - else - player.localAddStat(paramStatBase, paramInt); - - if(afterAddStatHooks != null) - for(int i = 0; i < afterAddStatHooks.length; i++) - afterAddStatHooks[i].afterAddStat(paramStatBase, paramInt); - - } - - protected ClientPlayerBase GetOverwrittenAddStat(ClientPlayerBase overWriter) - { - if (overrideAddStatHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddStatHooks.length; i++) - if(overrideAddStatHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddStatHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddStatHookTypes = new LinkedList(); - private final static List overrideAddStatHookTypes = new LinkedList(); - private final static List afterAddStatHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeAddStatHooks; - private ClientPlayerBase[] overrideAddStatHooks; - private ClientPlayerBase[] afterAddStatHooks; - - public boolean isAddStatModded; - - private static final Map allBaseBeforeAddStatSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddStatInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddStatSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddStatInferiors = new Hashtable(0); - private static final Map allBaseAfterAddStatSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddStatInferiors = new Hashtable(0); - - public static boolean attackEntityFrom(IClientPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isAttackEntityFromModded) - _result = clientPlayerAPI.attackEntityFrom(paramDamageSource, paramFloat); - else - _result = target.localAttackEntityFrom(paramDamageSource, paramFloat); - return _result; - } - - private boolean attackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - if(beforeAttackEntityFromHooks != null) - for(int i = beforeAttackEntityFromHooks.length - 1; i >= 0 ; i--) - beforeAttackEntityFromHooks[i].beforeAttackEntityFrom(paramDamageSource, paramFloat); - - boolean _result; - if(overrideAttackEntityFromHooks != null) - _result = overrideAttackEntityFromHooks[overrideAttackEntityFromHooks.length - 1].attackEntityFrom(paramDamageSource, paramFloat); - else - _result = player.localAttackEntityFrom(paramDamageSource, paramFloat); - - if(afterAttackEntityFromHooks != null) - for(int i = 0; i < afterAttackEntityFromHooks.length; i++) - afterAttackEntityFromHooks[i].afterAttackEntityFrom(paramDamageSource, paramFloat); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenAttackEntityFrom(ClientPlayerBase overWriter) - { - if (overrideAttackEntityFromHooks == null) - return overWriter; - - for(int i = 0; i < overrideAttackEntityFromHooks.length; i++) - if(overrideAttackEntityFromHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAttackEntityFromHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAttackEntityFromHookTypes = new LinkedList(); - private final static List overrideAttackEntityFromHookTypes = new LinkedList(); - private final static List afterAttackEntityFromHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeAttackEntityFromHooks; - private ClientPlayerBase[] overrideAttackEntityFromHooks; - private ClientPlayerBase[] afterAttackEntityFromHooks; - - public boolean isAttackEntityFromModded; - - private static final Map allBaseBeforeAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAttackEntityFromInferiors = new Hashtable(0); - private static final Map allBaseOverrideAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAttackEntityFromInferiors = new Hashtable(0); - private static final Map allBaseAfterAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseAfterAttackEntityFromInferiors = new Hashtable(0); - - public static void attackTargetEntityWithCurrentItem(IClientPlayerAPI target, net.minecraft.entity.Entity paramEntity) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isAttackTargetEntityWithCurrentItemModded) - clientPlayerAPI.attackTargetEntityWithCurrentItem(paramEntity); - else - target.localAttackTargetEntityWithCurrentItem(paramEntity); - } - - private void attackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - if(beforeAttackTargetEntityWithCurrentItemHooks != null) - for(int i = beforeAttackTargetEntityWithCurrentItemHooks.length - 1; i >= 0 ; i--) - beforeAttackTargetEntityWithCurrentItemHooks[i].beforeAttackTargetEntityWithCurrentItem(paramEntity); - - if(overrideAttackTargetEntityWithCurrentItemHooks != null) - overrideAttackTargetEntityWithCurrentItemHooks[overrideAttackTargetEntityWithCurrentItemHooks.length - 1].attackTargetEntityWithCurrentItem(paramEntity); - else - player.localAttackTargetEntityWithCurrentItem(paramEntity); - - if(afterAttackTargetEntityWithCurrentItemHooks != null) - for(int i = 0; i < afterAttackTargetEntityWithCurrentItemHooks.length; i++) - afterAttackTargetEntityWithCurrentItemHooks[i].afterAttackTargetEntityWithCurrentItem(paramEntity); - - } - - protected ClientPlayerBase GetOverwrittenAttackTargetEntityWithCurrentItem(ClientPlayerBase overWriter) - { - if (overrideAttackTargetEntityWithCurrentItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideAttackTargetEntityWithCurrentItemHooks.length; i++) - if(overrideAttackTargetEntityWithCurrentItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAttackTargetEntityWithCurrentItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - private final static List overrideAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - private final static List afterAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeAttackTargetEntityWithCurrentItemHooks; - private ClientPlayerBase[] overrideAttackTargetEntityWithCurrentItemHooks; - private ClientPlayerBase[] afterAttackTargetEntityWithCurrentItemHooks; - - public boolean isAttackTargetEntityWithCurrentItemModded; - - private static final Map allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - private static final Map allBaseAfterAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - - public static boolean canBreatheUnderwater(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isCanBreatheUnderwaterModded) - _result = clientPlayerAPI.canBreatheUnderwater(); - else - _result = target.localCanBreatheUnderwater(); - return _result; - } - - private boolean canBreatheUnderwater() - { - if(beforeCanBreatheUnderwaterHooks != null) - for(int i = beforeCanBreatheUnderwaterHooks.length - 1; i >= 0 ; i--) - beforeCanBreatheUnderwaterHooks[i].beforeCanBreatheUnderwater(); - - boolean _result; - if(overrideCanBreatheUnderwaterHooks != null) - _result = overrideCanBreatheUnderwaterHooks[overrideCanBreatheUnderwaterHooks.length - 1].canBreatheUnderwater(); - else - _result = player.localCanBreatheUnderwater(); - - if(afterCanBreatheUnderwaterHooks != null) - for(int i = 0; i < afterCanBreatheUnderwaterHooks.length; i++) - afterCanBreatheUnderwaterHooks[i].afterCanBreatheUnderwater(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenCanBreatheUnderwater(ClientPlayerBase overWriter) - { - if (overrideCanBreatheUnderwaterHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanBreatheUnderwaterHooks.length; i++) - if(overrideCanBreatheUnderwaterHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanBreatheUnderwaterHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanBreatheUnderwaterHookTypes = new LinkedList(); - private final static List overrideCanBreatheUnderwaterHookTypes = new LinkedList(); - private final static List afterCanBreatheUnderwaterHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeCanBreatheUnderwaterHooks; - private ClientPlayerBase[] overrideCanBreatheUnderwaterHooks; - private ClientPlayerBase[] afterCanBreatheUnderwaterHooks; - - public boolean isCanBreatheUnderwaterModded; - - private static final Map allBaseBeforeCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanBreatheUnderwaterInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanBreatheUnderwaterInferiors = new Hashtable(0); - private static final Map allBaseAfterCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanBreatheUnderwaterInferiors = new Hashtable(0); - - public static boolean canHarvestBlock(IClientPlayerAPI target, net.minecraft.block.Block paramBlock) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isCanHarvestBlockModded) - _result = clientPlayerAPI.canHarvestBlock(paramBlock); - else - _result = target.localCanHarvestBlock(paramBlock); - return _result; - } - - private boolean canHarvestBlock(net.minecraft.block.Block paramBlock) - { - if(beforeCanHarvestBlockHooks != null) - for(int i = beforeCanHarvestBlockHooks.length - 1; i >= 0 ; i--) - beforeCanHarvestBlockHooks[i].beforeCanHarvestBlock(paramBlock); - - boolean _result; - if(overrideCanHarvestBlockHooks != null) - _result = overrideCanHarvestBlockHooks[overrideCanHarvestBlockHooks.length - 1].canHarvestBlock(paramBlock); - else - _result = player.localCanHarvestBlock(paramBlock); - - if(afterCanHarvestBlockHooks != null) - for(int i = 0; i < afterCanHarvestBlockHooks.length; i++) - afterCanHarvestBlockHooks[i].afterCanHarvestBlock(paramBlock); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenCanHarvestBlock(ClientPlayerBase overWriter) - { - if (overrideCanHarvestBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanHarvestBlockHooks.length; i++) - if(overrideCanHarvestBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanHarvestBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanHarvestBlockHookTypes = new LinkedList(); - private final static List overrideCanHarvestBlockHookTypes = new LinkedList(); - private final static List afterCanHarvestBlockHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeCanHarvestBlockHooks; - private ClientPlayerBase[] overrideCanHarvestBlockHooks; - private ClientPlayerBase[] afterCanHarvestBlockHooks; - - public boolean isCanHarvestBlockModded; - - private static final Map allBaseBeforeCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanHarvestBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanHarvestBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanHarvestBlockInferiors = new Hashtable(0); - - public static boolean canPlayerEdit(IClientPlayerAPI target, int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isCanPlayerEditModded) - _result = clientPlayerAPI.canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = target.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - return _result; - } - - private boolean canPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - if(beforeCanPlayerEditHooks != null) - for(int i = beforeCanPlayerEditHooks.length - 1; i >= 0 ; i--) - beforeCanPlayerEditHooks[i].beforeCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - boolean _result; - if(overrideCanPlayerEditHooks != null) - _result = overrideCanPlayerEditHooks[overrideCanPlayerEditHooks.length - 1].canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = player.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - if(afterCanPlayerEditHooks != null) - for(int i = 0; i < afterCanPlayerEditHooks.length; i++) - afterCanPlayerEditHooks[i].afterCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenCanPlayerEdit(ClientPlayerBase overWriter) - { - if (overrideCanPlayerEditHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanPlayerEditHooks.length; i++) - if(overrideCanPlayerEditHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanPlayerEditHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanPlayerEditHookTypes = new LinkedList(); - private final static List overrideCanPlayerEditHookTypes = new LinkedList(); - private final static List afterCanPlayerEditHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeCanPlayerEditHooks; - private ClientPlayerBase[] overrideCanPlayerEditHooks; - private ClientPlayerBase[] afterCanPlayerEditHooks; - - public boolean isCanPlayerEditModded; - - private static final Map allBaseBeforeCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanPlayerEditInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanPlayerEditInferiors = new Hashtable(0); - private static final Map allBaseAfterCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanPlayerEditInferiors = new Hashtable(0); - - public static boolean canTriggerWalking(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isCanTriggerWalkingModded) - _result = clientPlayerAPI.canTriggerWalking(); - else - _result = target.localCanTriggerWalking(); - return _result; - } - - private boolean canTriggerWalking() - { - if(beforeCanTriggerWalkingHooks != null) - for(int i = beforeCanTriggerWalkingHooks.length - 1; i >= 0 ; i--) - beforeCanTriggerWalkingHooks[i].beforeCanTriggerWalking(); - - boolean _result; - if(overrideCanTriggerWalkingHooks != null) - _result = overrideCanTriggerWalkingHooks[overrideCanTriggerWalkingHooks.length - 1].canTriggerWalking(); - else - _result = player.localCanTriggerWalking(); - - if(afterCanTriggerWalkingHooks != null) - for(int i = 0; i < afterCanTriggerWalkingHooks.length; i++) - afterCanTriggerWalkingHooks[i].afterCanTriggerWalking(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenCanTriggerWalking(ClientPlayerBase overWriter) - { - if (overrideCanTriggerWalkingHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanTriggerWalkingHooks.length; i++) - if(overrideCanTriggerWalkingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanTriggerWalkingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanTriggerWalkingHookTypes = new LinkedList(); - private final static List overrideCanTriggerWalkingHookTypes = new LinkedList(); - private final static List afterCanTriggerWalkingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeCanTriggerWalkingHooks; - private ClientPlayerBase[] overrideCanTriggerWalkingHooks; - private ClientPlayerBase[] afterCanTriggerWalkingHooks; - - public boolean isCanTriggerWalkingModded; - - private static final Map allBaseBeforeCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanTriggerWalkingInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanTriggerWalkingInferiors = new Hashtable(0); - private static final Map allBaseAfterCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanTriggerWalkingInferiors = new Hashtable(0); - - public static void closeScreen(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isCloseScreenModded) - clientPlayerAPI.closeScreen(); - else - target.localCloseScreen(); - } - - private void closeScreen() - { - if(beforeCloseScreenHooks != null) - for(int i = beforeCloseScreenHooks.length - 1; i >= 0 ; i--) - beforeCloseScreenHooks[i].beforeCloseScreen(); - - if(overrideCloseScreenHooks != null) - overrideCloseScreenHooks[overrideCloseScreenHooks.length - 1].closeScreen(); - else - player.localCloseScreen(); - - if(afterCloseScreenHooks != null) - for(int i = 0; i < afterCloseScreenHooks.length; i++) - afterCloseScreenHooks[i].afterCloseScreen(); - - } - - protected ClientPlayerBase GetOverwrittenCloseScreen(ClientPlayerBase overWriter) - { - if (overrideCloseScreenHooks == null) - return overWriter; - - for(int i = 0; i < overrideCloseScreenHooks.length; i++) - if(overrideCloseScreenHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCloseScreenHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCloseScreenHookTypes = new LinkedList(); - private final static List overrideCloseScreenHookTypes = new LinkedList(); - private final static List afterCloseScreenHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeCloseScreenHooks; - private ClientPlayerBase[] overrideCloseScreenHooks; - private ClientPlayerBase[] afterCloseScreenHooks; - - public boolean isCloseScreenModded; - - private static final Map allBaseBeforeCloseScreenSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCloseScreenInferiors = new Hashtable(0); - private static final Map allBaseOverrideCloseScreenSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCloseScreenInferiors = new Hashtable(0); - private static final Map allBaseAfterCloseScreenSuperiors = new Hashtable(0); - private static final Map allBaseAfterCloseScreenInferiors = new Hashtable(0); - - public static void damageEntity(IClientPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDamageEntityModded) - clientPlayerAPI.damageEntity(paramDamageSource, paramFloat); - else - target.localDamageEntity(paramDamageSource, paramFloat); - } - - private void damageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - if(beforeDamageEntityHooks != null) - for(int i = beforeDamageEntityHooks.length - 1; i >= 0 ; i--) - beforeDamageEntityHooks[i].beforeDamageEntity(paramDamageSource, paramFloat); - - if(overrideDamageEntityHooks != null) - overrideDamageEntityHooks[overrideDamageEntityHooks.length - 1].damageEntity(paramDamageSource, paramFloat); - else - player.localDamageEntity(paramDamageSource, paramFloat); - - if(afterDamageEntityHooks != null) - for(int i = 0; i < afterDamageEntityHooks.length; i++) - afterDamageEntityHooks[i].afterDamageEntity(paramDamageSource, paramFloat); - - } - - protected ClientPlayerBase GetOverwrittenDamageEntity(ClientPlayerBase overWriter) - { - if (overrideDamageEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideDamageEntityHooks.length; i++) - if(overrideDamageEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDamageEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDamageEntityHookTypes = new LinkedList(); - private final static List overrideDamageEntityHookTypes = new LinkedList(); - private final static List afterDamageEntityHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDamageEntityHooks; - private ClientPlayerBase[] overrideDamageEntityHooks; - private ClientPlayerBase[] afterDamageEntityHooks; - - public boolean isDamageEntityModded; - - private static final Map allBaseBeforeDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeDamageEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideDamageEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterDamageEntityInferiors = new Hashtable(0); - - public static void displayGUIBrewingStand(IClientPlayerAPI target, net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIBrewingStandModded) - clientPlayerAPI.displayGUIBrewingStand(paramTileEntityBrewingStand); - else - target.localDisplayGUIBrewingStand(paramTileEntityBrewingStand); - } - - private void displayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand) - { - if(beforeDisplayGUIBrewingStandHooks != null) - for(int i = beforeDisplayGUIBrewingStandHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIBrewingStandHooks[i].beforeDisplayGUIBrewingStand(paramTileEntityBrewingStand); - - if(overrideDisplayGUIBrewingStandHooks != null) - overrideDisplayGUIBrewingStandHooks[overrideDisplayGUIBrewingStandHooks.length - 1].displayGUIBrewingStand(paramTileEntityBrewingStand); - else - player.localDisplayGUIBrewingStand(paramTileEntityBrewingStand); - - if(afterDisplayGUIBrewingStandHooks != null) - for(int i = 0; i < afterDisplayGUIBrewingStandHooks.length; i++) - afterDisplayGUIBrewingStandHooks[i].afterDisplayGUIBrewingStand(paramTileEntityBrewingStand); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIBrewingStand(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIBrewingStandHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIBrewingStandHooks.length; i++) - if(overrideDisplayGUIBrewingStandHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIBrewingStandHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIBrewingStandHookTypes = new LinkedList(); - private final static List overrideDisplayGUIBrewingStandHookTypes = new LinkedList(); - private final static List afterDisplayGUIBrewingStandHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIBrewingStandHooks; - private ClientPlayerBase[] overrideDisplayGUIBrewingStandHooks; - private ClientPlayerBase[] afterDisplayGUIBrewingStandHooks; - - public boolean isDisplayGUIBrewingStandModded; - - private static final Map allBaseBeforeDisplayGUIBrewingStandSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIBrewingStandInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIBrewingStandSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIBrewingStandInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIBrewingStandSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIBrewingStandInferiors = new Hashtable(0); - - public static void displayGUIChest(IClientPlayerAPI target, net.minecraft.inventory.IInventory paramIInventory) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIChestModded) - clientPlayerAPI.displayGUIChest(paramIInventory); - else - target.localDisplayGUIChest(paramIInventory); - } - - private void displayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - if(beforeDisplayGUIChestHooks != null) - for(int i = beforeDisplayGUIChestHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIChestHooks[i].beforeDisplayGUIChest(paramIInventory); - - if(overrideDisplayGUIChestHooks != null) - overrideDisplayGUIChestHooks[overrideDisplayGUIChestHooks.length - 1].displayGUIChest(paramIInventory); - else - player.localDisplayGUIChest(paramIInventory); - - if(afterDisplayGUIChestHooks != null) - for(int i = 0; i < afterDisplayGUIChestHooks.length; i++) - afterDisplayGUIChestHooks[i].afterDisplayGUIChest(paramIInventory); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIChest(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIChestHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIChestHooks.length; i++) - if(overrideDisplayGUIChestHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIChestHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIChestHookTypes = new LinkedList(); - private final static List overrideDisplayGUIChestHookTypes = new LinkedList(); - private final static List afterDisplayGUIChestHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIChestHooks; - private ClientPlayerBase[] overrideDisplayGUIChestHooks; - private ClientPlayerBase[] afterDisplayGUIChestHooks; - - public boolean isDisplayGUIChestModded; - - private static final Map allBaseBeforeDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIChestInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIChestInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIChestInferiors = new Hashtable(0); - - public static void displayGUIDispenser(IClientPlayerAPI target, net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIDispenserModded) - clientPlayerAPI.displayGUIDispenser(paramTileEntityDispenser); - else - target.localDisplayGUIDispenser(paramTileEntityDispenser); - } - - private void displayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - if(beforeDisplayGUIDispenserHooks != null) - for(int i = beforeDisplayGUIDispenserHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIDispenserHooks[i].beforeDisplayGUIDispenser(paramTileEntityDispenser); - - if(overrideDisplayGUIDispenserHooks != null) - overrideDisplayGUIDispenserHooks[overrideDisplayGUIDispenserHooks.length - 1].displayGUIDispenser(paramTileEntityDispenser); - else - player.localDisplayGUIDispenser(paramTileEntityDispenser); - - if(afterDisplayGUIDispenserHooks != null) - for(int i = 0; i < afterDisplayGUIDispenserHooks.length; i++) - afterDisplayGUIDispenserHooks[i].afterDisplayGUIDispenser(paramTileEntityDispenser); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIDispenser(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIDispenserHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIDispenserHooks.length; i++) - if(overrideDisplayGUIDispenserHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIDispenserHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIDispenserHookTypes = new LinkedList(); - private final static List overrideDisplayGUIDispenserHookTypes = new LinkedList(); - private final static List afterDisplayGUIDispenserHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIDispenserHooks; - private ClientPlayerBase[] overrideDisplayGUIDispenserHooks; - private ClientPlayerBase[] afterDisplayGUIDispenserHooks; - - public boolean isDisplayGUIDispenserModded; - - private static final Map allBaseBeforeDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIDispenserInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIDispenserInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIDispenserInferiors = new Hashtable(0); - - public static void displayGUIEditSign(IClientPlayerAPI target, net.minecraft.tileentity.TileEntity paramTileEntity) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIEditSignModded) - clientPlayerAPI.displayGUIEditSign(paramTileEntity); - else - target.localDisplayGUIEditSign(paramTileEntity); - } - - private void displayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity) - { - if(beforeDisplayGUIEditSignHooks != null) - for(int i = beforeDisplayGUIEditSignHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIEditSignHooks[i].beforeDisplayGUIEditSign(paramTileEntity); - - if(overrideDisplayGUIEditSignHooks != null) - overrideDisplayGUIEditSignHooks[overrideDisplayGUIEditSignHooks.length - 1].displayGUIEditSign(paramTileEntity); - else - player.localDisplayGUIEditSign(paramTileEntity); - - if(afterDisplayGUIEditSignHooks != null) - for(int i = 0; i < afterDisplayGUIEditSignHooks.length; i++) - afterDisplayGUIEditSignHooks[i].afterDisplayGUIEditSign(paramTileEntity); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIEditSign(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIEditSignHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIEditSignHooks.length; i++) - if(overrideDisplayGUIEditSignHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIEditSignHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIEditSignHookTypes = new LinkedList(); - private final static List overrideDisplayGUIEditSignHookTypes = new LinkedList(); - private final static List afterDisplayGUIEditSignHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIEditSignHooks; - private ClientPlayerBase[] overrideDisplayGUIEditSignHooks; - private ClientPlayerBase[] afterDisplayGUIEditSignHooks; - - public boolean isDisplayGUIEditSignModded; - - private static final Map allBaseBeforeDisplayGUIEditSignSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIEditSignInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIEditSignSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIEditSignInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIEditSignSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIEditSignInferiors = new Hashtable(0); - - public static void displayGUIEnchantment(IClientPlayerAPI target, int paramInt1, int paramInt2, int paramInt3, String paramString) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIEnchantmentModded) - clientPlayerAPI.displayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - else - target.localDisplayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - } - - private void displayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString) - { - if(beforeDisplayGUIEnchantmentHooks != null) - for(int i = beforeDisplayGUIEnchantmentHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIEnchantmentHooks[i].beforeDisplayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - - if(overrideDisplayGUIEnchantmentHooks != null) - overrideDisplayGUIEnchantmentHooks[overrideDisplayGUIEnchantmentHooks.length - 1].displayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - else - player.localDisplayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - - if(afterDisplayGUIEnchantmentHooks != null) - for(int i = 0; i < afterDisplayGUIEnchantmentHooks.length; i++) - afterDisplayGUIEnchantmentHooks[i].afterDisplayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIEnchantment(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIEnchantmentHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIEnchantmentHooks.length; i++) - if(overrideDisplayGUIEnchantmentHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIEnchantmentHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIEnchantmentHookTypes = new LinkedList(); - private final static List overrideDisplayGUIEnchantmentHookTypes = new LinkedList(); - private final static List afterDisplayGUIEnchantmentHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIEnchantmentHooks; - private ClientPlayerBase[] overrideDisplayGUIEnchantmentHooks; - private ClientPlayerBase[] afterDisplayGUIEnchantmentHooks; - - public boolean isDisplayGUIEnchantmentModded; - - private static final Map allBaseBeforeDisplayGUIEnchantmentSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIEnchantmentInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIEnchantmentSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIEnchantmentInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIEnchantmentSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIEnchantmentInferiors = new Hashtable(0); - - public static void displayGUIFurnace(IClientPlayerAPI target, net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIFurnaceModded) - clientPlayerAPI.displayGUIFurnace(paramTileEntityFurnace); - else - target.localDisplayGUIFurnace(paramTileEntityFurnace); - } - - private void displayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - if(beforeDisplayGUIFurnaceHooks != null) - for(int i = beforeDisplayGUIFurnaceHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIFurnaceHooks[i].beforeDisplayGUIFurnace(paramTileEntityFurnace); - - if(overrideDisplayGUIFurnaceHooks != null) - overrideDisplayGUIFurnaceHooks[overrideDisplayGUIFurnaceHooks.length - 1].displayGUIFurnace(paramTileEntityFurnace); - else - player.localDisplayGUIFurnace(paramTileEntityFurnace); - - if(afterDisplayGUIFurnaceHooks != null) - for(int i = 0; i < afterDisplayGUIFurnaceHooks.length; i++) - afterDisplayGUIFurnaceHooks[i].afterDisplayGUIFurnace(paramTileEntityFurnace); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIFurnace(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIFurnaceHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIFurnaceHooks.length; i++) - if(overrideDisplayGUIFurnaceHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIFurnaceHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIFurnaceHookTypes = new LinkedList(); - private final static List overrideDisplayGUIFurnaceHookTypes = new LinkedList(); - private final static List afterDisplayGUIFurnaceHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIFurnaceHooks; - private ClientPlayerBase[] overrideDisplayGUIFurnaceHooks; - private ClientPlayerBase[] afterDisplayGUIFurnaceHooks; - - public boolean isDisplayGUIFurnaceModded; - - private static final Map allBaseBeforeDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIFurnaceInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIFurnaceInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIFurnaceInferiors = new Hashtable(0); - - public static void displayGUIWorkbench(IClientPlayerAPI target, int paramInt1, int paramInt2, int paramInt3) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDisplayGUIWorkbenchModded) - clientPlayerAPI.displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else - target.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - } - - private void displayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - if(beforeDisplayGUIWorkbenchHooks != null) - for(int i = beforeDisplayGUIWorkbenchHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIWorkbenchHooks[i].beforeDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - if(overrideDisplayGUIWorkbenchHooks != null) - overrideDisplayGUIWorkbenchHooks[overrideDisplayGUIWorkbenchHooks.length - 1].displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else - player.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - if(afterDisplayGUIWorkbenchHooks != null) - for(int i = 0; i < afterDisplayGUIWorkbenchHooks.length; i++) - afterDisplayGUIWorkbenchHooks[i].afterDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - } - - protected ClientPlayerBase GetOverwrittenDisplayGUIWorkbench(ClientPlayerBase overWriter) - { - if (overrideDisplayGUIWorkbenchHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIWorkbenchHooks.length; i++) - if(overrideDisplayGUIWorkbenchHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIWorkbenchHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIWorkbenchHookTypes = new LinkedList(); - private final static List overrideDisplayGUIWorkbenchHookTypes = new LinkedList(); - private final static List afterDisplayGUIWorkbenchHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDisplayGUIWorkbenchHooks; - private ClientPlayerBase[] overrideDisplayGUIWorkbenchHooks; - private ClientPlayerBase[] afterDisplayGUIWorkbenchHooks; - - public boolean isDisplayGUIWorkbenchModded; - - private static final Map allBaseBeforeDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIWorkbenchInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIWorkbenchInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIWorkbenchInferiors = new Hashtable(0); - - public static net.minecraft.entity.item.EntityItem dropOneItem(IClientPlayerAPI target, boolean paramBoolean) - { - net.minecraft.entity.item.EntityItem _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDropOneItemModded) - _result = clientPlayerAPI.dropOneItem(paramBoolean); - else - _result = target.localDropOneItem(paramBoolean); - return _result; - } - - private net.minecraft.entity.item.EntityItem dropOneItem(boolean paramBoolean) - { - if(beforeDropOneItemHooks != null) - for(int i = beforeDropOneItemHooks.length - 1; i >= 0 ; i--) - beforeDropOneItemHooks[i].beforeDropOneItem(paramBoolean); - - net.minecraft.entity.item.EntityItem _result; - if(overrideDropOneItemHooks != null) - _result = overrideDropOneItemHooks[overrideDropOneItemHooks.length - 1].dropOneItem(paramBoolean); - else - _result = player.localDropOneItem(paramBoolean); - - if(afterDropOneItemHooks != null) - for(int i = 0; i < afterDropOneItemHooks.length; i++) - afterDropOneItemHooks[i].afterDropOneItem(paramBoolean); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenDropOneItem(ClientPlayerBase overWriter) - { - if (overrideDropOneItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideDropOneItemHooks.length; i++) - if(overrideDropOneItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDropOneItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDropOneItemHookTypes = new LinkedList(); - private final static List overrideDropOneItemHookTypes = new LinkedList(); - private final static List afterDropOneItemHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDropOneItemHooks; - private ClientPlayerBase[] overrideDropOneItemHooks; - private ClientPlayerBase[] afterDropOneItemHooks; - - public boolean isDropOneItemModded; - - private static final Map allBaseBeforeDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDropOneItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDropOneItemInferiors = new Hashtable(0); - private static final Map allBaseAfterDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterDropOneItemInferiors = new Hashtable(0); - - public static net.minecraft.entity.item.EntityItem dropPlayerItem(IClientPlayerAPI target, net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - net.minecraft.entity.item.EntityItem _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDropPlayerItemModded) - _result = clientPlayerAPI.dropPlayerItem(paramItemStack, paramBoolean); - else - _result = target.localDropPlayerItem(paramItemStack, paramBoolean); - return _result; - } - - private net.minecraft.entity.item.EntityItem dropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - if(beforeDropPlayerItemHooks != null) - for(int i = beforeDropPlayerItemHooks.length - 1; i >= 0 ; i--) - beforeDropPlayerItemHooks[i].beforeDropPlayerItem(paramItemStack, paramBoolean); - - net.minecraft.entity.item.EntityItem _result; - if(overrideDropPlayerItemHooks != null) - _result = overrideDropPlayerItemHooks[overrideDropPlayerItemHooks.length - 1].dropPlayerItem(paramItemStack, paramBoolean); - else - _result = player.localDropPlayerItem(paramItemStack, paramBoolean); - - if(afterDropPlayerItemHooks != null) - for(int i = 0; i < afterDropPlayerItemHooks.length; i++) - afterDropPlayerItemHooks[i].afterDropPlayerItem(paramItemStack, paramBoolean); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenDropPlayerItem(ClientPlayerBase overWriter) - { - if (overrideDropPlayerItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideDropPlayerItemHooks.length; i++) - if(overrideDropPlayerItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDropPlayerItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDropPlayerItemHookTypes = new LinkedList(); - private final static List overrideDropPlayerItemHookTypes = new LinkedList(); - private final static List afterDropPlayerItemHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDropPlayerItemHooks; - private ClientPlayerBase[] overrideDropPlayerItemHooks; - private ClientPlayerBase[] afterDropPlayerItemHooks; - - public boolean isDropPlayerItemModded; - - private static final Map allBaseBeforeDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDropPlayerItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemInferiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemInferiors = new Hashtable(0); - - public static net.minecraft.entity.item.EntityItem dropPlayerItemWithRandomChoice(IClientPlayerAPI target, net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2) - { - net.minecraft.entity.item.EntityItem _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isDropPlayerItemWithRandomChoiceModded) - _result = clientPlayerAPI.dropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - else - _result = target.localDropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - return _result; - } - - private net.minecraft.entity.item.EntityItem dropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2) - { - if(beforeDropPlayerItemWithRandomChoiceHooks != null) - for(int i = beforeDropPlayerItemWithRandomChoiceHooks.length - 1; i >= 0 ; i--) - beforeDropPlayerItemWithRandomChoiceHooks[i].beforeDropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - - net.minecraft.entity.item.EntityItem _result; - if(overrideDropPlayerItemWithRandomChoiceHooks != null) - _result = overrideDropPlayerItemWithRandomChoiceHooks[overrideDropPlayerItemWithRandomChoiceHooks.length - 1].dropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - else - _result = player.localDropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - - if(afterDropPlayerItemWithRandomChoiceHooks != null) - for(int i = 0; i < afterDropPlayerItemWithRandomChoiceHooks.length; i++) - afterDropPlayerItemWithRandomChoiceHooks[i].afterDropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenDropPlayerItemWithRandomChoice(ClientPlayerBase overWriter) - { - if (overrideDropPlayerItemWithRandomChoiceHooks == null) - return overWriter; - - for(int i = 0; i < overrideDropPlayerItemWithRandomChoiceHooks.length; i++) - if(overrideDropPlayerItemWithRandomChoiceHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDropPlayerItemWithRandomChoiceHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDropPlayerItemWithRandomChoiceHookTypes = new LinkedList(); - private final static List overrideDropPlayerItemWithRandomChoiceHookTypes = new LinkedList(); - private final static List afterDropPlayerItemWithRandomChoiceHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeDropPlayerItemWithRandomChoiceHooks; - private ClientPlayerBase[] overrideDropPlayerItemWithRandomChoiceHooks; - private ClientPlayerBase[] afterDropPlayerItemWithRandomChoiceHooks; - - public boolean isDropPlayerItemWithRandomChoiceModded; - - private static final Map allBaseBeforeDropPlayerItemWithRandomChoiceSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDropPlayerItemWithRandomChoiceInferiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemWithRandomChoiceSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemWithRandomChoiceInferiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemWithRandomChoiceSuperiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemWithRandomChoiceInferiors = new Hashtable(0); - - public static void fall(IClientPlayerAPI target, float paramFloat) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isFallModded) - clientPlayerAPI.fall(paramFloat); - else - target.localFall(paramFloat); - } - - private void fall(float paramFloat) - { - if(beforeFallHooks != null) - for(int i = beforeFallHooks.length - 1; i >= 0 ; i--) - beforeFallHooks[i].beforeFall(paramFloat); - - if(overrideFallHooks != null) - overrideFallHooks[overrideFallHooks.length - 1].fall(paramFloat); - else - player.localFall(paramFloat); - - if(afterFallHooks != null) - for(int i = 0; i < afterFallHooks.length; i++) - afterFallHooks[i].afterFall(paramFloat); - - } - - protected ClientPlayerBase GetOverwrittenFall(ClientPlayerBase overWriter) - { - if (overrideFallHooks == null) - return overWriter; - - for(int i = 0; i < overrideFallHooks.length; i++) - if(overrideFallHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideFallHooks[i - 1]; - - return overWriter; - } - - private final static List beforeFallHookTypes = new LinkedList(); - private final static List overrideFallHookTypes = new LinkedList(); - private final static List afterFallHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeFallHooks; - private ClientPlayerBase[] overrideFallHooks; - private ClientPlayerBase[] afterFallHooks; - - public boolean isFallModded; - - private static final Map allBaseBeforeFallSuperiors = new Hashtable(0); - private static final Map allBaseBeforeFallInferiors = new Hashtable(0); - private static final Map allBaseOverrideFallSuperiors = new Hashtable(0); - private static final Map allBaseOverrideFallInferiors = new Hashtable(0); - private static final Map allBaseAfterFallSuperiors = new Hashtable(0); - private static final Map allBaseAfterFallInferiors = new Hashtable(0); - - public static float getAIMoveSpeed(IClientPlayerAPI target) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetAIMoveSpeedModded) - _result = clientPlayerAPI.getAIMoveSpeed(); - else - _result = target.localGetAIMoveSpeed(); - return _result; - } - - private float getAIMoveSpeed() - { - if(beforeGetAIMoveSpeedHooks != null) - for(int i = beforeGetAIMoveSpeedHooks.length - 1; i >= 0 ; i--) - beforeGetAIMoveSpeedHooks[i].beforeGetAIMoveSpeed(); - - float _result; - if(overrideGetAIMoveSpeedHooks != null) - _result = overrideGetAIMoveSpeedHooks[overrideGetAIMoveSpeedHooks.length - 1].getAIMoveSpeed(); - else - _result = player.localGetAIMoveSpeed(); - - if(afterGetAIMoveSpeedHooks != null) - for(int i = 0; i < afterGetAIMoveSpeedHooks.length; i++) - afterGetAIMoveSpeedHooks[i].afterGetAIMoveSpeed(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetAIMoveSpeed(ClientPlayerBase overWriter) - { - if (overrideGetAIMoveSpeedHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetAIMoveSpeedHooks.length; i++) - if(overrideGetAIMoveSpeedHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetAIMoveSpeedHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetAIMoveSpeedHookTypes = new LinkedList(); - private final static List overrideGetAIMoveSpeedHookTypes = new LinkedList(); - private final static List afterGetAIMoveSpeedHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetAIMoveSpeedHooks; - private ClientPlayerBase[] overrideGetAIMoveSpeedHooks; - private ClientPlayerBase[] afterGetAIMoveSpeedHooks; - - public boolean isGetAIMoveSpeedModded; - - private static final Map allBaseBeforeGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetAIMoveSpeedInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetAIMoveSpeedInferiors = new Hashtable(0); - private static final Map allBaseAfterGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetAIMoveSpeedInferiors = new Hashtable(0); - - public static float getBedOrientationInDegrees(IClientPlayerAPI target) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetBedOrientationInDegreesModded) - _result = clientPlayerAPI.getBedOrientationInDegrees(); - else - _result = target.localGetBedOrientationInDegrees(); - return _result; - } - - private float getBedOrientationInDegrees() - { - if(beforeGetBedOrientationInDegreesHooks != null) - for(int i = beforeGetBedOrientationInDegreesHooks.length - 1; i >= 0 ; i--) - beforeGetBedOrientationInDegreesHooks[i].beforeGetBedOrientationInDegrees(); - - float _result; - if(overrideGetBedOrientationInDegreesHooks != null) - _result = overrideGetBedOrientationInDegreesHooks[overrideGetBedOrientationInDegreesHooks.length - 1].getBedOrientationInDegrees(); - else - _result = player.localGetBedOrientationInDegrees(); - - if(afterGetBedOrientationInDegreesHooks != null) - for(int i = 0; i < afterGetBedOrientationInDegreesHooks.length; i++) - afterGetBedOrientationInDegreesHooks[i].afterGetBedOrientationInDegrees(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetBedOrientationInDegrees(ClientPlayerBase overWriter) - { - if (overrideGetBedOrientationInDegreesHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetBedOrientationInDegreesHooks.length; i++) - if(overrideGetBedOrientationInDegreesHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetBedOrientationInDegreesHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetBedOrientationInDegreesHookTypes = new LinkedList(); - private final static List overrideGetBedOrientationInDegreesHookTypes = new LinkedList(); - private final static List afterGetBedOrientationInDegreesHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetBedOrientationInDegreesHooks; - private ClientPlayerBase[] overrideGetBedOrientationInDegreesHooks; - private ClientPlayerBase[] afterGetBedOrientationInDegreesHooks; - - public boolean isGetBedOrientationInDegreesModded; - - private static final Map allBaseBeforeGetBedOrientationInDegreesSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetBedOrientationInDegreesInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetBedOrientationInDegreesSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetBedOrientationInDegreesInferiors = new Hashtable(0); - private static final Map allBaseAfterGetBedOrientationInDegreesSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetBedOrientationInDegreesInferiors = new Hashtable(0); - - public static float getBrightness(IClientPlayerAPI target, float paramFloat) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetBrightnessModded) - _result = clientPlayerAPI.getBrightness(paramFloat); - else - _result = target.localGetBrightness(paramFloat); - return _result; - } - - private float getBrightness(float paramFloat) - { - if(beforeGetBrightnessHooks != null) - for(int i = beforeGetBrightnessHooks.length - 1; i >= 0 ; i--) - beforeGetBrightnessHooks[i].beforeGetBrightness(paramFloat); - - float _result; - if(overrideGetBrightnessHooks != null) - _result = overrideGetBrightnessHooks[overrideGetBrightnessHooks.length - 1].getBrightness(paramFloat); - else - _result = player.localGetBrightness(paramFloat); - - if(afterGetBrightnessHooks != null) - for(int i = 0; i < afterGetBrightnessHooks.length; i++) - afterGetBrightnessHooks[i].afterGetBrightness(paramFloat); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetBrightness(ClientPlayerBase overWriter) - { - if (overrideGetBrightnessHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetBrightnessHooks.length; i++) - if(overrideGetBrightnessHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetBrightnessHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetBrightnessHookTypes = new LinkedList(); - private final static List overrideGetBrightnessHookTypes = new LinkedList(); - private final static List afterGetBrightnessHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetBrightnessHooks; - private ClientPlayerBase[] overrideGetBrightnessHooks; - private ClientPlayerBase[] afterGetBrightnessHooks; - - public boolean isGetBrightnessModded; - - private static final Map allBaseBeforeGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetBrightnessInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessInferiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessInferiors = new Hashtable(0); - - public static int getBrightnessForRender(IClientPlayerAPI target, float paramFloat) - { - int _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetBrightnessForRenderModded) - _result = clientPlayerAPI.getBrightnessForRender(paramFloat); - else - _result = target.localGetBrightnessForRender(paramFloat); - return _result; - } - - private int getBrightnessForRender(float paramFloat) - { - if(beforeGetBrightnessForRenderHooks != null) - for(int i = beforeGetBrightnessForRenderHooks.length - 1; i >= 0 ; i--) - beforeGetBrightnessForRenderHooks[i].beforeGetBrightnessForRender(paramFloat); - - int _result; - if(overrideGetBrightnessForRenderHooks != null) - _result = overrideGetBrightnessForRenderHooks[overrideGetBrightnessForRenderHooks.length - 1].getBrightnessForRender(paramFloat); - else - _result = player.localGetBrightnessForRender(paramFloat); - - if(afterGetBrightnessForRenderHooks != null) - for(int i = 0; i < afterGetBrightnessForRenderHooks.length; i++) - afterGetBrightnessForRenderHooks[i].afterGetBrightnessForRender(paramFloat); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetBrightnessForRender(ClientPlayerBase overWriter) - { - if (overrideGetBrightnessForRenderHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetBrightnessForRenderHooks.length; i++) - if(overrideGetBrightnessForRenderHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetBrightnessForRenderHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetBrightnessForRenderHookTypes = new LinkedList(); - private final static List overrideGetBrightnessForRenderHookTypes = new LinkedList(); - private final static List afterGetBrightnessForRenderHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetBrightnessForRenderHooks; - private ClientPlayerBase[] overrideGetBrightnessForRenderHooks; - private ClientPlayerBase[] afterGetBrightnessForRenderHooks; - - public boolean isGetBrightnessForRenderModded; - - private static final Map allBaseBeforeGetBrightnessForRenderSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetBrightnessForRenderInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessForRenderSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessForRenderInferiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessForRenderSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessForRenderInferiors = new Hashtable(0); - - public static float getCurrentPlayerStrVsBlock(IClientPlayerAPI target, net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetCurrentPlayerStrVsBlockModded) - _result = clientPlayerAPI.getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = target.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - return _result; - } - - private float getCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - if(beforeGetCurrentPlayerStrVsBlockHooks != null) - for(int i = beforeGetCurrentPlayerStrVsBlockHooks.length - 1; i >= 0 ; i--) - beforeGetCurrentPlayerStrVsBlockHooks[i].beforeGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - float _result; - if(overrideGetCurrentPlayerStrVsBlockHooks != null) - _result = overrideGetCurrentPlayerStrVsBlockHooks[overrideGetCurrentPlayerStrVsBlockHooks.length - 1].getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = player.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - if(afterGetCurrentPlayerStrVsBlockHooks != null) - for(int i = 0; i < afterGetCurrentPlayerStrVsBlockHooks.length; i++) - afterGetCurrentPlayerStrVsBlockHooks[i].afterGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetCurrentPlayerStrVsBlock(ClientPlayerBase overWriter) - { - if (overrideGetCurrentPlayerStrVsBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetCurrentPlayerStrVsBlockHooks.length; i++) - if(overrideGetCurrentPlayerStrVsBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetCurrentPlayerStrVsBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - private final static List overrideGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - private final static List afterGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetCurrentPlayerStrVsBlockHooks; - private ClientPlayerBase[] overrideGetCurrentPlayerStrVsBlockHooks; - private ClientPlayerBase[] afterGetCurrentPlayerStrVsBlockHooks; - - public boolean isGetCurrentPlayerStrVsBlockModded; - - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - - public static float getCurrentPlayerStrVsBlockForge(IClientPlayerAPI target, net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetCurrentPlayerStrVsBlockForgeModded) - _result = clientPlayerAPI.getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = target.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - return _result; - } - - private float getCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - if(beforeGetCurrentPlayerStrVsBlockForgeHooks != null) - for(int i = beforeGetCurrentPlayerStrVsBlockForgeHooks.length - 1; i >= 0 ; i--) - beforeGetCurrentPlayerStrVsBlockForgeHooks[i].beforeGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - float _result; - if(overrideGetCurrentPlayerStrVsBlockForgeHooks != null) - _result = overrideGetCurrentPlayerStrVsBlockForgeHooks[overrideGetCurrentPlayerStrVsBlockForgeHooks.length - 1].getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = player.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - if(afterGetCurrentPlayerStrVsBlockForgeHooks != null) - for(int i = 0; i < afterGetCurrentPlayerStrVsBlockForgeHooks.length; i++) - afterGetCurrentPlayerStrVsBlockForgeHooks[i].afterGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetCurrentPlayerStrVsBlockForge(ClientPlayerBase overWriter) - { - if (overrideGetCurrentPlayerStrVsBlockForgeHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetCurrentPlayerStrVsBlockForgeHooks.length; i++) - if(overrideGetCurrentPlayerStrVsBlockForgeHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetCurrentPlayerStrVsBlockForgeHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - private final static List overrideGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - private final static List afterGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetCurrentPlayerStrVsBlockForgeHooks; - private ClientPlayerBase[] overrideGetCurrentPlayerStrVsBlockForgeHooks; - private ClientPlayerBase[] afterGetCurrentPlayerStrVsBlockForgeHooks; - - public boolean isGetCurrentPlayerStrVsBlockForgeModded; - - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - - public static double getDistanceSq(IClientPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - double _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetDistanceSqModded) - _result = clientPlayerAPI.getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = target.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - return _result; - } - - private double getDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeGetDistanceSqHooks != null) - for(int i = beforeGetDistanceSqHooks.length - 1; i >= 0 ; i--) - beforeGetDistanceSqHooks[i].beforeGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - double _result; - if(overrideGetDistanceSqHooks != null) - _result = overrideGetDistanceSqHooks[overrideGetDistanceSqHooks.length - 1].getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = player.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - if(afterGetDistanceSqHooks != null) - for(int i = 0; i < afterGetDistanceSqHooks.length; i++) - afterGetDistanceSqHooks[i].afterGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetDistanceSq(ClientPlayerBase overWriter) - { - if (overrideGetDistanceSqHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetDistanceSqHooks.length; i++) - if(overrideGetDistanceSqHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetDistanceSqHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetDistanceSqHookTypes = new LinkedList(); - private final static List overrideGetDistanceSqHookTypes = new LinkedList(); - private final static List afterGetDistanceSqHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetDistanceSqHooks; - private ClientPlayerBase[] overrideGetDistanceSqHooks; - private ClientPlayerBase[] afterGetDistanceSqHooks; - - public boolean isGetDistanceSqModded; - - private static final Map allBaseBeforeGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetDistanceSqInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqInferiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqInferiors = new Hashtable(0); - - public static double getDistanceSqToEntity(IClientPlayerAPI target, net.minecraft.entity.Entity paramEntity) - { - double _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetDistanceSqToEntityModded) - _result = clientPlayerAPI.getDistanceSqToEntity(paramEntity); - else - _result = target.localGetDistanceSqToEntity(paramEntity); - return _result; - } - - private double getDistanceSqToEntity(net.minecraft.entity.Entity paramEntity) - { - if(beforeGetDistanceSqToEntityHooks != null) - for(int i = beforeGetDistanceSqToEntityHooks.length - 1; i >= 0 ; i--) - beforeGetDistanceSqToEntityHooks[i].beforeGetDistanceSqToEntity(paramEntity); - - double _result; - if(overrideGetDistanceSqToEntityHooks != null) - _result = overrideGetDistanceSqToEntityHooks[overrideGetDistanceSqToEntityHooks.length - 1].getDistanceSqToEntity(paramEntity); - else - _result = player.localGetDistanceSqToEntity(paramEntity); - - if(afterGetDistanceSqToEntityHooks != null) - for(int i = 0; i < afterGetDistanceSqToEntityHooks.length; i++) - afterGetDistanceSqToEntityHooks[i].afterGetDistanceSqToEntity(paramEntity); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetDistanceSqToEntity(ClientPlayerBase overWriter) - { - if (overrideGetDistanceSqToEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetDistanceSqToEntityHooks.length; i++) - if(overrideGetDistanceSqToEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetDistanceSqToEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetDistanceSqToEntityHookTypes = new LinkedList(); - private final static List overrideGetDistanceSqToEntityHookTypes = new LinkedList(); - private final static List afterGetDistanceSqToEntityHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetDistanceSqToEntityHooks; - private ClientPlayerBase[] overrideGetDistanceSqToEntityHooks; - private ClientPlayerBase[] afterGetDistanceSqToEntityHooks; - - public boolean isGetDistanceSqToEntityModded; - - private static final Map allBaseBeforeGetDistanceSqToEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetDistanceSqToEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqToEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqToEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqToEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqToEntityInferiors = new Hashtable(0); - - public static float getFOVMultiplier(IClientPlayerAPI target) - { - float _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetFOVMultiplierModded) - _result = clientPlayerAPI.getFOVMultiplier(); - else - _result = target.localGetFOVMultiplier(); - return _result; - } - - private float getFOVMultiplier() - { - if(beforeGetFOVMultiplierHooks != null) - for(int i = beforeGetFOVMultiplierHooks.length - 1; i >= 0 ; i--) - beforeGetFOVMultiplierHooks[i].beforeGetFOVMultiplier(); - - float _result; - if(overrideGetFOVMultiplierHooks != null) - _result = overrideGetFOVMultiplierHooks[overrideGetFOVMultiplierHooks.length - 1].getFOVMultiplier(); - else - _result = player.localGetFOVMultiplier(); - - if(afterGetFOVMultiplierHooks != null) - for(int i = 0; i < afterGetFOVMultiplierHooks.length; i++) - afterGetFOVMultiplierHooks[i].afterGetFOVMultiplier(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetFOVMultiplier(ClientPlayerBase overWriter) - { - if (overrideGetFOVMultiplierHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetFOVMultiplierHooks.length; i++) - if(overrideGetFOVMultiplierHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetFOVMultiplierHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetFOVMultiplierHookTypes = new LinkedList(); - private final static List overrideGetFOVMultiplierHookTypes = new LinkedList(); - private final static List afterGetFOVMultiplierHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetFOVMultiplierHooks; - private ClientPlayerBase[] overrideGetFOVMultiplierHooks; - private ClientPlayerBase[] afterGetFOVMultiplierHooks; - - public boolean isGetFOVMultiplierModded; - - private static final Map allBaseBeforeGetFOVMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetFOVMultiplierInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetFOVMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetFOVMultiplierInferiors = new Hashtable(0); - private static final Map allBaseAfterGetFOVMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetFOVMultiplierInferiors = new Hashtable(0); - - public static java.lang.String getHurtSound(IClientPlayerAPI target) - { - java.lang.String _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetHurtSoundModded) - _result = clientPlayerAPI.getHurtSound(); - else - _result = target.localGetHurtSound(); - return _result; - } - - private java.lang.String getHurtSound() - { - if(beforeGetHurtSoundHooks != null) - for(int i = beforeGetHurtSoundHooks.length - 1; i >= 0 ; i--) - beforeGetHurtSoundHooks[i].beforeGetHurtSound(); - - java.lang.String _result; - if(overrideGetHurtSoundHooks != null) - _result = overrideGetHurtSoundHooks[overrideGetHurtSoundHooks.length - 1].getHurtSound(); - else - _result = player.localGetHurtSound(); - - if(afterGetHurtSoundHooks != null) - for(int i = 0; i < afterGetHurtSoundHooks.length; i++) - afterGetHurtSoundHooks[i].afterGetHurtSound(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetHurtSound(ClientPlayerBase overWriter) - { - if (overrideGetHurtSoundHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetHurtSoundHooks.length; i++) - if(overrideGetHurtSoundHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetHurtSoundHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetHurtSoundHookTypes = new LinkedList(); - private final static List overrideGetHurtSoundHookTypes = new LinkedList(); - private final static List afterGetHurtSoundHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetHurtSoundHooks; - private ClientPlayerBase[] overrideGetHurtSoundHooks; - private ClientPlayerBase[] afterGetHurtSoundHooks; - - public boolean isGetHurtSoundModded; - - private static final Map allBaseBeforeGetHurtSoundSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetHurtSoundInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetHurtSoundSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetHurtSoundInferiors = new Hashtable(0); - private static final Map allBaseAfterGetHurtSoundSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetHurtSoundInferiors = new Hashtable(0); - - public static net.minecraft.util.IIcon getItemIcon(IClientPlayerAPI target, net.minecraft.item.ItemStack paramItemStack, int paramInt) - { - net.minecraft.util.IIcon _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetItemIconModded) - _result = clientPlayerAPI.getItemIcon(paramItemStack, paramInt); - else - _result = target.localGetItemIcon(paramItemStack, paramInt); - return _result; - } - - private net.minecraft.util.IIcon getItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt) - { - if(beforeGetItemIconHooks != null) - for(int i = beforeGetItemIconHooks.length - 1; i >= 0 ; i--) - beforeGetItemIconHooks[i].beforeGetItemIcon(paramItemStack, paramInt); - - net.minecraft.util.IIcon _result; - if(overrideGetItemIconHooks != null) - _result = overrideGetItemIconHooks[overrideGetItemIconHooks.length - 1].getItemIcon(paramItemStack, paramInt); - else - _result = player.localGetItemIcon(paramItemStack, paramInt); - - if(afterGetItemIconHooks != null) - for(int i = 0; i < afterGetItemIconHooks.length; i++) - afterGetItemIconHooks[i].afterGetItemIcon(paramItemStack, paramInt); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetItemIcon(ClientPlayerBase overWriter) - { - if (overrideGetItemIconHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetItemIconHooks.length; i++) - if(overrideGetItemIconHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetItemIconHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetItemIconHookTypes = new LinkedList(); - private final static List overrideGetItemIconHookTypes = new LinkedList(); - private final static List afterGetItemIconHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetItemIconHooks; - private ClientPlayerBase[] overrideGetItemIconHooks; - private ClientPlayerBase[] afterGetItemIconHooks; - - public boolean isGetItemIconModded; - - private static final Map allBaseBeforeGetItemIconSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetItemIconInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetItemIconSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetItemIconInferiors = new Hashtable(0); - private static final Map allBaseAfterGetItemIconSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetItemIconInferiors = new Hashtable(0); - - public static int getSleepTimer(IClientPlayerAPI target) - { - int _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isGetSleepTimerModded) - _result = clientPlayerAPI.getSleepTimer(); - else - _result = target.localGetSleepTimer(); - return _result; - } - - private int getSleepTimer() - { - if(beforeGetSleepTimerHooks != null) - for(int i = beforeGetSleepTimerHooks.length - 1; i >= 0 ; i--) - beforeGetSleepTimerHooks[i].beforeGetSleepTimer(); - - int _result; - if(overrideGetSleepTimerHooks != null) - _result = overrideGetSleepTimerHooks[overrideGetSleepTimerHooks.length - 1].getSleepTimer(); - else - _result = player.localGetSleepTimer(); - - if(afterGetSleepTimerHooks != null) - for(int i = 0; i < afterGetSleepTimerHooks.length; i++) - afterGetSleepTimerHooks[i].afterGetSleepTimer(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenGetSleepTimer(ClientPlayerBase overWriter) - { - if (overrideGetSleepTimerHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetSleepTimerHooks.length; i++) - if(overrideGetSleepTimerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetSleepTimerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetSleepTimerHookTypes = new LinkedList(); - private final static List overrideGetSleepTimerHookTypes = new LinkedList(); - private final static List afterGetSleepTimerHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeGetSleepTimerHooks; - private ClientPlayerBase[] overrideGetSleepTimerHooks; - private ClientPlayerBase[] afterGetSleepTimerHooks; - - public boolean isGetSleepTimerModded; - - private static final Map allBaseBeforeGetSleepTimerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetSleepTimerInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetSleepTimerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetSleepTimerInferiors = new Hashtable(0); - private static final Map allBaseAfterGetSleepTimerSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetSleepTimerInferiors = new Hashtable(0); - - public static boolean handleLavaMovement(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isHandleLavaMovementModded) - _result = clientPlayerAPI.handleLavaMovement(); - else - _result = target.localHandleLavaMovement(); - return _result; - } - - private boolean handleLavaMovement() - { - if(beforeHandleLavaMovementHooks != null) - for(int i = beforeHandleLavaMovementHooks.length - 1; i >= 0 ; i--) - beforeHandleLavaMovementHooks[i].beforeHandleLavaMovement(); - - boolean _result; - if(overrideHandleLavaMovementHooks != null) - _result = overrideHandleLavaMovementHooks[overrideHandleLavaMovementHooks.length - 1].handleLavaMovement(); - else - _result = player.localHandleLavaMovement(); - - if(afterHandleLavaMovementHooks != null) - for(int i = 0; i < afterHandleLavaMovementHooks.length; i++) - afterHandleLavaMovementHooks[i].afterHandleLavaMovement(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenHandleLavaMovement(ClientPlayerBase overWriter) - { - if (overrideHandleLavaMovementHooks == null) - return overWriter; - - for(int i = 0; i < overrideHandleLavaMovementHooks.length; i++) - if(overrideHandleLavaMovementHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideHandleLavaMovementHooks[i - 1]; - - return overWriter; - } - - private final static List beforeHandleLavaMovementHookTypes = new LinkedList(); - private final static List overrideHandleLavaMovementHookTypes = new LinkedList(); - private final static List afterHandleLavaMovementHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeHandleLavaMovementHooks; - private ClientPlayerBase[] overrideHandleLavaMovementHooks; - private ClientPlayerBase[] afterHandleLavaMovementHooks; - - public boolean isHandleLavaMovementModded; - - private static final Map allBaseBeforeHandleLavaMovementSuperiors = new Hashtable(0); - private static final Map allBaseBeforeHandleLavaMovementInferiors = new Hashtable(0); - private static final Map allBaseOverrideHandleLavaMovementSuperiors = new Hashtable(0); - private static final Map allBaseOverrideHandleLavaMovementInferiors = new Hashtable(0); - private static final Map allBaseAfterHandleLavaMovementSuperiors = new Hashtable(0); - private static final Map allBaseAfterHandleLavaMovementInferiors = new Hashtable(0); - - public static boolean handleWaterMovement(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isHandleWaterMovementModded) - _result = clientPlayerAPI.handleWaterMovement(); - else - _result = target.localHandleWaterMovement(); - return _result; - } - - private boolean handleWaterMovement() - { - if(beforeHandleWaterMovementHooks != null) - for(int i = beforeHandleWaterMovementHooks.length - 1; i >= 0 ; i--) - beforeHandleWaterMovementHooks[i].beforeHandleWaterMovement(); - - boolean _result; - if(overrideHandleWaterMovementHooks != null) - _result = overrideHandleWaterMovementHooks[overrideHandleWaterMovementHooks.length - 1].handleWaterMovement(); - else - _result = player.localHandleWaterMovement(); - - if(afterHandleWaterMovementHooks != null) - for(int i = 0; i < afterHandleWaterMovementHooks.length; i++) - afterHandleWaterMovementHooks[i].afterHandleWaterMovement(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenHandleWaterMovement(ClientPlayerBase overWriter) - { - if (overrideHandleWaterMovementHooks == null) - return overWriter; - - for(int i = 0; i < overrideHandleWaterMovementHooks.length; i++) - if(overrideHandleWaterMovementHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideHandleWaterMovementHooks[i - 1]; - - return overWriter; - } - - private final static List beforeHandleWaterMovementHookTypes = new LinkedList(); - private final static List overrideHandleWaterMovementHookTypes = new LinkedList(); - private final static List afterHandleWaterMovementHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeHandleWaterMovementHooks; - private ClientPlayerBase[] overrideHandleWaterMovementHooks; - private ClientPlayerBase[] afterHandleWaterMovementHooks; - - public boolean isHandleWaterMovementModded; - - private static final Map allBaseBeforeHandleWaterMovementSuperiors = new Hashtable(0); - private static final Map allBaseBeforeHandleWaterMovementInferiors = new Hashtable(0); - private static final Map allBaseOverrideHandleWaterMovementSuperiors = new Hashtable(0); - private static final Map allBaseOverrideHandleWaterMovementInferiors = new Hashtable(0); - private static final Map allBaseAfterHandleWaterMovementSuperiors = new Hashtable(0); - private static final Map allBaseAfterHandleWaterMovementInferiors = new Hashtable(0); - - public static void heal(IClientPlayerAPI target, float paramFloat) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isHealModded) - clientPlayerAPI.heal(paramFloat); - else - target.localHeal(paramFloat); - } - - private void heal(float paramFloat) - { - if(beforeHealHooks != null) - for(int i = beforeHealHooks.length - 1; i >= 0 ; i--) - beforeHealHooks[i].beforeHeal(paramFloat); - - if(overrideHealHooks != null) - overrideHealHooks[overrideHealHooks.length - 1].heal(paramFloat); - else - player.localHeal(paramFloat); - - if(afterHealHooks != null) - for(int i = 0; i < afterHealHooks.length; i++) - afterHealHooks[i].afterHeal(paramFloat); - - } - - protected ClientPlayerBase GetOverwrittenHeal(ClientPlayerBase overWriter) - { - if (overrideHealHooks == null) - return overWriter; - - for(int i = 0; i < overrideHealHooks.length; i++) - if(overrideHealHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideHealHooks[i - 1]; - - return overWriter; - } - - private final static List beforeHealHookTypes = new LinkedList(); - private final static List overrideHealHookTypes = new LinkedList(); - private final static List afterHealHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeHealHooks; - private ClientPlayerBase[] overrideHealHooks; - private ClientPlayerBase[] afterHealHooks; - - public boolean isHealModded; - - private static final Map allBaseBeforeHealSuperiors = new Hashtable(0); - private static final Map allBaseBeforeHealInferiors = new Hashtable(0); - private static final Map allBaseOverrideHealSuperiors = new Hashtable(0); - private static final Map allBaseOverrideHealInferiors = new Hashtable(0); - private static final Map allBaseAfterHealSuperiors = new Hashtable(0); - private static final Map allBaseAfterHealInferiors = new Hashtable(0); - - public static boolean isEntityInsideOpaqueBlock(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsEntityInsideOpaqueBlockModded) - _result = clientPlayerAPI.isEntityInsideOpaqueBlock(); - else - _result = target.localIsEntityInsideOpaqueBlock(); - return _result; - } - - private boolean isEntityInsideOpaqueBlock() - { - if(beforeIsEntityInsideOpaqueBlockHooks != null) - for(int i = beforeIsEntityInsideOpaqueBlockHooks.length - 1; i >= 0 ; i--) - beforeIsEntityInsideOpaqueBlockHooks[i].beforeIsEntityInsideOpaqueBlock(); - - boolean _result; - if(overrideIsEntityInsideOpaqueBlockHooks != null) - _result = overrideIsEntityInsideOpaqueBlockHooks[overrideIsEntityInsideOpaqueBlockHooks.length - 1].isEntityInsideOpaqueBlock(); - else - _result = player.localIsEntityInsideOpaqueBlock(); - - if(afterIsEntityInsideOpaqueBlockHooks != null) - for(int i = 0; i < afterIsEntityInsideOpaqueBlockHooks.length; i++) - afterIsEntityInsideOpaqueBlockHooks[i].afterIsEntityInsideOpaqueBlock(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsEntityInsideOpaqueBlock(ClientPlayerBase overWriter) - { - if (overrideIsEntityInsideOpaqueBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsEntityInsideOpaqueBlockHooks.length; i++) - if(overrideIsEntityInsideOpaqueBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsEntityInsideOpaqueBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - private final static List overrideIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - private final static List afterIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsEntityInsideOpaqueBlockHooks; - private ClientPlayerBase[] overrideIsEntityInsideOpaqueBlockHooks; - private ClientPlayerBase[] afterIsEntityInsideOpaqueBlockHooks; - - public boolean isIsEntityInsideOpaqueBlockModded; - - private static final Map allBaseBeforeIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - - public static boolean isInWater(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsInWaterModded) - _result = clientPlayerAPI.isInWater(); - else - _result = target.localIsInWater(); - return _result; - } - - private boolean isInWater() - { - if(beforeIsInWaterHooks != null) - for(int i = beforeIsInWaterHooks.length - 1; i >= 0 ; i--) - beforeIsInWaterHooks[i].beforeIsInWater(); - - boolean _result; - if(overrideIsInWaterHooks != null) - _result = overrideIsInWaterHooks[overrideIsInWaterHooks.length - 1].isInWater(); - else - _result = player.localIsInWater(); - - if(afterIsInWaterHooks != null) - for(int i = 0; i < afterIsInWaterHooks.length; i++) - afterIsInWaterHooks[i].afterIsInWater(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsInWater(ClientPlayerBase overWriter) - { - if (overrideIsInWaterHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsInWaterHooks.length; i++) - if(overrideIsInWaterHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsInWaterHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsInWaterHookTypes = new LinkedList(); - private final static List overrideIsInWaterHookTypes = new LinkedList(); - private final static List afterIsInWaterHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsInWaterHooks; - private ClientPlayerBase[] overrideIsInWaterHooks; - private ClientPlayerBase[] afterIsInWaterHooks; - - public boolean isIsInWaterModded; - - private static final Map allBaseBeforeIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsInWaterInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsInWaterInferiors = new Hashtable(0); - private static final Map allBaseAfterIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsInWaterInferiors = new Hashtable(0); - - public static boolean isInsideOfMaterial(IClientPlayerAPI target, net.minecraft.block.material.Material paramMaterial) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsInsideOfMaterialModded) - _result = clientPlayerAPI.isInsideOfMaterial(paramMaterial); - else - _result = target.localIsInsideOfMaterial(paramMaterial); - return _result; - } - - private boolean isInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - if(beforeIsInsideOfMaterialHooks != null) - for(int i = beforeIsInsideOfMaterialHooks.length - 1; i >= 0 ; i--) - beforeIsInsideOfMaterialHooks[i].beforeIsInsideOfMaterial(paramMaterial); - - boolean _result; - if(overrideIsInsideOfMaterialHooks != null) - _result = overrideIsInsideOfMaterialHooks[overrideIsInsideOfMaterialHooks.length - 1].isInsideOfMaterial(paramMaterial); - else - _result = player.localIsInsideOfMaterial(paramMaterial); - - if(afterIsInsideOfMaterialHooks != null) - for(int i = 0; i < afterIsInsideOfMaterialHooks.length; i++) - afterIsInsideOfMaterialHooks[i].afterIsInsideOfMaterial(paramMaterial); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsInsideOfMaterial(ClientPlayerBase overWriter) - { - if (overrideIsInsideOfMaterialHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsInsideOfMaterialHooks.length; i++) - if(overrideIsInsideOfMaterialHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsInsideOfMaterialHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsInsideOfMaterialHookTypes = new LinkedList(); - private final static List overrideIsInsideOfMaterialHookTypes = new LinkedList(); - private final static List afterIsInsideOfMaterialHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsInsideOfMaterialHooks; - private ClientPlayerBase[] overrideIsInsideOfMaterialHooks; - private ClientPlayerBase[] afterIsInsideOfMaterialHooks; - - public boolean isIsInsideOfMaterialModded; - - private static final Map allBaseBeforeIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsInsideOfMaterialInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsInsideOfMaterialInferiors = new Hashtable(0); - private static final Map allBaseAfterIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsInsideOfMaterialInferiors = new Hashtable(0); - - public static boolean isOnLadder(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsOnLadderModded) - _result = clientPlayerAPI.isOnLadder(); - else - _result = target.localIsOnLadder(); - return _result; - } - - private boolean isOnLadder() - { - if(beforeIsOnLadderHooks != null) - for(int i = beforeIsOnLadderHooks.length - 1; i >= 0 ; i--) - beforeIsOnLadderHooks[i].beforeIsOnLadder(); - - boolean _result; - if(overrideIsOnLadderHooks != null) - _result = overrideIsOnLadderHooks[overrideIsOnLadderHooks.length - 1].isOnLadder(); - else - _result = player.localIsOnLadder(); - - if(afterIsOnLadderHooks != null) - for(int i = 0; i < afterIsOnLadderHooks.length; i++) - afterIsOnLadderHooks[i].afterIsOnLadder(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsOnLadder(ClientPlayerBase overWriter) - { - if (overrideIsOnLadderHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsOnLadderHooks.length; i++) - if(overrideIsOnLadderHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsOnLadderHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsOnLadderHookTypes = new LinkedList(); - private final static List overrideIsOnLadderHookTypes = new LinkedList(); - private final static List afterIsOnLadderHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsOnLadderHooks; - private ClientPlayerBase[] overrideIsOnLadderHooks; - private ClientPlayerBase[] afterIsOnLadderHooks; - - public boolean isIsOnLadderModded; - - private static final Map allBaseBeforeIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsOnLadderInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsOnLadderInferiors = new Hashtable(0); - private static final Map allBaseAfterIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsOnLadderInferiors = new Hashtable(0); - - public static boolean isPlayerSleeping(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsPlayerSleepingModded) - _result = clientPlayerAPI.isPlayerSleeping(); - else - _result = target.localIsPlayerSleeping(); - return _result; - } - - private boolean isPlayerSleeping() - { - if(beforeIsPlayerSleepingHooks != null) - for(int i = beforeIsPlayerSleepingHooks.length - 1; i >= 0 ; i--) - beforeIsPlayerSleepingHooks[i].beforeIsPlayerSleeping(); - - boolean _result; - if(overrideIsPlayerSleepingHooks != null) - _result = overrideIsPlayerSleepingHooks[overrideIsPlayerSleepingHooks.length - 1].isPlayerSleeping(); - else - _result = player.localIsPlayerSleeping(); - - if(afterIsPlayerSleepingHooks != null) - for(int i = 0; i < afterIsPlayerSleepingHooks.length; i++) - afterIsPlayerSleepingHooks[i].afterIsPlayerSleeping(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsPlayerSleeping(ClientPlayerBase overWriter) - { - if (overrideIsPlayerSleepingHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsPlayerSleepingHooks.length; i++) - if(overrideIsPlayerSleepingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsPlayerSleepingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsPlayerSleepingHookTypes = new LinkedList(); - private final static List overrideIsPlayerSleepingHookTypes = new LinkedList(); - private final static List afterIsPlayerSleepingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsPlayerSleepingHooks; - private ClientPlayerBase[] overrideIsPlayerSleepingHooks; - private ClientPlayerBase[] afterIsPlayerSleepingHooks; - - public boolean isIsPlayerSleepingModded; - - private static final Map allBaseBeforeIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsPlayerSleepingInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsPlayerSleepingInferiors = new Hashtable(0); - private static final Map allBaseAfterIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsPlayerSleepingInferiors = new Hashtable(0); - - public static boolean isSneaking(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsSneakingModded) - _result = clientPlayerAPI.isSneaking(); - else - _result = target.localIsSneaking(); - return _result; - } - - private boolean isSneaking() - { - if(beforeIsSneakingHooks != null) - for(int i = beforeIsSneakingHooks.length - 1; i >= 0 ; i--) - beforeIsSneakingHooks[i].beforeIsSneaking(); - - boolean _result; - if(overrideIsSneakingHooks != null) - _result = overrideIsSneakingHooks[overrideIsSneakingHooks.length - 1].isSneaking(); - else - _result = player.localIsSneaking(); - - if(afterIsSneakingHooks != null) - for(int i = 0; i < afterIsSneakingHooks.length; i++) - afterIsSneakingHooks[i].afterIsSneaking(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsSneaking(ClientPlayerBase overWriter) - { - if (overrideIsSneakingHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsSneakingHooks.length; i++) - if(overrideIsSneakingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsSneakingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsSneakingHookTypes = new LinkedList(); - private final static List overrideIsSneakingHookTypes = new LinkedList(); - private final static List afterIsSneakingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsSneakingHooks; - private ClientPlayerBase[] overrideIsSneakingHooks; - private ClientPlayerBase[] afterIsSneakingHooks; - - public boolean isIsSneakingModded; - - private static final Map allBaseBeforeIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsSneakingInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsSneakingInferiors = new Hashtable(0); - private static final Map allBaseAfterIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsSneakingInferiors = new Hashtable(0); - - public static boolean isSprinting(IClientPlayerAPI target) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isIsSprintingModded) - _result = clientPlayerAPI.isSprinting(); - else - _result = target.localIsSprinting(); - return _result; - } - - private boolean isSprinting() - { - if(beforeIsSprintingHooks != null) - for(int i = beforeIsSprintingHooks.length - 1; i >= 0 ; i--) - beforeIsSprintingHooks[i].beforeIsSprinting(); - - boolean _result; - if(overrideIsSprintingHooks != null) - _result = overrideIsSprintingHooks[overrideIsSprintingHooks.length - 1].isSprinting(); - else - _result = player.localIsSprinting(); - - if(afterIsSprintingHooks != null) - for(int i = 0; i < afterIsSprintingHooks.length; i++) - afterIsSprintingHooks[i].afterIsSprinting(); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenIsSprinting(ClientPlayerBase overWriter) - { - if (overrideIsSprintingHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsSprintingHooks.length; i++) - if(overrideIsSprintingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsSprintingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsSprintingHookTypes = new LinkedList(); - private final static List overrideIsSprintingHookTypes = new LinkedList(); - private final static List afterIsSprintingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeIsSprintingHooks; - private ClientPlayerBase[] overrideIsSprintingHooks; - private ClientPlayerBase[] afterIsSprintingHooks; - - public boolean isIsSprintingModded; - - private static final Map allBaseBeforeIsSprintingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsSprintingInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsSprintingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsSprintingInferiors = new Hashtable(0); - private static final Map allBaseAfterIsSprintingSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsSprintingInferiors = new Hashtable(0); - - public static void jump(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isJumpModded) - clientPlayerAPI.jump(); - else - target.localJump(); - } - - private void jump() - { - if(beforeJumpHooks != null) - for(int i = beforeJumpHooks.length - 1; i >= 0 ; i--) - beforeJumpHooks[i].beforeJump(); - - if(overrideJumpHooks != null) - overrideJumpHooks[overrideJumpHooks.length - 1].jump(); - else - player.localJump(); - - if(afterJumpHooks != null) - for(int i = 0; i < afterJumpHooks.length; i++) - afterJumpHooks[i].afterJump(); - - } - - protected ClientPlayerBase GetOverwrittenJump(ClientPlayerBase overWriter) - { - if (overrideJumpHooks == null) - return overWriter; - - for(int i = 0; i < overrideJumpHooks.length; i++) - if(overrideJumpHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideJumpHooks[i - 1]; - - return overWriter; - } - - private final static List beforeJumpHookTypes = new LinkedList(); - private final static List overrideJumpHookTypes = new LinkedList(); - private final static List afterJumpHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeJumpHooks; - private ClientPlayerBase[] overrideJumpHooks; - private ClientPlayerBase[] afterJumpHooks; - - public boolean isJumpModded; - - private static final Map allBaseBeforeJumpSuperiors = new Hashtable(0); - private static final Map allBaseBeforeJumpInferiors = new Hashtable(0); - private static final Map allBaseOverrideJumpSuperiors = new Hashtable(0); - private static final Map allBaseOverrideJumpInferiors = new Hashtable(0); - private static final Map allBaseAfterJumpSuperiors = new Hashtable(0); - private static final Map allBaseAfterJumpInferiors = new Hashtable(0); - - public static void knockBack(IClientPlayerAPI target, net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isKnockBackModded) - clientPlayerAPI.knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else - target.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - } - - private void knockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - if(beforeKnockBackHooks != null) - for(int i = beforeKnockBackHooks.length - 1; i >= 0 ; i--) - beforeKnockBackHooks[i].beforeKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - if(overrideKnockBackHooks != null) - overrideKnockBackHooks[overrideKnockBackHooks.length - 1].knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else - player.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - if(afterKnockBackHooks != null) - for(int i = 0; i < afterKnockBackHooks.length; i++) - afterKnockBackHooks[i].afterKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - } - - protected ClientPlayerBase GetOverwrittenKnockBack(ClientPlayerBase overWriter) - { - if (overrideKnockBackHooks == null) - return overWriter; - - for(int i = 0; i < overrideKnockBackHooks.length; i++) - if(overrideKnockBackHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideKnockBackHooks[i - 1]; - - return overWriter; - } - - private final static List beforeKnockBackHookTypes = new LinkedList(); - private final static List overrideKnockBackHookTypes = new LinkedList(); - private final static List afterKnockBackHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeKnockBackHooks; - private ClientPlayerBase[] overrideKnockBackHooks; - private ClientPlayerBase[] afterKnockBackHooks; - - public boolean isKnockBackModded; - - private static final Map allBaseBeforeKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseBeforeKnockBackInferiors = new Hashtable(0); - private static final Map allBaseOverrideKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseOverrideKnockBackInferiors = new Hashtable(0); - private static final Map allBaseAfterKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseAfterKnockBackInferiors = new Hashtable(0); - - public static void moveEntity(IClientPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isMoveEntityModded) - clientPlayerAPI.moveEntity(paramDouble1, paramDouble2, paramDouble3); - else - target.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - } - - private void moveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeMoveEntityHooks != null) - for(int i = beforeMoveEntityHooks.length - 1; i >= 0 ; i--) - beforeMoveEntityHooks[i].beforeMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - if(overrideMoveEntityHooks != null) - overrideMoveEntityHooks[overrideMoveEntityHooks.length - 1].moveEntity(paramDouble1, paramDouble2, paramDouble3); - else - player.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - if(afterMoveEntityHooks != null) - for(int i = 0; i < afterMoveEntityHooks.length; i++) - afterMoveEntityHooks[i].afterMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - } - - protected ClientPlayerBase GetOverwrittenMoveEntity(ClientPlayerBase overWriter) - { - if (overrideMoveEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveEntityHooks.length; i++) - if(overrideMoveEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveEntityHookTypes = new LinkedList(); - private final static List overrideMoveEntityHookTypes = new LinkedList(); - private final static List afterMoveEntityHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeMoveEntityHooks; - private ClientPlayerBase[] overrideMoveEntityHooks; - private ClientPlayerBase[] afterMoveEntityHooks; - - public boolean isMoveEntityModded; - - private static final Map allBaseBeforeMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityInferiors = new Hashtable(0); - - public static void moveEntityWithHeading(IClientPlayerAPI target, float paramFloat1, float paramFloat2) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isMoveEntityWithHeadingModded) - clientPlayerAPI.moveEntityWithHeading(paramFloat1, paramFloat2); - else - target.localMoveEntityWithHeading(paramFloat1, paramFloat2); - } - - private void moveEntityWithHeading(float paramFloat1, float paramFloat2) - { - if(beforeMoveEntityWithHeadingHooks != null) - for(int i = beforeMoveEntityWithHeadingHooks.length - 1; i >= 0 ; i--) - beforeMoveEntityWithHeadingHooks[i].beforeMoveEntityWithHeading(paramFloat1, paramFloat2); - - if(overrideMoveEntityWithHeadingHooks != null) - overrideMoveEntityWithHeadingHooks[overrideMoveEntityWithHeadingHooks.length - 1].moveEntityWithHeading(paramFloat1, paramFloat2); - else - player.localMoveEntityWithHeading(paramFloat1, paramFloat2); - - if(afterMoveEntityWithHeadingHooks != null) - for(int i = 0; i < afterMoveEntityWithHeadingHooks.length; i++) - afterMoveEntityWithHeadingHooks[i].afterMoveEntityWithHeading(paramFloat1, paramFloat2); - - } - - protected ClientPlayerBase GetOverwrittenMoveEntityWithHeading(ClientPlayerBase overWriter) - { - if (overrideMoveEntityWithHeadingHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveEntityWithHeadingHooks.length; i++) - if(overrideMoveEntityWithHeadingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveEntityWithHeadingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveEntityWithHeadingHookTypes = new LinkedList(); - private final static List overrideMoveEntityWithHeadingHookTypes = new LinkedList(); - private final static List afterMoveEntityWithHeadingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeMoveEntityWithHeadingHooks; - private ClientPlayerBase[] overrideMoveEntityWithHeadingHooks; - private ClientPlayerBase[] afterMoveEntityWithHeadingHooks; - - public boolean isMoveEntityWithHeadingModded; - - private static final Map allBaseBeforeMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveEntityWithHeadingInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityWithHeadingInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityWithHeadingInferiors = new Hashtable(0); - - public static void moveFlying(IClientPlayerAPI target, float paramFloat1, float paramFloat2, float paramFloat3) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isMoveFlyingModded) - clientPlayerAPI.moveFlying(paramFloat1, paramFloat2, paramFloat3); - else - target.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - } - - private void moveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - if(beforeMoveFlyingHooks != null) - for(int i = beforeMoveFlyingHooks.length - 1; i >= 0 ; i--) - beforeMoveFlyingHooks[i].beforeMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - if(overrideMoveFlyingHooks != null) - overrideMoveFlyingHooks[overrideMoveFlyingHooks.length - 1].moveFlying(paramFloat1, paramFloat2, paramFloat3); - else - player.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - if(afterMoveFlyingHooks != null) - for(int i = 0; i < afterMoveFlyingHooks.length; i++) - afterMoveFlyingHooks[i].afterMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - } - - protected ClientPlayerBase GetOverwrittenMoveFlying(ClientPlayerBase overWriter) - { - if (overrideMoveFlyingHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveFlyingHooks.length; i++) - if(overrideMoveFlyingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveFlyingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveFlyingHookTypes = new LinkedList(); - private final static List overrideMoveFlyingHookTypes = new LinkedList(); - private final static List afterMoveFlyingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeMoveFlyingHooks; - private ClientPlayerBase[] overrideMoveFlyingHooks; - private ClientPlayerBase[] afterMoveFlyingHooks; - - public boolean isMoveFlyingModded; - - private static final Map allBaseBeforeMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveFlyingInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveFlyingInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveFlyingInferiors = new Hashtable(0); - - public static void onDeath(IClientPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isOnDeathModded) - clientPlayerAPI.onDeath(paramDamageSource); - else - target.localOnDeath(paramDamageSource); - } - - private void onDeath(net.minecraft.util.DamageSource paramDamageSource) - { - if(beforeOnDeathHooks != null) - for(int i = beforeOnDeathHooks.length - 1; i >= 0 ; i--) - beforeOnDeathHooks[i].beforeOnDeath(paramDamageSource); - - if(overrideOnDeathHooks != null) - overrideOnDeathHooks[overrideOnDeathHooks.length - 1].onDeath(paramDamageSource); - else - player.localOnDeath(paramDamageSource); - - if(afterOnDeathHooks != null) - for(int i = 0; i < afterOnDeathHooks.length; i++) - afterOnDeathHooks[i].afterOnDeath(paramDamageSource); - - } - - protected ClientPlayerBase GetOverwrittenOnDeath(ClientPlayerBase overWriter) - { - if (overrideOnDeathHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnDeathHooks.length; i++) - if(overrideOnDeathHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnDeathHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnDeathHookTypes = new LinkedList(); - private final static List overrideOnDeathHookTypes = new LinkedList(); - private final static List afterOnDeathHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeOnDeathHooks; - private ClientPlayerBase[] overrideOnDeathHooks; - private ClientPlayerBase[] afterOnDeathHooks; - - public boolean isOnDeathModded; - - private static final Map allBaseBeforeOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnDeathInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnDeathInferiors = new Hashtable(0); - private static final Map allBaseAfterOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnDeathInferiors = new Hashtable(0); - - public static void onLivingUpdate(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isOnLivingUpdateModded) - clientPlayerAPI.onLivingUpdate(); - else - target.localOnLivingUpdate(); - } - - private void onLivingUpdate() - { - if(beforeOnLivingUpdateHooks != null) - for(int i = beforeOnLivingUpdateHooks.length - 1; i >= 0 ; i--) - beforeOnLivingUpdateHooks[i].beforeOnLivingUpdate(); - - if(overrideOnLivingUpdateHooks != null) - overrideOnLivingUpdateHooks[overrideOnLivingUpdateHooks.length - 1].onLivingUpdate(); - else - player.localOnLivingUpdate(); - - if(afterOnLivingUpdateHooks != null) - for(int i = 0; i < afterOnLivingUpdateHooks.length; i++) - afterOnLivingUpdateHooks[i].afterOnLivingUpdate(); - - } - - protected ClientPlayerBase GetOverwrittenOnLivingUpdate(ClientPlayerBase overWriter) - { - if (overrideOnLivingUpdateHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnLivingUpdateHooks.length; i++) - if(overrideOnLivingUpdateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnLivingUpdateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnLivingUpdateHookTypes = new LinkedList(); - private final static List overrideOnLivingUpdateHookTypes = new LinkedList(); - private final static List afterOnLivingUpdateHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeOnLivingUpdateHooks; - private ClientPlayerBase[] overrideOnLivingUpdateHooks; - private ClientPlayerBase[] afterOnLivingUpdateHooks; - - public boolean isOnLivingUpdateModded; - - private static final Map allBaseBeforeOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnLivingUpdateInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnLivingUpdateInferiors = new Hashtable(0); - private static final Map allBaseAfterOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnLivingUpdateInferiors = new Hashtable(0); - - public static void onKillEntity(IClientPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isOnKillEntityModded) - clientPlayerAPI.onKillEntity(paramEntityLivingBase); - else - target.localOnKillEntity(paramEntityLivingBase); - } - - private void onKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - if(beforeOnKillEntityHooks != null) - for(int i = beforeOnKillEntityHooks.length - 1; i >= 0 ; i--) - beforeOnKillEntityHooks[i].beforeOnKillEntity(paramEntityLivingBase); - - if(overrideOnKillEntityHooks != null) - overrideOnKillEntityHooks[overrideOnKillEntityHooks.length - 1].onKillEntity(paramEntityLivingBase); - else - player.localOnKillEntity(paramEntityLivingBase); - - if(afterOnKillEntityHooks != null) - for(int i = 0; i < afterOnKillEntityHooks.length; i++) - afterOnKillEntityHooks[i].afterOnKillEntity(paramEntityLivingBase); - - } - - protected ClientPlayerBase GetOverwrittenOnKillEntity(ClientPlayerBase overWriter) - { - if (overrideOnKillEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnKillEntityHooks.length; i++) - if(overrideOnKillEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnKillEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnKillEntityHookTypes = new LinkedList(); - private final static List overrideOnKillEntityHookTypes = new LinkedList(); - private final static List afterOnKillEntityHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeOnKillEntityHooks; - private ClientPlayerBase[] overrideOnKillEntityHooks; - private ClientPlayerBase[] afterOnKillEntityHooks; - - public boolean isOnKillEntityModded; - - private static final Map allBaseBeforeOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnKillEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnKillEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterOnKillEntityInferiors = new Hashtable(0); - - public static void onStruckByLightning(IClientPlayerAPI target, net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isOnStruckByLightningModded) - clientPlayerAPI.onStruckByLightning(paramEntityLightningBolt); - else - target.localOnStruckByLightning(paramEntityLightningBolt); - } - - private void onStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - if(beforeOnStruckByLightningHooks != null) - for(int i = beforeOnStruckByLightningHooks.length - 1; i >= 0 ; i--) - beforeOnStruckByLightningHooks[i].beforeOnStruckByLightning(paramEntityLightningBolt); - - if(overrideOnStruckByLightningHooks != null) - overrideOnStruckByLightningHooks[overrideOnStruckByLightningHooks.length - 1].onStruckByLightning(paramEntityLightningBolt); - else - player.localOnStruckByLightning(paramEntityLightningBolt); - - if(afterOnStruckByLightningHooks != null) - for(int i = 0; i < afterOnStruckByLightningHooks.length; i++) - afterOnStruckByLightningHooks[i].afterOnStruckByLightning(paramEntityLightningBolt); - - } - - protected ClientPlayerBase GetOverwrittenOnStruckByLightning(ClientPlayerBase overWriter) - { - if (overrideOnStruckByLightningHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnStruckByLightningHooks.length; i++) - if(overrideOnStruckByLightningHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnStruckByLightningHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnStruckByLightningHookTypes = new LinkedList(); - private final static List overrideOnStruckByLightningHookTypes = new LinkedList(); - private final static List afterOnStruckByLightningHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeOnStruckByLightningHooks; - private ClientPlayerBase[] overrideOnStruckByLightningHooks; - private ClientPlayerBase[] afterOnStruckByLightningHooks; - - public boolean isOnStruckByLightningModded; - - private static final Map allBaseBeforeOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnStruckByLightningInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnStruckByLightningInferiors = new Hashtable(0); - private static final Map allBaseAfterOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnStruckByLightningInferiors = new Hashtable(0); - - public static void onUpdate(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isOnUpdateModded) - clientPlayerAPI.onUpdate(); - else - target.localOnUpdate(); - } - - private void onUpdate() - { - if(beforeOnUpdateHooks != null) - for(int i = beforeOnUpdateHooks.length - 1; i >= 0 ; i--) - beforeOnUpdateHooks[i].beforeOnUpdate(); - - if(overrideOnUpdateHooks != null) - overrideOnUpdateHooks[overrideOnUpdateHooks.length - 1].onUpdate(); - else - player.localOnUpdate(); - - if(afterOnUpdateHooks != null) - for(int i = 0; i < afterOnUpdateHooks.length; i++) - afterOnUpdateHooks[i].afterOnUpdate(); - - } - - protected ClientPlayerBase GetOverwrittenOnUpdate(ClientPlayerBase overWriter) - { - if (overrideOnUpdateHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnUpdateHooks.length; i++) - if(overrideOnUpdateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnUpdateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnUpdateHookTypes = new LinkedList(); - private final static List overrideOnUpdateHookTypes = new LinkedList(); - private final static List afterOnUpdateHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeOnUpdateHooks; - private ClientPlayerBase[] overrideOnUpdateHooks; - private ClientPlayerBase[] afterOnUpdateHooks; - - public boolean isOnUpdateModded; - - private static final Map allBaseBeforeOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnUpdateInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateInferiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateInferiors = new Hashtable(0); - - public static void playStepSound(IClientPlayerAPI target, int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isPlayStepSoundModded) - clientPlayerAPI.playStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - else - target.localPlayStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - } - - private void playStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock) - { - if(beforePlayStepSoundHooks != null) - for(int i = beforePlayStepSoundHooks.length - 1; i >= 0 ; i--) - beforePlayStepSoundHooks[i].beforePlayStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - - if(overridePlayStepSoundHooks != null) - overridePlayStepSoundHooks[overridePlayStepSoundHooks.length - 1].playStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - else - player.localPlayStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - - if(afterPlayStepSoundHooks != null) - for(int i = 0; i < afterPlayStepSoundHooks.length; i++) - afterPlayStepSoundHooks[i].afterPlayStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - - } - - protected ClientPlayerBase GetOverwrittenPlayStepSound(ClientPlayerBase overWriter) - { - if (overridePlayStepSoundHooks == null) - return overWriter; - - for(int i = 0; i < overridePlayStepSoundHooks.length; i++) - if(overridePlayStepSoundHooks[i] == overWriter) - if(i == 0) - return null; - else - return overridePlayStepSoundHooks[i - 1]; - - return overWriter; - } - - private final static List beforePlayStepSoundHookTypes = new LinkedList(); - private final static List overridePlayStepSoundHookTypes = new LinkedList(); - private final static List afterPlayStepSoundHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforePlayStepSoundHooks; - private ClientPlayerBase[] overridePlayStepSoundHooks; - private ClientPlayerBase[] afterPlayStepSoundHooks; - - public boolean isPlayStepSoundModded; - - private static final Map allBaseBeforePlayStepSoundSuperiors = new Hashtable(0); - private static final Map allBaseBeforePlayStepSoundInferiors = new Hashtable(0); - private static final Map allBaseOverridePlayStepSoundSuperiors = new Hashtable(0); - private static final Map allBaseOverridePlayStepSoundInferiors = new Hashtable(0); - private static final Map allBaseAfterPlayStepSoundSuperiors = new Hashtable(0); - private static final Map allBaseAfterPlayStepSoundInferiors = new Hashtable(0); - - public static boolean pushOutOfBlocks(IClientPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - boolean _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isPushOutOfBlocksModded) - _result = clientPlayerAPI.pushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - else - _result = target.localPushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - return _result; - } - - private boolean pushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforePushOutOfBlocksHooks != null) - for(int i = beforePushOutOfBlocksHooks.length - 1; i >= 0 ; i--) - beforePushOutOfBlocksHooks[i].beforePushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - - boolean _result; - if(overridePushOutOfBlocksHooks != null) - _result = overridePushOutOfBlocksHooks[overridePushOutOfBlocksHooks.length - 1].pushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - else - _result = player.localPushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - - if(afterPushOutOfBlocksHooks != null) - for(int i = 0; i < afterPushOutOfBlocksHooks.length; i++) - afterPushOutOfBlocksHooks[i].afterPushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenPushOutOfBlocks(ClientPlayerBase overWriter) - { - if (overridePushOutOfBlocksHooks == null) - return overWriter; - - for(int i = 0; i < overridePushOutOfBlocksHooks.length; i++) - if(overridePushOutOfBlocksHooks[i] == overWriter) - if(i == 0) - return null; - else - return overridePushOutOfBlocksHooks[i - 1]; - - return overWriter; - } - - private final static List beforePushOutOfBlocksHookTypes = new LinkedList(); - private final static List overridePushOutOfBlocksHookTypes = new LinkedList(); - private final static List afterPushOutOfBlocksHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforePushOutOfBlocksHooks; - private ClientPlayerBase[] overridePushOutOfBlocksHooks; - private ClientPlayerBase[] afterPushOutOfBlocksHooks; - - public boolean isPushOutOfBlocksModded; - - private static final Map allBaseBeforePushOutOfBlocksSuperiors = new Hashtable(0); - private static final Map allBaseBeforePushOutOfBlocksInferiors = new Hashtable(0); - private static final Map allBaseOverridePushOutOfBlocksSuperiors = new Hashtable(0); - private static final Map allBaseOverridePushOutOfBlocksInferiors = new Hashtable(0); - private static final Map allBaseAfterPushOutOfBlocksSuperiors = new Hashtable(0); - private static final Map allBaseAfterPushOutOfBlocksInferiors = new Hashtable(0); - - public static net.minecraft.util.MovingObjectPosition rayTrace(IClientPlayerAPI target, double paramDouble, float paramFloat) - { - net.minecraft.util.MovingObjectPosition _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isRayTraceModded) - _result = clientPlayerAPI.rayTrace(paramDouble, paramFloat); - else - _result = target.localRayTrace(paramDouble, paramFloat); - return _result; - } - - private net.minecraft.util.MovingObjectPosition rayTrace(double paramDouble, float paramFloat) - { - if(beforeRayTraceHooks != null) - for(int i = beforeRayTraceHooks.length - 1; i >= 0 ; i--) - beforeRayTraceHooks[i].beforeRayTrace(paramDouble, paramFloat); - - net.minecraft.util.MovingObjectPosition _result; - if(overrideRayTraceHooks != null) - _result = overrideRayTraceHooks[overrideRayTraceHooks.length - 1].rayTrace(paramDouble, paramFloat); - else - _result = player.localRayTrace(paramDouble, paramFloat); - - if(afterRayTraceHooks != null) - for(int i = 0; i < afterRayTraceHooks.length; i++) - afterRayTraceHooks[i].afterRayTrace(paramDouble, paramFloat); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenRayTrace(ClientPlayerBase overWriter) - { - if (overrideRayTraceHooks == null) - return overWriter; - - for(int i = 0; i < overrideRayTraceHooks.length; i++) - if(overrideRayTraceHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRayTraceHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRayTraceHookTypes = new LinkedList(); - private final static List overrideRayTraceHookTypes = new LinkedList(); - private final static List afterRayTraceHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeRayTraceHooks; - private ClientPlayerBase[] overrideRayTraceHooks; - private ClientPlayerBase[] afterRayTraceHooks; - - public boolean isRayTraceModded; - - private static final Map allBaseBeforeRayTraceSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRayTraceInferiors = new Hashtable(0); - private static final Map allBaseOverrideRayTraceSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRayTraceInferiors = new Hashtable(0); - private static final Map allBaseAfterRayTraceSuperiors = new Hashtable(0); - private static final Map allBaseAfterRayTraceInferiors = new Hashtable(0); - - public static void readEntityFromNBT(IClientPlayerAPI target, net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isReadEntityFromNBTModded) - clientPlayerAPI.readEntityFromNBT(paramNBTTagCompound); - else - target.localReadEntityFromNBT(paramNBTTagCompound); - } - - private void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - if(beforeReadEntityFromNBTHooks != null) - for(int i = beforeReadEntityFromNBTHooks.length - 1; i >= 0 ; i--) - beforeReadEntityFromNBTHooks[i].beforeReadEntityFromNBT(paramNBTTagCompound); - - if(overrideReadEntityFromNBTHooks != null) - overrideReadEntityFromNBTHooks[overrideReadEntityFromNBTHooks.length - 1].readEntityFromNBT(paramNBTTagCompound); - else - player.localReadEntityFromNBT(paramNBTTagCompound); - - if(afterReadEntityFromNBTHooks != null) - for(int i = 0; i < afterReadEntityFromNBTHooks.length; i++) - afterReadEntityFromNBTHooks[i].afterReadEntityFromNBT(paramNBTTagCompound); - - } - - protected ClientPlayerBase GetOverwrittenReadEntityFromNBT(ClientPlayerBase overWriter) - { - if (overrideReadEntityFromNBTHooks == null) - return overWriter; - - for(int i = 0; i < overrideReadEntityFromNBTHooks.length; i++) - if(overrideReadEntityFromNBTHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideReadEntityFromNBTHooks[i - 1]; - - return overWriter; - } - - private final static List beforeReadEntityFromNBTHookTypes = new LinkedList(); - private final static List overrideReadEntityFromNBTHookTypes = new LinkedList(); - private final static List afterReadEntityFromNBTHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeReadEntityFromNBTHooks; - private ClientPlayerBase[] overrideReadEntityFromNBTHooks; - private ClientPlayerBase[] afterReadEntityFromNBTHooks; - - public boolean isReadEntityFromNBTModded; - - private static final Map allBaseBeforeReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseBeforeReadEntityFromNBTInferiors = new Hashtable(0); - private static final Map allBaseOverrideReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseOverrideReadEntityFromNBTInferiors = new Hashtable(0); - private static final Map allBaseAfterReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseAfterReadEntityFromNBTInferiors = new Hashtable(0); - - public static void respawnPlayer(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isRespawnPlayerModded) - clientPlayerAPI.respawnPlayer(); - else - target.localRespawnPlayer(); - } - - private void respawnPlayer() - { - if(beforeRespawnPlayerHooks != null) - for(int i = beforeRespawnPlayerHooks.length - 1; i >= 0 ; i--) - beforeRespawnPlayerHooks[i].beforeRespawnPlayer(); - - if(overrideRespawnPlayerHooks != null) - overrideRespawnPlayerHooks[overrideRespawnPlayerHooks.length - 1].respawnPlayer(); - else - player.localRespawnPlayer(); - - if(afterRespawnPlayerHooks != null) - for(int i = 0; i < afterRespawnPlayerHooks.length; i++) - afterRespawnPlayerHooks[i].afterRespawnPlayer(); - - } - - protected ClientPlayerBase GetOverwrittenRespawnPlayer(ClientPlayerBase overWriter) - { - if (overrideRespawnPlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideRespawnPlayerHooks.length; i++) - if(overrideRespawnPlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRespawnPlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRespawnPlayerHookTypes = new LinkedList(); - private final static List overrideRespawnPlayerHookTypes = new LinkedList(); - private final static List afterRespawnPlayerHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeRespawnPlayerHooks; - private ClientPlayerBase[] overrideRespawnPlayerHooks; - private ClientPlayerBase[] afterRespawnPlayerHooks; - - public boolean isRespawnPlayerModded; - - private static final Map allBaseBeforeRespawnPlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRespawnPlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideRespawnPlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRespawnPlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterRespawnPlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterRespawnPlayerInferiors = new Hashtable(0); - - public static void setDead(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSetDeadModded) - clientPlayerAPI.setDead(); - else - target.localSetDead(); - } - - private void setDead() - { - if(beforeSetDeadHooks != null) - for(int i = beforeSetDeadHooks.length - 1; i >= 0 ; i--) - beforeSetDeadHooks[i].beforeSetDead(); - - if(overrideSetDeadHooks != null) - overrideSetDeadHooks[overrideSetDeadHooks.length - 1].setDead(); - else - player.localSetDead(); - - if(afterSetDeadHooks != null) - for(int i = 0; i < afterSetDeadHooks.length; i++) - afterSetDeadHooks[i].afterSetDead(); - - } - - protected ClientPlayerBase GetOverwrittenSetDead(ClientPlayerBase overWriter) - { - if (overrideSetDeadHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetDeadHooks.length; i++) - if(overrideSetDeadHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetDeadHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetDeadHookTypes = new LinkedList(); - private final static List overrideSetDeadHookTypes = new LinkedList(); - private final static List afterSetDeadHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSetDeadHooks; - private ClientPlayerBase[] overrideSetDeadHooks; - private ClientPlayerBase[] afterSetDeadHooks; - - public boolean isSetDeadModded; - - private static final Map allBaseBeforeSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetDeadInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetDeadInferiors = new Hashtable(0); - private static final Map allBaseAfterSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetDeadInferiors = new Hashtable(0); - - public static void setPlayerSPHealth(IClientPlayerAPI target, float paramFloat) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSetPlayerSPHealthModded) - clientPlayerAPI.setPlayerSPHealth(paramFloat); - else - target.localSetPlayerSPHealth(paramFloat); - } - - private void setPlayerSPHealth(float paramFloat) - { - if(beforeSetPlayerSPHealthHooks != null) - for(int i = beforeSetPlayerSPHealthHooks.length - 1; i >= 0 ; i--) - beforeSetPlayerSPHealthHooks[i].beforeSetPlayerSPHealth(paramFloat); - - if(overrideSetPlayerSPHealthHooks != null) - overrideSetPlayerSPHealthHooks[overrideSetPlayerSPHealthHooks.length - 1].setPlayerSPHealth(paramFloat); - else - player.localSetPlayerSPHealth(paramFloat); - - if(afterSetPlayerSPHealthHooks != null) - for(int i = 0; i < afterSetPlayerSPHealthHooks.length; i++) - afterSetPlayerSPHealthHooks[i].afterSetPlayerSPHealth(paramFloat); - - } - - protected ClientPlayerBase GetOverwrittenSetPlayerSPHealth(ClientPlayerBase overWriter) - { - if (overrideSetPlayerSPHealthHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetPlayerSPHealthHooks.length; i++) - if(overrideSetPlayerSPHealthHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetPlayerSPHealthHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetPlayerSPHealthHookTypes = new LinkedList(); - private final static List overrideSetPlayerSPHealthHookTypes = new LinkedList(); - private final static List afterSetPlayerSPHealthHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSetPlayerSPHealthHooks; - private ClientPlayerBase[] overrideSetPlayerSPHealthHooks; - private ClientPlayerBase[] afterSetPlayerSPHealthHooks; - - public boolean isSetPlayerSPHealthModded; - - private static final Map allBaseBeforeSetPlayerSPHealthSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetPlayerSPHealthInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetPlayerSPHealthSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetPlayerSPHealthInferiors = new Hashtable(0); - private static final Map allBaseAfterSetPlayerSPHealthSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetPlayerSPHealthInferiors = new Hashtable(0); - - public static void setPositionAndRotation(IClientPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSetPositionAndRotationModded) - clientPlayerAPI.setPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - target.localSetPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - } - - private void setPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - if(beforeSetPositionAndRotationHooks != null) - for(int i = beforeSetPositionAndRotationHooks.length - 1; i >= 0 ; i--) - beforeSetPositionAndRotationHooks[i].beforeSetPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(overrideSetPositionAndRotationHooks != null) - overrideSetPositionAndRotationHooks[overrideSetPositionAndRotationHooks.length - 1].setPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - player.localSetPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(afterSetPositionAndRotationHooks != null) - for(int i = 0; i < afterSetPositionAndRotationHooks.length; i++) - afterSetPositionAndRotationHooks[i].afterSetPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - protected ClientPlayerBase GetOverwrittenSetPositionAndRotation(ClientPlayerBase overWriter) - { - if (overrideSetPositionAndRotationHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetPositionAndRotationHooks.length; i++) - if(overrideSetPositionAndRotationHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetPositionAndRotationHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetPositionAndRotationHookTypes = new LinkedList(); - private final static List overrideSetPositionAndRotationHookTypes = new LinkedList(); - private final static List afterSetPositionAndRotationHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSetPositionAndRotationHooks; - private ClientPlayerBase[] overrideSetPositionAndRotationHooks; - private ClientPlayerBase[] afterSetPositionAndRotationHooks; - - public boolean isSetPositionAndRotationModded; - - private static final Map allBaseBeforeSetPositionAndRotationSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetPositionAndRotationInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetPositionAndRotationSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetPositionAndRotationInferiors = new Hashtable(0); - private static final Map allBaseAfterSetPositionAndRotationSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetPositionAndRotationInferiors = new Hashtable(0); - - public static void setSneaking(IClientPlayerAPI target, boolean paramBoolean) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSetSneakingModded) - clientPlayerAPI.setSneaking(paramBoolean); - else - target.localSetSneaking(paramBoolean); - } - - private void setSneaking(boolean paramBoolean) - { - if(beforeSetSneakingHooks != null) - for(int i = beforeSetSneakingHooks.length - 1; i >= 0 ; i--) - beforeSetSneakingHooks[i].beforeSetSneaking(paramBoolean); - - if(overrideSetSneakingHooks != null) - overrideSetSneakingHooks[overrideSetSneakingHooks.length - 1].setSneaking(paramBoolean); - else - player.localSetSneaking(paramBoolean); - - if(afterSetSneakingHooks != null) - for(int i = 0; i < afterSetSneakingHooks.length; i++) - afterSetSneakingHooks[i].afterSetSneaking(paramBoolean); - - } - - protected ClientPlayerBase GetOverwrittenSetSneaking(ClientPlayerBase overWriter) - { - if (overrideSetSneakingHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetSneakingHooks.length; i++) - if(overrideSetSneakingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetSneakingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetSneakingHookTypes = new LinkedList(); - private final static List overrideSetSneakingHookTypes = new LinkedList(); - private final static List afterSetSneakingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSetSneakingHooks; - private ClientPlayerBase[] overrideSetSneakingHooks; - private ClientPlayerBase[] afterSetSneakingHooks; - - public boolean isSetSneakingModded; - - private static final Map allBaseBeforeSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetSneakingInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetSneakingInferiors = new Hashtable(0); - private static final Map allBaseAfterSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetSneakingInferiors = new Hashtable(0); - - public static void setSprinting(IClientPlayerAPI target, boolean paramBoolean) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSetSprintingModded) - clientPlayerAPI.setSprinting(paramBoolean); - else - target.localSetSprinting(paramBoolean); - } - - private void setSprinting(boolean paramBoolean) - { - if(beforeSetSprintingHooks != null) - for(int i = beforeSetSprintingHooks.length - 1; i >= 0 ; i--) - beforeSetSprintingHooks[i].beforeSetSprinting(paramBoolean); - - if(overrideSetSprintingHooks != null) - overrideSetSprintingHooks[overrideSetSprintingHooks.length - 1].setSprinting(paramBoolean); - else - player.localSetSprinting(paramBoolean); - - if(afterSetSprintingHooks != null) - for(int i = 0; i < afterSetSprintingHooks.length; i++) - afterSetSprintingHooks[i].afterSetSprinting(paramBoolean); - - } - - protected ClientPlayerBase GetOverwrittenSetSprinting(ClientPlayerBase overWriter) - { - if (overrideSetSprintingHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetSprintingHooks.length; i++) - if(overrideSetSprintingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetSprintingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetSprintingHookTypes = new LinkedList(); - private final static List overrideSetSprintingHookTypes = new LinkedList(); - private final static List afterSetSprintingHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSetSprintingHooks; - private ClientPlayerBase[] overrideSetSprintingHooks; - private ClientPlayerBase[] afterSetSprintingHooks; - - public boolean isSetSprintingModded; - - private static final Map allBaseBeforeSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetSprintingInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetSprintingInferiors = new Hashtable(0); - private static final Map allBaseAfterSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetSprintingInferiors = new Hashtable(0); - - public static net.minecraft.entity.player.EntityPlayer.EnumStatus sleepInBedAt(IClientPlayerAPI target, int paramInt1, int paramInt2, int paramInt3) - { - net.minecraft.entity.player.EntityPlayer.EnumStatus _result; - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSleepInBedAtModded) - _result = clientPlayerAPI.sleepInBedAt(paramInt1, paramInt2, paramInt3); - else - _result = target.localSleepInBedAt(paramInt1, paramInt2, paramInt3); - return _result; - } - - private net.minecraft.entity.player.EntityPlayer.EnumStatus sleepInBedAt(int paramInt1, int paramInt2, int paramInt3) - { - if(beforeSleepInBedAtHooks != null) - for(int i = beforeSleepInBedAtHooks.length - 1; i >= 0 ; i--) - beforeSleepInBedAtHooks[i].beforeSleepInBedAt(paramInt1, paramInt2, paramInt3); - - net.minecraft.entity.player.EntityPlayer.EnumStatus _result; - if(overrideSleepInBedAtHooks != null) - _result = overrideSleepInBedAtHooks[overrideSleepInBedAtHooks.length - 1].sleepInBedAt(paramInt1, paramInt2, paramInt3); - else - _result = player.localSleepInBedAt(paramInt1, paramInt2, paramInt3); - - if(afterSleepInBedAtHooks != null) - for(int i = 0; i < afterSleepInBedAtHooks.length; i++) - afterSleepInBedAtHooks[i].afterSleepInBedAt(paramInt1, paramInt2, paramInt3); - - return _result; - } - - protected ClientPlayerBase GetOverwrittenSleepInBedAt(ClientPlayerBase overWriter) - { - if (overrideSleepInBedAtHooks == null) - return overWriter; - - for(int i = 0; i < overrideSleepInBedAtHooks.length; i++) - if(overrideSleepInBedAtHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSleepInBedAtHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSleepInBedAtHookTypes = new LinkedList(); - private final static List overrideSleepInBedAtHookTypes = new LinkedList(); - private final static List afterSleepInBedAtHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSleepInBedAtHooks; - private ClientPlayerBase[] overrideSleepInBedAtHooks; - private ClientPlayerBase[] afterSleepInBedAtHooks; - - public boolean isSleepInBedAtModded; - - private static final Map allBaseBeforeSleepInBedAtSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSleepInBedAtInferiors = new Hashtable(0); - private static final Map allBaseOverrideSleepInBedAtSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSleepInBedAtInferiors = new Hashtable(0); - private static final Map allBaseAfterSleepInBedAtSuperiors = new Hashtable(0); - private static final Map allBaseAfterSleepInBedAtInferiors = new Hashtable(0); - - public static void swingItem(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isSwingItemModded) - clientPlayerAPI.swingItem(); - else - target.localSwingItem(); - } - - private void swingItem() - { - if(beforeSwingItemHooks != null) - for(int i = beforeSwingItemHooks.length - 1; i >= 0 ; i--) - beforeSwingItemHooks[i].beforeSwingItem(); - - if(overrideSwingItemHooks != null) - overrideSwingItemHooks[overrideSwingItemHooks.length - 1].swingItem(); - else - player.localSwingItem(); - - if(afterSwingItemHooks != null) - for(int i = 0; i < afterSwingItemHooks.length; i++) - afterSwingItemHooks[i].afterSwingItem(); - - } - - protected ClientPlayerBase GetOverwrittenSwingItem(ClientPlayerBase overWriter) - { - if (overrideSwingItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideSwingItemHooks.length; i++) - if(overrideSwingItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSwingItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSwingItemHookTypes = new LinkedList(); - private final static List overrideSwingItemHookTypes = new LinkedList(); - private final static List afterSwingItemHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeSwingItemHooks; - private ClientPlayerBase[] overrideSwingItemHooks; - private ClientPlayerBase[] afterSwingItemHooks; - - public boolean isSwingItemModded; - - private static final Map allBaseBeforeSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSwingItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSwingItemInferiors = new Hashtable(0); - private static final Map allBaseAfterSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterSwingItemInferiors = new Hashtable(0); - - public static void updateEntityActionState(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isUpdateEntityActionStateModded) - clientPlayerAPI.updateEntityActionState(); - else - target.localUpdateEntityActionState(); - } - - private void updateEntityActionState() - { - if(beforeUpdateEntityActionStateHooks != null) - for(int i = beforeUpdateEntityActionStateHooks.length - 1; i >= 0 ; i--) - beforeUpdateEntityActionStateHooks[i].beforeUpdateEntityActionState(); - - if(overrideUpdateEntityActionStateHooks != null) - overrideUpdateEntityActionStateHooks[overrideUpdateEntityActionStateHooks.length - 1].updateEntityActionState(); - else - player.localUpdateEntityActionState(); - - if(afterUpdateEntityActionStateHooks != null) - for(int i = 0; i < afterUpdateEntityActionStateHooks.length; i++) - afterUpdateEntityActionStateHooks[i].afterUpdateEntityActionState(); - - } - - protected ClientPlayerBase GetOverwrittenUpdateEntityActionState(ClientPlayerBase overWriter) - { - if (overrideUpdateEntityActionStateHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdateEntityActionStateHooks.length; i++) - if(overrideUpdateEntityActionStateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdateEntityActionStateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdateEntityActionStateHookTypes = new LinkedList(); - private final static List overrideUpdateEntityActionStateHookTypes = new LinkedList(); - private final static List afterUpdateEntityActionStateHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeUpdateEntityActionStateHooks; - private ClientPlayerBase[] overrideUpdateEntityActionStateHooks; - private ClientPlayerBase[] afterUpdateEntityActionStateHooks; - - public boolean isUpdateEntityActionStateModded; - - private static final Map allBaseBeforeUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdateEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdateEntityActionStateInferiors = new Hashtable(0); - - public static void updateRidden(IClientPlayerAPI target) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isUpdateRiddenModded) - clientPlayerAPI.updateRidden(); - else - target.localUpdateRidden(); - } - - private void updateRidden() - { - if(beforeUpdateRiddenHooks != null) - for(int i = beforeUpdateRiddenHooks.length - 1; i >= 0 ; i--) - beforeUpdateRiddenHooks[i].beforeUpdateRidden(); - - if(overrideUpdateRiddenHooks != null) - overrideUpdateRiddenHooks[overrideUpdateRiddenHooks.length - 1].updateRidden(); - else - player.localUpdateRidden(); - - if(afterUpdateRiddenHooks != null) - for(int i = 0; i < afterUpdateRiddenHooks.length; i++) - afterUpdateRiddenHooks[i].afterUpdateRidden(); - - } - - protected ClientPlayerBase GetOverwrittenUpdateRidden(ClientPlayerBase overWriter) - { - if (overrideUpdateRiddenHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdateRiddenHooks.length; i++) - if(overrideUpdateRiddenHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdateRiddenHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdateRiddenHookTypes = new LinkedList(); - private final static List overrideUpdateRiddenHookTypes = new LinkedList(); - private final static List afterUpdateRiddenHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeUpdateRiddenHooks; - private ClientPlayerBase[] overrideUpdateRiddenHooks; - private ClientPlayerBase[] afterUpdateRiddenHooks; - - public boolean isUpdateRiddenModded; - - private static final Map allBaseBeforeUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdateRiddenInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateRiddenInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdateRiddenInferiors = new Hashtable(0); - - public static void wakeUpPlayer(IClientPlayerAPI target, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isWakeUpPlayerModded) - clientPlayerAPI.wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else - target.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - } - - private void wakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - if(beforeWakeUpPlayerHooks != null) - for(int i = beforeWakeUpPlayerHooks.length - 1; i >= 0 ; i--) - beforeWakeUpPlayerHooks[i].beforeWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - if(overrideWakeUpPlayerHooks != null) - overrideWakeUpPlayerHooks[overrideWakeUpPlayerHooks.length - 1].wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else - player.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - if(afterWakeUpPlayerHooks != null) - for(int i = 0; i < afterWakeUpPlayerHooks.length; i++) - afterWakeUpPlayerHooks[i].afterWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - } - - protected ClientPlayerBase GetOverwrittenWakeUpPlayer(ClientPlayerBase overWriter) - { - if (overrideWakeUpPlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideWakeUpPlayerHooks.length; i++) - if(overrideWakeUpPlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideWakeUpPlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeWakeUpPlayerHookTypes = new LinkedList(); - private final static List overrideWakeUpPlayerHookTypes = new LinkedList(); - private final static List afterWakeUpPlayerHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeWakeUpPlayerHooks; - private ClientPlayerBase[] overrideWakeUpPlayerHooks; - private ClientPlayerBase[] afterWakeUpPlayerHooks; - - public boolean isWakeUpPlayerModded; - - private static final Map allBaseBeforeWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeWakeUpPlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideWakeUpPlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterWakeUpPlayerInferiors = new Hashtable(0); - - public static void writeEntityToNBT(IClientPlayerAPI target, net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ClientPlayerAPI clientPlayerAPI = target.getClientPlayerAPI(); - if(clientPlayerAPI != null && clientPlayerAPI.isWriteEntityToNBTModded) - clientPlayerAPI.writeEntityToNBT(paramNBTTagCompound); - else - target.localWriteEntityToNBT(paramNBTTagCompound); - } - - private void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - if(beforeWriteEntityToNBTHooks != null) - for(int i = beforeWriteEntityToNBTHooks.length - 1; i >= 0 ; i--) - beforeWriteEntityToNBTHooks[i].beforeWriteEntityToNBT(paramNBTTagCompound); - - if(overrideWriteEntityToNBTHooks != null) - overrideWriteEntityToNBTHooks[overrideWriteEntityToNBTHooks.length - 1].writeEntityToNBT(paramNBTTagCompound); - else - player.localWriteEntityToNBT(paramNBTTagCompound); - - if(afterWriteEntityToNBTHooks != null) - for(int i = 0; i < afterWriteEntityToNBTHooks.length; i++) - afterWriteEntityToNBTHooks[i].afterWriteEntityToNBT(paramNBTTagCompound); - - } - - protected ClientPlayerBase GetOverwrittenWriteEntityToNBT(ClientPlayerBase overWriter) - { - if (overrideWriteEntityToNBTHooks == null) - return overWriter; - - for(int i = 0; i < overrideWriteEntityToNBTHooks.length; i++) - if(overrideWriteEntityToNBTHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideWriteEntityToNBTHooks[i - 1]; - - return overWriter; - } - - private final static List beforeWriteEntityToNBTHookTypes = new LinkedList(); - private final static List overrideWriteEntityToNBTHookTypes = new LinkedList(); - private final static List afterWriteEntityToNBTHookTypes = new LinkedList(); - - private ClientPlayerBase[] beforeWriteEntityToNBTHooks; - private ClientPlayerBase[] overrideWriteEntityToNBTHooks; - private ClientPlayerBase[] afterWriteEntityToNBTHooks; - - public boolean isWriteEntityToNBTModded; - - private static final Map allBaseBeforeWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseBeforeWriteEntityToNBTInferiors = new Hashtable(0); - private static final Map allBaseOverrideWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseOverrideWriteEntityToNBTInferiors = new Hashtable(0); - private static final Map allBaseAfterWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseAfterWriteEntityToNBTInferiors = new Hashtable(0); - - - protected final IClientPlayerAPI player; - - private final static Set keys = new HashSet(); - private final static Map keysToVirtualIds = new HashMap(); - private final static Set> dynamicTypes = new HashSet>(); - - private final static Map, Map> virtualDynamicHookMethods = new HashMap, Map>(); - - private final static Map, Map> beforeDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> overrideDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> afterDynamicHookMethods = new HashMap, Map>(); - - private final static List beforeLocalConstructingHookTypes = new LinkedList(); - private final static List afterLocalConstructingHookTypes = new LinkedList(); - - private static final Map> beforeDynamicHookTypes = new Hashtable>(0); - private static final Map> overrideDynamicHookTypes = new Hashtable>(0); - private static final Map> afterDynamicHookTypes = new Hashtable>(0); - - private ClientPlayerBase[] beforeLocalConstructingHooks; - private ClientPlayerBase[] afterLocalConstructingHooks; - - private final Map baseObjectsToId = new Hashtable(); - private final Map allBaseObjects = new Hashtable(); - private final Set unmodifiableAllBaseIds = Collections.unmodifiableSet(allBaseObjects.keySet()); - - private static final Map> allBaseConstructors = new Hashtable>(); - private static final Set unmodifiableAllIds = Collections.unmodifiableSet(allBaseConstructors.keySet()); - - private static final Map allBaseBeforeLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeLocalConstructingInferiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingInferiors = new Hashtable(0); - - private static final Map> allBaseBeforeDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseBeforeDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicInferiors = new Hashtable>(0); - - private static boolean initialized = false; -} diff --git a/src/main/java/api/player/client/ClientPlayerBase.java b/src/main/java/api/player/client/ClientPlayerBase.java deleted file mode 100644 index 30f2a586..00000000 --- a/src/main/java/api/player/client/ClientPlayerBase.java +++ /dev/null @@ -1,1525 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -public abstract class ClientPlayerBase -{ - public ClientPlayerBase(ClientPlayerAPI playerAPI) - { - this.internalClientPlayerAPI = playerAPI; - this.playerAPI = playerAPI.player; - this.player = playerAPI.player.getEntityPlayerSP(); - } - - public void beforeBaseAttach(boolean onTheFly) - { - } - - public void afterBaseAttach(boolean onTheFly) - { - } - - public void beforeLocalConstructing(net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - } - - public void afterLocalConstructing(net.minecraft.client.Minecraft paramMinecraft, net.minecraft.world.World paramWorld, net.minecraft.util.Session paramSession, int paramInt) - { - } - - public void beforeBaseDetach(boolean onTheFly) - { - } - - public void afterBaseDetach(boolean onTheFly) - { - } - - public Object dynamic(String key, Object[] parameters) - { - return internalClientPlayerAPI.dynamicOverwritten(key, parameters, this); - } - - public final int hashCode() - { - return super.hashCode(); - } - - public void beforeAddExhaustion(float paramFloat) - { - } - - public void addExhaustion(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenAddExhaustion(this); - - if(overwritten == null) - playerAPI.localAddExhaustion(paramFloat); - else if(overwritten != this) - overwritten.addExhaustion(paramFloat); - - } - - public void afterAddExhaustion(float paramFloat) - { - } - - public void beforeAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void addMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenAddMovementStat(this); - - if(overwritten == null) - playerAPI.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.addMovementStat(paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeAddStat(net.minecraft.stats.StatBase paramStatBase, int paramInt) - { - } - - public void addStat(net.minecraft.stats.StatBase paramStatBase, int paramInt) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenAddStat(this); - - if(overwritten == null) - playerAPI.localAddStat(paramStatBase, paramInt); - else if(overwritten != this) - overwritten.addStat(paramStatBase, paramInt); - - } - - public void afterAddStat(net.minecraft.stats.StatBase paramStatBase, int paramInt) - { - } - - public void beforeAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public boolean attackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenAttackEntityFrom(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localAttackEntityFrom(paramDamageSource, paramFloat); - else if(overwritten != this) - _result = overwritten.attackEntityFrom(paramDamageSource, paramFloat); - else - _result = false; - - return _result; - } - - public void afterAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void beforeAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - } - - public void attackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenAttackTargetEntityWithCurrentItem(this); - - if(overwritten == null) - playerAPI.localAttackTargetEntityWithCurrentItem(paramEntity); - else if(overwritten != this) - overwritten.attackTargetEntityWithCurrentItem(paramEntity); - - } - - public void afterAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - } - - public void beforeCanBreatheUnderwater() - { - } - - public boolean canBreatheUnderwater() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenCanBreatheUnderwater(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanBreatheUnderwater(); - else if(overwritten != this) - _result = overwritten.canBreatheUnderwater(); - else - _result = false; - - return _result; - } - - public void afterCanBreatheUnderwater() - { - } - - public void beforeCanHarvestBlock(net.minecraft.block.Block paramBlock) - { - } - - public boolean canHarvestBlock(net.minecraft.block.Block paramBlock) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenCanHarvestBlock(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanHarvestBlock(paramBlock); - else if(overwritten != this) - _result = overwritten.canHarvestBlock(paramBlock); - else - _result = false; - - return _result; - } - - public void afterCanHarvestBlock(net.minecraft.block.Block paramBlock) - { - } - - public void beforeCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - } - - public boolean canPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenCanPlayerEdit(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else if(overwritten != this) - _result = overwritten.canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = false; - - return _result; - } - - public void afterCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - } - - public void beforeCanTriggerWalking() - { - } - - public boolean canTriggerWalking() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenCanTriggerWalking(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanTriggerWalking(); - else if(overwritten != this) - _result = overwritten.canTriggerWalking(); - else - _result = false; - - return _result; - } - - public void afterCanTriggerWalking() - { - } - - public void beforeCloseScreen() - { - } - - public void closeScreen() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenCloseScreen(this); - - if(overwritten == null) - playerAPI.localCloseScreen(); - else if(overwritten != this) - overwritten.closeScreen(); - - } - - public void afterCloseScreen() - { - } - - public void beforeDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void damageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDamageEntity(this); - - if(overwritten == null) - playerAPI.localDamageEntity(paramDamageSource, paramFloat); - else if(overwritten != this) - overwritten.damageEntity(paramDamageSource, paramFloat); - - } - - public void afterDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void beforeDisplayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand) - { - } - - public void displayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIBrewingStand(this); - - if(overwritten == null) - playerAPI.localDisplayGUIBrewingStand(paramTileEntityBrewingStand); - else if(overwritten != this) - overwritten.displayGUIBrewingStand(paramTileEntityBrewingStand); - - } - - public void afterDisplayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand) - { - } - - public void beforeDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - } - - public void displayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIChest(this); - - if(overwritten == null) - playerAPI.localDisplayGUIChest(paramIInventory); - else if(overwritten != this) - overwritten.displayGUIChest(paramIInventory); - - } - - public void afterDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - } - - public void beforeDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - } - - public void displayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIDispenser(this); - - if(overwritten == null) - playerAPI.localDisplayGUIDispenser(paramTileEntityDispenser); - else if(overwritten != this) - overwritten.displayGUIDispenser(paramTileEntityDispenser); - - } - - public void afterDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - } - - public void beforeDisplayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity) - { - } - - public void displayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIEditSign(this); - - if(overwritten == null) - playerAPI.localDisplayGUIEditSign(paramTileEntity); - else if(overwritten != this) - overwritten.displayGUIEditSign(paramTileEntity); - - } - - public void afterDisplayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity) - { - } - - public void beforeDisplayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString) - { - } - - public void displayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIEnchantment(this); - - if(overwritten == null) - playerAPI.localDisplayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - else if(overwritten != this) - overwritten.displayGUIEnchantment(paramInt1, paramInt2, paramInt3, paramString); - - } - - public void afterDisplayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString) - { - } - - public void beforeDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - } - - public void displayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIFurnace(this); - - if(overwritten == null) - playerAPI.localDisplayGUIFurnace(paramTileEntityFurnace); - else if(overwritten != this) - overwritten.displayGUIFurnace(paramTileEntityFurnace); - - } - - public void afterDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - } - - public void beforeDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - } - - public void displayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDisplayGUIWorkbench(this); - - if(overwritten == null) - playerAPI.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else if(overwritten != this) - overwritten.displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - } - - public void afterDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - } - - public void beforeDropOneItem(boolean paramBoolean) - { - } - - public net.minecraft.entity.item.EntityItem dropOneItem(boolean paramBoolean) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDropOneItem(this); - - net.minecraft.entity.item.EntityItem _result; - if(overwritten == null) - _result = playerAPI.localDropOneItem(paramBoolean); - else if(overwritten != this) - _result = overwritten.dropOneItem(paramBoolean); - else - _result = null; - - return _result; - } - - public void afterDropOneItem(boolean paramBoolean) - { - } - - public void beforeDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - } - - public net.minecraft.entity.item.EntityItem dropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDropPlayerItem(this); - - net.minecraft.entity.item.EntityItem _result; - if(overwritten == null) - _result = playerAPI.localDropPlayerItem(paramItemStack, paramBoolean); - else if(overwritten != this) - _result = overwritten.dropPlayerItem(paramItemStack, paramBoolean); - else - _result = null; - - return _result; - } - - public void afterDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - } - - public void beforeDropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2) - { - } - - public net.minecraft.entity.item.EntityItem dropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenDropPlayerItemWithRandomChoice(this); - - net.minecraft.entity.item.EntityItem _result; - if(overwritten == null) - _result = playerAPI.localDropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - else if(overwritten != this) - _result = overwritten.dropPlayerItemWithRandomChoice(paramItemStack, paramBoolean1, paramBoolean2); - else - _result = null; - - return _result; - } - - public void afterDropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2) - { - } - - public void beforeFall(float paramFloat) - { - } - - public void fall(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenFall(this); - - if(overwritten == null) - playerAPI.localFall(paramFloat); - else if(overwritten != this) - overwritten.fall(paramFloat); - - } - - public void afterFall(float paramFloat) - { - } - - public void beforeGetAIMoveSpeed() - { - } - - public float getAIMoveSpeed() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetAIMoveSpeed(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetAIMoveSpeed(); - else if(overwritten != this) - _result = overwritten.getAIMoveSpeed(); - else - _result = 0; - - return _result; - } - - public void afterGetAIMoveSpeed() - { - } - - public void beforeGetBedOrientationInDegrees() - { - } - - public float getBedOrientationInDegrees() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetBedOrientationInDegrees(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetBedOrientationInDegrees(); - else if(overwritten != this) - _result = overwritten.getBedOrientationInDegrees(); - else - _result = 0; - - return _result; - } - - public void afterGetBedOrientationInDegrees() - { - } - - public void beforeGetBrightness(float paramFloat) - { - } - - public float getBrightness(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetBrightness(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetBrightness(paramFloat); - else if(overwritten != this) - _result = overwritten.getBrightness(paramFloat); - else - _result = 0; - - return _result; - } - - public void afterGetBrightness(float paramFloat) - { - } - - public void beforeGetBrightnessForRender(float paramFloat) - { - } - - public int getBrightnessForRender(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetBrightnessForRender(this); - - int _result; - if(overwritten == null) - _result = playerAPI.localGetBrightnessForRender(paramFloat); - else if(overwritten != this) - _result = overwritten.getBrightnessForRender(paramFloat); - else - _result = 0; - - return _result; - } - - public void afterGetBrightnessForRender(float paramFloat) - { - } - - public void beforeGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - } - - public float getCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetCurrentPlayerStrVsBlock(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else if(overwritten != this) - _result = overwritten.getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = 0; - - return _result; - } - - public void afterGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - } - - public void beforeGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - } - - public float getCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetCurrentPlayerStrVsBlockForge(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else if(overwritten != this) - _result = overwritten.getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = 0; - - return _result; - } - - public void afterGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - } - - public void beforeGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public double getDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetDistanceSq(this); - - double _result; - if(overwritten == null) - _result = playerAPI.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - _result = overwritten.getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = 0; - - return _result; - } - - public void afterGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeGetDistanceSqToEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public double getDistanceSqToEntity(net.minecraft.entity.Entity paramEntity) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetDistanceSqToEntity(this); - - double _result; - if(overwritten == null) - _result = playerAPI.localGetDistanceSqToEntity(paramEntity); - else if(overwritten != this) - _result = overwritten.getDistanceSqToEntity(paramEntity); - else - _result = 0; - - return _result; - } - - public void afterGetDistanceSqToEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public void beforeGetFOVMultiplier() - { - } - - public float getFOVMultiplier() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetFOVMultiplier(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetFOVMultiplier(); - else if(overwritten != this) - _result = overwritten.getFOVMultiplier(); - else - _result = 0; - - return _result; - } - - public void afterGetFOVMultiplier() - { - } - - public void beforeGetHurtSound() - { - } - - public java.lang.String getHurtSound() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetHurtSound(this); - - java.lang.String _result; - if(overwritten == null) - _result = playerAPI.localGetHurtSound(); - else if(overwritten != this) - _result = overwritten.getHurtSound(); - else - _result = null; - - return _result; - } - - public void afterGetHurtSound() - { - } - - public void beforeGetItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt) - { - } - - public net.minecraft.util.IIcon getItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetItemIcon(this); - - net.minecraft.util.IIcon _result; - if(overwritten == null) - _result = playerAPI.localGetItemIcon(paramItemStack, paramInt); - else if(overwritten != this) - _result = overwritten.getItemIcon(paramItemStack, paramInt); - else - _result = null; - - return _result; - } - - public void afterGetItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt) - { - } - - public void beforeGetSleepTimer() - { - } - - public int getSleepTimer() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenGetSleepTimer(this); - - int _result; - if(overwritten == null) - _result = playerAPI.localGetSleepTimer(); - else if(overwritten != this) - _result = overwritten.getSleepTimer(); - else - _result = 0; - - return _result; - } - - public void afterGetSleepTimer() - { - } - - public void beforeHandleLavaMovement() - { - } - - public boolean handleLavaMovement() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenHandleLavaMovement(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localHandleLavaMovement(); - else if(overwritten != this) - _result = overwritten.handleLavaMovement(); - else - _result = false; - - return _result; - } - - public void afterHandleLavaMovement() - { - } - - public void beforeHandleWaterMovement() - { - } - - public boolean handleWaterMovement() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenHandleWaterMovement(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localHandleWaterMovement(); - else if(overwritten != this) - _result = overwritten.handleWaterMovement(); - else - _result = false; - - return _result; - } - - public void afterHandleWaterMovement() - { - } - - public void beforeHeal(float paramFloat) - { - } - - public void heal(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenHeal(this); - - if(overwritten == null) - playerAPI.localHeal(paramFloat); - else if(overwritten != this) - overwritten.heal(paramFloat); - - } - - public void afterHeal(float paramFloat) - { - } - - public void beforeIsEntityInsideOpaqueBlock() - { - } - - public boolean isEntityInsideOpaqueBlock() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsEntityInsideOpaqueBlock(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsEntityInsideOpaqueBlock(); - else if(overwritten != this) - _result = overwritten.isEntityInsideOpaqueBlock(); - else - _result = false; - - return _result; - } - - public void afterIsEntityInsideOpaqueBlock() - { - } - - public void beforeIsInWater() - { - } - - public boolean isInWater() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsInWater(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsInWater(); - else if(overwritten != this) - _result = overwritten.isInWater(); - else - _result = false; - - return _result; - } - - public void afterIsInWater() - { - } - - public void beforeIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - } - - public boolean isInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsInsideOfMaterial(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsInsideOfMaterial(paramMaterial); - else if(overwritten != this) - _result = overwritten.isInsideOfMaterial(paramMaterial); - else - _result = false; - - return _result; - } - - public void afterIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - } - - public void beforeIsOnLadder() - { - } - - public boolean isOnLadder() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsOnLadder(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsOnLadder(); - else if(overwritten != this) - _result = overwritten.isOnLadder(); - else - _result = false; - - return _result; - } - - public void afterIsOnLadder() - { - } - - public void beforeIsPlayerSleeping() - { - } - - public boolean isPlayerSleeping() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsPlayerSleeping(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsPlayerSleeping(); - else if(overwritten != this) - _result = overwritten.isPlayerSleeping(); - else - _result = false; - - return _result; - } - - public void afterIsPlayerSleeping() - { - } - - public void beforeIsSneaking() - { - } - - public boolean isSneaking() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsSneaking(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsSneaking(); - else if(overwritten != this) - _result = overwritten.isSneaking(); - else - _result = false; - - return _result; - } - - public void afterIsSneaking() - { - } - - public void beforeIsSprinting() - { - } - - public boolean isSprinting() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenIsSprinting(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsSprinting(); - else if(overwritten != this) - _result = overwritten.isSprinting(); - else - _result = false; - - return _result; - } - - public void afterIsSprinting() - { - } - - public void beforeJump() - { - } - - public void jump() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenJump(this); - - if(overwritten == null) - playerAPI.localJump(); - else if(overwritten != this) - overwritten.jump(); - - } - - public void afterJump() - { - } - - public void beforeKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - } - - public void knockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenKnockBack(this); - - if(overwritten == null) - playerAPI.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else if(overwritten != this) - overwritten.knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - } - - public void afterKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - } - - public void beforeMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void moveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenMoveEntity(this); - - if(overwritten == null) - playerAPI.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.moveEntity(paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeMoveEntityWithHeading(float paramFloat1, float paramFloat2) - { - } - - public void moveEntityWithHeading(float paramFloat1, float paramFloat2) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenMoveEntityWithHeading(this); - - if(overwritten == null) - playerAPI.localMoveEntityWithHeading(paramFloat1, paramFloat2); - else if(overwritten != this) - overwritten.moveEntityWithHeading(paramFloat1, paramFloat2); - - } - - public void afterMoveEntityWithHeading(float paramFloat1, float paramFloat2) - { - } - - public void beforeMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void moveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenMoveFlying(this); - - if(overwritten == null) - playerAPI.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - else if(overwritten != this) - overwritten.moveFlying(paramFloat1, paramFloat2, paramFloat3); - - } - - public void afterMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void beforeOnDeath(net.minecraft.util.DamageSource paramDamageSource) - { - } - - public void onDeath(net.minecraft.util.DamageSource paramDamageSource) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenOnDeath(this); - - if(overwritten == null) - playerAPI.localOnDeath(paramDamageSource); - else if(overwritten != this) - overwritten.onDeath(paramDamageSource); - - } - - public void afterOnDeath(net.minecraft.util.DamageSource paramDamageSource) - { - } - - public void beforeOnLivingUpdate() - { - } - - public void onLivingUpdate() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenOnLivingUpdate(this); - - if(overwritten == null) - playerAPI.localOnLivingUpdate(); - else if(overwritten != this) - overwritten.onLivingUpdate(); - - } - - public void afterOnLivingUpdate() - { - } - - public void beforeOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void onKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenOnKillEntity(this); - - if(overwritten == null) - playerAPI.localOnKillEntity(paramEntityLivingBase); - else if(overwritten != this) - overwritten.onKillEntity(paramEntityLivingBase); - - } - - public void afterOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void beforeOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - } - - public void onStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenOnStruckByLightning(this); - - if(overwritten == null) - playerAPI.localOnStruckByLightning(paramEntityLightningBolt); - else if(overwritten != this) - overwritten.onStruckByLightning(paramEntityLightningBolt); - - } - - public void afterOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - } - - public void beforeOnUpdate() - { - } - - public void onUpdate() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenOnUpdate(this); - - if(overwritten == null) - playerAPI.localOnUpdate(); - else if(overwritten != this) - overwritten.onUpdate(); - - } - - public void afterOnUpdate() - { - } - - public void beforePlayStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock) - { - } - - public void playStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenPlayStepSound(this); - - if(overwritten == null) - playerAPI.localPlayStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - else if(overwritten != this) - overwritten.playStepSound(paramInt1, paramInt2, paramInt3, paramBlock); - - } - - public void afterPlayStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock) - { - } - - public void beforePushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public boolean pushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenPushOutOfBlocks(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localPushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - _result = overwritten.pushOutOfBlocks(paramDouble1, paramDouble2, paramDouble3); - else - _result = false; - - return _result; - } - - public void afterPushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeRayTrace(double paramDouble, float paramFloat) - { - } - - public net.minecraft.util.MovingObjectPosition rayTrace(double paramDouble, float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenRayTrace(this); - - net.minecraft.util.MovingObjectPosition _result; - if(overwritten == null) - _result = playerAPI.localRayTrace(paramDouble, paramFloat); - else if(overwritten != this) - _result = overwritten.rayTrace(paramDouble, paramFloat); - else - _result = null; - - return _result; - } - - public void afterRayTrace(double paramDouble, float paramFloat) - { - } - - public void beforeReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenReadEntityFromNBT(this); - - if(overwritten == null) - playerAPI.localReadEntityFromNBT(paramNBTTagCompound); - else if(overwritten != this) - overwritten.readEntityFromNBT(paramNBTTagCompound); - - } - - public void afterReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void beforeRespawnPlayer() - { - } - - public void respawnPlayer() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenRespawnPlayer(this); - - if(overwritten == null) - playerAPI.localRespawnPlayer(); - else if(overwritten != this) - overwritten.respawnPlayer(); - - } - - public void afterRespawnPlayer() - { - } - - public void beforeSetDead() - { - } - - public void setDead() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSetDead(this); - - if(overwritten == null) - playerAPI.localSetDead(); - else if(overwritten != this) - overwritten.setDead(); - - } - - public void afterSetDead() - { - } - - public void beforeSetPlayerSPHealth(float paramFloat) - { - } - - public void setPlayerSPHealth(float paramFloat) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSetPlayerSPHealth(this); - - if(overwritten == null) - playerAPI.localSetPlayerSPHealth(paramFloat); - else if(overwritten != this) - overwritten.setPlayerSPHealth(paramFloat); - - } - - public void afterSetPlayerSPHealth(float paramFloat) - { - } - - public void beforeSetPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void setPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSetPositionAndRotation(this); - - if(overwritten == null) - playerAPI.localSetPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else if(overwritten != this) - overwritten.setPositionAndRotation(paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - public void afterSetPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void beforeSetSneaking(boolean paramBoolean) - { - } - - public void setSneaking(boolean paramBoolean) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSetSneaking(this); - - if(overwritten == null) - playerAPI.localSetSneaking(paramBoolean); - else if(overwritten != this) - overwritten.setSneaking(paramBoolean); - - } - - public void afterSetSneaking(boolean paramBoolean) - { - } - - public void beforeSetSprinting(boolean paramBoolean) - { - } - - public void setSprinting(boolean paramBoolean) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSetSprinting(this); - - if(overwritten == null) - playerAPI.localSetSprinting(paramBoolean); - else if(overwritten != this) - overwritten.setSprinting(paramBoolean); - - } - - public void afterSetSprinting(boolean paramBoolean) - { - } - - public void beforeSleepInBedAt(int paramInt1, int paramInt2, int paramInt3) - { - } - - public net.minecraft.entity.player.EntityPlayer.EnumStatus sleepInBedAt(int paramInt1, int paramInt2, int paramInt3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSleepInBedAt(this); - - net.minecraft.entity.player.EntityPlayer.EnumStatus _result; - if(overwritten == null) - _result = playerAPI.localSleepInBedAt(paramInt1, paramInt2, paramInt3); - else if(overwritten != this) - _result = overwritten.sleepInBedAt(paramInt1, paramInt2, paramInt3); - else - _result = null; - - return _result; - } - - public void afterSleepInBedAt(int paramInt1, int paramInt2, int paramInt3) - { - } - - public void beforeSwingItem() - { - } - - public void swingItem() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenSwingItem(this); - - if(overwritten == null) - playerAPI.localSwingItem(); - else if(overwritten != this) - overwritten.swingItem(); - - } - - public void afterSwingItem() - { - } - - public void beforeUpdateEntityActionState() - { - } - - public void updateEntityActionState() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenUpdateEntityActionState(this); - - if(overwritten == null) - playerAPI.localUpdateEntityActionState(); - else if(overwritten != this) - overwritten.updateEntityActionState(); - - } - - public void afterUpdateEntityActionState() - { - } - - public void beforeUpdateRidden() - { - } - - public void updateRidden() - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenUpdateRidden(this); - - if(overwritten == null) - playerAPI.localUpdateRidden(); - else if(overwritten != this) - overwritten.updateRidden(); - - } - - public void afterUpdateRidden() - { - } - - public void beforeWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - } - - public void wakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenWakeUpPlayer(this); - - if(overwritten == null) - playerAPI.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else if(overwritten != this) - overwritten.wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - } - - public void afterWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - } - - public void beforeWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ClientPlayerBase overwritten = internalClientPlayerAPI.GetOverwrittenWriteEntityToNBT(this); - - if(overwritten == null) - playerAPI.localWriteEntityToNBT(paramNBTTagCompound); - else if(overwritten != this) - overwritten.writeEntityToNBT(paramNBTTagCompound); - - } - - public void afterWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - protected final net.minecraft.client.entity.EntityPlayerSP player; - protected final IClientPlayer playerAPI; - private final ClientPlayerAPI internalClientPlayerAPI; -} diff --git a/src/main/java/api/player/client/ClientPlayerBaseSorter.java b/src/main/java/api/player/client/ClientPlayerBaseSorter.java deleted file mode 100644 index 68bc9ada..00000000 --- a/src/main/java/api/player/client/ClientPlayerBaseSorter.java +++ /dev/null @@ -1,259 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -import java.util.*; - -public final class ClientPlayerBaseSorter -{ - public ClientPlayerBaseSorter(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - this.list = list; - this.allBaseSuperiors = allBaseSuperiors; - this.allBaseInferiors = allBaseInferiors; - this.methodName = methodName; - } - - public void Sort() - { - if(list.size() <= 1) - return; - - if(explicitInferiors != null) - explicitInferiors.clear(); - - if(explicitSuperiors != null) - explicitSuperiors.clear(); - - if(directInferiorsMap != null) - directInferiorsMap.clear(); - - if(allInferiors != null) - allInferiors.clear(); - - for(int i = 0; i < list.size(); i++) - { - String baseId = list.get(i); - - String[] inferiorNames = allBaseInferiors.get(baseId); - boolean hasInferiors = inferiorNames != null && inferiorNames.length > 0; - - String[] superiorNames = allBaseSuperiors.get(baseId); - boolean hasSuperiors = superiorNames != null && superiorNames.length > 0; - - if((hasInferiors || hasSuperiors) && directInferiorsMap == null) - directInferiorsMap = new Hashtable>(); - - if(hasInferiors) - explicitInferiors = build(baseId, explicitInferiors, directInferiorsMap, null, inferiorNames); - - if(hasSuperiors) - explicitSuperiors = build(baseId, explicitSuperiors, null, directInferiorsMap, superiorNames); - } - if(directInferiorsMap != null) - { - for(int i = 0; i < list.size() - 1; i++) - for(int n = i + 1; n < list.size(); n++) - { - String left = list.get(i); - String right = list.get(n); - - Set leftInferiors = null, rightInferiors = null; - if(explicitInferiors != null) - { - leftInferiors = explicitInferiors.get(left); - rightInferiors = explicitInferiors.get(right); - } - - Set leftSuperiors = null, rightSuperiors = null; - if(explicitSuperiors != null) - { - leftSuperiors = explicitSuperiors.get(left); - rightSuperiors = explicitSuperiors.get(right); - } - - boolean leftWantsToBeInferiorToRight = leftSuperiors != null && leftSuperiors.contains(right); - boolean leftWantsToBeSuperiorToRight = leftInferiors != null && leftInferiors.contains(right); - - boolean rightWantsToBeInferiorToLeft = rightSuperiors != null && rightSuperiors.contains(left); - boolean rightWantsToBeSuperiorToLeft = rightInferiors != null && rightInferiors.contains(left); - - if(leftWantsToBeInferiorToRight && rightWantsToBeInferiorToLeft) - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be inferior to '" + right + "' and '" + right + "' wants to be inferior to '" + left + "'"); - if(leftWantsToBeSuperiorToRight && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior to '" + right + "' and '" + right + "' wants to be superior to '" + left + "'"); - - if(leftWantsToBeInferiorToRight && leftWantsToBeSuperiorToRight) - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior and inferior to '" + right + "'"); - if(rightWantsToBeInferiorToLeft && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. '" + right + "' wants to be superior and inferior to '" + left + "'"); - } - - if(allInferiors == null) - allInferiors = new Hashtable>(); - - for(int i = 0; i < list.size(); i++) - build(list.get(i), null); - } - - if (withoutSuperiors == null) - withoutSuperiors = new LinkedList(); - - int offset = 0; - int size = list.size(); - - while(size > 1) - { - withoutSuperiors.clear(); - for(int i = offset; i < offset + size; i++) - withoutSuperiors.add(list.get(i)); - - if(allInferiors != null) - for(int i = offset; i < offset + size; i++) - { - Set inferiors = allInferiors.get(list.get(i)); - if (inferiors != null) - withoutSuperiors.removeAll(inferiors); - } - - boolean initial = true; - for(int i = offset; i < offset + size; i++) - { - String key = list.get(i); - if(withoutSuperiors.contains(key)) - { - if(initial) - { - Set inferiors = null; - if(allInferiors != null) - inferiors = allInferiors.get(key); - if(inferiors == null || inferiors.isEmpty()) - { - withoutSuperiors.remove(key); - size--; - offset++; - continue; - } - } - list.remove(i--); - size--; - } - initial = false; - } - list.addAll(offset + size, withoutSuperiors); - } - } - - private Set build(String type, String startType) - { - Set inferiors = allInferiors.get(type); - if(inferiors == null) - { - inferiors = build(type, null, startType != null ? startType : type); - if(inferiors == null) - inferiors = Empty; - allInferiors.put(type, inferiors); - } - return inferiors; - } - - private Set build(String type, Set inferiors, String startType) - { - Set directInferiors = directInferiorsMap.get(type); - if(directInferiors == null) - return inferiors; - - if(inferiors == null) - inferiors = new HashSet(); - - Iterator iter = directInferiors.iterator(); - while(iter.hasNext()) - { - String inferiorType = iter.next(); - if(inferiorType == startType) - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + startType + "'"); - if(list.contains(inferiorType)) - inferiors.add(inferiorType); - - Set inferiorSet; - try - { - inferiorSet = build(inferiorType, startType); - } - catch(UnsupportedOperationException uoe) - { - throw new UnsupportedOperationException("Can not sort ClientPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + inferiorType + "'", uoe); - } - - if(inferiorSet != Empty) - inferiors.addAll(inferiorSet); - } - return inferiors; - } - - private static Map> build(String baseId, Map> map, Map> directMap, Map> otherDirectMap, String[] names) - { - if(map == null) - map = new Hashtable>(); - - Set types = new HashSet(); - for(int n = 0; n < names.length; n++) - { - if(names[n] != null) - types.add(names[n]); - } - - if(directMap != null) - getOrCreateSet(directMap, baseId).addAll(types); - - if(otherDirectMap != null) - { - Iterator iter = types.iterator(); - while(iter.hasNext()) - getOrCreateSet(otherDirectMap, iter.next()).add(baseId); - } - - map.put(baseId, types); - return map; - } - - private static Set getOrCreateSet(Map> map, String key) - { - Set value = map.get(key); - if(value != null) - return value; - - value = new HashSet(); - map.put(key, value); - return value; - } - - private Map> explicitInferiors; - private Map> explicitSuperiors; - private Map> directInferiorsMap; - private Map> allInferiors; - private List withoutSuperiors; - - private final List list; - private final Map allBaseSuperiors; - private final Map allBaseInferiors; - private final String methodName; - - private static final Set Empty = new HashSet(); -} diff --git a/src/main/java/api/player/client/ClientPlayerBaseSorting.java b/src/main/java/api/player/client/ClientPlayerBaseSorting.java deleted file mode 100644 index bc187794..00000000 --- a/src/main/java/api/player/client/ClientPlayerBaseSorting.java +++ /dev/null @@ -1,4847 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -import java.util.*; - -public final class ClientPlayerBaseSorting -{ - private String[] beforeLocalConstructingSuperiors = null; - private String[] beforeLocalConstructingInferiors = null; - private String[] afterLocalConstructingSuperiors = null; - private String[] afterLocalConstructingInferiors = null; - - private Map dynamicBeforeSuperiors = null; - private Map dynamicBeforeInferiors = null; - private Map dynamicOverrideSuperiors = null; - private Map dynamicOverrideInferiors = null; - private Map dynamicAfterSuperiors = null; - private Map dynamicAfterInferiors = null; - - private String[] beforeAddExhaustionSuperiors = null; - private String[] beforeAddExhaustionInferiors = null; - private String[] overrideAddExhaustionSuperiors = null; - private String[] overrideAddExhaustionInferiors = null; - private String[] afterAddExhaustionSuperiors = null; - private String[] afterAddExhaustionInferiors = null; - - private String[] beforeAddMovementStatSuperiors = null; - private String[] beforeAddMovementStatInferiors = null; - private String[] overrideAddMovementStatSuperiors = null; - private String[] overrideAddMovementStatInferiors = null; - private String[] afterAddMovementStatSuperiors = null; - private String[] afterAddMovementStatInferiors = null; - - private String[] beforeAddStatSuperiors = null; - private String[] beforeAddStatInferiors = null; - private String[] overrideAddStatSuperiors = null; - private String[] overrideAddStatInferiors = null; - private String[] afterAddStatSuperiors = null; - private String[] afterAddStatInferiors = null; - - private String[] beforeAttackEntityFromSuperiors = null; - private String[] beforeAttackEntityFromInferiors = null; - private String[] overrideAttackEntityFromSuperiors = null; - private String[] overrideAttackEntityFromInferiors = null; - private String[] afterAttackEntityFromSuperiors = null; - private String[] afterAttackEntityFromInferiors = null; - - private String[] beforeAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] beforeAttackTargetEntityWithCurrentItemInferiors = null; - private String[] overrideAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] overrideAttackTargetEntityWithCurrentItemInferiors = null; - private String[] afterAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] afterAttackTargetEntityWithCurrentItemInferiors = null; - - private String[] beforeCanBreatheUnderwaterSuperiors = null; - private String[] beforeCanBreatheUnderwaterInferiors = null; - private String[] overrideCanBreatheUnderwaterSuperiors = null; - private String[] overrideCanBreatheUnderwaterInferiors = null; - private String[] afterCanBreatheUnderwaterSuperiors = null; - private String[] afterCanBreatheUnderwaterInferiors = null; - - private String[] beforeCanHarvestBlockSuperiors = null; - private String[] beforeCanHarvestBlockInferiors = null; - private String[] overrideCanHarvestBlockSuperiors = null; - private String[] overrideCanHarvestBlockInferiors = null; - private String[] afterCanHarvestBlockSuperiors = null; - private String[] afterCanHarvestBlockInferiors = null; - - private String[] beforeCanPlayerEditSuperiors = null; - private String[] beforeCanPlayerEditInferiors = null; - private String[] overrideCanPlayerEditSuperiors = null; - private String[] overrideCanPlayerEditInferiors = null; - private String[] afterCanPlayerEditSuperiors = null; - private String[] afterCanPlayerEditInferiors = null; - - private String[] beforeCanTriggerWalkingSuperiors = null; - private String[] beforeCanTriggerWalkingInferiors = null; - private String[] overrideCanTriggerWalkingSuperiors = null; - private String[] overrideCanTriggerWalkingInferiors = null; - private String[] afterCanTriggerWalkingSuperiors = null; - private String[] afterCanTriggerWalkingInferiors = null; - - private String[] beforeCloseScreenSuperiors = null; - private String[] beforeCloseScreenInferiors = null; - private String[] overrideCloseScreenSuperiors = null; - private String[] overrideCloseScreenInferiors = null; - private String[] afterCloseScreenSuperiors = null; - private String[] afterCloseScreenInferiors = null; - - private String[] beforeDamageEntitySuperiors = null; - private String[] beforeDamageEntityInferiors = null; - private String[] overrideDamageEntitySuperiors = null; - private String[] overrideDamageEntityInferiors = null; - private String[] afterDamageEntitySuperiors = null; - private String[] afterDamageEntityInferiors = null; - - private String[] beforeDisplayGUIBrewingStandSuperiors = null; - private String[] beforeDisplayGUIBrewingStandInferiors = null; - private String[] overrideDisplayGUIBrewingStandSuperiors = null; - private String[] overrideDisplayGUIBrewingStandInferiors = null; - private String[] afterDisplayGUIBrewingStandSuperiors = null; - private String[] afterDisplayGUIBrewingStandInferiors = null; - - private String[] beforeDisplayGUIChestSuperiors = null; - private String[] beforeDisplayGUIChestInferiors = null; - private String[] overrideDisplayGUIChestSuperiors = null; - private String[] overrideDisplayGUIChestInferiors = null; - private String[] afterDisplayGUIChestSuperiors = null; - private String[] afterDisplayGUIChestInferiors = null; - - private String[] beforeDisplayGUIDispenserSuperiors = null; - private String[] beforeDisplayGUIDispenserInferiors = null; - private String[] overrideDisplayGUIDispenserSuperiors = null; - private String[] overrideDisplayGUIDispenserInferiors = null; - private String[] afterDisplayGUIDispenserSuperiors = null; - private String[] afterDisplayGUIDispenserInferiors = null; - - private String[] beforeDisplayGUIEditSignSuperiors = null; - private String[] beforeDisplayGUIEditSignInferiors = null; - private String[] overrideDisplayGUIEditSignSuperiors = null; - private String[] overrideDisplayGUIEditSignInferiors = null; - private String[] afterDisplayGUIEditSignSuperiors = null; - private String[] afterDisplayGUIEditSignInferiors = null; - - private String[] beforeDisplayGUIEnchantmentSuperiors = null; - private String[] beforeDisplayGUIEnchantmentInferiors = null; - private String[] overrideDisplayGUIEnchantmentSuperiors = null; - private String[] overrideDisplayGUIEnchantmentInferiors = null; - private String[] afterDisplayGUIEnchantmentSuperiors = null; - private String[] afterDisplayGUIEnchantmentInferiors = null; - - private String[] beforeDisplayGUIFurnaceSuperiors = null; - private String[] beforeDisplayGUIFurnaceInferiors = null; - private String[] overrideDisplayGUIFurnaceSuperiors = null; - private String[] overrideDisplayGUIFurnaceInferiors = null; - private String[] afterDisplayGUIFurnaceSuperiors = null; - private String[] afterDisplayGUIFurnaceInferiors = null; - - private String[] beforeDisplayGUIWorkbenchSuperiors = null; - private String[] beforeDisplayGUIWorkbenchInferiors = null; - private String[] overrideDisplayGUIWorkbenchSuperiors = null; - private String[] overrideDisplayGUIWorkbenchInferiors = null; - private String[] afterDisplayGUIWorkbenchSuperiors = null; - private String[] afterDisplayGUIWorkbenchInferiors = null; - - private String[] beforeDropOneItemSuperiors = null; - private String[] beforeDropOneItemInferiors = null; - private String[] overrideDropOneItemSuperiors = null; - private String[] overrideDropOneItemInferiors = null; - private String[] afterDropOneItemSuperiors = null; - private String[] afterDropOneItemInferiors = null; - - private String[] beforeDropPlayerItemSuperiors = null; - private String[] beforeDropPlayerItemInferiors = null; - private String[] overrideDropPlayerItemSuperiors = null; - private String[] overrideDropPlayerItemInferiors = null; - private String[] afterDropPlayerItemSuperiors = null; - private String[] afterDropPlayerItemInferiors = null; - - private String[] beforeDropPlayerItemWithRandomChoiceSuperiors = null; - private String[] beforeDropPlayerItemWithRandomChoiceInferiors = null; - private String[] overrideDropPlayerItemWithRandomChoiceSuperiors = null; - private String[] overrideDropPlayerItemWithRandomChoiceInferiors = null; - private String[] afterDropPlayerItemWithRandomChoiceSuperiors = null; - private String[] afterDropPlayerItemWithRandomChoiceInferiors = null; - - private String[] beforeFallSuperiors = null; - private String[] beforeFallInferiors = null; - private String[] overrideFallSuperiors = null; - private String[] overrideFallInferiors = null; - private String[] afterFallSuperiors = null; - private String[] afterFallInferiors = null; - - private String[] beforeGetAIMoveSpeedSuperiors = null; - private String[] beforeGetAIMoveSpeedInferiors = null; - private String[] overrideGetAIMoveSpeedSuperiors = null; - private String[] overrideGetAIMoveSpeedInferiors = null; - private String[] afterGetAIMoveSpeedSuperiors = null; - private String[] afterGetAIMoveSpeedInferiors = null; - - private String[] beforeGetBedOrientationInDegreesSuperiors = null; - private String[] beforeGetBedOrientationInDegreesInferiors = null; - private String[] overrideGetBedOrientationInDegreesSuperiors = null; - private String[] overrideGetBedOrientationInDegreesInferiors = null; - private String[] afterGetBedOrientationInDegreesSuperiors = null; - private String[] afterGetBedOrientationInDegreesInferiors = null; - - private String[] beforeGetBrightnessSuperiors = null; - private String[] beforeGetBrightnessInferiors = null; - private String[] overrideGetBrightnessSuperiors = null; - private String[] overrideGetBrightnessInferiors = null; - private String[] afterGetBrightnessSuperiors = null; - private String[] afterGetBrightnessInferiors = null; - - private String[] beforeGetBrightnessForRenderSuperiors = null; - private String[] beforeGetBrightnessForRenderInferiors = null; - private String[] overrideGetBrightnessForRenderSuperiors = null; - private String[] overrideGetBrightnessForRenderInferiors = null; - private String[] afterGetBrightnessForRenderSuperiors = null; - private String[] afterGetBrightnessForRenderInferiors = null; - - private String[] beforeGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] beforeGetCurrentPlayerStrVsBlockInferiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockInferiors = null; - private String[] afterGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] afterGetCurrentPlayerStrVsBlockInferiors = null; - - private String[] beforeGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] beforeGetCurrentPlayerStrVsBlockForgeInferiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockForgeInferiors = null; - private String[] afterGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] afterGetCurrentPlayerStrVsBlockForgeInferiors = null; - - private String[] beforeGetDistanceSqSuperiors = null; - private String[] beforeGetDistanceSqInferiors = null; - private String[] overrideGetDistanceSqSuperiors = null; - private String[] overrideGetDistanceSqInferiors = null; - private String[] afterGetDistanceSqSuperiors = null; - private String[] afterGetDistanceSqInferiors = null; - - private String[] beforeGetDistanceSqToEntitySuperiors = null; - private String[] beforeGetDistanceSqToEntityInferiors = null; - private String[] overrideGetDistanceSqToEntitySuperiors = null; - private String[] overrideGetDistanceSqToEntityInferiors = null; - private String[] afterGetDistanceSqToEntitySuperiors = null; - private String[] afterGetDistanceSqToEntityInferiors = null; - - private String[] beforeGetFOVMultiplierSuperiors = null; - private String[] beforeGetFOVMultiplierInferiors = null; - private String[] overrideGetFOVMultiplierSuperiors = null; - private String[] overrideGetFOVMultiplierInferiors = null; - private String[] afterGetFOVMultiplierSuperiors = null; - private String[] afterGetFOVMultiplierInferiors = null; - - private String[] beforeGetHurtSoundSuperiors = null; - private String[] beforeGetHurtSoundInferiors = null; - private String[] overrideGetHurtSoundSuperiors = null; - private String[] overrideGetHurtSoundInferiors = null; - private String[] afterGetHurtSoundSuperiors = null; - private String[] afterGetHurtSoundInferiors = null; - - private String[] beforeGetItemIconSuperiors = null; - private String[] beforeGetItemIconInferiors = null; - private String[] overrideGetItemIconSuperiors = null; - private String[] overrideGetItemIconInferiors = null; - private String[] afterGetItemIconSuperiors = null; - private String[] afterGetItemIconInferiors = null; - - private String[] beforeGetSleepTimerSuperiors = null; - private String[] beforeGetSleepTimerInferiors = null; - private String[] overrideGetSleepTimerSuperiors = null; - private String[] overrideGetSleepTimerInferiors = null; - private String[] afterGetSleepTimerSuperiors = null; - private String[] afterGetSleepTimerInferiors = null; - - private String[] beforeHandleLavaMovementSuperiors = null; - private String[] beforeHandleLavaMovementInferiors = null; - private String[] overrideHandleLavaMovementSuperiors = null; - private String[] overrideHandleLavaMovementInferiors = null; - private String[] afterHandleLavaMovementSuperiors = null; - private String[] afterHandleLavaMovementInferiors = null; - - private String[] beforeHandleWaterMovementSuperiors = null; - private String[] beforeHandleWaterMovementInferiors = null; - private String[] overrideHandleWaterMovementSuperiors = null; - private String[] overrideHandleWaterMovementInferiors = null; - private String[] afterHandleWaterMovementSuperiors = null; - private String[] afterHandleWaterMovementInferiors = null; - - private String[] beforeHealSuperiors = null; - private String[] beforeHealInferiors = null; - private String[] overrideHealSuperiors = null; - private String[] overrideHealInferiors = null; - private String[] afterHealSuperiors = null; - private String[] afterHealInferiors = null; - - private String[] beforeIsEntityInsideOpaqueBlockSuperiors = null; - private String[] beforeIsEntityInsideOpaqueBlockInferiors = null; - private String[] overrideIsEntityInsideOpaqueBlockSuperiors = null; - private String[] overrideIsEntityInsideOpaqueBlockInferiors = null; - private String[] afterIsEntityInsideOpaqueBlockSuperiors = null; - private String[] afterIsEntityInsideOpaqueBlockInferiors = null; - - private String[] beforeIsInWaterSuperiors = null; - private String[] beforeIsInWaterInferiors = null; - private String[] overrideIsInWaterSuperiors = null; - private String[] overrideIsInWaterInferiors = null; - private String[] afterIsInWaterSuperiors = null; - private String[] afterIsInWaterInferiors = null; - - private String[] beforeIsInsideOfMaterialSuperiors = null; - private String[] beforeIsInsideOfMaterialInferiors = null; - private String[] overrideIsInsideOfMaterialSuperiors = null; - private String[] overrideIsInsideOfMaterialInferiors = null; - private String[] afterIsInsideOfMaterialSuperiors = null; - private String[] afterIsInsideOfMaterialInferiors = null; - - private String[] beforeIsOnLadderSuperiors = null; - private String[] beforeIsOnLadderInferiors = null; - private String[] overrideIsOnLadderSuperiors = null; - private String[] overrideIsOnLadderInferiors = null; - private String[] afterIsOnLadderSuperiors = null; - private String[] afterIsOnLadderInferiors = null; - - private String[] beforeIsPlayerSleepingSuperiors = null; - private String[] beforeIsPlayerSleepingInferiors = null; - private String[] overrideIsPlayerSleepingSuperiors = null; - private String[] overrideIsPlayerSleepingInferiors = null; - private String[] afterIsPlayerSleepingSuperiors = null; - private String[] afterIsPlayerSleepingInferiors = null; - - private String[] beforeIsSneakingSuperiors = null; - private String[] beforeIsSneakingInferiors = null; - private String[] overrideIsSneakingSuperiors = null; - private String[] overrideIsSneakingInferiors = null; - private String[] afterIsSneakingSuperiors = null; - private String[] afterIsSneakingInferiors = null; - - private String[] beforeIsSprintingSuperiors = null; - private String[] beforeIsSprintingInferiors = null; - private String[] overrideIsSprintingSuperiors = null; - private String[] overrideIsSprintingInferiors = null; - private String[] afterIsSprintingSuperiors = null; - private String[] afterIsSprintingInferiors = null; - - private String[] beforeJumpSuperiors = null; - private String[] beforeJumpInferiors = null; - private String[] overrideJumpSuperiors = null; - private String[] overrideJumpInferiors = null; - private String[] afterJumpSuperiors = null; - private String[] afterJumpInferiors = null; - - private String[] beforeKnockBackSuperiors = null; - private String[] beforeKnockBackInferiors = null; - private String[] overrideKnockBackSuperiors = null; - private String[] overrideKnockBackInferiors = null; - private String[] afterKnockBackSuperiors = null; - private String[] afterKnockBackInferiors = null; - - private String[] beforeMoveEntitySuperiors = null; - private String[] beforeMoveEntityInferiors = null; - private String[] overrideMoveEntitySuperiors = null; - private String[] overrideMoveEntityInferiors = null; - private String[] afterMoveEntitySuperiors = null; - private String[] afterMoveEntityInferiors = null; - - private String[] beforeMoveEntityWithHeadingSuperiors = null; - private String[] beforeMoveEntityWithHeadingInferiors = null; - private String[] overrideMoveEntityWithHeadingSuperiors = null; - private String[] overrideMoveEntityWithHeadingInferiors = null; - private String[] afterMoveEntityWithHeadingSuperiors = null; - private String[] afterMoveEntityWithHeadingInferiors = null; - - private String[] beforeMoveFlyingSuperiors = null; - private String[] beforeMoveFlyingInferiors = null; - private String[] overrideMoveFlyingSuperiors = null; - private String[] overrideMoveFlyingInferiors = null; - private String[] afterMoveFlyingSuperiors = null; - private String[] afterMoveFlyingInferiors = null; - - private String[] beforeOnDeathSuperiors = null; - private String[] beforeOnDeathInferiors = null; - private String[] overrideOnDeathSuperiors = null; - private String[] overrideOnDeathInferiors = null; - private String[] afterOnDeathSuperiors = null; - private String[] afterOnDeathInferiors = null; - - private String[] beforeOnLivingUpdateSuperiors = null; - private String[] beforeOnLivingUpdateInferiors = null; - private String[] overrideOnLivingUpdateSuperiors = null; - private String[] overrideOnLivingUpdateInferiors = null; - private String[] afterOnLivingUpdateSuperiors = null; - private String[] afterOnLivingUpdateInferiors = null; - - private String[] beforeOnKillEntitySuperiors = null; - private String[] beforeOnKillEntityInferiors = null; - private String[] overrideOnKillEntitySuperiors = null; - private String[] overrideOnKillEntityInferiors = null; - private String[] afterOnKillEntitySuperiors = null; - private String[] afterOnKillEntityInferiors = null; - - private String[] beforeOnStruckByLightningSuperiors = null; - private String[] beforeOnStruckByLightningInferiors = null; - private String[] overrideOnStruckByLightningSuperiors = null; - private String[] overrideOnStruckByLightningInferiors = null; - private String[] afterOnStruckByLightningSuperiors = null; - private String[] afterOnStruckByLightningInferiors = null; - - private String[] beforeOnUpdateSuperiors = null; - private String[] beforeOnUpdateInferiors = null; - private String[] overrideOnUpdateSuperiors = null; - private String[] overrideOnUpdateInferiors = null; - private String[] afterOnUpdateSuperiors = null; - private String[] afterOnUpdateInferiors = null; - - private String[] beforePlayStepSoundSuperiors = null; - private String[] beforePlayStepSoundInferiors = null; - private String[] overridePlayStepSoundSuperiors = null; - private String[] overridePlayStepSoundInferiors = null; - private String[] afterPlayStepSoundSuperiors = null; - private String[] afterPlayStepSoundInferiors = null; - - private String[] beforePushOutOfBlocksSuperiors = null; - private String[] beforePushOutOfBlocksInferiors = null; - private String[] overridePushOutOfBlocksSuperiors = null; - private String[] overridePushOutOfBlocksInferiors = null; - private String[] afterPushOutOfBlocksSuperiors = null; - private String[] afterPushOutOfBlocksInferiors = null; - - private String[] beforeRayTraceSuperiors = null; - private String[] beforeRayTraceInferiors = null; - private String[] overrideRayTraceSuperiors = null; - private String[] overrideRayTraceInferiors = null; - private String[] afterRayTraceSuperiors = null; - private String[] afterRayTraceInferiors = null; - - private String[] beforeReadEntityFromNBTSuperiors = null; - private String[] beforeReadEntityFromNBTInferiors = null; - private String[] overrideReadEntityFromNBTSuperiors = null; - private String[] overrideReadEntityFromNBTInferiors = null; - private String[] afterReadEntityFromNBTSuperiors = null; - private String[] afterReadEntityFromNBTInferiors = null; - - private String[] beforeRespawnPlayerSuperiors = null; - private String[] beforeRespawnPlayerInferiors = null; - private String[] overrideRespawnPlayerSuperiors = null; - private String[] overrideRespawnPlayerInferiors = null; - private String[] afterRespawnPlayerSuperiors = null; - private String[] afterRespawnPlayerInferiors = null; - - private String[] beforeSetDeadSuperiors = null; - private String[] beforeSetDeadInferiors = null; - private String[] overrideSetDeadSuperiors = null; - private String[] overrideSetDeadInferiors = null; - private String[] afterSetDeadSuperiors = null; - private String[] afterSetDeadInferiors = null; - - private String[] beforeSetPlayerSPHealthSuperiors = null; - private String[] beforeSetPlayerSPHealthInferiors = null; - private String[] overrideSetPlayerSPHealthSuperiors = null; - private String[] overrideSetPlayerSPHealthInferiors = null; - private String[] afterSetPlayerSPHealthSuperiors = null; - private String[] afterSetPlayerSPHealthInferiors = null; - - private String[] beforeSetPositionAndRotationSuperiors = null; - private String[] beforeSetPositionAndRotationInferiors = null; - private String[] overrideSetPositionAndRotationSuperiors = null; - private String[] overrideSetPositionAndRotationInferiors = null; - private String[] afterSetPositionAndRotationSuperiors = null; - private String[] afterSetPositionAndRotationInferiors = null; - - private String[] beforeSetSneakingSuperiors = null; - private String[] beforeSetSneakingInferiors = null; - private String[] overrideSetSneakingSuperiors = null; - private String[] overrideSetSneakingInferiors = null; - private String[] afterSetSneakingSuperiors = null; - private String[] afterSetSneakingInferiors = null; - - private String[] beforeSetSprintingSuperiors = null; - private String[] beforeSetSprintingInferiors = null; - private String[] overrideSetSprintingSuperiors = null; - private String[] overrideSetSprintingInferiors = null; - private String[] afterSetSprintingSuperiors = null; - private String[] afterSetSprintingInferiors = null; - - private String[] beforeSleepInBedAtSuperiors = null; - private String[] beforeSleepInBedAtInferiors = null; - private String[] overrideSleepInBedAtSuperiors = null; - private String[] overrideSleepInBedAtInferiors = null; - private String[] afterSleepInBedAtSuperiors = null; - private String[] afterSleepInBedAtInferiors = null; - - private String[] beforeSwingItemSuperiors = null; - private String[] beforeSwingItemInferiors = null; - private String[] overrideSwingItemSuperiors = null; - private String[] overrideSwingItemInferiors = null; - private String[] afterSwingItemSuperiors = null; - private String[] afterSwingItemInferiors = null; - - private String[] beforeUpdateEntityActionStateSuperiors = null; - private String[] beforeUpdateEntityActionStateInferiors = null; - private String[] overrideUpdateEntityActionStateSuperiors = null; - private String[] overrideUpdateEntityActionStateInferiors = null; - private String[] afterUpdateEntityActionStateSuperiors = null; - private String[] afterUpdateEntityActionStateInferiors = null; - - private String[] beforeUpdateRiddenSuperiors = null; - private String[] beforeUpdateRiddenInferiors = null; - private String[] overrideUpdateRiddenSuperiors = null; - private String[] overrideUpdateRiddenInferiors = null; - private String[] afterUpdateRiddenSuperiors = null; - private String[] afterUpdateRiddenInferiors = null; - - private String[] beforeWakeUpPlayerSuperiors = null; - private String[] beforeWakeUpPlayerInferiors = null; - private String[] overrideWakeUpPlayerSuperiors = null; - private String[] overrideWakeUpPlayerInferiors = null; - private String[] afterWakeUpPlayerSuperiors = null; - private String[] afterWakeUpPlayerInferiors = null; - - private String[] beforeWriteEntityToNBTSuperiors = null; - private String[] beforeWriteEntityToNBTInferiors = null; - private String[] overrideWriteEntityToNBTSuperiors = null; - private String[] overrideWriteEntityToNBTInferiors = null; - private String[] afterWriteEntityToNBTSuperiors = null; - private String[] afterWriteEntityToNBTInferiors = null; - - - public String[] getBeforeLocalConstructingSuperiors() - { - return beforeLocalConstructingSuperiors; - } - - public String[] getBeforeLocalConstructingInferiors() - { - return beforeLocalConstructingInferiors; - } - - public String[] getAfterLocalConstructingSuperiors() - { - return afterLocalConstructingSuperiors; - } - - public String[] getAfterLocalConstructingInferiors() - { - return afterLocalConstructingInferiors; - } - - public void setBeforeLocalConstructingSuperiors(String[] value) - { - beforeLocalConstructingSuperiors = value; - } - - public void setBeforeLocalConstructingInferiors(String[] value) - { - beforeLocalConstructingInferiors = value; - } - - public void setAfterLocalConstructingSuperiors(String[] value) - { - afterLocalConstructingSuperiors = value; - } - - public void setAfterLocalConstructingInferiors(String[] value) - { - afterLocalConstructingInferiors = value; - } - - public Map getDynamicBeforeSuperiors() - { - return dynamicBeforeSuperiors; - } - - public Map getDynamicBeforeInferiors() - { - return dynamicBeforeInferiors; - } - - public Map getDynamicOverrideSuperiors() - { - return dynamicOverrideSuperiors; - } - - public Map getDynamicOverrideInferiors() - { - return dynamicOverrideInferiors; - } - - public Map getDynamicAfterSuperiors() - { - return dynamicAfterSuperiors; - } - - public Map getDynamicAfterInferiors() - { - return dynamicAfterInferiors; - } - - public void setDynamicBeforeSuperiors(String name, String[] superiors) - { - dynamicBeforeSuperiors = setDynamic(name, superiors, dynamicBeforeSuperiors); - } - - public void setDynamicBeforeInferiors(String name, String[] inferiors) - { - dynamicBeforeInferiors = setDynamic(name, inferiors, dynamicBeforeInferiors); - } - - public void setDynamicOverrideSuperiors(String name, String[] superiors) - { - dynamicOverrideSuperiors = setDynamic(name, superiors, dynamicOverrideSuperiors); - } - - public void setDynamicOverrideInferiors(String name, String[] inferiors) - { - dynamicOverrideInferiors = setDynamic(name, inferiors, dynamicOverrideInferiors); - } - - public void setDynamicAfterSuperiors(String name, String[] superiors) - { - dynamicAfterSuperiors = setDynamic(name, superiors, dynamicAfterSuperiors); - } - - public void setDynamicAfterInferiors(String name, String[] inferiors) - { - dynamicAfterInferiors = setDynamic(name, inferiors, dynamicAfterInferiors); - } - - private Map setDynamic(String name, String[] names, Map map) - { - if(name == null) - throw new IllegalArgumentException("Parameter 'name' may not be null"); - - if(names == null) - { - if(map != null) - map.remove(name); - return map; - } - - if(map == null) - map = new HashMap(); - map.put(name, names); - - return map; - } - - public String[] getBeforeAddExhaustionSuperiors() - { - return beforeAddExhaustionSuperiors; - } - - public String[] getBeforeAddExhaustionInferiors() - { - return beforeAddExhaustionInferiors; - } - - public String[] getOverrideAddExhaustionSuperiors() - { - return overrideAddExhaustionSuperiors; - } - - public String[] getOverrideAddExhaustionInferiors() - { - return overrideAddExhaustionInferiors; - } - - public String[] getAfterAddExhaustionSuperiors() - { - return afterAddExhaustionSuperiors; - } - - public String[] getAfterAddExhaustionInferiors() - { - return afterAddExhaustionInferiors; - } - - public void setBeforeAddExhaustionSuperiors(String[] value) - { - beforeAddExhaustionSuperiors = value; - } - - public void setBeforeAddExhaustionInferiors(String[] value) - { - beforeAddExhaustionInferiors = value; - } - - public void setOverrideAddExhaustionSuperiors(String[] value) - { - overrideAddExhaustionSuperiors = value; - } - - public void setOverrideAddExhaustionInferiors(String[] value) - { - overrideAddExhaustionInferiors = value; - } - - public void setAfterAddExhaustionSuperiors(String[] value) - { - afterAddExhaustionSuperiors = value; - } - - public void setAfterAddExhaustionInferiors(String[] value) - { - afterAddExhaustionInferiors = value; - } - - public String[] getBeforeAddMovementStatSuperiors() - { - return beforeAddMovementStatSuperiors; - } - - public String[] getBeforeAddMovementStatInferiors() - { - return beforeAddMovementStatInferiors; - } - - public String[] getOverrideAddMovementStatSuperiors() - { - return overrideAddMovementStatSuperiors; - } - - public String[] getOverrideAddMovementStatInferiors() - { - return overrideAddMovementStatInferiors; - } - - public String[] getAfterAddMovementStatSuperiors() - { - return afterAddMovementStatSuperiors; - } - - public String[] getAfterAddMovementStatInferiors() - { - return afterAddMovementStatInferiors; - } - - public void setBeforeAddMovementStatSuperiors(String[] value) - { - beforeAddMovementStatSuperiors = value; - } - - public void setBeforeAddMovementStatInferiors(String[] value) - { - beforeAddMovementStatInferiors = value; - } - - public void setOverrideAddMovementStatSuperiors(String[] value) - { - overrideAddMovementStatSuperiors = value; - } - - public void setOverrideAddMovementStatInferiors(String[] value) - { - overrideAddMovementStatInferiors = value; - } - - public void setAfterAddMovementStatSuperiors(String[] value) - { - afterAddMovementStatSuperiors = value; - } - - public void setAfterAddMovementStatInferiors(String[] value) - { - afterAddMovementStatInferiors = value; - } - - public String[] getBeforeAddStatSuperiors() - { - return beforeAddStatSuperiors; - } - - public String[] getBeforeAddStatInferiors() - { - return beforeAddStatInferiors; - } - - public String[] getOverrideAddStatSuperiors() - { - return overrideAddStatSuperiors; - } - - public String[] getOverrideAddStatInferiors() - { - return overrideAddStatInferiors; - } - - public String[] getAfterAddStatSuperiors() - { - return afterAddStatSuperiors; - } - - public String[] getAfterAddStatInferiors() - { - return afterAddStatInferiors; - } - - public void setBeforeAddStatSuperiors(String[] value) - { - beforeAddStatSuperiors = value; - } - - public void setBeforeAddStatInferiors(String[] value) - { - beforeAddStatInferiors = value; - } - - public void setOverrideAddStatSuperiors(String[] value) - { - overrideAddStatSuperiors = value; - } - - public void setOverrideAddStatInferiors(String[] value) - { - overrideAddStatInferiors = value; - } - - public void setAfterAddStatSuperiors(String[] value) - { - afterAddStatSuperiors = value; - } - - public void setAfterAddStatInferiors(String[] value) - { - afterAddStatInferiors = value; - } - - public String[] getBeforeAttackEntityFromSuperiors() - { - return beforeAttackEntityFromSuperiors; - } - - public String[] getBeforeAttackEntityFromInferiors() - { - return beforeAttackEntityFromInferiors; - } - - public String[] getOverrideAttackEntityFromSuperiors() - { - return overrideAttackEntityFromSuperiors; - } - - public String[] getOverrideAttackEntityFromInferiors() - { - return overrideAttackEntityFromInferiors; - } - - public String[] getAfterAttackEntityFromSuperiors() - { - return afterAttackEntityFromSuperiors; - } - - public String[] getAfterAttackEntityFromInferiors() - { - return afterAttackEntityFromInferiors; - } - - public void setBeforeAttackEntityFromSuperiors(String[] value) - { - beforeAttackEntityFromSuperiors = value; - } - - public void setBeforeAttackEntityFromInferiors(String[] value) - { - beforeAttackEntityFromInferiors = value; - } - - public void setOverrideAttackEntityFromSuperiors(String[] value) - { - overrideAttackEntityFromSuperiors = value; - } - - public void setOverrideAttackEntityFromInferiors(String[] value) - { - overrideAttackEntityFromInferiors = value; - } - - public void setAfterAttackEntityFromSuperiors(String[] value) - { - afterAttackEntityFromSuperiors = value; - } - - public void setAfterAttackEntityFromInferiors(String[] value) - { - afterAttackEntityFromInferiors = value; - } - - public String[] getBeforeAttackTargetEntityWithCurrentItemSuperiors() - { - return beforeAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getBeforeAttackTargetEntityWithCurrentItemInferiors() - { - return beforeAttackTargetEntityWithCurrentItemInferiors; - } - - public String[] getOverrideAttackTargetEntityWithCurrentItemSuperiors() - { - return overrideAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getOverrideAttackTargetEntityWithCurrentItemInferiors() - { - return overrideAttackTargetEntityWithCurrentItemInferiors; - } - - public String[] getAfterAttackTargetEntityWithCurrentItemSuperiors() - { - return afterAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getAfterAttackTargetEntityWithCurrentItemInferiors() - { - return afterAttackTargetEntityWithCurrentItemInferiors; - } - - public void setBeforeAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - beforeAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setBeforeAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - beforeAttackTargetEntityWithCurrentItemInferiors = value; - } - - public void setOverrideAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - overrideAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setOverrideAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - overrideAttackTargetEntityWithCurrentItemInferiors = value; - } - - public void setAfterAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - afterAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setAfterAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - afterAttackTargetEntityWithCurrentItemInferiors = value; - } - - public String[] getBeforeCanBreatheUnderwaterSuperiors() - { - return beforeCanBreatheUnderwaterSuperiors; - } - - public String[] getBeforeCanBreatheUnderwaterInferiors() - { - return beforeCanBreatheUnderwaterInferiors; - } - - public String[] getOverrideCanBreatheUnderwaterSuperiors() - { - return overrideCanBreatheUnderwaterSuperiors; - } - - public String[] getOverrideCanBreatheUnderwaterInferiors() - { - return overrideCanBreatheUnderwaterInferiors; - } - - public String[] getAfterCanBreatheUnderwaterSuperiors() - { - return afterCanBreatheUnderwaterSuperiors; - } - - public String[] getAfterCanBreatheUnderwaterInferiors() - { - return afterCanBreatheUnderwaterInferiors; - } - - public void setBeforeCanBreatheUnderwaterSuperiors(String[] value) - { - beforeCanBreatheUnderwaterSuperiors = value; - } - - public void setBeforeCanBreatheUnderwaterInferiors(String[] value) - { - beforeCanBreatheUnderwaterInferiors = value; - } - - public void setOverrideCanBreatheUnderwaterSuperiors(String[] value) - { - overrideCanBreatheUnderwaterSuperiors = value; - } - - public void setOverrideCanBreatheUnderwaterInferiors(String[] value) - { - overrideCanBreatheUnderwaterInferiors = value; - } - - public void setAfterCanBreatheUnderwaterSuperiors(String[] value) - { - afterCanBreatheUnderwaterSuperiors = value; - } - - public void setAfterCanBreatheUnderwaterInferiors(String[] value) - { - afterCanBreatheUnderwaterInferiors = value; - } - - public String[] getBeforeCanHarvestBlockSuperiors() - { - return beforeCanHarvestBlockSuperiors; - } - - public String[] getBeforeCanHarvestBlockInferiors() - { - return beforeCanHarvestBlockInferiors; - } - - public String[] getOverrideCanHarvestBlockSuperiors() - { - return overrideCanHarvestBlockSuperiors; - } - - public String[] getOverrideCanHarvestBlockInferiors() - { - return overrideCanHarvestBlockInferiors; - } - - public String[] getAfterCanHarvestBlockSuperiors() - { - return afterCanHarvestBlockSuperiors; - } - - public String[] getAfterCanHarvestBlockInferiors() - { - return afterCanHarvestBlockInferiors; - } - - public void setBeforeCanHarvestBlockSuperiors(String[] value) - { - beforeCanHarvestBlockSuperiors = value; - } - - public void setBeforeCanHarvestBlockInferiors(String[] value) - { - beforeCanHarvestBlockInferiors = value; - } - - public void setOverrideCanHarvestBlockSuperiors(String[] value) - { - overrideCanHarvestBlockSuperiors = value; - } - - public void setOverrideCanHarvestBlockInferiors(String[] value) - { - overrideCanHarvestBlockInferiors = value; - } - - public void setAfterCanHarvestBlockSuperiors(String[] value) - { - afterCanHarvestBlockSuperiors = value; - } - - public void setAfterCanHarvestBlockInferiors(String[] value) - { - afterCanHarvestBlockInferiors = value; - } - - public String[] getBeforeCanPlayerEditSuperiors() - { - return beforeCanPlayerEditSuperiors; - } - - public String[] getBeforeCanPlayerEditInferiors() - { - return beforeCanPlayerEditInferiors; - } - - public String[] getOverrideCanPlayerEditSuperiors() - { - return overrideCanPlayerEditSuperiors; - } - - public String[] getOverrideCanPlayerEditInferiors() - { - return overrideCanPlayerEditInferiors; - } - - public String[] getAfterCanPlayerEditSuperiors() - { - return afterCanPlayerEditSuperiors; - } - - public String[] getAfterCanPlayerEditInferiors() - { - return afterCanPlayerEditInferiors; - } - - public void setBeforeCanPlayerEditSuperiors(String[] value) - { - beforeCanPlayerEditSuperiors = value; - } - - public void setBeforeCanPlayerEditInferiors(String[] value) - { - beforeCanPlayerEditInferiors = value; - } - - public void setOverrideCanPlayerEditSuperiors(String[] value) - { - overrideCanPlayerEditSuperiors = value; - } - - public void setOverrideCanPlayerEditInferiors(String[] value) - { - overrideCanPlayerEditInferiors = value; - } - - public void setAfterCanPlayerEditSuperiors(String[] value) - { - afterCanPlayerEditSuperiors = value; - } - - public void setAfterCanPlayerEditInferiors(String[] value) - { - afterCanPlayerEditInferiors = value; - } - - public String[] getBeforeCanTriggerWalkingSuperiors() - { - return beforeCanTriggerWalkingSuperiors; - } - - public String[] getBeforeCanTriggerWalkingInferiors() - { - return beforeCanTriggerWalkingInferiors; - } - - public String[] getOverrideCanTriggerWalkingSuperiors() - { - return overrideCanTriggerWalkingSuperiors; - } - - public String[] getOverrideCanTriggerWalkingInferiors() - { - return overrideCanTriggerWalkingInferiors; - } - - public String[] getAfterCanTriggerWalkingSuperiors() - { - return afterCanTriggerWalkingSuperiors; - } - - public String[] getAfterCanTriggerWalkingInferiors() - { - return afterCanTriggerWalkingInferiors; - } - - public void setBeforeCanTriggerWalkingSuperiors(String[] value) - { - beforeCanTriggerWalkingSuperiors = value; - } - - public void setBeforeCanTriggerWalkingInferiors(String[] value) - { - beforeCanTriggerWalkingInferiors = value; - } - - public void setOverrideCanTriggerWalkingSuperiors(String[] value) - { - overrideCanTriggerWalkingSuperiors = value; - } - - public void setOverrideCanTriggerWalkingInferiors(String[] value) - { - overrideCanTriggerWalkingInferiors = value; - } - - public void setAfterCanTriggerWalkingSuperiors(String[] value) - { - afterCanTriggerWalkingSuperiors = value; - } - - public void setAfterCanTriggerWalkingInferiors(String[] value) - { - afterCanTriggerWalkingInferiors = value; - } - - public String[] getBeforeCloseScreenSuperiors() - { - return beforeCloseScreenSuperiors; - } - - public String[] getBeforeCloseScreenInferiors() - { - return beforeCloseScreenInferiors; - } - - public String[] getOverrideCloseScreenSuperiors() - { - return overrideCloseScreenSuperiors; - } - - public String[] getOverrideCloseScreenInferiors() - { - return overrideCloseScreenInferiors; - } - - public String[] getAfterCloseScreenSuperiors() - { - return afterCloseScreenSuperiors; - } - - public String[] getAfterCloseScreenInferiors() - { - return afterCloseScreenInferiors; - } - - public void setBeforeCloseScreenSuperiors(String[] value) - { - beforeCloseScreenSuperiors = value; - } - - public void setBeforeCloseScreenInferiors(String[] value) - { - beforeCloseScreenInferiors = value; - } - - public void setOverrideCloseScreenSuperiors(String[] value) - { - overrideCloseScreenSuperiors = value; - } - - public void setOverrideCloseScreenInferiors(String[] value) - { - overrideCloseScreenInferiors = value; - } - - public void setAfterCloseScreenSuperiors(String[] value) - { - afterCloseScreenSuperiors = value; - } - - public void setAfterCloseScreenInferiors(String[] value) - { - afterCloseScreenInferiors = value; - } - - public String[] getBeforeDamageEntitySuperiors() - { - return beforeDamageEntitySuperiors; - } - - public String[] getBeforeDamageEntityInferiors() - { - return beforeDamageEntityInferiors; - } - - public String[] getOverrideDamageEntitySuperiors() - { - return overrideDamageEntitySuperiors; - } - - public String[] getOverrideDamageEntityInferiors() - { - return overrideDamageEntityInferiors; - } - - public String[] getAfterDamageEntitySuperiors() - { - return afterDamageEntitySuperiors; - } - - public String[] getAfterDamageEntityInferiors() - { - return afterDamageEntityInferiors; - } - - public void setBeforeDamageEntitySuperiors(String[] value) - { - beforeDamageEntitySuperiors = value; - } - - public void setBeforeDamageEntityInferiors(String[] value) - { - beforeDamageEntityInferiors = value; - } - - public void setOverrideDamageEntitySuperiors(String[] value) - { - overrideDamageEntitySuperiors = value; - } - - public void setOverrideDamageEntityInferiors(String[] value) - { - overrideDamageEntityInferiors = value; - } - - public void setAfterDamageEntitySuperiors(String[] value) - { - afterDamageEntitySuperiors = value; - } - - public void setAfterDamageEntityInferiors(String[] value) - { - afterDamageEntityInferiors = value; - } - - public String[] getBeforeDisplayGUIBrewingStandSuperiors() - { - return beforeDisplayGUIBrewingStandSuperiors; - } - - public String[] getBeforeDisplayGUIBrewingStandInferiors() - { - return beforeDisplayGUIBrewingStandInferiors; - } - - public String[] getOverrideDisplayGUIBrewingStandSuperiors() - { - return overrideDisplayGUIBrewingStandSuperiors; - } - - public String[] getOverrideDisplayGUIBrewingStandInferiors() - { - return overrideDisplayGUIBrewingStandInferiors; - } - - public String[] getAfterDisplayGUIBrewingStandSuperiors() - { - return afterDisplayGUIBrewingStandSuperiors; - } - - public String[] getAfterDisplayGUIBrewingStandInferiors() - { - return afterDisplayGUIBrewingStandInferiors; - } - - public void setBeforeDisplayGUIBrewingStandSuperiors(String[] value) - { - beforeDisplayGUIBrewingStandSuperiors = value; - } - - public void setBeforeDisplayGUIBrewingStandInferiors(String[] value) - { - beforeDisplayGUIBrewingStandInferiors = value; - } - - public void setOverrideDisplayGUIBrewingStandSuperiors(String[] value) - { - overrideDisplayGUIBrewingStandSuperiors = value; - } - - public void setOverrideDisplayGUIBrewingStandInferiors(String[] value) - { - overrideDisplayGUIBrewingStandInferiors = value; - } - - public void setAfterDisplayGUIBrewingStandSuperiors(String[] value) - { - afterDisplayGUIBrewingStandSuperiors = value; - } - - public void setAfterDisplayGUIBrewingStandInferiors(String[] value) - { - afterDisplayGUIBrewingStandInferiors = value; - } - - public String[] getBeforeDisplayGUIChestSuperiors() - { - return beforeDisplayGUIChestSuperiors; - } - - public String[] getBeforeDisplayGUIChestInferiors() - { - return beforeDisplayGUIChestInferiors; - } - - public String[] getOverrideDisplayGUIChestSuperiors() - { - return overrideDisplayGUIChestSuperiors; - } - - public String[] getOverrideDisplayGUIChestInferiors() - { - return overrideDisplayGUIChestInferiors; - } - - public String[] getAfterDisplayGUIChestSuperiors() - { - return afterDisplayGUIChestSuperiors; - } - - public String[] getAfterDisplayGUIChestInferiors() - { - return afterDisplayGUIChestInferiors; - } - - public void setBeforeDisplayGUIChestSuperiors(String[] value) - { - beforeDisplayGUIChestSuperiors = value; - } - - public void setBeforeDisplayGUIChestInferiors(String[] value) - { - beforeDisplayGUIChestInferiors = value; - } - - public void setOverrideDisplayGUIChestSuperiors(String[] value) - { - overrideDisplayGUIChestSuperiors = value; - } - - public void setOverrideDisplayGUIChestInferiors(String[] value) - { - overrideDisplayGUIChestInferiors = value; - } - - public void setAfterDisplayGUIChestSuperiors(String[] value) - { - afterDisplayGUIChestSuperiors = value; - } - - public void setAfterDisplayGUIChestInferiors(String[] value) - { - afterDisplayGUIChestInferiors = value; - } - - public String[] getBeforeDisplayGUIDispenserSuperiors() - { - return beforeDisplayGUIDispenserSuperiors; - } - - public String[] getBeforeDisplayGUIDispenserInferiors() - { - return beforeDisplayGUIDispenserInferiors; - } - - public String[] getOverrideDisplayGUIDispenserSuperiors() - { - return overrideDisplayGUIDispenserSuperiors; - } - - public String[] getOverrideDisplayGUIDispenserInferiors() - { - return overrideDisplayGUIDispenserInferiors; - } - - public String[] getAfterDisplayGUIDispenserSuperiors() - { - return afterDisplayGUIDispenserSuperiors; - } - - public String[] getAfterDisplayGUIDispenserInferiors() - { - return afterDisplayGUIDispenserInferiors; - } - - public void setBeforeDisplayGUIDispenserSuperiors(String[] value) - { - beforeDisplayGUIDispenserSuperiors = value; - } - - public void setBeforeDisplayGUIDispenserInferiors(String[] value) - { - beforeDisplayGUIDispenserInferiors = value; - } - - public void setOverrideDisplayGUIDispenserSuperiors(String[] value) - { - overrideDisplayGUIDispenserSuperiors = value; - } - - public void setOverrideDisplayGUIDispenserInferiors(String[] value) - { - overrideDisplayGUIDispenserInferiors = value; - } - - public void setAfterDisplayGUIDispenserSuperiors(String[] value) - { - afterDisplayGUIDispenserSuperiors = value; - } - - public void setAfterDisplayGUIDispenserInferiors(String[] value) - { - afterDisplayGUIDispenserInferiors = value; - } - - public String[] getBeforeDisplayGUIEditSignSuperiors() - { - return beforeDisplayGUIEditSignSuperiors; - } - - public String[] getBeforeDisplayGUIEditSignInferiors() - { - return beforeDisplayGUIEditSignInferiors; - } - - public String[] getOverrideDisplayGUIEditSignSuperiors() - { - return overrideDisplayGUIEditSignSuperiors; - } - - public String[] getOverrideDisplayGUIEditSignInferiors() - { - return overrideDisplayGUIEditSignInferiors; - } - - public String[] getAfterDisplayGUIEditSignSuperiors() - { - return afterDisplayGUIEditSignSuperiors; - } - - public String[] getAfterDisplayGUIEditSignInferiors() - { - return afterDisplayGUIEditSignInferiors; - } - - public void setBeforeDisplayGUIEditSignSuperiors(String[] value) - { - beforeDisplayGUIEditSignSuperiors = value; - } - - public void setBeforeDisplayGUIEditSignInferiors(String[] value) - { - beforeDisplayGUIEditSignInferiors = value; - } - - public void setOverrideDisplayGUIEditSignSuperiors(String[] value) - { - overrideDisplayGUIEditSignSuperiors = value; - } - - public void setOverrideDisplayGUIEditSignInferiors(String[] value) - { - overrideDisplayGUIEditSignInferiors = value; - } - - public void setAfterDisplayGUIEditSignSuperiors(String[] value) - { - afterDisplayGUIEditSignSuperiors = value; - } - - public void setAfterDisplayGUIEditSignInferiors(String[] value) - { - afterDisplayGUIEditSignInferiors = value; - } - - public String[] getBeforeDisplayGUIEnchantmentSuperiors() - { - return beforeDisplayGUIEnchantmentSuperiors; - } - - public String[] getBeforeDisplayGUIEnchantmentInferiors() - { - return beforeDisplayGUIEnchantmentInferiors; - } - - public String[] getOverrideDisplayGUIEnchantmentSuperiors() - { - return overrideDisplayGUIEnchantmentSuperiors; - } - - public String[] getOverrideDisplayGUIEnchantmentInferiors() - { - return overrideDisplayGUIEnchantmentInferiors; - } - - public String[] getAfterDisplayGUIEnchantmentSuperiors() - { - return afterDisplayGUIEnchantmentSuperiors; - } - - public String[] getAfterDisplayGUIEnchantmentInferiors() - { - return afterDisplayGUIEnchantmentInferiors; - } - - public void setBeforeDisplayGUIEnchantmentSuperiors(String[] value) - { - beforeDisplayGUIEnchantmentSuperiors = value; - } - - public void setBeforeDisplayGUIEnchantmentInferiors(String[] value) - { - beforeDisplayGUIEnchantmentInferiors = value; - } - - public void setOverrideDisplayGUIEnchantmentSuperiors(String[] value) - { - overrideDisplayGUIEnchantmentSuperiors = value; - } - - public void setOverrideDisplayGUIEnchantmentInferiors(String[] value) - { - overrideDisplayGUIEnchantmentInferiors = value; - } - - public void setAfterDisplayGUIEnchantmentSuperiors(String[] value) - { - afterDisplayGUIEnchantmentSuperiors = value; - } - - public void setAfterDisplayGUIEnchantmentInferiors(String[] value) - { - afterDisplayGUIEnchantmentInferiors = value; - } - - public String[] getBeforeDisplayGUIFurnaceSuperiors() - { - return beforeDisplayGUIFurnaceSuperiors; - } - - public String[] getBeforeDisplayGUIFurnaceInferiors() - { - return beforeDisplayGUIFurnaceInferiors; - } - - public String[] getOverrideDisplayGUIFurnaceSuperiors() - { - return overrideDisplayGUIFurnaceSuperiors; - } - - public String[] getOverrideDisplayGUIFurnaceInferiors() - { - return overrideDisplayGUIFurnaceInferiors; - } - - public String[] getAfterDisplayGUIFurnaceSuperiors() - { - return afterDisplayGUIFurnaceSuperiors; - } - - public String[] getAfterDisplayGUIFurnaceInferiors() - { - return afterDisplayGUIFurnaceInferiors; - } - - public void setBeforeDisplayGUIFurnaceSuperiors(String[] value) - { - beforeDisplayGUIFurnaceSuperiors = value; - } - - public void setBeforeDisplayGUIFurnaceInferiors(String[] value) - { - beforeDisplayGUIFurnaceInferiors = value; - } - - public void setOverrideDisplayGUIFurnaceSuperiors(String[] value) - { - overrideDisplayGUIFurnaceSuperiors = value; - } - - public void setOverrideDisplayGUIFurnaceInferiors(String[] value) - { - overrideDisplayGUIFurnaceInferiors = value; - } - - public void setAfterDisplayGUIFurnaceSuperiors(String[] value) - { - afterDisplayGUIFurnaceSuperiors = value; - } - - public void setAfterDisplayGUIFurnaceInferiors(String[] value) - { - afterDisplayGUIFurnaceInferiors = value; - } - - public String[] getBeforeDisplayGUIWorkbenchSuperiors() - { - return beforeDisplayGUIWorkbenchSuperiors; - } - - public String[] getBeforeDisplayGUIWorkbenchInferiors() - { - return beforeDisplayGUIWorkbenchInferiors; - } - - public String[] getOverrideDisplayGUIWorkbenchSuperiors() - { - return overrideDisplayGUIWorkbenchSuperiors; - } - - public String[] getOverrideDisplayGUIWorkbenchInferiors() - { - return overrideDisplayGUIWorkbenchInferiors; - } - - public String[] getAfterDisplayGUIWorkbenchSuperiors() - { - return afterDisplayGUIWorkbenchSuperiors; - } - - public String[] getAfterDisplayGUIWorkbenchInferiors() - { - return afterDisplayGUIWorkbenchInferiors; - } - - public void setBeforeDisplayGUIWorkbenchSuperiors(String[] value) - { - beforeDisplayGUIWorkbenchSuperiors = value; - } - - public void setBeforeDisplayGUIWorkbenchInferiors(String[] value) - { - beforeDisplayGUIWorkbenchInferiors = value; - } - - public void setOverrideDisplayGUIWorkbenchSuperiors(String[] value) - { - overrideDisplayGUIWorkbenchSuperiors = value; - } - - public void setOverrideDisplayGUIWorkbenchInferiors(String[] value) - { - overrideDisplayGUIWorkbenchInferiors = value; - } - - public void setAfterDisplayGUIWorkbenchSuperiors(String[] value) - { - afterDisplayGUIWorkbenchSuperiors = value; - } - - public void setAfterDisplayGUIWorkbenchInferiors(String[] value) - { - afterDisplayGUIWorkbenchInferiors = value; - } - - public String[] getBeforeDropOneItemSuperiors() - { - return beforeDropOneItemSuperiors; - } - - public String[] getBeforeDropOneItemInferiors() - { - return beforeDropOneItemInferiors; - } - - public String[] getOverrideDropOneItemSuperiors() - { - return overrideDropOneItemSuperiors; - } - - public String[] getOverrideDropOneItemInferiors() - { - return overrideDropOneItemInferiors; - } - - public String[] getAfterDropOneItemSuperiors() - { - return afterDropOneItemSuperiors; - } - - public String[] getAfterDropOneItemInferiors() - { - return afterDropOneItemInferiors; - } - - public void setBeforeDropOneItemSuperiors(String[] value) - { - beforeDropOneItemSuperiors = value; - } - - public void setBeforeDropOneItemInferiors(String[] value) - { - beforeDropOneItemInferiors = value; - } - - public void setOverrideDropOneItemSuperiors(String[] value) - { - overrideDropOneItemSuperiors = value; - } - - public void setOverrideDropOneItemInferiors(String[] value) - { - overrideDropOneItemInferiors = value; - } - - public void setAfterDropOneItemSuperiors(String[] value) - { - afterDropOneItemSuperiors = value; - } - - public void setAfterDropOneItemInferiors(String[] value) - { - afterDropOneItemInferiors = value; - } - - public String[] getBeforeDropPlayerItemSuperiors() - { - return beforeDropPlayerItemSuperiors; - } - - public String[] getBeforeDropPlayerItemInferiors() - { - return beforeDropPlayerItemInferiors; - } - - public String[] getOverrideDropPlayerItemSuperiors() - { - return overrideDropPlayerItemSuperiors; - } - - public String[] getOverrideDropPlayerItemInferiors() - { - return overrideDropPlayerItemInferiors; - } - - public String[] getAfterDropPlayerItemSuperiors() - { - return afterDropPlayerItemSuperiors; - } - - public String[] getAfterDropPlayerItemInferiors() - { - return afterDropPlayerItemInferiors; - } - - public void setBeforeDropPlayerItemSuperiors(String[] value) - { - beforeDropPlayerItemSuperiors = value; - } - - public void setBeforeDropPlayerItemInferiors(String[] value) - { - beforeDropPlayerItemInferiors = value; - } - - public void setOverrideDropPlayerItemSuperiors(String[] value) - { - overrideDropPlayerItemSuperiors = value; - } - - public void setOverrideDropPlayerItemInferiors(String[] value) - { - overrideDropPlayerItemInferiors = value; - } - - public void setAfterDropPlayerItemSuperiors(String[] value) - { - afterDropPlayerItemSuperiors = value; - } - - public void setAfterDropPlayerItemInferiors(String[] value) - { - afterDropPlayerItemInferiors = value; - } - - public String[] getBeforeDropPlayerItemWithRandomChoiceSuperiors() - { - return beforeDropPlayerItemWithRandomChoiceSuperiors; - } - - public String[] getBeforeDropPlayerItemWithRandomChoiceInferiors() - { - return beforeDropPlayerItemWithRandomChoiceInferiors; - } - - public String[] getOverrideDropPlayerItemWithRandomChoiceSuperiors() - { - return overrideDropPlayerItemWithRandomChoiceSuperiors; - } - - public String[] getOverrideDropPlayerItemWithRandomChoiceInferiors() - { - return overrideDropPlayerItemWithRandomChoiceInferiors; - } - - public String[] getAfterDropPlayerItemWithRandomChoiceSuperiors() - { - return afterDropPlayerItemWithRandomChoiceSuperiors; - } - - public String[] getAfterDropPlayerItemWithRandomChoiceInferiors() - { - return afterDropPlayerItemWithRandomChoiceInferiors; - } - - public void setBeforeDropPlayerItemWithRandomChoiceSuperiors(String[] value) - { - beforeDropPlayerItemWithRandomChoiceSuperiors = value; - } - - public void setBeforeDropPlayerItemWithRandomChoiceInferiors(String[] value) - { - beforeDropPlayerItemWithRandomChoiceInferiors = value; - } - - public void setOverrideDropPlayerItemWithRandomChoiceSuperiors(String[] value) - { - overrideDropPlayerItemWithRandomChoiceSuperiors = value; - } - - public void setOverrideDropPlayerItemWithRandomChoiceInferiors(String[] value) - { - overrideDropPlayerItemWithRandomChoiceInferiors = value; - } - - public void setAfterDropPlayerItemWithRandomChoiceSuperiors(String[] value) - { - afterDropPlayerItemWithRandomChoiceSuperiors = value; - } - - public void setAfterDropPlayerItemWithRandomChoiceInferiors(String[] value) - { - afterDropPlayerItemWithRandomChoiceInferiors = value; - } - - public String[] getBeforeFallSuperiors() - { - return beforeFallSuperiors; - } - - public String[] getBeforeFallInferiors() - { - return beforeFallInferiors; - } - - public String[] getOverrideFallSuperiors() - { - return overrideFallSuperiors; - } - - public String[] getOverrideFallInferiors() - { - return overrideFallInferiors; - } - - public String[] getAfterFallSuperiors() - { - return afterFallSuperiors; - } - - public String[] getAfterFallInferiors() - { - return afterFallInferiors; - } - - public void setBeforeFallSuperiors(String[] value) - { - beforeFallSuperiors = value; - } - - public void setBeforeFallInferiors(String[] value) - { - beforeFallInferiors = value; - } - - public void setOverrideFallSuperiors(String[] value) - { - overrideFallSuperiors = value; - } - - public void setOverrideFallInferiors(String[] value) - { - overrideFallInferiors = value; - } - - public void setAfterFallSuperiors(String[] value) - { - afterFallSuperiors = value; - } - - public void setAfterFallInferiors(String[] value) - { - afterFallInferiors = value; - } - - public String[] getBeforeGetAIMoveSpeedSuperiors() - { - return beforeGetAIMoveSpeedSuperiors; - } - - public String[] getBeforeGetAIMoveSpeedInferiors() - { - return beforeGetAIMoveSpeedInferiors; - } - - public String[] getOverrideGetAIMoveSpeedSuperiors() - { - return overrideGetAIMoveSpeedSuperiors; - } - - public String[] getOverrideGetAIMoveSpeedInferiors() - { - return overrideGetAIMoveSpeedInferiors; - } - - public String[] getAfterGetAIMoveSpeedSuperiors() - { - return afterGetAIMoveSpeedSuperiors; - } - - public String[] getAfterGetAIMoveSpeedInferiors() - { - return afterGetAIMoveSpeedInferiors; - } - - public void setBeforeGetAIMoveSpeedSuperiors(String[] value) - { - beforeGetAIMoveSpeedSuperiors = value; - } - - public void setBeforeGetAIMoveSpeedInferiors(String[] value) - { - beforeGetAIMoveSpeedInferiors = value; - } - - public void setOverrideGetAIMoveSpeedSuperiors(String[] value) - { - overrideGetAIMoveSpeedSuperiors = value; - } - - public void setOverrideGetAIMoveSpeedInferiors(String[] value) - { - overrideGetAIMoveSpeedInferiors = value; - } - - public void setAfterGetAIMoveSpeedSuperiors(String[] value) - { - afterGetAIMoveSpeedSuperiors = value; - } - - public void setAfterGetAIMoveSpeedInferiors(String[] value) - { - afterGetAIMoveSpeedInferiors = value; - } - - public String[] getBeforeGetBedOrientationInDegreesSuperiors() - { - return beforeGetBedOrientationInDegreesSuperiors; - } - - public String[] getBeforeGetBedOrientationInDegreesInferiors() - { - return beforeGetBedOrientationInDegreesInferiors; - } - - public String[] getOverrideGetBedOrientationInDegreesSuperiors() - { - return overrideGetBedOrientationInDegreesSuperiors; - } - - public String[] getOverrideGetBedOrientationInDegreesInferiors() - { - return overrideGetBedOrientationInDegreesInferiors; - } - - public String[] getAfterGetBedOrientationInDegreesSuperiors() - { - return afterGetBedOrientationInDegreesSuperiors; - } - - public String[] getAfterGetBedOrientationInDegreesInferiors() - { - return afterGetBedOrientationInDegreesInferiors; - } - - public void setBeforeGetBedOrientationInDegreesSuperiors(String[] value) - { - beforeGetBedOrientationInDegreesSuperiors = value; - } - - public void setBeforeGetBedOrientationInDegreesInferiors(String[] value) - { - beforeGetBedOrientationInDegreesInferiors = value; - } - - public void setOverrideGetBedOrientationInDegreesSuperiors(String[] value) - { - overrideGetBedOrientationInDegreesSuperiors = value; - } - - public void setOverrideGetBedOrientationInDegreesInferiors(String[] value) - { - overrideGetBedOrientationInDegreesInferiors = value; - } - - public void setAfterGetBedOrientationInDegreesSuperiors(String[] value) - { - afterGetBedOrientationInDegreesSuperiors = value; - } - - public void setAfterGetBedOrientationInDegreesInferiors(String[] value) - { - afterGetBedOrientationInDegreesInferiors = value; - } - - public String[] getBeforeGetBrightnessSuperiors() - { - return beforeGetBrightnessSuperiors; - } - - public String[] getBeforeGetBrightnessInferiors() - { - return beforeGetBrightnessInferiors; - } - - public String[] getOverrideGetBrightnessSuperiors() - { - return overrideGetBrightnessSuperiors; - } - - public String[] getOverrideGetBrightnessInferiors() - { - return overrideGetBrightnessInferiors; - } - - public String[] getAfterGetBrightnessSuperiors() - { - return afterGetBrightnessSuperiors; - } - - public String[] getAfterGetBrightnessInferiors() - { - return afterGetBrightnessInferiors; - } - - public void setBeforeGetBrightnessSuperiors(String[] value) - { - beforeGetBrightnessSuperiors = value; - } - - public void setBeforeGetBrightnessInferiors(String[] value) - { - beforeGetBrightnessInferiors = value; - } - - public void setOverrideGetBrightnessSuperiors(String[] value) - { - overrideGetBrightnessSuperiors = value; - } - - public void setOverrideGetBrightnessInferiors(String[] value) - { - overrideGetBrightnessInferiors = value; - } - - public void setAfterGetBrightnessSuperiors(String[] value) - { - afterGetBrightnessSuperiors = value; - } - - public void setAfterGetBrightnessInferiors(String[] value) - { - afterGetBrightnessInferiors = value; - } - - public String[] getBeforeGetBrightnessForRenderSuperiors() - { - return beforeGetBrightnessForRenderSuperiors; - } - - public String[] getBeforeGetBrightnessForRenderInferiors() - { - return beforeGetBrightnessForRenderInferiors; - } - - public String[] getOverrideGetBrightnessForRenderSuperiors() - { - return overrideGetBrightnessForRenderSuperiors; - } - - public String[] getOverrideGetBrightnessForRenderInferiors() - { - return overrideGetBrightnessForRenderInferiors; - } - - public String[] getAfterGetBrightnessForRenderSuperiors() - { - return afterGetBrightnessForRenderSuperiors; - } - - public String[] getAfterGetBrightnessForRenderInferiors() - { - return afterGetBrightnessForRenderInferiors; - } - - public void setBeforeGetBrightnessForRenderSuperiors(String[] value) - { - beforeGetBrightnessForRenderSuperiors = value; - } - - public void setBeforeGetBrightnessForRenderInferiors(String[] value) - { - beforeGetBrightnessForRenderInferiors = value; - } - - public void setOverrideGetBrightnessForRenderSuperiors(String[] value) - { - overrideGetBrightnessForRenderSuperiors = value; - } - - public void setOverrideGetBrightnessForRenderInferiors(String[] value) - { - overrideGetBrightnessForRenderInferiors = value; - } - - public void setAfterGetBrightnessForRenderSuperiors(String[] value) - { - afterGetBrightnessForRenderSuperiors = value; - } - - public void setAfterGetBrightnessForRenderInferiors(String[] value) - { - afterGetBrightnessForRenderInferiors = value; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockSuperiors() - { - return beforeGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockInferiors() - { - return beforeGetCurrentPlayerStrVsBlockInferiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockSuperiors() - { - return overrideGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockInferiors() - { - return overrideGetCurrentPlayerStrVsBlockInferiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockSuperiors() - { - return afterGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockInferiors() - { - return afterGetCurrentPlayerStrVsBlockInferiors; - } - - public void setBeforeGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setBeforeGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockInferiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockInferiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockInferiors = value; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return beforeGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockForgeInferiors() - { - return beforeGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return overrideGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockForgeInferiors() - { - return overrideGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return afterGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockForgeInferiors() - { - return afterGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public void setBeforeGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setBeforeGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public String[] getBeforeGetDistanceSqSuperiors() - { - return beforeGetDistanceSqSuperiors; - } - - public String[] getBeforeGetDistanceSqInferiors() - { - return beforeGetDistanceSqInferiors; - } - - public String[] getOverrideGetDistanceSqSuperiors() - { - return overrideGetDistanceSqSuperiors; - } - - public String[] getOverrideGetDistanceSqInferiors() - { - return overrideGetDistanceSqInferiors; - } - - public String[] getAfterGetDistanceSqSuperiors() - { - return afterGetDistanceSqSuperiors; - } - - public String[] getAfterGetDistanceSqInferiors() - { - return afterGetDistanceSqInferiors; - } - - public void setBeforeGetDistanceSqSuperiors(String[] value) - { - beforeGetDistanceSqSuperiors = value; - } - - public void setBeforeGetDistanceSqInferiors(String[] value) - { - beforeGetDistanceSqInferiors = value; - } - - public void setOverrideGetDistanceSqSuperiors(String[] value) - { - overrideGetDistanceSqSuperiors = value; - } - - public void setOverrideGetDistanceSqInferiors(String[] value) - { - overrideGetDistanceSqInferiors = value; - } - - public void setAfterGetDistanceSqSuperiors(String[] value) - { - afterGetDistanceSqSuperiors = value; - } - - public void setAfterGetDistanceSqInferiors(String[] value) - { - afterGetDistanceSqInferiors = value; - } - - public String[] getBeforeGetDistanceSqToEntitySuperiors() - { - return beforeGetDistanceSqToEntitySuperiors; - } - - public String[] getBeforeGetDistanceSqToEntityInferiors() - { - return beforeGetDistanceSqToEntityInferiors; - } - - public String[] getOverrideGetDistanceSqToEntitySuperiors() - { - return overrideGetDistanceSqToEntitySuperiors; - } - - public String[] getOverrideGetDistanceSqToEntityInferiors() - { - return overrideGetDistanceSqToEntityInferiors; - } - - public String[] getAfterGetDistanceSqToEntitySuperiors() - { - return afterGetDistanceSqToEntitySuperiors; - } - - public String[] getAfterGetDistanceSqToEntityInferiors() - { - return afterGetDistanceSqToEntityInferiors; - } - - public void setBeforeGetDistanceSqToEntitySuperiors(String[] value) - { - beforeGetDistanceSqToEntitySuperiors = value; - } - - public void setBeforeGetDistanceSqToEntityInferiors(String[] value) - { - beforeGetDistanceSqToEntityInferiors = value; - } - - public void setOverrideGetDistanceSqToEntitySuperiors(String[] value) - { - overrideGetDistanceSqToEntitySuperiors = value; - } - - public void setOverrideGetDistanceSqToEntityInferiors(String[] value) - { - overrideGetDistanceSqToEntityInferiors = value; - } - - public void setAfterGetDistanceSqToEntitySuperiors(String[] value) - { - afterGetDistanceSqToEntitySuperiors = value; - } - - public void setAfterGetDistanceSqToEntityInferiors(String[] value) - { - afterGetDistanceSqToEntityInferiors = value; - } - - public String[] getBeforeGetFOVMultiplierSuperiors() - { - return beforeGetFOVMultiplierSuperiors; - } - - public String[] getBeforeGetFOVMultiplierInferiors() - { - return beforeGetFOVMultiplierInferiors; - } - - public String[] getOverrideGetFOVMultiplierSuperiors() - { - return overrideGetFOVMultiplierSuperiors; - } - - public String[] getOverrideGetFOVMultiplierInferiors() - { - return overrideGetFOVMultiplierInferiors; - } - - public String[] getAfterGetFOVMultiplierSuperiors() - { - return afterGetFOVMultiplierSuperiors; - } - - public String[] getAfterGetFOVMultiplierInferiors() - { - return afterGetFOVMultiplierInferiors; - } - - public void setBeforeGetFOVMultiplierSuperiors(String[] value) - { - beforeGetFOVMultiplierSuperiors = value; - } - - public void setBeforeGetFOVMultiplierInferiors(String[] value) - { - beforeGetFOVMultiplierInferiors = value; - } - - public void setOverrideGetFOVMultiplierSuperiors(String[] value) - { - overrideGetFOVMultiplierSuperiors = value; - } - - public void setOverrideGetFOVMultiplierInferiors(String[] value) - { - overrideGetFOVMultiplierInferiors = value; - } - - public void setAfterGetFOVMultiplierSuperiors(String[] value) - { - afterGetFOVMultiplierSuperiors = value; - } - - public void setAfterGetFOVMultiplierInferiors(String[] value) - { - afterGetFOVMultiplierInferiors = value; - } - - public String[] getBeforeGetHurtSoundSuperiors() - { - return beforeGetHurtSoundSuperiors; - } - - public String[] getBeforeGetHurtSoundInferiors() - { - return beforeGetHurtSoundInferiors; - } - - public String[] getOverrideGetHurtSoundSuperiors() - { - return overrideGetHurtSoundSuperiors; - } - - public String[] getOverrideGetHurtSoundInferiors() - { - return overrideGetHurtSoundInferiors; - } - - public String[] getAfterGetHurtSoundSuperiors() - { - return afterGetHurtSoundSuperiors; - } - - public String[] getAfterGetHurtSoundInferiors() - { - return afterGetHurtSoundInferiors; - } - - public void setBeforeGetHurtSoundSuperiors(String[] value) - { - beforeGetHurtSoundSuperiors = value; - } - - public void setBeforeGetHurtSoundInferiors(String[] value) - { - beforeGetHurtSoundInferiors = value; - } - - public void setOverrideGetHurtSoundSuperiors(String[] value) - { - overrideGetHurtSoundSuperiors = value; - } - - public void setOverrideGetHurtSoundInferiors(String[] value) - { - overrideGetHurtSoundInferiors = value; - } - - public void setAfterGetHurtSoundSuperiors(String[] value) - { - afterGetHurtSoundSuperiors = value; - } - - public void setAfterGetHurtSoundInferiors(String[] value) - { - afterGetHurtSoundInferiors = value; - } - - public String[] getBeforeGetItemIconSuperiors() - { - return beforeGetItemIconSuperiors; - } - - public String[] getBeforeGetItemIconInferiors() - { - return beforeGetItemIconInferiors; - } - - public String[] getOverrideGetItemIconSuperiors() - { - return overrideGetItemIconSuperiors; - } - - public String[] getOverrideGetItemIconInferiors() - { - return overrideGetItemIconInferiors; - } - - public String[] getAfterGetItemIconSuperiors() - { - return afterGetItemIconSuperiors; - } - - public String[] getAfterGetItemIconInferiors() - { - return afterGetItemIconInferiors; - } - - public void setBeforeGetItemIconSuperiors(String[] value) - { - beforeGetItemIconSuperiors = value; - } - - public void setBeforeGetItemIconInferiors(String[] value) - { - beforeGetItemIconInferiors = value; - } - - public void setOverrideGetItemIconSuperiors(String[] value) - { - overrideGetItemIconSuperiors = value; - } - - public void setOverrideGetItemIconInferiors(String[] value) - { - overrideGetItemIconInferiors = value; - } - - public void setAfterGetItemIconSuperiors(String[] value) - { - afterGetItemIconSuperiors = value; - } - - public void setAfterGetItemIconInferiors(String[] value) - { - afterGetItemIconInferiors = value; - } - - public String[] getBeforeGetSleepTimerSuperiors() - { - return beforeGetSleepTimerSuperiors; - } - - public String[] getBeforeGetSleepTimerInferiors() - { - return beforeGetSleepTimerInferiors; - } - - public String[] getOverrideGetSleepTimerSuperiors() - { - return overrideGetSleepTimerSuperiors; - } - - public String[] getOverrideGetSleepTimerInferiors() - { - return overrideGetSleepTimerInferiors; - } - - public String[] getAfterGetSleepTimerSuperiors() - { - return afterGetSleepTimerSuperiors; - } - - public String[] getAfterGetSleepTimerInferiors() - { - return afterGetSleepTimerInferiors; - } - - public void setBeforeGetSleepTimerSuperiors(String[] value) - { - beforeGetSleepTimerSuperiors = value; - } - - public void setBeforeGetSleepTimerInferiors(String[] value) - { - beforeGetSleepTimerInferiors = value; - } - - public void setOverrideGetSleepTimerSuperiors(String[] value) - { - overrideGetSleepTimerSuperiors = value; - } - - public void setOverrideGetSleepTimerInferiors(String[] value) - { - overrideGetSleepTimerInferiors = value; - } - - public void setAfterGetSleepTimerSuperiors(String[] value) - { - afterGetSleepTimerSuperiors = value; - } - - public void setAfterGetSleepTimerInferiors(String[] value) - { - afterGetSleepTimerInferiors = value; - } - - public String[] getBeforeHandleLavaMovementSuperiors() - { - return beforeHandleLavaMovementSuperiors; - } - - public String[] getBeforeHandleLavaMovementInferiors() - { - return beforeHandleLavaMovementInferiors; - } - - public String[] getOverrideHandleLavaMovementSuperiors() - { - return overrideHandleLavaMovementSuperiors; - } - - public String[] getOverrideHandleLavaMovementInferiors() - { - return overrideHandleLavaMovementInferiors; - } - - public String[] getAfterHandleLavaMovementSuperiors() - { - return afterHandleLavaMovementSuperiors; - } - - public String[] getAfterHandleLavaMovementInferiors() - { - return afterHandleLavaMovementInferiors; - } - - public void setBeforeHandleLavaMovementSuperiors(String[] value) - { - beforeHandleLavaMovementSuperiors = value; - } - - public void setBeforeHandleLavaMovementInferiors(String[] value) - { - beforeHandleLavaMovementInferiors = value; - } - - public void setOverrideHandleLavaMovementSuperiors(String[] value) - { - overrideHandleLavaMovementSuperiors = value; - } - - public void setOverrideHandleLavaMovementInferiors(String[] value) - { - overrideHandleLavaMovementInferiors = value; - } - - public void setAfterHandleLavaMovementSuperiors(String[] value) - { - afterHandleLavaMovementSuperiors = value; - } - - public void setAfterHandleLavaMovementInferiors(String[] value) - { - afterHandleLavaMovementInferiors = value; - } - - public String[] getBeforeHandleWaterMovementSuperiors() - { - return beforeHandleWaterMovementSuperiors; - } - - public String[] getBeforeHandleWaterMovementInferiors() - { - return beforeHandleWaterMovementInferiors; - } - - public String[] getOverrideHandleWaterMovementSuperiors() - { - return overrideHandleWaterMovementSuperiors; - } - - public String[] getOverrideHandleWaterMovementInferiors() - { - return overrideHandleWaterMovementInferiors; - } - - public String[] getAfterHandleWaterMovementSuperiors() - { - return afterHandleWaterMovementSuperiors; - } - - public String[] getAfterHandleWaterMovementInferiors() - { - return afterHandleWaterMovementInferiors; - } - - public void setBeforeHandleWaterMovementSuperiors(String[] value) - { - beforeHandleWaterMovementSuperiors = value; - } - - public void setBeforeHandleWaterMovementInferiors(String[] value) - { - beforeHandleWaterMovementInferiors = value; - } - - public void setOverrideHandleWaterMovementSuperiors(String[] value) - { - overrideHandleWaterMovementSuperiors = value; - } - - public void setOverrideHandleWaterMovementInferiors(String[] value) - { - overrideHandleWaterMovementInferiors = value; - } - - public void setAfterHandleWaterMovementSuperiors(String[] value) - { - afterHandleWaterMovementSuperiors = value; - } - - public void setAfterHandleWaterMovementInferiors(String[] value) - { - afterHandleWaterMovementInferiors = value; - } - - public String[] getBeforeHealSuperiors() - { - return beforeHealSuperiors; - } - - public String[] getBeforeHealInferiors() - { - return beforeHealInferiors; - } - - public String[] getOverrideHealSuperiors() - { - return overrideHealSuperiors; - } - - public String[] getOverrideHealInferiors() - { - return overrideHealInferiors; - } - - public String[] getAfterHealSuperiors() - { - return afterHealSuperiors; - } - - public String[] getAfterHealInferiors() - { - return afterHealInferiors; - } - - public void setBeforeHealSuperiors(String[] value) - { - beforeHealSuperiors = value; - } - - public void setBeforeHealInferiors(String[] value) - { - beforeHealInferiors = value; - } - - public void setOverrideHealSuperiors(String[] value) - { - overrideHealSuperiors = value; - } - - public void setOverrideHealInferiors(String[] value) - { - overrideHealInferiors = value; - } - - public void setAfterHealSuperiors(String[] value) - { - afterHealSuperiors = value; - } - - public void setAfterHealInferiors(String[] value) - { - afterHealInferiors = value; - } - - public String[] getBeforeIsEntityInsideOpaqueBlockSuperiors() - { - return beforeIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getBeforeIsEntityInsideOpaqueBlockInferiors() - { - return beforeIsEntityInsideOpaqueBlockInferiors; - } - - public String[] getOverrideIsEntityInsideOpaqueBlockSuperiors() - { - return overrideIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getOverrideIsEntityInsideOpaqueBlockInferiors() - { - return overrideIsEntityInsideOpaqueBlockInferiors; - } - - public String[] getAfterIsEntityInsideOpaqueBlockSuperiors() - { - return afterIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getAfterIsEntityInsideOpaqueBlockInferiors() - { - return afterIsEntityInsideOpaqueBlockInferiors; - } - - public void setBeforeIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - beforeIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setBeforeIsEntityInsideOpaqueBlockInferiors(String[] value) - { - beforeIsEntityInsideOpaqueBlockInferiors = value; - } - - public void setOverrideIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - overrideIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setOverrideIsEntityInsideOpaqueBlockInferiors(String[] value) - { - overrideIsEntityInsideOpaqueBlockInferiors = value; - } - - public void setAfterIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - afterIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setAfterIsEntityInsideOpaqueBlockInferiors(String[] value) - { - afterIsEntityInsideOpaqueBlockInferiors = value; - } - - public String[] getBeforeIsInWaterSuperiors() - { - return beforeIsInWaterSuperiors; - } - - public String[] getBeforeIsInWaterInferiors() - { - return beforeIsInWaterInferiors; - } - - public String[] getOverrideIsInWaterSuperiors() - { - return overrideIsInWaterSuperiors; - } - - public String[] getOverrideIsInWaterInferiors() - { - return overrideIsInWaterInferiors; - } - - public String[] getAfterIsInWaterSuperiors() - { - return afterIsInWaterSuperiors; - } - - public String[] getAfterIsInWaterInferiors() - { - return afterIsInWaterInferiors; - } - - public void setBeforeIsInWaterSuperiors(String[] value) - { - beforeIsInWaterSuperiors = value; - } - - public void setBeforeIsInWaterInferiors(String[] value) - { - beforeIsInWaterInferiors = value; - } - - public void setOverrideIsInWaterSuperiors(String[] value) - { - overrideIsInWaterSuperiors = value; - } - - public void setOverrideIsInWaterInferiors(String[] value) - { - overrideIsInWaterInferiors = value; - } - - public void setAfterIsInWaterSuperiors(String[] value) - { - afterIsInWaterSuperiors = value; - } - - public void setAfterIsInWaterInferiors(String[] value) - { - afterIsInWaterInferiors = value; - } - - public String[] getBeforeIsInsideOfMaterialSuperiors() - { - return beforeIsInsideOfMaterialSuperiors; - } - - public String[] getBeforeIsInsideOfMaterialInferiors() - { - return beforeIsInsideOfMaterialInferiors; - } - - public String[] getOverrideIsInsideOfMaterialSuperiors() - { - return overrideIsInsideOfMaterialSuperiors; - } - - public String[] getOverrideIsInsideOfMaterialInferiors() - { - return overrideIsInsideOfMaterialInferiors; - } - - public String[] getAfterIsInsideOfMaterialSuperiors() - { - return afterIsInsideOfMaterialSuperiors; - } - - public String[] getAfterIsInsideOfMaterialInferiors() - { - return afterIsInsideOfMaterialInferiors; - } - - public void setBeforeIsInsideOfMaterialSuperiors(String[] value) - { - beforeIsInsideOfMaterialSuperiors = value; - } - - public void setBeforeIsInsideOfMaterialInferiors(String[] value) - { - beforeIsInsideOfMaterialInferiors = value; - } - - public void setOverrideIsInsideOfMaterialSuperiors(String[] value) - { - overrideIsInsideOfMaterialSuperiors = value; - } - - public void setOverrideIsInsideOfMaterialInferiors(String[] value) - { - overrideIsInsideOfMaterialInferiors = value; - } - - public void setAfterIsInsideOfMaterialSuperiors(String[] value) - { - afterIsInsideOfMaterialSuperiors = value; - } - - public void setAfterIsInsideOfMaterialInferiors(String[] value) - { - afterIsInsideOfMaterialInferiors = value; - } - - public String[] getBeforeIsOnLadderSuperiors() - { - return beforeIsOnLadderSuperiors; - } - - public String[] getBeforeIsOnLadderInferiors() - { - return beforeIsOnLadderInferiors; - } - - public String[] getOverrideIsOnLadderSuperiors() - { - return overrideIsOnLadderSuperiors; - } - - public String[] getOverrideIsOnLadderInferiors() - { - return overrideIsOnLadderInferiors; - } - - public String[] getAfterIsOnLadderSuperiors() - { - return afterIsOnLadderSuperiors; - } - - public String[] getAfterIsOnLadderInferiors() - { - return afterIsOnLadderInferiors; - } - - public void setBeforeIsOnLadderSuperiors(String[] value) - { - beforeIsOnLadderSuperiors = value; - } - - public void setBeforeIsOnLadderInferiors(String[] value) - { - beforeIsOnLadderInferiors = value; - } - - public void setOverrideIsOnLadderSuperiors(String[] value) - { - overrideIsOnLadderSuperiors = value; - } - - public void setOverrideIsOnLadderInferiors(String[] value) - { - overrideIsOnLadderInferiors = value; - } - - public void setAfterIsOnLadderSuperiors(String[] value) - { - afterIsOnLadderSuperiors = value; - } - - public void setAfterIsOnLadderInferiors(String[] value) - { - afterIsOnLadderInferiors = value; - } - - public String[] getBeforeIsPlayerSleepingSuperiors() - { - return beforeIsPlayerSleepingSuperiors; - } - - public String[] getBeforeIsPlayerSleepingInferiors() - { - return beforeIsPlayerSleepingInferiors; - } - - public String[] getOverrideIsPlayerSleepingSuperiors() - { - return overrideIsPlayerSleepingSuperiors; - } - - public String[] getOverrideIsPlayerSleepingInferiors() - { - return overrideIsPlayerSleepingInferiors; - } - - public String[] getAfterIsPlayerSleepingSuperiors() - { - return afterIsPlayerSleepingSuperiors; - } - - public String[] getAfterIsPlayerSleepingInferiors() - { - return afterIsPlayerSleepingInferiors; - } - - public void setBeforeIsPlayerSleepingSuperiors(String[] value) - { - beforeIsPlayerSleepingSuperiors = value; - } - - public void setBeforeIsPlayerSleepingInferiors(String[] value) - { - beforeIsPlayerSleepingInferiors = value; - } - - public void setOverrideIsPlayerSleepingSuperiors(String[] value) - { - overrideIsPlayerSleepingSuperiors = value; - } - - public void setOverrideIsPlayerSleepingInferiors(String[] value) - { - overrideIsPlayerSleepingInferiors = value; - } - - public void setAfterIsPlayerSleepingSuperiors(String[] value) - { - afterIsPlayerSleepingSuperiors = value; - } - - public void setAfterIsPlayerSleepingInferiors(String[] value) - { - afterIsPlayerSleepingInferiors = value; - } - - public String[] getBeforeIsSneakingSuperiors() - { - return beforeIsSneakingSuperiors; - } - - public String[] getBeforeIsSneakingInferiors() - { - return beforeIsSneakingInferiors; - } - - public String[] getOverrideIsSneakingSuperiors() - { - return overrideIsSneakingSuperiors; - } - - public String[] getOverrideIsSneakingInferiors() - { - return overrideIsSneakingInferiors; - } - - public String[] getAfterIsSneakingSuperiors() - { - return afterIsSneakingSuperiors; - } - - public String[] getAfterIsSneakingInferiors() - { - return afterIsSneakingInferiors; - } - - public void setBeforeIsSneakingSuperiors(String[] value) - { - beforeIsSneakingSuperiors = value; - } - - public void setBeforeIsSneakingInferiors(String[] value) - { - beforeIsSneakingInferiors = value; - } - - public void setOverrideIsSneakingSuperiors(String[] value) - { - overrideIsSneakingSuperiors = value; - } - - public void setOverrideIsSneakingInferiors(String[] value) - { - overrideIsSneakingInferiors = value; - } - - public void setAfterIsSneakingSuperiors(String[] value) - { - afterIsSneakingSuperiors = value; - } - - public void setAfterIsSneakingInferiors(String[] value) - { - afterIsSneakingInferiors = value; - } - - public String[] getBeforeIsSprintingSuperiors() - { - return beforeIsSprintingSuperiors; - } - - public String[] getBeforeIsSprintingInferiors() - { - return beforeIsSprintingInferiors; - } - - public String[] getOverrideIsSprintingSuperiors() - { - return overrideIsSprintingSuperiors; - } - - public String[] getOverrideIsSprintingInferiors() - { - return overrideIsSprintingInferiors; - } - - public String[] getAfterIsSprintingSuperiors() - { - return afterIsSprintingSuperiors; - } - - public String[] getAfterIsSprintingInferiors() - { - return afterIsSprintingInferiors; - } - - public void setBeforeIsSprintingSuperiors(String[] value) - { - beforeIsSprintingSuperiors = value; - } - - public void setBeforeIsSprintingInferiors(String[] value) - { - beforeIsSprintingInferiors = value; - } - - public void setOverrideIsSprintingSuperiors(String[] value) - { - overrideIsSprintingSuperiors = value; - } - - public void setOverrideIsSprintingInferiors(String[] value) - { - overrideIsSprintingInferiors = value; - } - - public void setAfterIsSprintingSuperiors(String[] value) - { - afterIsSprintingSuperiors = value; - } - - public void setAfterIsSprintingInferiors(String[] value) - { - afterIsSprintingInferiors = value; - } - - public String[] getBeforeJumpSuperiors() - { - return beforeJumpSuperiors; - } - - public String[] getBeforeJumpInferiors() - { - return beforeJumpInferiors; - } - - public String[] getOverrideJumpSuperiors() - { - return overrideJumpSuperiors; - } - - public String[] getOverrideJumpInferiors() - { - return overrideJumpInferiors; - } - - public String[] getAfterJumpSuperiors() - { - return afterJumpSuperiors; - } - - public String[] getAfterJumpInferiors() - { - return afterJumpInferiors; - } - - public void setBeforeJumpSuperiors(String[] value) - { - beforeJumpSuperiors = value; - } - - public void setBeforeJumpInferiors(String[] value) - { - beforeJumpInferiors = value; - } - - public void setOverrideJumpSuperiors(String[] value) - { - overrideJumpSuperiors = value; - } - - public void setOverrideJumpInferiors(String[] value) - { - overrideJumpInferiors = value; - } - - public void setAfterJumpSuperiors(String[] value) - { - afterJumpSuperiors = value; - } - - public void setAfterJumpInferiors(String[] value) - { - afterJumpInferiors = value; - } - - public String[] getBeforeKnockBackSuperiors() - { - return beforeKnockBackSuperiors; - } - - public String[] getBeforeKnockBackInferiors() - { - return beforeKnockBackInferiors; - } - - public String[] getOverrideKnockBackSuperiors() - { - return overrideKnockBackSuperiors; - } - - public String[] getOverrideKnockBackInferiors() - { - return overrideKnockBackInferiors; - } - - public String[] getAfterKnockBackSuperiors() - { - return afterKnockBackSuperiors; - } - - public String[] getAfterKnockBackInferiors() - { - return afterKnockBackInferiors; - } - - public void setBeforeKnockBackSuperiors(String[] value) - { - beforeKnockBackSuperiors = value; - } - - public void setBeforeKnockBackInferiors(String[] value) - { - beforeKnockBackInferiors = value; - } - - public void setOverrideKnockBackSuperiors(String[] value) - { - overrideKnockBackSuperiors = value; - } - - public void setOverrideKnockBackInferiors(String[] value) - { - overrideKnockBackInferiors = value; - } - - public void setAfterKnockBackSuperiors(String[] value) - { - afterKnockBackSuperiors = value; - } - - public void setAfterKnockBackInferiors(String[] value) - { - afterKnockBackInferiors = value; - } - - public String[] getBeforeMoveEntitySuperiors() - { - return beforeMoveEntitySuperiors; - } - - public String[] getBeforeMoveEntityInferiors() - { - return beforeMoveEntityInferiors; - } - - public String[] getOverrideMoveEntitySuperiors() - { - return overrideMoveEntitySuperiors; - } - - public String[] getOverrideMoveEntityInferiors() - { - return overrideMoveEntityInferiors; - } - - public String[] getAfterMoveEntitySuperiors() - { - return afterMoveEntitySuperiors; - } - - public String[] getAfterMoveEntityInferiors() - { - return afterMoveEntityInferiors; - } - - public void setBeforeMoveEntitySuperiors(String[] value) - { - beforeMoveEntitySuperiors = value; - } - - public void setBeforeMoveEntityInferiors(String[] value) - { - beforeMoveEntityInferiors = value; - } - - public void setOverrideMoveEntitySuperiors(String[] value) - { - overrideMoveEntitySuperiors = value; - } - - public void setOverrideMoveEntityInferiors(String[] value) - { - overrideMoveEntityInferiors = value; - } - - public void setAfterMoveEntitySuperiors(String[] value) - { - afterMoveEntitySuperiors = value; - } - - public void setAfterMoveEntityInferiors(String[] value) - { - afterMoveEntityInferiors = value; - } - - public String[] getBeforeMoveEntityWithHeadingSuperiors() - { - return beforeMoveEntityWithHeadingSuperiors; - } - - public String[] getBeforeMoveEntityWithHeadingInferiors() - { - return beforeMoveEntityWithHeadingInferiors; - } - - public String[] getOverrideMoveEntityWithHeadingSuperiors() - { - return overrideMoveEntityWithHeadingSuperiors; - } - - public String[] getOverrideMoveEntityWithHeadingInferiors() - { - return overrideMoveEntityWithHeadingInferiors; - } - - public String[] getAfterMoveEntityWithHeadingSuperiors() - { - return afterMoveEntityWithHeadingSuperiors; - } - - public String[] getAfterMoveEntityWithHeadingInferiors() - { - return afterMoveEntityWithHeadingInferiors; - } - - public void setBeforeMoveEntityWithHeadingSuperiors(String[] value) - { - beforeMoveEntityWithHeadingSuperiors = value; - } - - public void setBeforeMoveEntityWithHeadingInferiors(String[] value) - { - beforeMoveEntityWithHeadingInferiors = value; - } - - public void setOverrideMoveEntityWithHeadingSuperiors(String[] value) - { - overrideMoveEntityWithHeadingSuperiors = value; - } - - public void setOverrideMoveEntityWithHeadingInferiors(String[] value) - { - overrideMoveEntityWithHeadingInferiors = value; - } - - public void setAfterMoveEntityWithHeadingSuperiors(String[] value) - { - afterMoveEntityWithHeadingSuperiors = value; - } - - public void setAfterMoveEntityWithHeadingInferiors(String[] value) - { - afterMoveEntityWithHeadingInferiors = value; - } - - public String[] getBeforeMoveFlyingSuperiors() - { - return beforeMoveFlyingSuperiors; - } - - public String[] getBeforeMoveFlyingInferiors() - { - return beforeMoveFlyingInferiors; - } - - public String[] getOverrideMoveFlyingSuperiors() - { - return overrideMoveFlyingSuperiors; - } - - public String[] getOverrideMoveFlyingInferiors() - { - return overrideMoveFlyingInferiors; - } - - public String[] getAfterMoveFlyingSuperiors() - { - return afterMoveFlyingSuperiors; - } - - public String[] getAfterMoveFlyingInferiors() - { - return afterMoveFlyingInferiors; - } - - public void setBeforeMoveFlyingSuperiors(String[] value) - { - beforeMoveFlyingSuperiors = value; - } - - public void setBeforeMoveFlyingInferiors(String[] value) - { - beforeMoveFlyingInferiors = value; - } - - public void setOverrideMoveFlyingSuperiors(String[] value) - { - overrideMoveFlyingSuperiors = value; - } - - public void setOverrideMoveFlyingInferiors(String[] value) - { - overrideMoveFlyingInferiors = value; - } - - public void setAfterMoveFlyingSuperiors(String[] value) - { - afterMoveFlyingSuperiors = value; - } - - public void setAfterMoveFlyingInferiors(String[] value) - { - afterMoveFlyingInferiors = value; - } - - public String[] getBeforeOnDeathSuperiors() - { - return beforeOnDeathSuperiors; - } - - public String[] getBeforeOnDeathInferiors() - { - return beforeOnDeathInferiors; - } - - public String[] getOverrideOnDeathSuperiors() - { - return overrideOnDeathSuperiors; - } - - public String[] getOverrideOnDeathInferiors() - { - return overrideOnDeathInferiors; - } - - public String[] getAfterOnDeathSuperiors() - { - return afterOnDeathSuperiors; - } - - public String[] getAfterOnDeathInferiors() - { - return afterOnDeathInferiors; - } - - public void setBeforeOnDeathSuperiors(String[] value) - { - beforeOnDeathSuperiors = value; - } - - public void setBeforeOnDeathInferiors(String[] value) - { - beforeOnDeathInferiors = value; - } - - public void setOverrideOnDeathSuperiors(String[] value) - { - overrideOnDeathSuperiors = value; - } - - public void setOverrideOnDeathInferiors(String[] value) - { - overrideOnDeathInferiors = value; - } - - public void setAfterOnDeathSuperiors(String[] value) - { - afterOnDeathSuperiors = value; - } - - public void setAfterOnDeathInferiors(String[] value) - { - afterOnDeathInferiors = value; - } - - public String[] getBeforeOnLivingUpdateSuperiors() - { - return beforeOnLivingUpdateSuperiors; - } - - public String[] getBeforeOnLivingUpdateInferiors() - { - return beforeOnLivingUpdateInferiors; - } - - public String[] getOverrideOnLivingUpdateSuperiors() - { - return overrideOnLivingUpdateSuperiors; - } - - public String[] getOverrideOnLivingUpdateInferiors() - { - return overrideOnLivingUpdateInferiors; - } - - public String[] getAfterOnLivingUpdateSuperiors() - { - return afterOnLivingUpdateSuperiors; - } - - public String[] getAfterOnLivingUpdateInferiors() - { - return afterOnLivingUpdateInferiors; - } - - public void setBeforeOnLivingUpdateSuperiors(String[] value) - { - beforeOnLivingUpdateSuperiors = value; - } - - public void setBeforeOnLivingUpdateInferiors(String[] value) - { - beforeOnLivingUpdateInferiors = value; - } - - public void setOverrideOnLivingUpdateSuperiors(String[] value) - { - overrideOnLivingUpdateSuperiors = value; - } - - public void setOverrideOnLivingUpdateInferiors(String[] value) - { - overrideOnLivingUpdateInferiors = value; - } - - public void setAfterOnLivingUpdateSuperiors(String[] value) - { - afterOnLivingUpdateSuperiors = value; - } - - public void setAfterOnLivingUpdateInferiors(String[] value) - { - afterOnLivingUpdateInferiors = value; - } - - public String[] getBeforeOnKillEntitySuperiors() - { - return beforeOnKillEntitySuperiors; - } - - public String[] getBeforeOnKillEntityInferiors() - { - return beforeOnKillEntityInferiors; - } - - public String[] getOverrideOnKillEntitySuperiors() - { - return overrideOnKillEntitySuperiors; - } - - public String[] getOverrideOnKillEntityInferiors() - { - return overrideOnKillEntityInferiors; - } - - public String[] getAfterOnKillEntitySuperiors() - { - return afterOnKillEntitySuperiors; - } - - public String[] getAfterOnKillEntityInferiors() - { - return afterOnKillEntityInferiors; - } - - public void setBeforeOnKillEntitySuperiors(String[] value) - { - beforeOnKillEntitySuperiors = value; - } - - public void setBeforeOnKillEntityInferiors(String[] value) - { - beforeOnKillEntityInferiors = value; - } - - public void setOverrideOnKillEntitySuperiors(String[] value) - { - overrideOnKillEntitySuperiors = value; - } - - public void setOverrideOnKillEntityInferiors(String[] value) - { - overrideOnKillEntityInferiors = value; - } - - public void setAfterOnKillEntitySuperiors(String[] value) - { - afterOnKillEntitySuperiors = value; - } - - public void setAfterOnKillEntityInferiors(String[] value) - { - afterOnKillEntityInferiors = value; - } - - public String[] getBeforeOnStruckByLightningSuperiors() - { - return beforeOnStruckByLightningSuperiors; - } - - public String[] getBeforeOnStruckByLightningInferiors() - { - return beforeOnStruckByLightningInferiors; - } - - public String[] getOverrideOnStruckByLightningSuperiors() - { - return overrideOnStruckByLightningSuperiors; - } - - public String[] getOverrideOnStruckByLightningInferiors() - { - return overrideOnStruckByLightningInferiors; - } - - public String[] getAfterOnStruckByLightningSuperiors() - { - return afterOnStruckByLightningSuperiors; - } - - public String[] getAfterOnStruckByLightningInferiors() - { - return afterOnStruckByLightningInferiors; - } - - public void setBeforeOnStruckByLightningSuperiors(String[] value) - { - beforeOnStruckByLightningSuperiors = value; - } - - public void setBeforeOnStruckByLightningInferiors(String[] value) - { - beforeOnStruckByLightningInferiors = value; - } - - public void setOverrideOnStruckByLightningSuperiors(String[] value) - { - overrideOnStruckByLightningSuperiors = value; - } - - public void setOverrideOnStruckByLightningInferiors(String[] value) - { - overrideOnStruckByLightningInferiors = value; - } - - public void setAfterOnStruckByLightningSuperiors(String[] value) - { - afterOnStruckByLightningSuperiors = value; - } - - public void setAfterOnStruckByLightningInferiors(String[] value) - { - afterOnStruckByLightningInferiors = value; - } - - public String[] getBeforeOnUpdateSuperiors() - { - return beforeOnUpdateSuperiors; - } - - public String[] getBeforeOnUpdateInferiors() - { - return beforeOnUpdateInferiors; - } - - public String[] getOverrideOnUpdateSuperiors() - { - return overrideOnUpdateSuperiors; - } - - public String[] getOverrideOnUpdateInferiors() - { - return overrideOnUpdateInferiors; - } - - public String[] getAfterOnUpdateSuperiors() - { - return afterOnUpdateSuperiors; - } - - public String[] getAfterOnUpdateInferiors() - { - return afterOnUpdateInferiors; - } - - public void setBeforeOnUpdateSuperiors(String[] value) - { - beforeOnUpdateSuperiors = value; - } - - public void setBeforeOnUpdateInferiors(String[] value) - { - beforeOnUpdateInferiors = value; - } - - public void setOverrideOnUpdateSuperiors(String[] value) - { - overrideOnUpdateSuperiors = value; - } - - public void setOverrideOnUpdateInferiors(String[] value) - { - overrideOnUpdateInferiors = value; - } - - public void setAfterOnUpdateSuperiors(String[] value) - { - afterOnUpdateSuperiors = value; - } - - public void setAfterOnUpdateInferiors(String[] value) - { - afterOnUpdateInferiors = value; - } - - public String[] getBeforePlayStepSoundSuperiors() - { - return beforePlayStepSoundSuperiors; - } - - public String[] getBeforePlayStepSoundInferiors() - { - return beforePlayStepSoundInferiors; - } - - public String[] getOverridePlayStepSoundSuperiors() - { - return overridePlayStepSoundSuperiors; - } - - public String[] getOverridePlayStepSoundInferiors() - { - return overridePlayStepSoundInferiors; - } - - public String[] getAfterPlayStepSoundSuperiors() - { - return afterPlayStepSoundSuperiors; - } - - public String[] getAfterPlayStepSoundInferiors() - { - return afterPlayStepSoundInferiors; - } - - public void setBeforePlayStepSoundSuperiors(String[] value) - { - beforePlayStepSoundSuperiors = value; - } - - public void setBeforePlayStepSoundInferiors(String[] value) - { - beforePlayStepSoundInferiors = value; - } - - public void setOverridePlayStepSoundSuperiors(String[] value) - { - overridePlayStepSoundSuperiors = value; - } - - public void setOverridePlayStepSoundInferiors(String[] value) - { - overridePlayStepSoundInferiors = value; - } - - public void setAfterPlayStepSoundSuperiors(String[] value) - { - afterPlayStepSoundSuperiors = value; - } - - public void setAfterPlayStepSoundInferiors(String[] value) - { - afterPlayStepSoundInferiors = value; - } - - public String[] getBeforePushOutOfBlocksSuperiors() - { - return beforePushOutOfBlocksSuperiors; - } - - public String[] getBeforePushOutOfBlocksInferiors() - { - return beforePushOutOfBlocksInferiors; - } - - public String[] getOverridePushOutOfBlocksSuperiors() - { - return overridePushOutOfBlocksSuperiors; - } - - public String[] getOverridePushOutOfBlocksInferiors() - { - return overridePushOutOfBlocksInferiors; - } - - public String[] getAfterPushOutOfBlocksSuperiors() - { - return afterPushOutOfBlocksSuperiors; - } - - public String[] getAfterPushOutOfBlocksInferiors() - { - return afterPushOutOfBlocksInferiors; - } - - public void setBeforePushOutOfBlocksSuperiors(String[] value) - { - beforePushOutOfBlocksSuperiors = value; - } - - public void setBeforePushOutOfBlocksInferiors(String[] value) - { - beforePushOutOfBlocksInferiors = value; - } - - public void setOverridePushOutOfBlocksSuperiors(String[] value) - { - overridePushOutOfBlocksSuperiors = value; - } - - public void setOverridePushOutOfBlocksInferiors(String[] value) - { - overridePushOutOfBlocksInferiors = value; - } - - public void setAfterPushOutOfBlocksSuperiors(String[] value) - { - afterPushOutOfBlocksSuperiors = value; - } - - public void setAfterPushOutOfBlocksInferiors(String[] value) - { - afterPushOutOfBlocksInferiors = value; - } - - public String[] getBeforeRayTraceSuperiors() - { - return beforeRayTraceSuperiors; - } - - public String[] getBeforeRayTraceInferiors() - { - return beforeRayTraceInferiors; - } - - public String[] getOverrideRayTraceSuperiors() - { - return overrideRayTraceSuperiors; - } - - public String[] getOverrideRayTraceInferiors() - { - return overrideRayTraceInferiors; - } - - public String[] getAfterRayTraceSuperiors() - { - return afterRayTraceSuperiors; - } - - public String[] getAfterRayTraceInferiors() - { - return afterRayTraceInferiors; - } - - public void setBeforeRayTraceSuperiors(String[] value) - { - beforeRayTraceSuperiors = value; - } - - public void setBeforeRayTraceInferiors(String[] value) - { - beforeRayTraceInferiors = value; - } - - public void setOverrideRayTraceSuperiors(String[] value) - { - overrideRayTraceSuperiors = value; - } - - public void setOverrideRayTraceInferiors(String[] value) - { - overrideRayTraceInferiors = value; - } - - public void setAfterRayTraceSuperiors(String[] value) - { - afterRayTraceSuperiors = value; - } - - public void setAfterRayTraceInferiors(String[] value) - { - afterRayTraceInferiors = value; - } - - public String[] getBeforeReadEntityFromNBTSuperiors() - { - return beforeReadEntityFromNBTSuperiors; - } - - public String[] getBeforeReadEntityFromNBTInferiors() - { - return beforeReadEntityFromNBTInferiors; - } - - public String[] getOverrideReadEntityFromNBTSuperiors() - { - return overrideReadEntityFromNBTSuperiors; - } - - public String[] getOverrideReadEntityFromNBTInferiors() - { - return overrideReadEntityFromNBTInferiors; - } - - public String[] getAfterReadEntityFromNBTSuperiors() - { - return afterReadEntityFromNBTSuperiors; - } - - public String[] getAfterReadEntityFromNBTInferiors() - { - return afterReadEntityFromNBTInferiors; - } - - public void setBeforeReadEntityFromNBTSuperiors(String[] value) - { - beforeReadEntityFromNBTSuperiors = value; - } - - public void setBeforeReadEntityFromNBTInferiors(String[] value) - { - beforeReadEntityFromNBTInferiors = value; - } - - public void setOverrideReadEntityFromNBTSuperiors(String[] value) - { - overrideReadEntityFromNBTSuperiors = value; - } - - public void setOverrideReadEntityFromNBTInferiors(String[] value) - { - overrideReadEntityFromNBTInferiors = value; - } - - public void setAfterReadEntityFromNBTSuperiors(String[] value) - { - afterReadEntityFromNBTSuperiors = value; - } - - public void setAfterReadEntityFromNBTInferiors(String[] value) - { - afterReadEntityFromNBTInferiors = value; - } - - public String[] getBeforeRespawnPlayerSuperiors() - { - return beforeRespawnPlayerSuperiors; - } - - public String[] getBeforeRespawnPlayerInferiors() - { - return beforeRespawnPlayerInferiors; - } - - public String[] getOverrideRespawnPlayerSuperiors() - { - return overrideRespawnPlayerSuperiors; - } - - public String[] getOverrideRespawnPlayerInferiors() - { - return overrideRespawnPlayerInferiors; - } - - public String[] getAfterRespawnPlayerSuperiors() - { - return afterRespawnPlayerSuperiors; - } - - public String[] getAfterRespawnPlayerInferiors() - { - return afterRespawnPlayerInferiors; - } - - public void setBeforeRespawnPlayerSuperiors(String[] value) - { - beforeRespawnPlayerSuperiors = value; - } - - public void setBeforeRespawnPlayerInferiors(String[] value) - { - beforeRespawnPlayerInferiors = value; - } - - public void setOverrideRespawnPlayerSuperiors(String[] value) - { - overrideRespawnPlayerSuperiors = value; - } - - public void setOverrideRespawnPlayerInferiors(String[] value) - { - overrideRespawnPlayerInferiors = value; - } - - public void setAfterRespawnPlayerSuperiors(String[] value) - { - afterRespawnPlayerSuperiors = value; - } - - public void setAfterRespawnPlayerInferiors(String[] value) - { - afterRespawnPlayerInferiors = value; - } - - public String[] getBeforeSetDeadSuperiors() - { - return beforeSetDeadSuperiors; - } - - public String[] getBeforeSetDeadInferiors() - { - return beforeSetDeadInferiors; - } - - public String[] getOverrideSetDeadSuperiors() - { - return overrideSetDeadSuperiors; - } - - public String[] getOverrideSetDeadInferiors() - { - return overrideSetDeadInferiors; - } - - public String[] getAfterSetDeadSuperiors() - { - return afterSetDeadSuperiors; - } - - public String[] getAfterSetDeadInferiors() - { - return afterSetDeadInferiors; - } - - public void setBeforeSetDeadSuperiors(String[] value) - { - beforeSetDeadSuperiors = value; - } - - public void setBeforeSetDeadInferiors(String[] value) - { - beforeSetDeadInferiors = value; - } - - public void setOverrideSetDeadSuperiors(String[] value) - { - overrideSetDeadSuperiors = value; - } - - public void setOverrideSetDeadInferiors(String[] value) - { - overrideSetDeadInferiors = value; - } - - public void setAfterSetDeadSuperiors(String[] value) - { - afterSetDeadSuperiors = value; - } - - public void setAfterSetDeadInferiors(String[] value) - { - afterSetDeadInferiors = value; - } - - public String[] getBeforeSetPlayerSPHealthSuperiors() - { - return beforeSetPlayerSPHealthSuperiors; - } - - public String[] getBeforeSetPlayerSPHealthInferiors() - { - return beforeSetPlayerSPHealthInferiors; - } - - public String[] getOverrideSetPlayerSPHealthSuperiors() - { - return overrideSetPlayerSPHealthSuperiors; - } - - public String[] getOverrideSetPlayerSPHealthInferiors() - { - return overrideSetPlayerSPHealthInferiors; - } - - public String[] getAfterSetPlayerSPHealthSuperiors() - { - return afterSetPlayerSPHealthSuperiors; - } - - public String[] getAfterSetPlayerSPHealthInferiors() - { - return afterSetPlayerSPHealthInferiors; - } - - public void setBeforeSetPlayerSPHealthSuperiors(String[] value) - { - beforeSetPlayerSPHealthSuperiors = value; - } - - public void setBeforeSetPlayerSPHealthInferiors(String[] value) - { - beforeSetPlayerSPHealthInferiors = value; - } - - public void setOverrideSetPlayerSPHealthSuperiors(String[] value) - { - overrideSetPlayerSPHealthSuperiors = value; - } - - public void setOverrideSetPlayerSPHealthInferiors(String[] value) - { - overrideSetPlayerSPHealthInferiors = value; - } - - public void setAfterSetPlayerSPHealthSuperiors(String[] value) - { - afterSetPlayerSPHealthSuperiors = value; - } - - public void setAfterSetPlayerSPHealthInferiors(String[] value) - { - afterSetPlayerSPHealthInferiors = value; - } - - public String[] getBeforeSetPositionAndRotationSuperiors() - { - return beforeSetPositionAndRotationSuperiors; - } - - public String[] getBeforeSetPositionAndRotationInferiors() - { - return beforeSetPositionAndRotationInferiors; - } - - public String[] getOverrideSetPositionAndRotationSuperiors() - { - return overrideSetPositionAndRotationSuperiors; - } - - public String[] getOverrideSetPositionAndRotationInferiors() - { - return overrideSetPositionAndRotationInferiors; - } - - public String[] getAfterSetPositionAndRotationSuperiors() - { - return afterSetPositionAndRotationSuperiors; - } - - public String[] getAfterSetPositionAndRotationInferiors() - { - return afterSetPositionAndRotationInferiors; - } - - public void setBeforeSetPositionAndRotationSuperiors(String[] value) - { - beforeSetPositionAndRotationSuperiors = value; - } - - public void setBeforeSetPositionAndRotationInferiors(String[] value) - { - beforeSetPositionAndRotationInferiors = value; - } - - public void setOverrideSetPositionAndRotationSuperiors(String[] value) - { - overrideSetPositionAndRotationSuperiors = value; - } - - public void setOverrideSetPositionAndRotationInferiors(String[] value) - { - overrideSetPositionAndRotationInferiors = value; - } - - public void setAfterSetPositionAndRotationSuperiors(String[] value) - { - afterSetPositionAndRotationSuperiors = value; - } - - public void setAfterSetPositionAndRotationInferiors(String[] value) - { - afterSetPositionAndRotationInferiors = value; - } - - public String[] getBeforeSetSneakingSuperiors() - { - return beforeSetSneakingSuperiors; - } - - public String[] getBeforeSetSneakingInferiors() - { - return beforeSetSneakingInferiors; - } - - public String[] getOverrideSetSneakingSuperiors() - { - return overrideSetSneakingSuperiors; - } - - public String[] getOverrideSetSneakingInferiors() - { - return overrideSetSneakingInferiors; - } - - public String[] getAfterSetSneakingSuperiors() - { - return afterSetSneakingSuperiors; - } - - public String[] getAfterSetSneakingInferiors() - { - return afterSetSneakingInferiors; - } - - public void setBeforeSetSneakingSuperiors(String[] value) - { - beforeSetSneakingSuperiors = value; - } - - public void setBeforeSetSneakingInferiors(String[] value) - { - beforeSetSneakingInferiors = value; - } - - public void setOverrideSetSneakingSuperiors(String[] value) - { - overrideSetSneakingSuperiors = value; - } - - public void setOverrideSetSneakingInferiors(String[] value) - { - overrideSetSneakingInferiors = value; - } - - public void setAfterSetSneakingSuperiors(String[] value) - { - afterSetSneakingSuperiors = value; - } - - public void setAfterSetSneakingInferiors(String[] value) - { - afterSetSneakingInferiors = value; - } - - public String[] getBeforeSetSprintingSuperiors() - { - return beforeSetSprintingSuperiors; - } - - public String[] getBeforeSetSprintingInferiors() - { - return beforeSetSprintingInferiors; - } - - public String[] getOverrideSetSprintingSuperiors() - { - return overrideSetSprintingSuperiors; - } - - public String[] getOverrideSetSprintingInferiors() - { - return overrideSetSprintingInferiors; - } - - public String[] getAfterSetSprintingSuperiors() - { - return afterSetSprintingSuperiors; - } - - public String[] getAfterSetSprintingInferiors() - { - return afterSetSprintingInferiors; - } - - public void setBeforeSetSprintingSuperiors(String[] value) - { - beforeSetSprintingSuperiors = value; - } - - public void setBeforeSetSprintingInferiors(String[] value) - { - beforeSetSprintingInferiors = value; - } - - public void setOverrideSetSprintingSuperiors(String[] value) - { - overrideSetSprintingSuperiors = value; - } - - public void setOverrideSetSprintingInferiors(String[] value) - { - overrideSetSprintingInferiors = value; - } - - public void setAfterSetSprintingSuperiors(String[] value) - { - afterSetSprintingSuperiors = value; - } - - public void setAfterSetSprintingInferiors(String[] value) - { - afterSetSprintingInferiors = value; - } - - public String[] getBeforeSleepInBedAtSuperiors() - { - return beforeSleepInBedAtSuperiors; - } - - public String[] getBeforeSleepInBedAtInferiors() - { - return beforeSleepInBedAtInferiors; - } - - public String[] getOverrideSleepInBedAtSuperiors() - { - return overrideSleepInBedAtSuperiors; - } - - public String[] getOverrideSleepInBedAtInferiors() - { - return overrideSleepInBedAtInferiors; - } - - public String[] getAfterSleepInBedAtSuperiors() - { - return afterSleepInBedAtSuperiors; - } - - public String[] getAfterSleepInBedAtInferiors() - { - return afterSleepInBedAtInferiors; - } - - public void setBeforeSleepInBedAtSuperiors(String[] value) - { - beforeSleepInBedAtSuperiors = value; - } - - public void setBeforeSleepInBedAtInferiors(String[] value) - { - beforeSleepInBedAtInferiors = value; - } - - public void setOverrideSleepInBedAtSuperiors(String[] value) - { - overrideSleepInBedAtSuperiors = value; - } - - public void setOverrideSleepInBedAtInferiors(String[] value) - { - overrideSleepInBedAtInferiors = value; - } - - public void setAfterSleepInBedAtSuperiors(String[] value) - { - afterSleepInBedAtSuperiors = value; - } - - public void setAfterSleepInBedAtInferiors(String[] value) - { - afterSleepInBedAtInferiors = value; - } - - public String[] getBeforeSwingItemSuperiors() - { - return beforeSwingItemSuperiors; - } - - public String[] getBeforeSwingItemInferiors() - { - return beforeSwingItemInferiors; - } - - public String[] getOverrideSwingItemSuperiors() - { - return overrideSwingItemSuperiors; - } - - public String[] getOverrideSwingItemInferiors() - { - return overrideSwingItemInferiors; - } - - public String[] getAfterSwingItemSuperiors() - { - return afterSwingItemSuperiors; - } - - public String[] getAfterSwingItemInferiors() - { - return afterSwingItemInferiors; - } - - public void setBeforeSwingItemSuperiors(String[] value) - { - beforeSwingItemSuperiors = value; - } - - public void setBeforeSwingItemInferiors(String[] value) - { - beforeSwingItemInferiors = value; - } - - public void setOverrideSwingItemSuperiors(String[] value) - { - overrideSwingItemSuperiors = value; - } - - public void setOverrideSwingItemInferiors(String[] value) - { - overrideSwingItemInferiors = value; - } - - public void setAfterSwingItemSuperiors(String[] value) - { - afterSwingItemSuperiors = value; - } - - public void setAfterSwingItemInferiors(String[] value) - { - afterSwingItemInferiors = value; - } - - public String[] getBeforeUpdateEntityActionStateSuperiors() - { - return beforeUpdateEntityActionStateSuperiors; - } - - public String[] getBeforeUpdateEntityActionStateInferiors() - { - return beforeUpdateEntityActionStateInferiors; - } - - public String[] getOverrideUpdateEntityActionStateSuperiors() - { - return overrideUpdateEntityActionStateSuperiors; - } - - public String[] getOverrideUpdateEntityActionStateInferiors() - { - return overrideUpdateEntityActionStateInferiors; - } - - public String[] getAfterUpdateEntityActionStateSuperiors() - { - return afterUpdateEntityActionStateSuperiors; - } - - public String[] getAfterUpdateEntityActionStateInferiors() - { - return afterUpdateEntityActionStateInferiors; - } - - public void setBeforeUpdateEntityActionStateSuperiors(String[] value) - { - beforeUpdateEntityActionStateSuperiors = value; - } - - public void setBeforeUpdateEntityActionStateInferiors(String[] value) - { - beforeUpdateEntityActionStateInferiors = value; - } - - public void setOverrideUpdateEntityActionStateSuperiors(String[] value) - { - overrideUpdateEntityActionStateSuperiors = value; - } - - public void setOverrideUpdateEntityActionStateInferiors(String[] value) - { - overrideUpdateEntityActionStateInferiors = value; - } - - public void setAfterUpdateEntityActionStateSuperiors(String[] value) - { - afterUpdateEntityActionStateSuperiors = value; - } - - public void setAfterUpdateEntityActionStateInferiors(String[] value) - { - afterUpdateEntityActionStateInferiors = value; - } - - public String[] getBeforeUpdateRiddenSuperiors() - { - return beforeUpdateRiddenSuperiors; - } - - public String[] getBeforeUpdateRiddenInferiors() - { - return beforeUpdateRiddenInferiors; - } - - public String[] getOverrideUpdateRiddenSuperiors() - { - return overrideUpdateRiddenSuperiors; - } - - public String[] getOverrideUpdateRiddenInferiors() - { - return overrideUpdateRiddenInferiors; - } - - public String[] getAfterUpdateRiddenSuperiors() - { - return afterUpdateRiddenSuperiors; - } - - public String[] getAfterUpdateRiddenInferiors() - { - return afterUpdateRiddenInferiors; - } - - public void setBeforeUpdateRiddenSuperiors(String[] value) - { - beforeUpdateRiddenSuperiors = value; - } - - public void setBeforeUpdateRiddenInferiors(String[] value) - { - beforeUpdateRiddenInferiors = value; - } - - public void setOverrideUpdateRiddenSuperiors(String[] value) - { - overrideUpdateRiddenSuperiors = value; - } - - public void setOverrideUpdateRiddenInferiors(String[] value) - { - overrideUpdateRiddenInferiors = value; - } - - public void setAfterUpdateRiddenSuperiors(String[] value) - { - afterUpdateRiddenSuperiors = value; - } - - public void setAfterUpdateRiddenInferiors(String[] value) - { - afterUpdateRiddenInferiors = value; - } - - public String[] getBeforeWakeUpPlayerSuperiors() - { - return beforeWakeUpPlayerSuperiors; - } - - public String[] getBeforeWakeUpPlayerInferiors() - { - return beforeWakeUpPlayerInferiors; - } - - public String[] getOverrideWakeUpPlayerSuperiors() - { - return overrideWakeUpPlayerSuperiors; - } - - public String[] getOverrideWakeUpPlayerInferiors() - { - return overrideWakeUpPlayerInferiors; - } - - public String[] getAfterWakeUpPlayerSuperiors() - { - return afterWakeUpPlayerSuperiors; - } - - public String[] getAfterWakeUpPlayerInferiors() - { - return afterWakeUpPlayerInferiors; - } - - public void setBeforeWakeUpPlayerSuperiors(String[] value) - { - beforeWakeUpPlayerSuperiors = value; - } - - public void setBeforeWakeUpPlayerInferiors(String[] value) - { - beforeWakeUpPlayerInferiors = value; - } - - public void setOverrideWakeUpPlayerSuperiors(String[] value) - { - overrideWakeUpPlayerSuperiors = value; - } - - public void setOverrideWakeUpPlayerInferiors(String[] value) - { - overrideWakeUpPlayerInferiors = value; - } - - public void setAfterWakeUpPlayerSuperiors(String[] value) - { - afterWakeUpPlayerSuperiors = value; - } - - public void setAfterWakeUpPlayerInferiors(String[] value) - { - afterWakeUpPlayerInferiors = value; - } - - public String[] getBeforeWriteEntityToNBTSuperiors() - { - return beforeWriteEntityToNBTSuperiors; - } - - public String[] getBeforeWriteEntityToNBTInferiors() - { - return beforeWriteEntityToNBTInferiors; - } - - public String[] getOverrideWriteEntityToNBTSuperiors() - { - return overrideWriteEntityToNBTSuperiors; - } - - public String[] getOverrideWriteEntityToNBTInferiors() - { - return overrideWriteEntityToNBTInferiors; - } - - public String[] getAfterWriteEntityToNBTSuperiors() - { - return afterWriteEntityToNBTSuperiors; - } - - public String[] getAfterWriteEntityToNBTInferiors() - { - return afterWriteEntityToNBTInferiors; - } - - public void setBeforeWriteEntityToNBTSuperiors(String[] value) - { - beforeWriteEntityToNBTSuperiors = value; - } - - public void setBeforeWriteEntityToNBTInferiors(String[] value) - { - beforeWriteEntityToNBTInferiors = value; - } - - public void setOverrideWriteEntityToNBTSuperiors(String[] value) - { - overrideWriteEntityToNBTSuperiors = value; - } - - public void setOverrideWriteEntityToNBTInferiors(String[] value) - { - overrideWriteEntityToNBTInferiors = value; - } - - public void setAfterWriteEntityToNBTSuperiors(String[] value) - { - afterWriteEntityToNBTSuperiors = value; - } - - public void setAfterWriteEntityToNBTInferiors(String[] value) - { - afterWriteEntityToNBTInferiors = value; - } - -} diff --git a/src/main/java/api/player/client/ClientPlayerClassVisitor.java b/src/main/java/api/player/client/ClientPlayerClassVisitor.java deleted file mode 100644 index 34499351..00000000 --- a/src/main/java/api/player/client/ClientPlayerClassVisitor.java +++ /dev/null @@ -1,5400 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -import java.io.*; - -import org.objectweb.asm.*; - -public final class ClientPlayerClassVisitor extends ClassVisitor -{ - public static final String targetClassName = "net.minecraft.client.entity.EntityPlayerSP"; - - private boolean hadLocalAddExhaustion; - private boolean hadLocalAddMovementStat; - private boolean hadLocalAddStat; - private boolean hadLocalAttackEntityFrom; - private boolean hadLocalAttackTargetEntityWithCurrentItem; - private boolean hadLocalCanBreatheUnderwater; - private boolean hadLocalCanHarvestBlock; - private boolean hadLocalCanPlayerEdit; - private boolean hadLocalCanTriggerWalking; - private boolean hadLocalCloseScreen; - private boolean hadLocalDamageEntity; - private boolean hadLocalDisplayGUIBrewingStand; - private boolean hadLocalDisplayGUIChest; - private boolean hadLocalDisplayGUIDispenser; - private boolean hadLocalDisplayGUIEditSign; - private boolean hadLocalDisplayGUIEnchantment; - private boolean hadLocalDisplayGUIFurnace; - private boolean hadLocalDisplayGUIWorkbench; - private boolean hadLocalDropOneItem; - private boolean hadLocalDropPlayerItem; - private boolean hadLocalDropPlayerItemWithRandomChoice; - private boolean hadLocalFall; - private boolean hadLocalGetAIMoveSpeed; - private boolean hadLocalGetBedOrientationInDegrees; - private boolean hadLocalGetBrightness; - private boolean hadLocalGetBrightnessForRender; - private boolean hadLocalGetCurrentPlayerStrVsBlock; - private boolean hadLocalGetCurrentPlayerStrVsBlockForge; - private boolean hadLocalGetDistanceSq; - private boolean hadLocalGetDistanceSqToEntity; - private boolean hadLocalGetFOVMultiplier; - private boolean hadLocalGetHurtSound; - private boolean hadLocalGetItemIcon; - private boolean hadLocalGetSleepTimer; - private boolean hadLocalHandleLavaMovement; - private boolean hadLocalHandleWaterMovement; - private boolean hadLocalHeal; - private boolean hadLocalIsEntityInsideOpaqueBlock; - private boolean hadLocalIsInWater; - private boolean hadLocalIsInsideOfMaterial; - private boolean hadLocalIsOnLadder; - private boolean hadLocalIsPlayerSleeping; - private boolean hadLocalIsSneaking; - private boolean hadLocalIsSprinting; - private boolean hadLocalJump; - private boolean hadLocalKnockBack; - private boolean hadLocalMoveEntity; - private boolean hadLocalMoveEntityWithHeading; - private boolean hadLocalMoveFlying; - private boolean hadLocalOnDeath; - private boolean hadLocalOnLivingUpdate; - private boolean hadLocalOnKillEntity; - private boolean hadLocalOnStruckByLightning; - private boolean hadLocalOnUpdate; - private boolean hadLocalPlayStepSound; - private boolean hadLocalPushOutOfBlocks; - private boolean hadLocalRayTrace; - private boolean hadLocalReadEntityFromNBT; - private boolean hadLocalRespawnPlayer; - private boolean hadLocalSetDead; - private boolean hadLocalSetPlayerSPHealth; - private boolean hadLocalSetPositionAndRotation; - private boolean hadLocalSetSneaking; - private boolean hadLocalSetSprinting; - private boolean hadLocalSleepInBedAt; - private boolean hadLocalSwingItem; - private boolean hadLocalUpdateEntityActionState; - private boolean hadLocalUpdateRidden; - private boolean hadLocalWakeUpPlayer; - private boolean hadLocalWriteEntityToNBT; - - public static byte[] transform(byte[] bytes, boolean isObfuscated) - { - try - { - ByteArrayInputStream in = new ByteArrayInputStream(bytes); - ClassReader cr = new ClassReader(in); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - ClientPlayerClassVisitor p = new ClientPlayerClassVisitor(cw, isObfuscated); - - cr.accept(p, 0); - - byte[] result = cw.toByteArray(); - in.close(); - return result; - } - catch(IOException ioe) - { - throw new RuntimeException(ioe); - } - } - - private final boolean isObfuscated; - - public ClientPlayerClassVisitor(ClassVisitor classVisitor, boolean isObfuscated) - { - super(262144, classVisitor); - this.isObfuscated = isObfuscated; - } - - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - { - String[] newInterfaces = new String[interfaces.length + 1]; - for(int i=0; i")) - return new ClientPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated); - - if(name.equals(isObfuscated ? "a" : "addExhaustion") && desc.equals("(F)V")) - { - hadLocalAddExhaustion = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExhaustion", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "k" : "addMovementStat") && desc.equals("(DDD)V")) - { - hadLocalAddMovementStat = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddMovementStat", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "addStat") && desc.equals(isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V")) - { - hadLocalAddStat = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddStat", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "attackEntityFrom") && desc.equals(isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z")) - { - hadLocalAttackEntityFrom = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackEntityFrom", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "r" : "attackEntityPlayerSPEntityWithCurrentItem") && desc.equals(isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V")) - { - hadLocalAttackTargetEntityWithCurrentItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackTargetEntityWithCurrentItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aE" : "canBreatheUnderwater") && desc.equals("()Z")) - { - hadLocalCanBreatheUnderwater = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanBreatheUnderwater", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "canHarvestBlock") && desc.equals(isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z")) - { - hadLocalCanHarvestBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanHarvestBlock", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "canPlayerEdit") && desc.equals(isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z")) - { - hadLocalCanPlayerEdit = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanPlayerEdit", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "g_" : "canTriggerWalking") && desc.equals("()Z")) - { - hadLocalCanTriggerWalking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanTriggerWalking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "k" : "closeScreen") && desc.equals("()V")) - { - hadLocalCloseScreen = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCloseScreen", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "damageEntity") && desc.equals(isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V")) - { - hadLocalDamageEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDamageEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146098_a") && desc.equals(isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V")) - { - hadLocalDisplayGUIBrewingStand = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIBrewingStand", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "displayGUIChest") && desc.equals(isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V")) - { - hadLocalDisplayGUIChest = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIChest", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146102_a") && desc.equals(isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V")) - { - hadLocalDisplayGUIDispenser = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIDispenser", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146100_a") && desc.equals(isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V")) - { - hadLocalDisplayGUIEditSign = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIEditSign", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "displayGUIEnchantment") && desc.equals("(IIILjava/lang/String;)V")) - { - hadLocalDisplayGUIEnchantment = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIEnchantment", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146101_a") && desc.equals(isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V")) - { - hadLocalDisplayGUIFurnace = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIFurnace", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "displayGUIWorkbench") && desc.equals("(III)V")) - { - hadLocalDisplayGUIWorkbench = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIWorkbench", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "dropOneItem") && desc.equals(isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;")) - { - hadLocalDropOneItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropOneItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "dropPlayerItemWithRandomChoice") && desc.equals(isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;")) - { - hadLocalDropPlayerItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146097_a") && desc.equals(isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;")) - { - hadLocalDropPlayerItemWithRandomChoice = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItemWithRandomChoice", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "fall") && desc.equals("(F)V")) - { - hadLocalFall = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localFall", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bl" : "getAIMoveSpeed") && desc.equals("()F")) - { - hadLocalGetAIMoveSpeed = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetAIMoveSpeed", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bK" : "getBedOrientationInDegrees") && desc.equals("()F")) - { - hadLocalGetBedOrientationInDegrees = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBedOrientationInDegrees", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "getBrightness") && desc.equals("(F)F")) - { - hadLocalGetBrightness = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightness", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "c" : "getBrightnessForRender") && desc.equals("(F)I")) - { - hadLocalGetBrightnessForRender = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightnessForRender", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getCurrentPlayerStrVsBlock") && desc.equals(isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F")) - { - hadLocalGetCurrentPlayerStrVsBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlock", desc, signature, exceptions); - } - - if(name.equals("getBreakSpeed") && desc.equals(isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F")) - { - hadLocalGetCurrentPlayerStrVsBlockForge = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlockForge", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "getDistanceSq") && desc.equals("(DDD)D")) - { - hadLocalGetDistanceSq = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSq", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "f" : "getDistanceSqToEntity") && desc.equals(isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D")) - { - hadLocalGetDistanceSqToEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSqToEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "t" : "getFOVMultiplier") && desc.equals("()F")) - { - hadLocalGetFOVMultiplier = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetFOVMultiplier", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aT" : "getHurtSound") && desc.equals("()Ljava/lang/String;")) - { - hadLocalGetHurtSound = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetHurtSound", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "getItemIcon") && desc.equals(isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;")) - { - hadLocalGetItemIcon = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetItemIcon", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bM" : "getSleepTimer") && desc.equals("()I")) - { - hadLocalGetSleepTimer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetSleepTimer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "P" : "handleLavaMovement") && desc.equals("()Z")) - { - hadLocalHandleLavaMovement = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleLavaMovement", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "N" : "handleWaterMovement") && desc.equals("()Z")) - { - hadLocalHandleWaterMovement = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleWaterMovement", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "f" : "heal") && desc.equals("(F)V")) - { - hadLocalHeal = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHeal", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aa" : "isEntityInsideOpaqueBlock") && desc.equals("()Z")) - { - hadLocalIsEntityInsideOpaqueBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsEntityInsideOpaqueBlock", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "M" : "isInWater") && desc.equals("()Z")) - { - hadLocalIsInWater = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInWater", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "isInsideOfMaterial") && desc.equals(isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z")) - { - hadLocalIsInsideOfMaterial = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInsideOfMaterial", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "h_" : "isOnLadder") && desc.equals("()Z")) - { - hadLocalIsOnLadder = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsOnLadder", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bm" : "isPlayerSleeping") && desc.equals("()Z")) - { - hadLocalIsPlayerSleeping = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsPlayerSleeping", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "an" : "isSneaking") && desc.equals("()Z")) - { - hadLocalIsSneaking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSneaking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "ao" : "isSprinting") && desc.equals("()Z")) - { - hadLocalIsSprinting = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSprinting", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bj" : "jump") && desc.equals("()V")) - { - hadLocalJump = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localJump", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "knockBack") && desc.equals(isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V")) - { - hadLocalKnockBack = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localKnockBack", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "moveEntity") && desc.equals("(DDD)V")) - { - hadLocalMoveEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "moveEntityWithHeading") && desc.equals("(FF)V")) - { - hadLocalMoveEntityWithHeading = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntityWithHeading", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "moveFlying") && desc.equals("(FFF)V")) - { - hadLocalMoveFlying = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveFlying", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onDeath") && desc.equals(isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V")) - { - hadLocalOnDeath = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnDeath", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "onLivingUpdate") && desc.equals("()V")) - { - hadLocalOnLivingUpdate = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnLivingUpdate", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onKillEntity") && desc.equals(isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V")) - { - hadLocalOnKillEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnKillEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onStruckByLightning") && desc.equals(isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V")) - { - hadLocalOnStruckByLightning = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnStruckByLightning", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "h" : "onUpdate") && desc.equals("()V")) - { - hadLocalOnUpdate = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdate", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_145780_a") && desc.equals(isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V")) - { - hadLocalPlayStepSound = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPlayStepSound", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "j" : "func_145771_j") && desc.equals("(DDD)Z")) - { - hadLocalPushOutOfBlocks = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPushOutOfBlocks", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "rayTrace") && desc.equals(isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;")) - { - hadLocalRayTrace = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRayTrace", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "readEntityFromNBT") && desc.equals(isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V")) - { - hadLocalReadEntityFromNBT = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localReadEntityFromNBT", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bH" : "respawnPlayer") && desc.equals("()V")) - { - hadLocalRespawnPlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRespawnPlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "B" : "setDead") && desc.equals("()V")) - { - hadLocalSetDead = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetDead", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "n" : "setPlayerSPHealth") && desc.equals("(F)V")) - { - hadLocalSetPlayerSPHealth = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPlayerSPHealth", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setPositionAndRotation") && desc.equals("(DDDFF)V")) - { - hadLocalSetPositionAndRotation = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPositionAndRotation", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "setSneaking") && desc.equals("(Z)V")) - { - hadLocalSetSneaking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSneaking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "c" : "setSprinting") && desc.equals("(Z)V")) - { - hadLocalSetSprinting = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSprinting", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "sleepInBedAt") && desc.equals(isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;")) - { - hadLocalSleepInBedAt = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSleepInBedAt", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "ba" : "swingItem") && desc.equals("()V")) - { - hadLocalSwingItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSwingItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bq" : "updateEntityActionState") && desc.equals("()V")) - { - hadLocalUpdateEntityActionState = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateEntityActionState", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "ab" : "updateRidden") && desc.equals("()V")) - { - hadLocalUpdateRidden = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateRidden", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "wakeUpPlayer") && desc.equals("(ZZZ)V")) - { - hadLocalWakeUpPlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWakeUpPlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "writeEntityToNBT") && desc.equals(isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V")) - { - hadLocalWriteEntityToNBT = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWriteEntityToNBT", desc, signature, exceptions); - } - - return super.visitMethod(access, name, desc, signature, exceptions); - } - - public void visitEnd() - { - MethodVisitor mv; - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "addExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "addExhaustion", "(Lapi/player/client/IClientPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddExhaustion) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "k" : "addMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "addMovementStat", "(Lapi/player/client/IClientPlayerAPI;DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddMovementStat) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "addStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "addStat", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lph;I" : "Lnet/minecraft/stats/StatBase;I") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "addStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "addStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddStat) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "addStat", "" + (isObfuscated ? "(Lph;I)V" : "(Lnet/minecraft/stats/StatBase;I)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "attackEntityFrom", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lro;F" : "Lnet/minecraft/util/DamageSource;F") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAttackEntityFrom) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "r" : "attackEntityPlayerSPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "attackTargetEntityWithCurrentItem", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "r" : "attackEntityPlayerSPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "r" : "attackEntityPlayerSPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAttackTargetEntityWithCurrentItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "r" : "attackEntityPlayerSPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aE" : "canBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "canBreatheUnderwater", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanBreatheUnderwater) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "canHarvestBlock", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Laji;" : "Lnet/minecraft/block/Block;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanHarvestBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "canPlayerEdit", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "IIIILadd;" : "IIIILnet/minecraft/item/ItemStack;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanPlayerEdit) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "g_" : "canTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "canTriggerWalking", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanTriggerWalking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "k" : "closeScreen", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "closeScreen", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCloseScreen", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "k" : "closeScreen", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCloseScreen", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "k" : "closeScreen", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCloseScreen) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCloseScreen", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "k" : "closeScreen", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "damageEntity", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lro;F" : "Lnet/minecraft/util/DamageSource;F") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDamageEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146098_a", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIBrewingStand", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Laov;" : "Lnet/minecraft/tileentity/TileEntityBrewingStand;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIBrewingStand", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_146098_a", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIBrewingStand", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146098_a", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIBrewingStand) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIBrewingStand", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146098_a", "" + (isObfuscated ? "(Laov;)V" : "(Lnet/minecraft/tileentity/TileEntityBrewingStand;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIChest", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lrb;" : "Lnet/minecraft/inventory/IInventory;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIChest) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIDispenser", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lapb;" : "Lnet/minecraft/tileentity/TileEntityDispenser;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIDispenser) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146100_a", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIEditSign", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Laor;" : "Lnet/minecraft/tileentity/TileEntity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIEditSign", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_146100_a", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIEditSign", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146100_a", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIEditSign) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIEditSign", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146100_a", "" + (isObfuscated ? "(Laor;)V" : "(Lnet/minecraft/tileentity/TileEntity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "displayGUIEnchantment", "(IIILjava/lang/String;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIEnchantment", "(Lapi/player/client/IClientPlayerAPI;IIILjava/lang/String;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIEnchantment", "(IIILjava/lang/String;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "displayGUIEnchantment", "(IIILjava/lang/String;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIEnchantment", "(IIILjava/lang/String;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "displayGUIEnchantment", "(IIILjava/lang/String;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIEnchantment) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIEnchantment", "(IIILjava/lang/String;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "displayGUIEnchantment", "(IIILjava/lang/String;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIFurnace", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lapg;" : "Lnet/minecraft/tileentity/TileEntityFurnace;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIFurnace) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "displayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "displayGUIWorkbench", "(Lapi/player/client/IClientPlayerAPI;III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIWorkbench) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "dropOneItem", "(Lapi/player/client/IClientPlayerAPI;Z)" + (isObfuscated ? "Lxk;" : "Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDropOneItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "dropPlayerItem", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Ladd;Z" : "Lnet/minecraft/item/ItemStack;Z") + ")" + (isObfuscated ? "Lxk;" : "Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDropPlayerItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146097_a", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "dropPlayerItemWithRandomChoice", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Ladd;ZZ" : "Lnet/minecraft/item/ItemStack;ZZ") + ")" + (isObfuscated ? "Lxk;" : "Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_146097_a", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146097_a", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDropPlayerItemWithRandomChoice) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_146097_a", "" + (isObfuscated ? "(Ladd;ZZ)Lxk;" : "(Lnet/minecraft/item/ItemStack;ZZ)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "fall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "fall", "(Lapi/player/client/IClientPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalFall) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bl" : "getAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getAIMoveSpeed", "(Lapi/player/client/IClientPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetAIMoveSpeed) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bK" : "getBedOrientationInDegrees", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getBedOrientationInDegrees", "(Lapi/player/client/IClientPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetBedOrientationInDegrees", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bK" : "getBedOrientationInDegrees", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetBedOrientationInDegrees", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bK" : "getBedOrientationInDegrees", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetBedOrientationInDegrees) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBedOrientationInDegrees", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bK" : "getBedOrientationInDegrees", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "getBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getBrightness", "(Lapi/player/client/IClientPlayerAPI;F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetBrightness) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "c" : "getBrightnessForRender", "(F)I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getBrightnessForRender", "(Lapi/player/client/IClientPlayerAPI;F)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetBrightnessForRender", "(F)I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "c" : "getBrightnessForRender", "(F)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetBrightnessForRender", "(F)I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "c" : "getBrightnessForRender", "(F)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetBrightnessForRender) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightnessForRender", "(F)I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "c" : "getBrightnessForRender", "(F)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getCurrentPlayerStrVsBlock", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Laji;Z" : "Lnet/minecraft/block/Block;Z") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetCurrentPlayerStrVsBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getCurrentPlayerStrVsBlockForge", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Laji;ZI" : "Lnet/minecraft/block/Block;ZI") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetCurrentPlayerStrVsBlockForge) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "getDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getDistanceSq", "(Lapi/player/client/IClientPlayerAPI;DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetDistanceSq) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "f" : "getDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getDistanceSqToEntity", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;") + ")D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "f" : "getDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + ""); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "f" : "getDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + ""); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetDistanceSqToEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "f" : "getDistanceSqToEntity", "" + (isObfuscated ? "(Lsa;)D" : "(Lnet/minecraft/entity/Entity;)D") + ""); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "t" : "getFOVMultiplier", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getFOVMultiplier", "(Lapi/player/client/IClientPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetFOVMultiplier", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "t" : "getFOVMultiplier", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetFOVMultiplier", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "t" : "getFOVMultiplier", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetFOVMultiplier) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetFOVMultiplier", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "t" : "getFOVMultiplier", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aT" : "getHurtSound", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getHurtSound", "(Lapi/player/client/IClientPlayerAPI;)Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetHurtSound", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aT" : "getHurtSound", "()Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetHurtSound", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aT" : "getHurtSound", "()Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetHurtSound) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetHurtSound", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aT" : "getHurtSound", "()Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "getItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getItemIcon", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Ladd;I" : "Lnet/minecraft/item/ItemStack;I") + ")" + (isObfuscated ? "Lrf;" : "Lnet/minecraft/util/IIcon;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "b" : "getItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "getItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetItemIcon) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "getItemIcon", "" + (isObfuscated ? "(Ladd;I)Lrf;" : "(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bM" : "getSleepTimer", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getSleepTimer", "(Lapi/player/client/IClientPlayerAPI;)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetSleepTimer", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bM" : "getSleepTimer", "()I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetSleepTimer", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bM" : "getSleepTimer", "()I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetSleepTimer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetSleepTimer", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bM" : "getSleepTimer", "()I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "P" : "handleLavaMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "handleLavaMovement", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realHandleLavaMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "P" : "handleLavaMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superHandleLavaMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "P" : "handleLavaMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalHandleLavaMovement) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleLavaMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "P" : "handleLavaMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "N" : "handleWaterMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "handleWaterMovement", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realHandleWaterMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "N" : "handleWaterMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superHandleWaterMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "N" : "handleWaterMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalHandleWaterMovement) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleWaterMovement", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "N" : "handleWaterMovement", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "f" : "heal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "heal", "(Lapi/player/client/IClientPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalHeal) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isEntityInsideOpaqueBlock", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsEntityInsideOpaqueBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "M" : "isInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isInWater", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsInWater) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isInsideOfMaterial", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lawt;" : "Lnet/minecraft/block/material/Material;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsInsideOfMaterial) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "h_" : "isOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isOnLadder", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsOnLadder) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bm" : "isPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isPlayerSleeping", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsPlayerSleeping) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "an" : "isSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isSneaking", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsSneaking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "ao" : "isSprinting", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "isSprinting", "(Lapi/player/client/IClientPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsSprinting", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ao" : "isSprinting", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsSprinting", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ao" : "isSprinting", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsSprinting) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSprinting", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ao" : "isSprinting", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bj" : "jump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "jump", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalJump) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "knockBack", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lsa;FDD" : "Lnet/minecraft/entity/Entity;FDD") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalKnockBack) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "moveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "moveEntity", "(Lapi/player/client/IClientPlayerAPI;DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "moveEntityWithHeading", "(Lapi/player/client/IClientPlayerAPI;FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveEntityWithHeading) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "moveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "moveFlying", "(Lapi/player/client/IClientPlayerAPI;FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveFlying) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "onDeath", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lro;" : "Lnet/minecraft/util/DamageSource;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnDeath) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "onLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "onLivingUpdate", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnLivingUpdate) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "onKillEntity", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lsv;" : "Lnet/minecraft/entity/EntityLivingBase;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnKillEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "onStruckByLightning", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Lxh;" : "Lnet/minecraft/entity/effect/EntityLightningBolt;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnStruckByLightning) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "h" : "onUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "onUpdate", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnUpdate) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_145780_a", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "playStepSound", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "IIILaji;" : "IIILnet/minecraft/block/Block;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realPlayStepSound", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "func_145780_a", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superPlayStepSound", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_145780_a", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalPlayStepSound) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPlayStepSound", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "func_145780_a", "" + (isObfuscated ? "(IIILaji;)V" : "(IIILnet/minecraft/block/Block;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "j" : "func_145771_j", "(DDD)Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "pushOutOfBlocks", "(Lapi/player/client/IClientPlayerAPI;DDD)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realPushOutOfBlocks", "(DDD)Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "j" : "func_145771_j", "(DDD)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superPushOutOfBlocks", "(DDD)Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "j" : "func_145771_j", "(DDD)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalPushOutOfBlocks) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPushOutOfBlocks", "(DDD)Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "j" : "func_145771_j", "(DDD)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "rayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "rayTrace", "(Lapi/player/client/IClientPlayerAPI;DF)" + (isObfuscated ? "Lazu;" : "Lnet/minecraft/util/MovingObjectPosition;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "rayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "rayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRayTrace) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "rayTrace", "" + (isObfuscated ? "(DF)Lazu;" : "(DF)Lnet/minecraft/util/MovingObjectPosition;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "readEntityFromNBT", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Ldh;" : "Lnet/minecraft/nbt/NBTTagCompound;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalReadEntityFromNBT) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bH" : "respawnPlayer", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "respawnPlayer", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRespawnPlayer", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bH" : "respawnPlayer", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRespawnPlayer", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bH" : "respawnPlayer", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRespawnPlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRespawnPlayer", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bH" : "respawnPlayer", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "B" : "setDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "setDead", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetDead) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "n" : "setPlayerSPHealth", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "setPlayerSPHealth", "(Lapi/player/client/IClientPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetPlayerSPHealth", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "n" : "setPlayerSPHealth", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetPlayerSPHealth", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "n" : "setPlayerSPHealth", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetPlayerSPHealth) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPlayerSPHealth", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "n" : "setPlayerSPHealth", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setPositionAndRotation", "(DDDFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "setPositionAndRotation", "(Lapi/player/client/IClientPlayerAPI;DDDFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetPositionAndRotation", "(DDDFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "setPositionAndRotation", "(DDDFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetPositionAndRotation", "(DDDFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "setPositionAndRotation", "(DDDFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetPositionAndRotation) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPositionAndRotation", "(DDDFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "setPositionAndRotation", "(DDDFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "setSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "setSneaking", "(Lapi/player/client/IClientPlayerAPI;Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetSneaking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "c" : "setSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "setSprinting", "(Lapi/player/client/IClientPlayerAPI;Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetSprinting) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "sleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "sleepInBedAt", "(Lapi/player/client/IClientPlayerAPI;III)" + (isObfuscated ? "Lza;" : "Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "sleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "sleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSleepInBedAt) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "sleepInBedAt", "" + (isObfuscated ? "(III)Lza;" : "(III)Lnet/minecraft/entity/player/EntityPlayer$EnumStatus;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "ba" : "swingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "swingItem", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSwingItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bq" : "updateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "updateEntityActionState", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdateEntityActionState) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "ab" : "updateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "updateRidden", "(Lapi/player/client/IClientPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdateRidden) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "wakeUpPlayer", "(Lapi/player/client/IClientPlayerAPI;ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalWakeUpPlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "writeEntityToNBT", "(Lapi/player/client/IClientPlayerAPI;" + (isObfuscated ? "Ldh;" : "Lnet/minecraft/nbt/NBTTagCompound;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalWriteEntityToNBT) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAddedToChunkField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ag" : "addedToChunk", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAddedToChunkField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ag" : "addedToChunk", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getArrowHitTimerField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "av" : "arrowHitTimer", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setArrowHitTimerField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "av" : "arrowHitTimer", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aB" : "attackTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aB" : "attackTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackedAtYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "az" : "attackedAtYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackedAtYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "az" : "attackedAtYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackingPlayerField", isObfuscated ? "()Lyz;" : "()Lnet/minecraft/entity/player/EntityPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aR" : "attackingPlayer", isObfuscated ? "Lyz;" : "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackingPlayerField", isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aR" : "attackingPlayer", isObfuscated ? "Lyz;" : "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBoundingBoxField", isObfuscated ? "()Lazt;" : "()Lnet/minecraft/util/AxisAlignedBB;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "C" : "boundingBox", isObfuscated ? "Lazt;" : "Lnet/minecraft/util/AxisAlignedBB;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCameraPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aJ" : "cameraPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCameraPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aJ" : "cameraPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCameraYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bs" : "cameraYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCameraYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bs" : "cameraYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCapabilitiesField", isObfuscated ? "()Lyw;" : "()Lnet/minecraft/entity/player/PlayerCapabilities;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bE" : "capabilities", isObfuscated ? "Lyw;" : "Lnet/minecraft/entity/player/PlayerCapabilities;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCapabilitiesField", isObfuscated ? "(Lyw;)V" : "(Lnet/minecraft/entity/player/PlayerCapabilities;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bE" : "capabilities", isObfuscated ? "Lyw;" : "Lnet/minecraft/entity/player/PlayerCapabilities;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordXField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ah" : "chunkCoordX", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordXField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ah" : "chunkCoordX", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordYField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ai" : "chunkCoordY", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordYField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ai" : "chunkCoordY", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordZField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aj" : "chunkCoordZ", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordZField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aj" : "chunkCoordZ", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDataWatcherField", isObfuscated ? "()Lte;" : "()Lnet/minecraft/entity/DataWatcher;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "af" : "dataWatcher", isObfuscated ? "Lte;" : "Lnet/minecraft/entity/DataWatcher;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDataWatcherField", isObfuscated ? "(Lte;)V" : "(Lnet/minecraft/entity/DataWatcher;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "af" : "dataWatcher", isObfuscated ? "Lte;" : "Lnet/minecraft/entity/DataWatcher;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDeadField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aT" : "dead", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDeadField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aT" : "dead", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDeathTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aA" : "deathTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDeathTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aA" : "deathTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDimensionField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ap" : "dimension", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDimensionField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ap" : "dimension", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDistanceWalkedModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "P" : "distanceWalkedModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDistanceWalkedModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "P" : "distanceWalkedModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDistanceWalkedOnStepModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Q" : "distanceWalkedOnStepModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDistanceWalkedOnStepModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Q" : "distanceWalkedOnStepModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityAgeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aU" : "entityAge", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityAgeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aU" : "entityAge", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityCollisionReductionField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Y" : "entityCollisionReduction", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityCollisionReductionField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Y" : "entityCollisionReduction", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityUniqueIDField", "()Ljava/util/UUID;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ar" : "entityUniqueID", "Ljava/util/UUID;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityUniqueIDField", "(Ljava/util/UUID;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ar" : "entityUniqueID", "Ljava/util/UUID;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bH" : "experience", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bH" : "experience", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceLevelField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bF" : "experienceLevel", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceLevelField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bF" : "experienceLevel", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceTotalField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bG" : "experienceTotal", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceTotalField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bG" : "experienceTotal", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFallDistanceField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "R" : "fallDistance", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFallDistanceField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "R" : "fallDistance", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_110154_aXField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aW" : "field_110154_aX", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_110154_aXField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aW" : "field_110154_aX", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70135_KField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "J" : "field_70135_K", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70135_KField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "J" : "field_70135_K", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70741_aBField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aZ" : "field_70741_aB", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70741_aBField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aZ" : "field_70741_aB", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70763_axField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aY" : "field_70763_ax", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70763_axField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aY" : "field_70763_ax", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70764_awField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aX" : "field_70764_aw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70764_awField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aX" : "field_70764_aw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70768_auField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aV" : "field_70768_au", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70768_auField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aV" : "field_70768_au", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70769_aoField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aK" : "field_70769_ao", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70769_aoField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aK" : "field_70769_ao", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70770_apField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aL" : "field_70770_ap", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70770_apField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aL" : "field_70770_ap", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71079_bUField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bC" : "field_71079_bU", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71079_bUField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bC" : "field_71079_bU", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71082_cxField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "cc" : "field_71082_cx", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71082_cxField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "cc" : "field_71082_cx", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71085_bRField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bz" : "field_71085_bR", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71085_bRField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bz" : "field_71085_bR", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71089_bVField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bD" : "field_71089_bV", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71089_bVField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bD" : "field_71089_bV", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71091_bMField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bu" : "field_71091_bM", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71091_bMField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bu" : "field_71091_bM", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71094_bPField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bx" : "field_71094_bP", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71094_bPField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bx" : "field_71094_bP", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71095_bQField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "by" : "field_71095_bQ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71095_bQField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "by" : "field_71095_bQ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71096_bNField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bv" : "field_71096_bN", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71096_bNField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bv" : "field_71096_bN", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71097_bOField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bw" : "field_71097_bO", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71097_bOField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bw" : "field_71097_bO", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71160_ciField", isObfuscated ? "()Lqm;" : "()Lnet/minecraft/util/MouseFilter;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bT" : "field_71160_ci", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71160_ciField", isObfuscated ? "(Lqm;)V" : "(Lnet/minecraft/util/MouseFilter;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bT" : "field_71160_ci", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71161_cjField", isObfuscated ? "()Lqm;" : "()Lnet/minecraft/util/MouseFilter;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bU" : "field_71161_cj", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71161_cjField", isObfuscated ? "(Lqm;)V" : "(Lnet/minecraft/util/MouseFilter;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bU" : "field_71161_cj", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71162_chField", isObfuscated ? "()Lqm;" : "()Lnet/minecraft/util/MouseFilter;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bS" : "field_71162_ch", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71162_chField", isObfuscated ? "(Lqm;)V" : "(Lnet/minecraft/util/MouseFilter;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bS" : "field_71162_ch", isObfuscated ? "Lqm;" : "Lnet/minecraft/util/MouseFilter;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFireResistanceField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ab" : "fireResistance", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFireResistanceField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ab" : "fireResistance", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFishEntityField", isObfuscated ? "()Lxe;" : "()Lnet/minecraft/entity/projectile/EntityFishHook;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bK" : "fishEntity", isObfuscated ? "Lxe;" : "Lnet/minecraft/entity/projectile/EntityFishHook;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFishEntityField", isObfuscated ? "(Lxe;)V" : "(Lnet/minecraft/entity/projectile/EntityFishHook;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bK" : "fishEntity", isObfuscated ? "Lxe;" : "Lnet/minecraft/entity/projectile/EntityFishHook;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFlyToggleTimerField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bq" : "flyToggleTimer", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFlyToggleTimerField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bq" : "flyToggleTimer", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFoodStatsField", isObfuscated ? "()Lzr;" : "()Lnet/minecraft/util/FoodStats;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bp" : "foodStats", isObfuscated ? "Lzr;" : "Lnet/minecraft/util/FoodStats;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFoodStatsField", isObfuscated ? "(Lzr;)V" : "(Lnet/minecraft/util/FoodStats;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bp" : "foodStats", isObfuscated ? "Lzr;" : "Lnet/minecraft/util/FoodStats;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getForceSpawnField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "n" : "forceSpawn", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setForceSpawnField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "n" : "forceSpawn", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHeightField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "N" : "height", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHeightField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "N" : "height", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHorseJumpPowerField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bO" : "horseJumpPower", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHorseJumpPowerField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bO" : "horseJumpPower", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHorseJumpPowerCounterField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "horseJumpPowerCounter", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHorseJumpPowerCounterField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "a" : "horseJumpPowerCounter", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHurtResistantTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ad" : "hurtResistantTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHurtResistantTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ad" : "hurtResistantTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHurtTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ax" : "hurtTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHurtTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ax" : "hurtTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIgnoreFrustumCheckField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ak" : "ignoreFrustumCheck", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIgnoreFrustumCheckField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ak" : "ignoreFrustumCheck", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInPortalField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "an" : "inPortal", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInPortalField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "an" : "inPortal", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInWaterField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ac" : "inWater", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInWaterField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ac" : "inWater", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInventoryField", isObfuscated ? "()Lyx;" : "()Lnet/minecraft/entity/player/InventoryPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bm" : "inventory", isObfuscated ? "Lyx;" : "Lnet/minecraft/entity/player/InventoryPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInventoryField", isObfuscated ? "(Lyx;)V" : "(Lnet/minecraft/entity/player/InventoryPlayer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bm" : "inventory", isObfuscated ? "Lyx;" : "Lnet/minecraft/entity/player/InventoryPlayer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInventoryContainerField", isObfuscated ? "()Lzs;" : "()Lnet/minecraft/inventory/Container;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bn" : "inventoryContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInventoryContainerField", isObfuscated ? "(Lzs;)V" : "(Lnet/minecraft/inventory/Container;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bn" : "inventoryContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsAirBorneField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "al" : "isAirBorne", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsAirBorneField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "al" : "isAirBorne", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "G" : "isCollided", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "G" : "isCollided", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedHorizontallyField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "E" : "isCollidedHorizontally", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedHorizontallyField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "E" : "isCollidedHorizontally", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedVerticallyField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "F" : "isCollidedVertically", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedVerticallyField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "F" : "isCollidedVertically", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsDeadField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "K" : "isDead", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsDeadField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "K" : "isDead", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsImmuneToFireField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ae" : "isImmuneToFire", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsImmuneToFireField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ae" : "isImmuneToFire", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsInWebField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "I" : "isInWeb", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsInWebField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "I" : "isInWeb", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsJumpingField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bc" : "isJumping", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsJumpingField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bc" : "isJumping", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsSwingInProgressField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "at" : "isSwingInProgress", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsSwingInProgressField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "at" : "isSwingInProgress", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getJumpMovementFactorField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aQ" : "jumpMovementFactor", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setJumpMovementFactorField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aQ" : "jumpMovementFactor", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastDamageField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bb" : "lastDamage", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastDamageField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bb" : "lastDamage", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "S" : "lastTickPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "S" : "lastTickPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "T" : "lastTickPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "T" : "lastTickPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "U" : "lastTickPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "U" : "lastTickPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLimbSwingField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aG" : "limbSwing", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLimbSwingField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aG" : "limbSwing", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLimbSwingAmountField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aF" : "limbSwingAmount", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLimbSwingAmountField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aF" : "limbSwingAmount", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMaxHurtResistantTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aH" : "maxHurtResistantTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMaxHurtResistantTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aH" : "maxHurtResistantTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMaxHurtTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ay" : "maxHurtTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMaxHurtTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ay" : "maxHurtTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMcField", isObfuscated ? "()Lbao;" : "()Lnet/minecraft/client/Minecraft;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "d" : "mc", isObfuscated ? "Lbao;" : "Lnet/minecraft/client/Minecraft;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMcField", isObfuscated ? "(Lbao;)V" : "(Lnet/minecraft/client/Minecraft;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "d" : "mc", isObfuscated ? "Lbao;" : "Lnet/minecraft/client/Minecraft;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "v" : "motionX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "v" : "motionX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "w" : "motionY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "w" : "motionY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "x" : "motionZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "x" : "motionZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMoveForwardField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "be" : "moveForward", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMoveForwardField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "be" : "moveForward", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMoveStrafingField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bd" : "moveStrafing", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMoveStrafingField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bd" : "moveStrafing", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMovementInputField", isObfuscated ? "()Lbli;" : "()Lnet/minecraft/util/MovementInput;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "c" : "movementInput", isObfuscated ? "Lbli;" : "Lnet/minecraft/util/MovementInput;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMovementInputField", isObfuscated ? "(Lbli;)V" : "(Lnet/minecraft/util/MovementInput;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "c" : "movementInput", isObfuscated ? "Lbli;" : "Lnet/minecraft/util/MovementInput;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMyEntitySizeField", isObfuscated ? "()Lse;" : "()Lnet/minecraft/entity/Entity$EnumEntitySize;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "as" : "myEntitySize", isObfuscated ? "Lse;" : "Lnet/minecraft/entity/Entity$EnumEntitySize;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMyEntitySizeField", isObfuscated ? "(Lse;)V" : "(Lnet/minecraft/entity/Entity$EnumEntitySize;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "as" : "myEntitySize", isObfuscated ? "Lse;" : "Lnet/minecraft/entity/Entity$EnumEntitySize;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosRotationIncrementsField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bg" : "newPosRotationIncrements", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosRotationIncrementsField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bg" : "newPosRotationIncrements", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bh" : "newPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bh" : "newPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bi" : "newPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bi" : "newPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bj" : "newPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bj" : "newPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewRotationPitchField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bl" : "newRotationPitch", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewRotationPitchField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bl" : "newRotationPitch", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewRotationYawField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bk" : "newRotationYaw", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewRotationYawField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bk" : "newRotationYaw", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNoClipField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "X" : "noClip", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNoClipField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "X" : "noClip", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getOnGroundField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "D" : "onGround", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setOnGroundField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "D" : "onGround", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getOpenContainerField", isObfuscated ? "()Lzs;" : "()Lnet/minecraft/inventory/Container;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bo" : "openContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setOpenContainerField", isObfuscated ? "(Lzs;)V" : "(Lnet/minecraft/inventory/Container;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bo" : "openContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPlayerLocationField", isObfuscated ? "()Lr;" : "()Lnet/minecraft/util/ChunkCoordinates;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bB" : "playerLocation", isObfuscated ? "Lr;" : "Lnet/minecraft/util/ChunkCoordinates;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPlayerLocationField", isObfuscated ? "(Lr;)V" : "(Lnet/minecraft/util/ChunkCoordinates;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bB" : "playerLocation", isObfuscated ? "Lr;" : "Lnet/minecraft/util/ChunkCoordinates;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPortalCounterField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ao" : "portalCounter", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPortalCounterField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ao" : "portalCounter", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "s" : "posX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "s" : "posX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "t" : "posY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "t" : "posY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "u" : "posZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "u" : "posZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevCameraPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aI" : "prevCameraPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevCameraPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aI" : "prevCameraPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevCameraYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "br" : "prevCameraYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevCameraYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "br" : "prevCameraYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevDistanceWalkedModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "O" : "prevDistanceWalkedModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevDistanceWalkedModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "O" : "prevDistanceWalkedModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevHealthField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aw" : "prevHealth", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevHealthField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aw" : "prevHealth", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevLimbSwingAmountField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aE" : "prevLimbSwingAmount", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevLimbSwingAmountField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aE" : "prevLimbSwingAmount", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "p" : "prevPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "p" : "prevPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "q" : "prevPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "q" : "prevPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "r" : "prevPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "r" : "prevPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRenderArmPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bL" : "prevRenderArmPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRenderArmPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bL" : "prevRenderArmPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRenderArmYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "i" : "prevRenderArmYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRenderArmYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "i" : "prevRenderArmYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRenderYawOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aN" : "prevRenderYawOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRenderYawOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aN" : "prevRenderYawOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "B" : "prevRotationPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "B" : "prevRotationPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "A" : "prevRotationYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "A" : "prevRotationYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationYawHeadField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aP" : "prevRotationYawHead", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationYawHeadField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aP" : "prevRotationYawHead", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevSwingProgressField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aC" : "prevSwingProgress", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevSwingProgressField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aC" : "prevSwingProgress", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevTimeInPortalField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bN" : "prevTimeInPortal", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevTimeInPortalField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bN" : "prevTimeInPortal", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPreventEntitySpawningField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "k" : "preventEntitySpawning", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPreventEntitySpawningField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "k" : "preventEntitySpawning", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRandField", "()Ljava/util/Random;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Z" : "rand", "Ljava/util/Random;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRandField", "(Ljava/util/Random;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "Z" : "rand", "Ljava/util/Random;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRandomYawVelocityField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bf" : "randomYawVelocity", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRandomYawVelocityField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bf" : "randomYawVelocity", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRecentlyHitField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aS" : "recentlyHit", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRecentlyHitField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aS" : "recentlyHit", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderArmPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "h" : "renderArmPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderArmPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "h" : "renderArmPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderArmYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "g" : "renderArmYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderArmYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "g" : "renderArmYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderDistanceWeightField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "j" : "renderDistanceWeight", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderDistanceWeightField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "j" : "renderDistanceWeight", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderYawOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aM" : "renderYawOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderYawOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aM" : "renderYawOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRiddenByEntityField", isObfuscated ? "()Lsa;" : "()Lnet/minecraft/entity/Entity;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "l" : "riddenByEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRiddenByEntityField", isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "l" : "riddenByEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRidingEntityField", isObfuscated ? "()Lsa;" : "()Lnet/minecraft/entity/Entity;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "m" : "ridingEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRidingEntityField", isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "m" : "ridingEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "z" : "rotationPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "z" : "rotationPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "y" : "rotationYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "y" : "rotationYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationYawHeadField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aO" : "rotationYawHead", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationYawHeadField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aO" : "rotationYawHead", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getScoreValueField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ba" : "scoreValue", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setScoreValueField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ba" : "scoreValue", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosXField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bZ" : "serverPosX", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosXField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bZ" : "serverPosX", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosYField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ca" : "serverPosY", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosYField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "ca" : "serverPosY", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosZField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "cb" : "serverPosZ", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosZField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "cb" : "serverPosZ", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSleepingField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bA" : "sleeping", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSleepingField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bA" : "sleeping", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSpeedInAirField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bJ" : "speedInAir", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSpeedInAirField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bJ" : "speedInAir", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSpeedOnGroundField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bI" : "speedOnGround", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSpeedOnGroundField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bI" : "speedOnGround", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSprintToggleTimerField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "e" : "sprintToggleTimer", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSprintToggleTimerField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "e" : "sprintToggleTimer", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSprintingTicksLeftField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "f" : "sprintingTicksLeft", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSprintingTicksLeftField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "f" : "sprintingTicksLeft", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getStepHeightField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "W" : "stepHeight", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setStepHeightField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "W" : "stepHeight", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSwingProgressField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aD" : "swingProgress", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSwingProgressField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aD" : "swingProgress", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSwingProgressIntField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "au" : "swingProgressInt", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSwingProgressIntField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "au" : "swingProgressInt", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTeleportDirectionField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aq" : "teleportDirection", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTeleportDirectionField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aq" : "teleportDirection", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTicksExistedField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aa" : "ticksExisted", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTicksExistedField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "aa" : "ticksExisted", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTimeInPortalField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bM" : "timeInPortal", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTimeInPortalField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bM" : "timeInPortal", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTimeUntilPortalField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "am" : "timeUntilPortal", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTimeUntilPortalField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "am" : "timeUntilPortal", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getVelocityChangedField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "H" : "velocityChanged", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setVelocityChangedField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "H" : "velocityChanged", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getWidthField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "M" : "width", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setWidthField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "M" : "width", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getWorldObjField", isObfuscated ? "()Lahb;" : "()Lnet/minecraft/world/World;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "o" : "worldObj", isObfuscated ? "Lahb;" : "Lnet/minecraft/world/World;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setWorldObjField", isObfuscated ? "(Lahb;)V" : "(Lnet/minecraft/world/World;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "o" : "worldObj", isObfuscated ? "Lahb;" : "Lnet/minecraft/world/World;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getXpCooldownField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bt" : "xpCooldown", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setXpCooldownField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "bt" : "xpCooldown", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getYOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "L" : "yOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setYOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "L" : "yOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getYSizeField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "V" : "ySize", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setYSizeField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", isObfuscated ? "V" : "ySize", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getClientPlayerBase", "(Ljava/lang/String;)Lapi/player/client/ClientPlayerBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getClientPlayerBase", "(Lapi/player/client/IClientPlayerAPI;Ljava/lang/String;)Lapi/player/client/ClientPlayerBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getClientPlayerBaseIds", "()Ljava/util/Set;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "getClientPlayerBaseIds", "(Lapi/player/client/IClientPlayerAPI;)Ljava/util/Set;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "dynamic", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "dynamic", "(Lapi/player/client/IClientPlayerAPI;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getClientPlayerAPI", "()Lapi/player/client/ClientPlayerAPI;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", "clientPlayerAPI", "Lapi/player/client/ClientPlayerAPI;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityPlayerSP", isObfuscated ? "()Lblk;" : "()Lnet/minecraft/client/entity/EntityPlayerSP;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - cv.visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_FINAL, "clientPlayerAPI", "Lapi/player/client/ClientPlayerAPI;", null, null); - } -} diff --git a/src/main/java/api/player/client/ClientPlayerConstructorVisitor.java b/src/main/java/api/player/client/ClientPlayerConstructorVisitor.java deleted file mode 100644 index 414c016e..00000000 --- a/src/main/java/api/player/client/ClientPlayerConstructorVisitor.java +++ /dev/null @@ -1,65 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -import org.objectweb.asm.*; - -public final class ClientPlayerConstructorVisitor extends MethodVisitor -{ - private final boolean isObfuscated; - - public ClientPlayerConstructorVisitor(MethodVisitor paramMethodVisitor, boolean isObfuscated) - { - super(262144, paramMethodVisitor); - this.isObfuscated = isObfuscated; - } - - public void visitMethodInsn(int opcode, String owner, String name, String desc) - { - super.visitMethodInsn(opcode, owner, name, desc); - if(name.equals("") && owner.equals(isObfuscated ? "blg" : "net/minecraft/client/entity/AbstractClientPlayer")) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "create", "(Lapi/player/client/IClientPlayerAPI;)Lapi/player/client/ClientPlayerAPI;"); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "blk" : "net/minecraft/client/entity/EntityPlayerSP", "clientPlayerAPI", "Lapi/player/client/ClientPlayerAPI;"); - - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.ALOAD, 1); - mv.visitIntInsn(Opcodes.ALOAD, 2); - mv.visitIntInsn(Opcodes.ALOAD, 3); - mv.visitIntInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "beforeLocalConstructing", "(Lapi/player/client/IClientPlayerAPI;Lnet/minecraft/client/Minecraft;Lnet/minecraft/world/World;Lnet/minecraft/util/Session;I)V"); - } - } - - public void visitInsn(int opcode) - { - if(opcode == Opcodes.RETURN) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.ALOAD, 1); - mv.visitIntInsn(Opcodes.ALOAD, 2); - mv.visitIntInsn(Opcodes.ALOAD, 3); - mv.visitIntInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/client/ClientPlayerAPI", "afterLocalConstructing", "(Lapi/player/client/IClientPlayerAPI;Lnet/minecraft/client/Minecraft;Lnet/minecraft/world/World;Lnet/minecraft/util/Session;I)V"); - } - super.visitInsn(opcode); - } -} diff --git a/src/main/java/api/player/client/IClientPlayer.java b/src/main/java/api/player/client/IClientPlayer.java deleted file mode 100644 index 9c50158c..00000000 --- a/src/main/java/api/player/client/IClientPlayer.java +++ /dev/null @@ -1,1047 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -public interface IClientPlayer -{ - ClientPlayerBase getClientPlayerBase(String baseId); - - java.util.Set getClientPlayerBaseIds(); - - Object dynamic(String key, Object[] parameters); - - void realAddExhaustion(float paramFloat); - - void superAddExhaustion(float paramFloat); - - void localAddExhaustion(float paramFloat); - - void realAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - void superAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - void localAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - void realAddStat(net.minecraft.stats.StatBase paramStatBase, int paramInt); - - void superAddStat(net.minecraft.stats.StatBase paramStatBase, int paramInt); - - void localAddStat(net.minecraft.stats.StatBase paramStatBase, int paramInt); - - boolean realAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - boolean superAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - boolean localAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void realAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - void superAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - void localAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - boolean realCanBreatheUnderwater(); - - boolean superCanBreatheUnderwater(); - - boolean localCanBreatheUnderwater(); - - boolean realCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean superCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean localCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean realCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean superCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean localCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean realCanTriggerWalking(); - - boolean superCanTriggerWalking(); - - boolean localCanTriggerWalking(); - - void realCloseScreen(); - - void superCloseScreen(); - - void localCloseScreen(); - - void realDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void superDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void localDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void realDisplayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand); - - void superDisplayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand); - - void localDisplayGUIBrewingStand(net.minecraft.tileentity.TileEntityBrewingStand paramTileEntityBrewingStand); - - void realDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void superDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void localDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void realDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void superDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void localDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void realDisplayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity); - - void superDisplayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity); - - void localDisplayGUIEditSign(net.minecraft.tileentity.TileEntity paramTileEntity); - - void realDisplayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString); - - void superDisplayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString); - - void localDisplayGUIEnchantment(int paramInt1, int paramInt2, int paramInt3, String paramString); - - void realDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void superDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void localDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void realDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - void superDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - void localDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - net.minecraft.entity.item.EntityItem realDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem superDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem localDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem realDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - net.minecraft.entity.item.EntityItem superDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - net.minecraft.entity.item.EntityItem localDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - net.minecraft.entity.item.EntityItem realDropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2); - - net.minecraft.entity.item.EntityItem superDropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2); - - net.minecraft.entity.item.EntityItem localDropPlayerItemWithRandomChoice(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean1, boolean paramBoolean2); - - void realFall(float paramFloat); - - void superFall(float paramFloat); - - void localFall(float paramFloat); - - float realGetAIMoveSpeed(); - - float superGetAIMoveSpeed(); - - float localGetAIMoveSpeed(); - - float realGetBedOrientationInDegrees(); - - float superGetBedOrientationInDegrees(); - - float localGetBedOrientationInDegrees(); - - float realGetBrightness(float paramFloat); - - float superGetBrightness(float paramFloat); - - float localGetBrightness(float paramFloat); - - int realGetBrightnessForRender(float paramFloat); - - int superGetBrightnessForRender(float paramFloat); - - int localGetBrightnessForRender(float paramFloat); - - float realGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float superGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float localGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float realGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - float superGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - float localGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - double realGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - double superGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - double localGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - double realGetDistanceSqToEntity(net.minecraft.entity.Entity paramEntity); - - double superGetDistanceSqToEntity(net.minecraft.entity.Entity paramEntity); - - double localGetDistanceSqToEntity(net.minecraft.entity.Entity paramEntity); - - float realGetFOVMultiplier(); - - float localGetFOVMultiplier(); - - java.lang.String realGetHurtSound(); - - java.lang.String superGetHurtSound(); - - java.lang.String localGetHurtSound(); - - net.minecraft.util.IIcon realGetItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt); - - net.minecraft.util.IIcon superGetItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt); - - net.minecraft.util.IIcon localGetItemIcon(net.minecraft.item.ItemStack paramItemStack, int paramInt); - - int realGetSleepTimer(); - - int superGetSleepTimer(); - - int localGetSleepTimer(); - - boolean realHandleLavaMovement(); - - boolean superHandleLavaMovement(); - - boolean localHandleLavaMovement(); - - boolean realHandleWaterMovement(); - - boolean superHandleWaterMovement(); - - boolean localHandleWaterMovement(); - - void realHeal(float paramFloat); - - void superHeal(float paramFloat); - - void localHeal(float paramFloat); - - boolean realIsEntityInsideOpaqueBlock(); - - boolean superIsEntityInsideOpaqueBlock(); - - boolean localIsEntityInsideOpaqueBlock(); - - boolean realIsInWater(); - - boolean superIsInWater(); - - boolean localIsInWater(); - - boolean realIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean superIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean localIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean realIsOnLadder(); - - boolean superIsOnLadder(); - - boolean localIsOnLadder(); - - boolean realIsPlayerSleeping(); - - boolean superIsPlayerSleeping(); - - boolean localIsPlayerSleeping(); - - boolean realIsSneaking(); - - boolean superIsSneaking(); - - boolean localIsSneaking(); - - boolean realIsSprinting(); - - boolean superIsSprinting(); - - boolean localIsSprinting(); - - void realJump(); - - void superJump(); - - void localJump(); - - void realKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void superKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void localKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void realMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void superMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void localMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void realMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void superMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void localMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void realMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void superMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void localMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void realOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void superOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void localOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void realOnLivingUpdate(); - - void superOnLivingUpdate(); - - void localOnLivingUpdate(); - - void realOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void superOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void localOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void realOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void superOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void localOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void realOnUpdate(); - - void superOnUpdate(); - - void localOnUpdate(); - - void realPlayStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock); - - void superPlayStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock); - - void localPlayStepSound(int paramInt1, int paramInt2, int paramInt3, net.minecraft.block.Block paramBlock); - - boolean realPushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3); - - boolean superPushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3); - - boolean localPushOutOfBlocks(double paramDouble1, double paramDouble2, double paramDouble3); - - net.minecraft.util.MovingObjectPosition realRayTrace(double paramDouble, float paramFloat); - - net.minecraft.util.MovingObjectPosition superRayTrace(double paramDouble, float paramFloat); - - net.minecraft.util.MovingObjectPosition localRayTrace(double paramDouble, float paramFloat); - - void realReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void superReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void localReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void realRespawnPlayer(); - - void superRespawnPlayer(); - - void localRespawnPlayer(); - - void realSetDead(); - - void superSetDead(); - - void localSetDead(); - - void realSetPlayerSPHealth(float paramFloat); - - void localSetPlayerSPHealth(float paramFloat); - - void realSetPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void superSetPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void localSetPositionAndRotation(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void realSetSneaking(boolean paramBoolean); - - void superSetSneaking(boolean paramBoolean); - - void localSetSneaking(boolean paramBoolean); - - void realSetSprinting(boolean paramBoolean); - - void superSetSprinting(boolean paramBoolean); - - void localSetSprinting(boolean paramBoolean); - - net.minecraft.entity.player.EntityPlayer.EnumStatus realSleepInBedAt(int paramInt1, int paramInt2, int paramInt3); - - net.minecraft.entity.player.EntityPlayer.EnumStatus superSleepInBedAt(int paramInt1, int paramInt2, int paramInt3); - - net.minecraft.entity.player.EntityPlayer.EnumStatus localSleepInBedAt(int paramInt1, int paramInt2, int paramInt3); - - void realSwingItem(); - - void superSwingItem(); - - void localSwingItem(); - - void realUpdateEntityActionState(); - - void superUpdateEntityActionState(); - - void localUpdateEntityActionState(); - - void realUpdateRidden(); - - void superUpdateRidden(); - - void localUpdateRidden(); - - void realWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void superWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void localWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void realWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void superWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void localWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - boolean getAddedToChunkField(); - - void setAddedToChunkField(boolean addedToChunk); - - int getArrowHitTimerField(); - - void setArrowHitTimerField(int arrowHitTimer); - - int getAttackTimeField(); - - void setAttackTimeField(int attackTime); - - float getAttackedAtYawField(); - - void setAttackedAtYawField(float attackedAtYaw); - - net.minecraft.entity.player.EntityPlayer getAttackingPlayerField(); - - void setAttackingPlayerField(net.minecraft.entity.player.EntityPlayer attackingPlayer); - - net.minecraft.util.AxisAlignedBB getBoundingBoxField(); - - float getCameraPitchField(); - - void setCameraPitchField(float cameraPitch); - - float getCameraYawField(); - - void setCameraYawField(float cameraYaw); - - net.minecraft.entity.player.PlayerCapabilities getCapabilitiesField(); - - void setCapabilitiesField(net.minecraft.entity.player.PlayerCapabilities capabilities); - - int getChunkCoordXField(); - - void setChunkCoordXField(int chunkCoordX); - - int getChunkCoordYField(); - - void setChunkCoordYField(int chunkCoordY); - - int getChunkCoordZField(); - - void setChunkCoordZField(int chunkCoordZ); - - net.minecraft.entity.DataWatcher getDataWatcherField(); - - void setDataWatcherField(net.minecraft.entity.DataWatcher dataWatcher); - - boolean getDeadField(); - - void setDeadField(boolean dead); - - int getDeathTimeField(); - - void setDeathTimeField(int deathTime); - - int getDimensionField(); - - void setDimensionField(int dimension); - - float getDistanceWalkedModifiedField(); - - void setDistanceWalkedModifiedField(float distanceWalkedModified); - - float getDistanceWalkedOnStepModifiedField(); - - void setDistanceWalkedOnStepModifiedField(float distanceWalkedOnStepModified); - - int getEntityAgeField(); - - void setEntityAgeField(int entityAge); - - float getEntityCollisionReductionField(); - - void setEntityCollisionReductionField(float entityCollisionReduction); - - java.util.UUID getEntityUniqueIDField(); - - void setEntityUniqueIDField(java.util.UUID entityUniqueID); - - float getExperienceField(); - - void setExperienceField(float experience); - - int getExperienceLevelField(); - - void setExperienceLevelField(int experienceLevel); - - int getExperienceTotalField(); - - void setExperienceTotalField(int experienceTotal); - - float getFallDistanceField(); - - void setFallDistanceField(float fallDistance); - - float getField_110154_aXField(); - - void setField_110154_aXField(float field_110154_aX); - - boolean getField_70135_KField(); - - void setField_70135_KField(boolean field_70135_K); - - float getField_70741_aBField(); - - void setField_70741_aBField(float field_70741_aB); - - float getField_70763_axField(); - - void setField_70763_axField(float field_70763_ax); - - float getField_70764_awField(); - - void setField_70764_awField(float field_70764_aw); - - float getField_70768_auField(); - - void setField_70768_auField(float field_70768_au); - - float getField_70769_aoField(); - - void setField_70769_aoField(float field_70769_ao); - - float getField_70770_apField(); - - void setField_70770_apField(float field_70770_ap); - - float getField_71079_bUField(); - - void setField_71079_bUField(float field_71079_bU); - - float getField_71082_cxField(); - - void setField_71082_cxField(float field_71082_cx); - - double getField_71085_bRField(); - - void setField_71085_bRField(double field_71085_bR); - - float getField_71089_bVField(); - - void setField_71089_bVField(float field_71089_bV); - - double getField_71091_bMField(); - - void setField_71091_bMField(double field_71091_bM); - - double getField_71094_bPField(); - - void setField_71094_bPField(double field_71094_bP); - - double getField_71095_bQField(); - - void setField_71095_bQField(double field_71095_bQ); - - double getField_71096_bNField(); - - void setField_71096_bNField(double field_71096_bN); - - double getField_71097_bOField(); - - void setField_71097_bOField(double field_71097_bO); - - net.minecraft.util.MouseFilter getField_71160_ciField(); - - void setField_71160_ciField(net.minecraft.util.MouseFilter field_71160_ci); - - net.minecraft.util.MouseFilter getField_71161_cjField(); - - void setField_71161_cjField(net.minecraft.util.MouseFilter field_71161_cj); - - net.minecraft.util.MouseFilter getField_71162_chField(); - - void setField_71162_chField(net.minecraft.util.MouseFilter field_71162_ch); - - int getFireResistanceField(); - - void setFireResistanceField(int fireResistance); - - net.minecraft.entity.projectile.EntityFishHook getFishEntityField(); - - void setFishEntityField(net.minecraft.entity.projectile.EntityFishHook fishEntity); - - int getFlyToggleTimerField(); - - void setFlyToggleTimerField(int flyToggleTimer); - - net.minecraft.util.FoodStats getFoodStatsField(); - - void setFoodStatsField(net.minecraft.util.FoodStats foodStats); - - boolean getForceSpawnField(); - - void setForceSpawnField(boolean forceSpawn); - - float getHeightField(); - - void setHeightField(float height); - - float getHorseJumpPowerField(); - - void setHorseJumpPowerField(float horseJumpPower); - - int getHorseJumpPowerCounterField(); - - void setHorseJumpPowerCounterField(int horseJumpPowerCounter); - - int getHurtResistantTimeField(); - - void setHurtResistantTimeField(int hurtResistantTime); - - int getHurtTimeField(); - - void setHurtTimeField(int hurtTime); - - boolean getIgnoreFrustumCheckField(); - - void setIgnoreFrustumCheckField(boolean ignoreFrustumCheck); - - boolean getInPortalField(); - - void setInPortalField(boolean inPortal); - - boolean getInWaterField(); - - void setInWaterField(boolean inWater); - - net.minecraft.entity.player.InventoryPlayer getInventoryField(); - - void setInventoryField(net.minecraft.entity.player.InventoryPlayer inventory); - - net.minecraft.inventory.Container getInventoryContainerField(); - - void setInventoryContainerField(net.minecraft.inventory.Container inventoryContainer); - - boolean getIsAirBorneField(); - - void setIsAirBorneField(boolean isAirBorne); - - boolean getIsCollidedField(); - - void setIsCollidedField(boolean isCollided); - - boolean getIsCollidedHorizontallyField(); - - void setIsCollidedHorizontallyField(boolean isCollidedHorizontally); - - boolean getIsCollidedVerticallyField(); - - void setIsCollidedVerticallyField(boolean isCollidedVertically); - - boolean getIsDeadField(); - - void setIsDeadField(boolean isDead); - - boolean getIsImmuneToFireField(); - - void setIsImmuneToFireField(boolean isImmuneToFire); - - boolean getIsInWebField(); - - void setIsInWebField(boolean isInWeb); - - boolean getIsJumpingField(); - - void setIsJumpingField(boolean isJumping); - - boolean getIsSwingInProgressField(); - - void setIsSwingInProgressField(boolean isSwingInProgress); - - float getJumpMovementFactorField(); - - void setJumpMovementFactorField(float jumpMovementFactor); - - float getLastDamageField(); - - void setLastDamageField(float lastDamage); - - double getLastTickPosXField(); - - void setLastTickPosXField(double lastTickPosX); - - double getLastTickPosYField(); - - void setLastTickPosYField(double lastTickPosY); - - double getLastTickPosZField(); - - void setLastTickPosZField(double lastTickPosZ); - - float getLimbSwingField(); - - void setLimbSwingField(float limbSwing); - - float getLimbSwingAmountField(); - - void setLimbSwingAmountField(float limbSwingAmount); - - int getMaxHurtResistantTimeField(); - - void setMaxHurtResistantTimeField(int maxHurtResistantTime); - - int getMaxHurtTimeField(); - - void setMaxHurtTimeField(int maxHurtTime); - - net.minecraft.client.Minecraft getMcField(); - - void setMcField(net.minecraft.client.Minecraft mc); - - double getMotionXField(); - - void setMotionXField(double motionX); - - double getMotionYField(); - - void setMotionYField(double motionY); - - double getMotionZField(); - - void setMotionZField(double motionZ); - - float getMoveForwardField(); - - void setMoveForwardField(float moveForward); - - float getMoveStrafingField(); - - void setMoveStrafingField(float moveStrafing); - - net.minecraft.util.MovementInput getMovementInputField(); - - void setMovementInputField(net.minecraft.util.MovementInput movementInput); - - net.minecraft.entity.Entity.EnumEntitySize getMyEntitySizeField(); - - void setMyEntitySizeField(net.minecraft.entity.Entity.EnumEntitySize myEntitySize); - - int getNewPosRotationIncrementsField(); - - void setNewPosRotationIncrementsField(int newPosRotationIncrements); - - double getNewPosXField(); - - void setNewPosXField(double newPosX); - - double getNewPosYField(); - - void setNewPosYField(double newPosY); - - double getNewPosZField(); - - void setNewPosZField(double newPosZ); - - double getNewRotationPitchField(); - - void setNewRotationPitchField(double newRotationPitch); - - double getNewRotationYawField(); - - void setNewRotationYawField(double newRotationYaw); - - boolean getNoClipField(); - - void setNoClipField(boolean noClip); - - boolean getOnGroundField(); - - void setOnGroundField(boolean onGround); - - net.minecraft.inventory.Container getOpenContainerField(); - - void setOpenContainerField(net.minecraft.inventory.Container openContainer); - - net.minecraft.util.ChunkCoordinates getPlayerLocationField(); - - void setPlayerLocationField(net.minecraft.util.ChunkCoordinates playerLocation); - - int getPortalCounterField(); - - void setPortalCounterField(int portalCounter); - - double getPosXField(); - - void setPosXField(double posX); - - double getPosYField(); - - void setPosYField(double posY); - - double getPosZField(); - - void setPosZField(double posZ); - - float getPrevCameraPitchField(); - - void setPrevCameraPitchField(float prevCameraPitch); - - float getPrevCameraYawField(); - - void setPrevCameraYawField(float prevCameraYaw); - - float getPrevDistanceWalkedModifiedField(); - - void setPrevDistanceWalkedModifiedField(float prevDistanceWalkedModified); - - float getPrevHealthField(); - - void setPrevHealthField(float prevHealth); - - float getPrevLimbSwingAmountField(); - - void setPrevLimbSwingAmountField(float prevLimbSwingAmount); - - double getPrevPosXField(); - - void setPrevPosXField(double prevPosX); - - double getPrevPosYField(); - - void setPrevPosYField(double prevPosY); - - double getPrevPosZField(); - - void setPrevPosZField(double prevPosZ); - - float getPrevRenderArmPitchField(); - - void setPrevRenderArmPitchField(float prevRenderArmPitch); - - float getPrevRenderArmYawField(); - - void setPrevRenderArmYawField(float prevRenderArmYaw); - - float getPrevRenderYawOffsetField(); - - void setPrevRenderYawOffsetField(float prevRenderYawOffset); - - float getPrevRotationPitchField(); - - void setPrevRotationPitchField(float prevRotationPitch); - - float getPrevRotationYawField(); - - void setPrevRotationYawField(float prevRotationYaw); - - float getPrevRotationYawHeadField(); - - void setPrevRotationYawHeadField(float prevRotationYawHead); - - float getPrevSwingProgressField(); - - void setPrevSwingProgressField(float prevSwingProgress); - - float getPrevTimeInPortalField(); - - void setPrevTimeInPortalField(float prevTimeInPortal); - - boolean getPreventEntitySpawningField(); - - void setPreventEntitySpawningField(boolean preventEntitySpawning); - - java.util.Random getRandField(); - - void setRandField(java.util.Random rand); - - float getRandomYawVelocityField(); - - void setRandomYawVelocityField(float randomYawVelocity); - - int getRecentlyHitField(); - - void setRecentlyHitField(int recentlyHit); - - float getRenderArmPitchField(); - - void setRenderArmPitchField(float renderArmPitch); - - float getRenderArmYawField(); - - void setRenderArmYawField(float renderArmYaw); - - double getRenderDistanceWeightField(); - - void setRenderDistanceWeightField(double renderDistanceWeight); - - float getRenderYawOffsetField(); - - void setRenderYawOffsetField(float renderYawOffset); - - net.minecraft.entity.Entity getRiddenByEntityField(); - - void setRiddenByEntityField(net.minecraft.entity.Entity riddenByEntity); - - net.minecraft.entity.Entity getRidingEntityField(); - - void setRidingEntityField(net.minecraft.entity.Entity ridingEntity); - - float getRotationPitchField(); - - void setRotationPitchField(float rotationPitch); - - float getRotationYawField(); - - void setRotationYawField(float rotationYaw); - - float getRotationYawHeadField(); - - void setRotationYawHeadField(float rotationYawHead); - - int getScoreValueField(); - - void setScoreValueField(int scoreValue); - - int getServerPosXField(); - - void setServerPosXField(int serverPosX); - - int getServerPosYField(); - - void setServerPosYField(int serverPosY); - - int getServerPosZField(); - - void setServerPosZField(int serverPosZ); - - boolean getSleepingField(); - - void setSleepingField(boolean sleeping); - - float getSpeedInAirField(); - - void setSpeedInAirField(float speedInAir); - - float getSpeedOnGroundField(); - - void setSpeedOnGroundField(float speedOnGround); - - int getSprintToggleTimerField(); - - void setSprintToggleTimerField(int sprintToggleTimer); - - int getSprintingTicksLeftField(); - - void setSprintingTicksLeftField(int sprintingTicksLeft); - - float getStepHeightField(); - - void setStepHeightField(float stepHeight); - - float getSwingProgressField(); - - void setSwingProgressField(float swingProgress); - - int getSwingProgressIntField(); - - void setSwingProgressIntField(int swingProgressInt); - - int getTeleportDirectionField(); - - void setTeleportDirectionField(int teleportDirection); - - int getTicksExistedField(); - - void setTicksExistedField(int ticksExisted); - - float getTimeInPortalField(); - - void setTimeInPortalField(float timeInPortal); - - int getTimeUntilPortalField(); - - void setTimeUntilPortalField(int timeUntilPortal); - - boolean getVelocityChangedField(); - - void setVelocityChangedField(boolean velocityChanged); - - float getWidthField(); - - void setWidthField(float width); - - net.minecraft.world.World getWorldObjField(); - - void setWorldObjField(net.minecraft.world.World worldObj); - - int getXpCooldownField(); - - void setXpCooldownField(int xpCooldown); - - float getYOffsetField(); - - void setYOffsetField(float yOffset); - - float getYSizeField(); - - void setYSizeField(float ySize); - -} diff --git a/src/main/java/api/player/client/IClientPlayerAPI.java b/src/main/java/api/player/client/IClientPlayerAPI.java deleted file mode 100644 index 5c2235ae..00000000 --- a/src/main/java/api/player/client/IClientPlayerAPI.java +++ /dev/null @@ -1,26 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.client; - -public interface IClientPlayerAPI extends IClientPlayer -{ - ClientPlayerAPI getClientPlayerAPI(); - - net.minecraft.client.entity.EntityPlayerSP getEntityPlayerSP(); -} diff --git a/src/main/java/api/player/forge/PlayerAPIContainer.java b/src/main/java/api/player/forge/PlayerAPIContainer.java deleted file mode 100644 index 8241ea4c..00000000 --- a/src/main/java/api/player/forge/PlayerAPIContainer.java +++ /dev/null @@ -1,50 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.forge; - -import java.util.*; -import com.google.common.eventbus.*; -import cpw.mods.fml.common.*; - -public class PlayerAPIContainer extends DummyModContainer -{ - public PlayerAPIContainer() - { - super(createMetadata()); - } - - public boolean registerBus(EventBus bus, LoadController controller) - { - return true; - } - - private static ModMetadata createMetadata() - { - ModMetadata meta = new ModMetadata(); - - meta.modId = "PlayerAPI"; - meta.name = "Player API"; - meta.version = PlayerAPIPlugin.Version; - meta.description = "Player API for Minecraft Forge"; - meta.url = "http://www.minecraftforum.net/topic/738498-"; - meta.authorList = Arrays.asList(new String[] { "Divisor" }); - - return meta; - } -} \ No newline at end of file diff --git a/src/main/java/api/player/forge/PlayerAPIPlugin.java b/src/main/java/api/player/forge/PlayerAPIPlugin.java deleted file mode 100644 index bab6e05a..00000000 --- a/src/main/java/api/player/forge/PlayerAPIPlugin.java +++ /dev/null @@ -1,57 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.forge; - -import java.util.*; - -import cpw.mods.fml.relauncher.*; - -@IFMLLoadingPlugin.MCVersion("1.7.10") -@IFMLLoadingPlugin.TransformerExclusions("api.player.forge") -public class PlayerAPIPlugin implements IFMLLoadingPlugin -{ - public static String Version = "1.4"; - - public static boolean isObfuscated; - - public String[] getASMTransformerClass() - { - return new String[] { "api.player.forge.PlayerAPITransformer" }; - } - - public String getModContainerClass() - { - return "api.player.forge.PlayerAPIContainer"; - } - - public String getSetupClass() - { - return null; - } - - public void injectData(Map data) - { - isObfuscated = (Boolean)data.get("runtimeDeobfuscationEnabled"); - } - - public String getAccessTransformerClass() - { - return null; - } -} diff --git a/src/main/java/api/player/forge/PlayerAPITransformer.java b/src/main/java/api/player/forge/PlayerAPITransformer.java deleted file mode 100644 index 71173474..00000000 --- a/src/main/java/api/player/forge/PlayerAPITransformer.java +++ /dev/null @@ -1,37 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.forge; - -import net.minecraft.launchwrapper.*; - -import api.player.client.*; -import api.player.server.*; - -public class PlayerAPITransformer implements IClassTransformer -{ - public byte[] transform(String name, String transformedName, byte[] bytes) - { - if(transformedName.equals(ClientPlayerClassVisitor.targetClassName)) - return ClientPlayerClassVisitor.transform(bytes, PlayerAPIPlugin.isObfuscated); - else if(transformedName.equals(ServerPlayerClassVisitor.targetClassName)) - return ServerPlayerClassVisitor.transform(bytes, PlayerAPIPlugin.isObfuscated); - else - return bytes; - } -} \ No newline at end of file diff --git a/src/main/java/api/player/forge/RenderPlayerAPIContainer.java b/src/main/java/api/player/forge/RenderPlayerAPIContainer.java deleted file mode 100644 index 25d70856..00000000 --- a/src/main/java/api/player/forge/RenderPlayerAPIContainer.java +++ /dev/null @@ -1,50 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.forge; - -import java.util.*; -import com.google.common.eventbus.*; -import cpw.mods.fml.common.*; - -public class RenderPlayerAPIContainer extends DummyModContainer -{ - public RenderPlayerAPIContainer() - { - super(createMetadata()); - } - - public boolean registerBus(EventBus bus, LoadController controller) - { - return true; - } - - private static ModMetadata createMetadata() - { - ModMetadata meta = new ModMetadata(); - - meta.modId = "RenderPlayerAPI"; - meta.name = "Render Player API"; - meta.version = RenderPlayerAPIPlugin.Version; - meta.description = "Render Player API for Minecraft Forge"; - meta.url = "http://www.minecraftforum.net/topic/1261354-"; - meta.authorList = Arrays.asList(new String[] { "Divisor" }); - - return meta; - } -} \ No newline at end of file diff --git a/src/main/java/api/player/forge/RenderPlayerAPIPlugin.java b/src/main/java/api/player/forge/RenderPlayerAPIPlugin.java deleted file mode 100644 index 64bf082a..00000000 --- a/src/main/java/api/player/forge/RenderPlayerAPIPlugin.java +++ /dev/null @@ -1,57 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.forge; - -import java.util.*; - -import cpw.mods.fml.relauncher.*; - -@IFMLLoadingPlugin.MCVersion("1.7.10") -@IFMLLoadingPlugin.TransformerExclusions("api.player.forge") -public class RenderPlayerAPIPlugin implements IFMLLoadingPlugin -{ - public static String Version = "1.4"; - - public static boolean isObfuscated; - - public String[] getASMTransformerClass() - { - return new String[] { "api.player.forge.RenderPlayerAPITransformer" }; - } - - public String getModContainerClass() - { - return "api.player.forge.RenderPlayerAPIContainer"; - } - - public String getSetupClass() - { - return null; - } - - public void injectData(Map data) - { - isObfuscated = (Boolean)data.get("runtimeDeobfuscationEnabled"); - } - - public String getAccessTransformerClass() - { - return null; - } -} \ No newline at end of file diff --git a/src/main/java/api/player/forge/RenderPlayerAPITransformer.java b/src/main/java/api/player/forge/RenderPlayerAPITransformer.java deleted file mode 100644 index 9a8505ab..00000000 --- a/src/main/java/api/player/forge/RenderPlayerAPITransformer.java +++ /dev/null @@ -1,50 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.forge; - -import java.util.*; - -import net.minecraft.launchwrapper.*; - -import api.player.model.*; -import api.player.render.*; - -public class RenderPlayerAPITransformer implements IClassTransformer -{ - public byte[] transform(String name, String transformedName, byte[] bytes) - { - if(transformedName.equals(RenderPlayerClassVisitor.targetClassName)) - { - Stack models = new Stack(); - models.push(ModelPlayerClassVisitor.deobfuscatedClassReference + ":armor"); - models.push(ModelPlayerClassVisitor.deobfuscatedClassReference + ":chestplate"); - models.push(ModelPlayerClassVisitor.deobfuscatedClassReference + ":main"); - - Map> renderConstructorReplacements = new Hashtable>(); - renderConstructorReplacements.put(ModelPlayerClassVisitor.obfuscatedSuperClassReference, models); - renderConstructorReplacements.put(ModelPlayerClassVisitor.deobfuscateSuperClassReference, models); - - return RenderPlayerClassVisitor.transform(bytes, RenderPlayerAPIPlugin.isObfuscated, renderConstructorReplacements); - } - else if(transformedName.equals(ModelPlayerClassVisitor.targetClassName)) - return ModelPlayerClassVisitor.transform(bytes, RenderPlayerAPIPlugin.isObfuscated); - else - return bytes; - } -} \ No newline at end of file diff --git a/src/main/java/api/player/model/IModelPlayer.java b/src/main/java/api/player/model/IModelPlayer.java deleted file mode 100644 index 5f796b82..00000000 --- a/src/main/java/api/player/model/IModelPlayer.java +++ /dev/null @@ -1,163 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -public interface IModelPlayer -{ - ModelPlayerBase getModelPlayerBase(String baseId); - - java.util.Set getModelPlayerBaseIds(); - - float getExpandParameter(); - - float getYOffsetParameter(); - - int getTextureWidthParameter(); - - int getTextureHeightParameter(); - - String getModelPlayerType(); - - Object dynamic(String key, Object[] parameters); - - net.minecraft.client.model.ModelRenderer realGetRandomModelBox(java.util.Random paramRandom); - - net.minecraft.client.model.ModelRenderer superGetRandomModelBox(java.util.Random paramRandom); - - net.minecraft.client.model.ModelRenderer localGetRandomModelBox(java.util.Random paramRandom); - - net.minecraft.client.model.TextureOffset realGetTextureOffset(String paramString); - - net.minecraft.client.model.TextureOffset superGetTextureOffset(String paramString); - - net.minecraft.client.model.TextureOffset localGetTextureOffset(String paramString); - - void realRender(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void superRender(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void localRender(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void realRenderCloak(float paramFloat); - - void superRenderCloak(float paramFloat); - - void localRenderCloak(float paramFloat); - - void realRenderEars(float paramFloat); - - void superRenderEars(float paramFloat); - - void localRenderEars(float paramFloat); - - void realSetLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3); - - void superSetLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3); - - void localSetLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3); - - void realSetRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity); - - void superSetRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity); - - void localSetRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity); - - void realSetTextureOffset(String paramString, int paramInt1, int paramInt2); - - void superSetTextureOffset(String paramString, int paramInt1, int paramInt2); - - void localSetTextureOffset(String paramString, int paramInt1, int paramInt2); - - boolean getAimedBowField(); - - void setAimedBowField(boolean aimedBow); - - net.minecraft.client.model.ModelRenderer getBipedBodyField(); - - void setBipedBodyField(net.minecraft.client.model.ModelRenderer bipedBody); - - net.minecraft.client.model.ModelRenderer getBipedCloakField(); - - void setBipedCloakField(net.minecraft.client.model.ModelRenderer bipedCloak); - - net.minecraft.client.model.ModelRenderer getBipedEarsField(); - - void setBipedEarsField(net.minecraft.client.model.ModelRenderer bipedEars); - - net.minecraft.client.model.ModelRenderer getBipedHeadField(); - - void setBipedHeadField(net.minecraft.client.model.ModelRenderer bipedHead); - - net.minecraft.client.model.ModelRenderer getBipedHeadwearField(); - - void setBipedHeadwearField(net.minecraft.client.model.ModelRenderer bipedHeadwear); - - net.minecraft.client.model.ModelRenderer getBipedLeftArmField(); - - void setBipedLeftArmField(net.minecraft.client.model.ModelRenderer bipedLeftArm); - - net.minecraft.client.model.ModelRenderer getBipedLeftLegField(); - - void setBipedLeftLegField(net.minecraft.client.model.ModelRenderer bipedLeftLeg); - - net.minecraft.client.model.ModelRenderer getBipedRightArmField(); - - void setBipedRightArmField(net.minecraft.client.model.ModelRenderer bipedRightArm); - - net.minecraft.client.model.ModelRenderer getBipedRightLegField(); - - void setBipedRightLegField(net.minecraft.client.model.ModelRenderer bipedRightLeg); - - java.util.List getBoxListField(); - - void setBoxListField(java.util.List boxList); - - int getHeldItemLeftField(); - - void setHeldItemLeftField(int heldItemLeft); - - int getHeldItemRightField(); - - void setHeldItemRightField(int heldItemRight); - - boolean getIsChildField(); - - void setIsChildField(boolean isChild); - - boolean getIsRidingField(); - - void setIsRidingField(boolean isRiding); - - boolean getIsSneakField(); - - void setIsSneakField(boolean isSneak); - - float getOnGroundField(); - - void setOnGroundField(float onGround); - - int getTextureHeightField(); - - void setTextureHeightField(int textureHeight); - - int getTextureWidthField(); - - void setTextureWidthField(int textureWidth); - -} diff --git a/src/main/java/api/player/model/IModelPlayerAPI.java b/src/main/java/api/player/model/IModelPlayerAPI.java deleted file mode 100644 index 76550170..00000000 --- a/src/main/java/api/player/model/IModelPlayerAPI.java +++ /dev/null @@ -1,26 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -public interface IModelPlayerAPI extends IModelPlayer -{ - ModelPlayerAPI getModelPlayerAPI(); - - api.player.model.ModelPlayer getModelPlayer(); -} diff --git a/src/main/java/api/player/model/ModelPlayer.java b/src/main/java/api/player/model/ModelPlayer.java deleted file mode 100644 index 7c2600c3..00000000 --- a/src/main/java/api/player/model/ModelPlayer.java +++ /dev/null @@ -1,37 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -public class ModelPlayer extends net.minecraft.client.model.ModelBiped -{ - public ModelPlayer() - { - this(0.0F); - } - - public ModelPlayer(float paramFloat) - { - this(paramFloat, 0.0F, 64, 32); - } - - public ModelPlayer(float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - super(paramFloat1, paramFloat2, paramInt1, paramInt2); - } -} \ No newline at end of file diff --git a/src/main/java/api/player/model/ModelPlayerAPI.java b/src/main/java/api/player/model/ModelPlayerAPI.java deleted file mode 100644 index 9f6b76d2..00000000 --- a/src/main/java/api/player/model/ModelPlayerAPI.java +++ /dev/null @@ -1,1573 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -import java.io.*; -import java.text.*; -import java.util.*; -import java.util.logging.*; -import java.lang.ref.*; -import java.lang.reflect.*; - -public final class ModelPlayerAPI -{ - private final static Class[] Class = new Class[] { ModelPlayerAPI.class }; - private final static Class[] Classes = new Class[] { ModelPlayerAPI.class, String.class }; - - private static boolean isCreated; - private static final Logger logger = Logger.getLogger("ModelPlayerAPI"); - - private static void log(String text) - { - System.out.println(text); - logger.fine(text); - } - - public static void register(String id, Class baseClass) - { - register(id, baseClass, null); - } - - public static void register(String id, Class baseClass, ModelPlayerBaseSorting baseSorting) - { - try - { - register(baseClass, id, baseSorting); - } - catch(RuntimeException exception) - { - if(id != null) - log("Model Player: failed to register id '" + id + "'"); - else - log("Model Player: failed to register ModelPlayerBase"); - - throw exception; - } - } - - private static void register(Class baseClass, String id, ModelPlayerBaseSorting baseSorting) - { - if(!isCreated) - { - try - { - Method mandatory = api.player.model.ModelPlayer.class.getMethod("getModelPlayerBase", String.class); - if (mandatory.getReturnType() != ModelPlayerBase.class) - throw new NoSuchMethodException(ModelPlayerBase.class.getName() + " " + api.player.model.ModelPlayer.class.getName() + ".getModelPlayerBase(" + String.class.getName() + ")"); - } - catch(NoSuchMethodException exception) - { - String[] errorMessageParts = new String[] - { - "========================================", - "The API \"Model Player\" version " + api.player.forge.RenderPlayerAPIPlugin.Version + " of the mod \"Render Player API Core " + api.player.forge.RenderPlayerAPIPlugin.Version + "\" can not be created!", - "----------------------------------------", - "Mandatory member method \"{0} getModelPlayerBase({3})\" not found in class \"{1}\".", - "There are three scenarios this can happen:", - "* Minecraft Forge is missing a Render Player API Core which Minecraft version matches its own.", - " Download and install the latest Render Player API Core for the Minecraft version you were trying to run.", - "* The code of the class \"{2}\" of Render Player API Core has been modified beyond recognition by another Minecraft Forge coremod.", - " Try temporary deinstallation of other core mods to find the culprit and deinstall it permanently to fix this specific problem.", - "* Render Player API Core has not been installed correctly.", - " Deinstall Render Player API Core and install it again following the installation instructions in the readme file.", - "========================================" - }; - - String baseModelPlayerClassName = ModelPlayerBase.class.getName(); - String targetClassName = api.player.model.ModelPlayer.class.getName(); - String targetClassFileName = targetClassName.replace(".", File.separator); - String stringClassName = String.class.getName(); - - for(int i=0; i allreadyRegistered = allBaseConstructors.get(id); - if(allreadyRegistered != null) - throw new IllegalArgumentException("The class '" + baseClass.getName() + "' can not be registered with the id '" + id + "' because the class '" + allreadyRegistered.getDeclaringClass().getName() + "' has allready been registered with the same id"); - - Constructor baseConstructor; - try - { - baseConstructor = baseClass.getDeclaredConstructor(Classes); - } - catch (Throwable t) - { - try - { - baseConstructor = baseClass.getDeclaredConstructor(Class); - } - catch(Throwable s) - { - throw new IllegalArgumentException("Can not find necessary constructor with one argument of type '" + ModelPlayerAPI.class.getName() + "' and eventually a second argument of type 'String' in the class '" + baseClass.getName() + "'", t); - } - } - - allBaseConstructors.put(id, baseConstructor); - - if(baseSorting != null) - { - addSorting(id, allBaseBeforeLocalConstructingSuperiors, baseSorting.getBeforeLocalConstructingSuperiors()); - addSorting(id, allBaseBeforeLocalConstructingInferiors, baseSorting.getBeforeLocalConstructingInferiors()); - addSorting(id, allBaseAfterLocalConstructingSuperiors, baseSorting.getAfterLocalConstructingSuperiors()); - addSorting(id, allBaseAfterLocalConstructingInferiors, baseSorting.getAfterLocalConstructingInferiors()); - - addDynamicSorting(id, allBaseBeforeDynamicSuperiors, baseSorting.getDynamicBeforeSuperiors()); - addDynamicSorting(id, allBaseBeforeDynamicInferiors, baseSorting.getDynamicBeforeInferiors()); - addDynamicSorting(id, allBaseOverrideDynamicSuperiors, baseSorting.getDynamicOverrideSuperiors()); - addDynamicSorting(id, allBaseOverrideDynamicInferiors, baseSorting.getDynamicOverrideInferiors()); - addDynamicSorting(id, allBaseAfterDynamicSuperiors, baseSorting.getDynamicAfterSuperiors()); - addDynamicSorting(id, allBaseAfterDynamicInferiors, baseSorting.getDynamicAfterInferiors()); - - addSorting(id, allBaseBeforeGetRandomModelBoxSuperiors, baseSorting.getBeforeGetRandomModelBoxSuperiors()); - addSorting(id, allBaseBeforeGetRandomModelBoxInferiors, baseSorting.getBeforeGetRandomModelBoxInferiors()); - addSorting(id, allBaseOverrideGetRandomModelBoxSuperiors, baseSorting.getOverrideGetRandomModelBoxSuperiors()); - addSorting(id, allBaseOverrideGetRandomModelBoxInferiors, baseSorting.getOverrideGetRandomModelBoxInferiors()); - addSorting(id, allBaseAfterGetRandomModelBoxSuperiors, baseSorting.getAfterGetRandomModelBoxSuperiors()); - addSorting(id, allBaseAfterGetRandomModelBoxInferiors, baseSorting.getAfterGetRandomModelBoxInferiors()); - - addSorting(id, allBaseBeforeGetTextureOffsetSuperiors, baseSorting.getBeforeGetTextureOffsetSuperiors()); - addSorting(id, allBaseBeforeGetTextureOffsetInferiors, baseSorting.getBeforeGetTextureOffsetInferiors()); - addSorting(id, allBaseOverrideGetTextureOffsetSuperiors, baseSorting.getOverrideGetTextureOffsetSuperiors()); - addSorting(id, allBaseOverrideGetTextureOffsetInferiors, baseSorting.getOverrideGetTextureOffsetInferiors()); - addSorting(id, allBaseAfterGetTextureOffsetSuperiors, baseSorting.getAfterGetTextureOffsetSuperiors()); - addSorting(id, allBaseAfterGetTextureOffsetInferiors, baseSorting.getAfterGetTextureOffsetInferiors()); - - addSorting(id, allBaseBeforeRenderSuperiors, baseSorting.getBeforeRenderSuperiors()); - addSorting(id, allBaseBeforeRenderInferiors, baseSorting.getBeforeRenderInferiors()); - addSorting(id, allBaseOverrideRenderSuperiors, baseSorting.getOverrideRenderSuperiors()); - addSorting(id, allBaseOverrideRenderInferiors, baseSorting.getOverrideRenderInferiors()); - addSorting(id, allBaseAfterRenderSuperiors, baseSorting.getAfterRenderSuperiors()); - addSorting(id, allBaseAfterRenderInferiors, baseSorting.getAfterRenderInferiors()); - - addSorting(id, allBaseBeforeRenderCloakSuperiors, baseSorting.getBeforeRenderCloakSuperiors()); - addSorting(id, allBaseBeforeRenderCloakInferiors, baseSorting.getBeforeRenderCloakInferiors()); - addSorting(id, allBaseOverrideRenderCloakSuperiors, baseSorting.getOverrideRenderCloakSuperiors()); - addSorting(id, allBaseOverrideRenderCloakInferiors, baseSorting.getOverrideRenderCloakInferiors()); - addSorting(id, allBaseAfterRenderCloakSuperiors, baseSorting.getAfterRenderCloakSuperiors()); - addSorting(id, allBaseAfterRenderCloakInferiors, baseSorting.getAfterRenderCloakInferiors()); - - addSorting(id, allBaseBeforeRenderEarsSuperiors, baseSorting.getBeforeRenderEarsSuperiors()); - addSorting(id, allBaseBeforeRenderEarsInferiors, baseSorting.getBeforeRenderEarsInferiors()); - addSorting(id, allBaseOverrideRenderEarsSuperiors, baseSorting.getOverrideRenderEarsSuperiors()); - addSorting(id, allBaseOverrideRenderEarsInferiors, baseSorting.getOverrideRenderEarsInferiors()); - addSorting(id, allBaseAfterRenderEarsSuperiors, baseSorting.getAfterRenderEarsSuperiors()); - addSorting(id, allBaseAfterRenderEarsInferiors, baseSorting.getAfterRenderEarsInferiors()); - - addSorting(id, allBaseBeforeSetLivingAnimationsSuperiors, baseSorting.getBeforeSetLivingAnimationsSuperiors()); - addSorting(id, allBaseBeforeSetLivingAnimationsInferiors, baseSorting.getBeforeSetLivingAnimationsInferiors()); - addSorting(id, allBaseOverrideSetLivingAnimationsSuperiors, baseSorting.getOverrideSetLivingAnimationsSuperiors()); - addSorting(id, allBaseOverrideSetLivingAnimationsInferiors, baseSorting.getOverrideSetLivingAnimationsInferiors()); - addSorting(id, allBaseAfterSetLivingAnimationsSuperiors, baseSorting.getAfterSetLivingAnimationsSuperiors()); - addSorting(id, allBaseAfterSetLivingAnimationsInferiors, baseSorting.getAfterSetLivingAnimationsInferiors()); - - addSorting(id, allBaseBeforeSetRotationAnglesSuperiors, baseSorting.getBeforeSetRotationAnglesSuperiors()); - addSorting(id, allBaseBeforeSetRotationAnglesInferiors, baseSorting.getBeforeSetRotationAnglesInferiors()); - addSorting(id, allBaseOverrideSetRotationAnglesSuperiors, baseSorting.getOverrideSetRotationAnglesSuperiors()); - addSorting(id, allBaseOverrideSetRotationAnglesInferiors, baseSorting.getOverrideSetRotationAnglesInferiors()); - addSorting(id, allBaseAfterSetRotationAnglesSuperiors, baseSorting.getAfterSetRotationAnglesSuperiors()); - addSorting(id, allBaseAfterSetRotationAnglesInferiors, baseSorting.getAfterSetRotationAnglesInferiors()); - - addSorting(id, allBaseBeforeSetTextureOffsetSuperiors, baseSorting.getBeforeSetTextureOffsetSuperiors()); - addSorting(id, allBaseBeforeSetTextureOffsetInferiors, baseSorting.getBeforeSetTextureOffsetInferiors()); - addSorting(id, allBaseOverrideSetTextureOffsetSuperiors, baseSorting.getOverrideSetTextureOffsetSuperiors()); - addSorting(id, allBaseOverrideSetTextureOffsetInferiors, baseSorting.getOverrideSetTextureOffsetInferiors()); - addSorting(id, allBaseAfterSetTextureOffsetSuperiors, baseSorting.getAfterSetTextureOffsetSuperiors()); - addSorting(id, allBaseAfterSetTextureOffsetInferiors, baseSorting.getAfterSetTextureOffsetInferiors()); - - } - - addMethod(id, baseClass, beforeLocalConstructingHookTypes, "beforeLocalConstructing", float.class, float.class, int.class, int.class); - addMethod(id, baseClass, afterLocalConstructingHookTypes, "afterLocalConstructing", float.class, float.class, int.class, int.class); - - - addMethod(id, baseClass, beforeGetRandomModelBoxHookTypes, "beforeGetRandomModelBox", java.util.Random.class); - addMethod(id, baseClass, overrideGetRandomModelBoxHookTypes, "getRandomModelBox", java.util.Random.class); - addMethod(id, baseClass, afterGetRandomModelBoxHookTypes, "afterGetRandomModelBox", java.util.Random.class); - - addMethod(id, baseClass, beforeGetTextureOffsetHookTypes, "beforeGetTextureOffset", String.class); - addMethod(id, baseClass, overrideGetTextureOffsetHookTypes, "getTextureOffset", String.class); - addMethod(id, baseClass, afterGetTextureOffsetHookTypes, "afterGetTextureOffset", String.class); - - addMethod(id, baseClass, beforeRenderHookTypes, "beforeRender", net.minecraft.entity.Entity.class, float.class, float.class, float.class, float.class, float.class, float.class); - addMethod(id, baseClass, overrideRenderHookTypes, "render", net.minecraft.entity.Entity.class, float.class, float.class, float.class, float.class, float.class, float.class); - addMethod(id, baseClass, afterRenderHookTypes, "afterRender", net.minecraft.entity.Entity.class, float.class, float.class, float.class, float.class, float.class, float.class); - - addMethod(id, baseClass, beforeRenderCloakHookTypes, "beforeRenderCloak", float.class); - addMethod(id, baseClass, overrideRenderCloakHookTypes, "renderCloak", float.class); - addMethod(id, baseClass, afterRenderCloakHookTypes, "afterRenderCloak", float.class); - - addMethod(id, baseClass, beforeRenderEarsHookTypes, "beforeRenderEars", float.class); - addMethod(id, baseClass, overrideRenderEarsHookTypes, "renderEars", float.class); - addMethod(id, baseClass, afterRenderEarsHookTypes, "afterRenderEars", float.class); - - addMethod(id, baseClass, beforeSetLivingAnimationsHookTypes, "beforeSetLivingAnimations", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class); - addMethod(id, baseClass, overrideSetLivingAnimationsHookTypes, "setLivingAnimations", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class); - addMethod(id, baseClass, afterSetLivingAnimationsHookTypes, "afterSetLivingAnimations", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class); - - addMethod(id, baseClass, beforeSetRotationAnglesHookTypes, "beforeSetRotationAngles", float.class, float.class, float.class, float.class, float.class, float.class, net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideSetRotationAnglesHookTypes, "setRotationAngles", float.class, float.class, float.class, float.class, float.class, float.class, net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterSetRotationAnglesHookTypes, "afterSetRotationAngles", float.class, float.class, float.class, float.class, float.class, float.class, net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforeSetTextureOffsetHookTypes, "beforeSetTextureOffset", String.class, int.class, int.class); - addMethod(id, baseClass, overrideSetTextureOffsetHookTypes, "setTextureOffset", String.class, int.class, int.class); - addMethod(id, baseClass, afterSetTextureOffsetHookTypes, "afterSetTextureOffset", String.class, int.class, int.class); - - - addDynamicMethods(id, baseClass); - - addDynamicKeys(id, baseClass, beforeDynamicHookMethods, beforeDynamicHookTypes); - addDynamicKeys(id, baseClass, overrideDynamicHookMethods, overrideDynamicHookTypes); - addDynamicKeys(id, baseClass, afterDynamicHookMethods, afterDynamicHookTypes); - - initialize(); - - for(IModelPlayerAPI instance : getAllInstancesList()) - instance.getModelPlayerAPI().attachModelPlayerBase(id); - - System.out.println("Model Player: registered " + id); - logger.fine("Model Player: registered class '" + baseClass.getName() + "' with id '" + id + "'"); - - initialized = false; - } - - public static boolean unregister(String id) - { - if(id == null) - return false; - - Constructor constructor = allBaseConstructors.remove(id); - if(constructor == null) - return false; - - for(IModelPlayerAPI instance : getAllInstancesList()) - instance.getModelPlayerAPI().detachModelPlayerBase(id); - - beforeLocalConstructingHookTypes.remove(id); - afterLocalConstructingHookTypes.remove(id); - - allBaseBeforeGetRandomModelBoxSuperiors.remove(id); - allBaseBeforeGetRandomModelBoxInferiors.remove(id); - allBaseOverrideGetRandomModelBoxSuperiors.remove(id); - allBaseOverrideGetRandomModelBoxInferiors.remove(id); - allBaseAfterGetRandomModelBoxSuperiors.remove(id); - allBaseAfterGetRandomModelBoxInferiors.remove(id); - - beforeGetRandomModelBoxHookTypes.remove(id); - overrideGetRandomModelBoxHookTypes.remove(id); - afterGetRandomModelBoxHookTypes.remove(id); - - allBaseBeforeGetTextureOffsetSuperiors.remove(id); - allBaseBeforeGetTextureOffsetInferiors.remove(id); - allBaseOverrideGetTextureOffsetSuperiors.remove(id); - allBaseOverrideGetTextureOffsetInferiors.remove(id); - allBaseAfterGetTextureOffsetSuperiors.remove(id); - allBaseAfterGetTextureOffsetInferiors.remove(id); - - beforeGetTextureOffsetHookTypes.remove(id); - overrideGetTextureOffsetHookTypes.remove(id); - afterGetTextureOffsetHookTypes.remove(id); - - allBaseBeforeRenderSuperiors.remove(id); - allBaseBeforeRenderInferiors.remove(id); - allBaseOverrideRenderSuperiors.remove(id); - allBaseOverrideRenderInferiors.remove(id); - allBaseAfterRenderSuperiors.remove(id); - allBaseAfterRenderInferiors.remove(id); - - beforeRenderHookTypes.remove(id); - overrideRenderHookTypes.remove(id); - afterRenderHookTypes.remove(id); - - allBaseBeforeRenderCloakSuperiors.remove(id); - allBaseBeforeRenderCloakInferiors.remove(id); - allBaseOverrideRenderCloakSuperiors.remove(id); - allBaseOverrideRenderCloakInferiors.remove(id); - allBaseAfterRenderCloakSuperiors.remove(id); - allBaseAfterRenderCloakInferiors.remove(id); - - beforeRenderCloakHookTypes.remove(id); - overrideRenderCloakHookTypes.remove(id); - afterRenderCloakHookTypes.remove(id); - - allBaseBeforeRenderEarsSuperiors.remove(id); - allBaseBeforeRenderEarsInferiors.remove(id); - allBaseOverrideRenderEarsSuperiors.remove(id); - allBaseOverrideRenderEarsInferiors.remove(id); - allBaseAfterRenderEarsSuperiors.remove(id); - allBaseAfterRenderEarsInferiors.remove(id); - - beforeRenderEarsHookTypes.remove(id); - overrideRenderEarsHookTypes.remove(id); - afterRenderEarsHookTypes.remove(id); - - allBaseBeforeSetLivingAnimationsSuperiors.remove(id); - allBaseBeforeSetLivingAnimationsInferiors.remove(id); - allBaseOverrideSetLivingAnimationsSuperiors.remove(id); - allBaseOverrideSetLivingAnimationsInferiors.remove(id); - allBaseAfterSetLivingAnimationsSuperiors.remove(id); - allBaseAfterSetLivingAnimationsInferiors.remove(id); - - beforeSetLivingAnimationsHookTypes.remove(id); - overrideSetLivingAnimationsHookTypes.remove(id); - afterSetLivingAnimationsHookTypes.remove(id); - - allBaseBeforeSetRotationAnglesSuperiors.remove(id); - allBaseBeforeSetRotationAnglesInferiors.remove(id); - allBaseOverrideSetRotationAnglesSuperiors.remove(id); - allBaseOverrideSetRotationAnglesInferiors.remove(id); - allBaseAfterSetRotationAnglesSuperiors.remove(id); - allBaseAfterSetRotationAnglesInferiors.remove(id); - - beforeSetRotationAnglesHookTypes.remove(id); - overrideSetRotationAnglesHookTypes.remove(id); - afterSetRotationAnglesHookTypes.remove(id); - - allBaseBeforeSetTextureOffsetSuperiors.remove(id); - allBaseBeforeSetTextureOffsetInferiors.remove(id); - allBaseOverrideSetTextureOffsetSuperiors.remove(id); - allBaseOverrideSetTextureOffsetInferiors.remove(id); - allBaseAfterSetTextureOffsetSuperiors.remove(id); - allBaseAfterSetTextureOffsetInferiors.remove(id); - - beforeSetTextureOffsetHookTypes.remove(id); - overrideSetTextureOffsetHookTypes.remove(id); - afterSetTextureOffsetHookTypes.remove(id); - - for(IModelPlayerAPI instance : getAllInstancesList()) - instance.getModelPlayerAPI().updateModelPlayerBases(); - - Iterator iterator = keysToVirtualIds.keySet().iterator(); - while(iterator.hasNext()) - { - String key = iterator.next(); - if(keysToVirtualIds.get(key).equals(id)) - keysToVirtualIds.remove(key); - } - - boolean otherFound = false; - Class type = constructor.getDeclaringClass(); - - iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String otherId = iterator.next(); - Class otherType = allBaseConstructors.get(otherId).getDeclaringClass(); - if(!otherId.equals(id) && otherType.equals(type)) - { - otherFound = true; - break; - } - } - - if(!otherFound) - { - dynamicTypes.remove(type); - - virtualDynamicHookMethods.remove(type); - - beforeDynamicHookMethods.remove(type); - overrideDynamicHookMethods.remove(type); - afterDynamicHookMethods.remove(type); - } - - removeDynamicHookTypes(id, beforeDynamicHookTypes); - removeDynamicHookTypes(id, overrideDynamicHookTypes); - removeDynamicHookTypes(id, afterDynamicHookTypes); - - allBaseBeforeDynamicSuperiors.remove(id); - allBaseBeforeDynamicInferiors.remove(id); - allBaseOverrideDynamicSuperiors.remove(id); - allBaseOverrideDynamicInferiors.remove(id); - allBaseAfterDynamicSuperiors.remove(id); - allBaseAfterDynamicInferiors.remove(id); - - log("ModelPlayerAPI: unregistered id '" + id + "'"); - - return true; - } - - public static void removeDynamicHookTypes(String id, Map> map) - { - Iterator keys = map.keySet().iterator(); - while(keys.hasNext()) - map.get(keys.next()).remove(id); - } - - public static Set getRegisteredIds() - { - return unmodifiableAllIds; - } - - private static void addSorting(String id, Map map, String[] values) - { - if(values != null && values.length > 0) - map.put(id, values); - } - - private static void addDynamicSorting(String id, Map> map, Map values) - { - if(values != null && values.size() > 0) - map.put(id, values); - } - - private static boolean addMethod(String id, Class baseClass, List list, String methodName, Class... _parameterTypes) - { - try - { - Method method = baseClass.getMethod(methodName, _parameterTypes); - boolean isOverridden = method.getDeclaringClass() != ModelPlayerBase.class; - if(isOverridden) - list.add(id); - return isOverridden; - } - catch(Exception e) - { - throw new RuntimeException("Can not reflect method '" + methodName + "' of class '" + baseClass.getName() + "'", e); - } - } - - private static void addDynamicMethods(String id, Class baseClass) - { - if(!dynamicTypes.add(baseClass)) - return; - - Map virtuals = null; - Map befores = null; - Map overrides = null; - Map afters = null; - - Method[] methods = baseClass.getDeclaredMethods(); - for(int i=0; i= 8 && name.substring(0, 8).equalsIgnoreCase("override")) - { - name = name.substring(8); - override = true; - } - else if(name.length() >= 6 && name.substring(0, 6).equalsIgnoreCase("before")) - { - before = true; - name = name.substring(6); - } - else if(name.length() >= 5 && name.substring(0, 5).equalsIgnoreCase("after")) - { - after = true; - name = name.substring(5); - } - } - - if(name.length() >= 1 && (before || virtual || override || after)) - name = name.substring(0,1).toLowerCase() + name.substring(1); - - while(name.charAt(0) == '_') - name = name.substring(1); - - if(name.length() == 0) - throw new RuntimeException("Can not process dynamic hook method with no key"); - - keys.add(name); - - if(virtual) - { - if(keysToVirtualIds.containsKey(name)) - throw new RuntimeException("Can not process more than one dynamic virtual method"); - - keysToVirtualIds.put(name, id); - virtuals = addDynamicMethod(name, method, virtuals); - } - else if(before) - befores = addDynamicMethod(name, method, befores); - else if(after) - afters = addDynamicMethod(name, method, afters); - else - overrides = addDynamicMethod(name, method, overrides); - } - - if(virtuals != null) - virtualDynamicHookMethods.put(baseClass, virtuals); - if(befores != null) - beforeDynamicHookMethods.put(baseClass, befores); - if(overrides != null) - overrideDynamicHookMethods.put(baseClass, overrides); - if(afters != null) - afterDynamicHookMethods.put(baseClass, afters); - } - - private static void addDynamicKeys(String id, Class baseClass, Map, Map> dynamicHookMethods, Map> dynamicHookTypes) - { - Map methods = dynamicHookMethods.get(baseClass); - if(methods == null || methods.size() == 0) - return; - - Iterator keys = methods.keySet().iterator(); - while(keys.hasNext()) - { - String key = keys.next(); - if(!dynamicHookTypes.containsKey(key)) - dynamicHookTypes.put(key, new ArrayList(1)); - dynamicHookTypes.get(key).add(id); - } - } - - private static Map addDynamicMethod(String key, Method method, Map methods) - { - if(methods == null) - methods = new HashMap(); - if(methods.containsKey(key)) - throw new RuntimeException("method with key '" + key + "' allready exists"); - methods.put(key, method); - return methods; - } - - public static ModelPlayerAPI create(IModelPlayerAPI modelPlayer, float paramFloat1, float paramFloat2, int paramInt1, int paramInt2, String type) - { - if(allBaseConstructors.size() > 0 && !initialized) - initialize(); - return new ModelPlayerAPI(modelPlayer, paramFloat1, paramFloat2, paramInt1, paramInt2, type); - } - - private static void initialize() - { - sortBases(beforeLocalConstructingHookTypes, allBaseBeforeLocalConstructingSuperiors, allBaseBeforeLocalConstructingInferiors, "beforeLocalConstructing"); - sortBases(afterLocalConstructingHookTypes, allBaseAfterLocalConstructingSuperiors, allBaseAfterLocalConstructingInferiors, "afterLocalConstructing"); - - Iterator keyIterator = keys.iterator(); - while(keyIterator.hasNext()) - { - String key = keyIterator.next(); - sortDynamicBases(beforeDynamicHookTypes, allBaseBeforeDynamicSuperiors, allBaseBeforeDynamicInferiors, key); - sortDynamicBases(overrideDynamicHookTypes, allBaseOverrideDynamicSuperiors, allBaseOverrideDynamicInferiors, key); - sortDynamicBases(afterDynamicHookTypes, allBaseAfterDynamicSuperiors, allBaseAfterDynamicInferiors, key); - } - - sortBases(beforeGetRandomModelBoxHookTypes, allBaseBeforeGetRandomModelBoxSuperiors, allBaseBeforeGetRandomModelBoxInferiors, "beforeGetRandomModelBox"); - sortBases(overrideGetRandomModelBoxHookTypes, allBaseOverrideGetRandomModelBoxSuperiors, allBaseOverrideGetRandomModelBoxInferiors, "overrideGetRandomModelBox"); - sortBases(afterGetRandomModelBoxHookTypes, allBaseAfterGetRandomModelBoxSuperiors, allBaseAfterGetRandomModelBoxInferiors, "afterGetRandomModelBox"); - - sortBases(beforeGetTextureOffsetHookTypes, allBaseBeforeGetTextureOffsetSuperiors, allBaseBeforeGetTextureOffsetInferiors, "beforeGetTextureOffset"); - sortBases(overrideGetTextureOffsetHookTypes, allBaseOverrideGetTextureOffsetSuperiors, allBaseOverrideGetTextureOffsetInferiors, "overrideGetTextureOffset"); - sortBases(afterGetTextureOffsetHookTypes, allBaseAfterGetTextureOffsetSuperiors, allBaseAfterGetTextureOffsetInferiors, "afterGetTextureOffset"); - - sortBases(beforeRenderHookTypes, allBaseBeforeRenderSuperiors, allBaseBeforeRenderInferiors, "beforeRender"); - sortBases(overrideRenderHookTypes, allBaseOverrideRenderSuperiors, allBaseOverrideRenderInferiors, "overrideRender"); - sortBases(afterRenderHookTypes, allBaseAfterRenderSuperiors, allBaseAfterRenderInferiors, "afterRender"); - - sortBases(beforeRenderCloakHookTypes, allBaseBeforeRenderCloakSuperiors, allBaseBeforeRenderCloakInferiors, "beforeRenderCloak"); - sortBases(overrideRenderCloakHookTypes, allBaseOverrideRenderCloakSuperiors, allBaseOverrideRenderCloakInferiors, "overrideRenderCloak"); - sortBases(afterRenderCloakHookTypes, allBaseAfterRenderCloakSuperiors, allBaseAfterRenderCloakInferiors, "afterRenderCloak"); - - sortBases(beforeRenderEarsHookTypes, allBaseBeforeRenderEarsSuperiors, allBaseBeforeRenderEarsInferiors, "beforeRenderEars"); - sortBases(overrideRenderEarsHookTypes, allBaseOverrideRenderEarsSuperiors, allBaseOverrideRenderEarsInferiors, "overrideRenderEars"); - sortBases(afterRenderEarsHookTypes, allBaseAfterRenderEarsSuperiors, allBaseAfterRenderEarsInferiors, "afterRenderEars"); - - sortBases(beforeSetLivingAnimationsHookTypes, allBaseBeforeSetLivingAnimationsSuperiors, allBaseBeforeSetLivingAnimationsInferiors, "beforeSetLivingAnimations"); - sortBases(overrideSetLivingAnimationsHookTypes, allBaseOverrideSetLivingAnimationsSuperiors, allBaseOverrideSetLivingAnimationsInferiors, "overrideSetLivingAnimations"); - sortBases(afterSetLivingAnimationsHookTypes, allBaseAfterSetLivingAnimationsSuperiors, allBaseAfterSetLivingAnimationsInferiors, "afterSetLivingAnimations"); - - sortBases(beforeSetRotationAnglesHookTypes, allBaseBeforeSetRotationAnglesSuperiors, allBaseBeforeSetRotationAnglesInferiors, "beforeSetRotationAngles"); - sortBases(overrideSetRotationAnglesHookTypes, allBaseOverrideSetRotationAnglesSuperiors, allBaseOverrideSetRotationAnglesInferiors, "overrideSetRotationAngles"); - sortBases(afterSetRotationAnglesHookTypes, allBaseAfterSetRotationAnglesSuperiors, allBaseAfterSetRotationAnglesInferiors, "afterSetRotationAngles"); - - sortBases(beforeSetTextureOffsetHookTypes, allBaseBeforeSetTextureOffsetSuperiors, allBaseBeforeSetTextureOffsetInferiors, "beforeSetTextureOffset"); - sortBases(overrideSetTextureOffsetHookTypes, allBaseOverrideSetTextureOffsetSuperiors, allBaseOverrideSetTextureOffsetInferiors, "overrideSetTextureOffset"); - sortBases(afterSetTextureOffsetHookTypes, allBaseAfterSetTextureOffsetSuperiors, allBaseAfterSetTextureOffsetInferiors, "afterSetTextureOffset"); - - initialized = true; - } - - private static List getAllInstancesList() - { - List result = new ArrayList(); - for(Iterator> iterator = allInstances.iterator(); iterator.hasNext();) - { - IModelPlayerAPI instance = iterator.next().get(); - if(instance != null) - result.add(instance); - else - iterator.remove(); - } - return result; - } - - private static List> allInstances = new ArrayList>(); - - public static api.player.model.ModelPlayer[] getAllInstances() - { - List allInstances = getAllInstancesList(); - return allInstances.toArray(new api.player.model.ModelPlayer[allInstances.size()]); - } - - public static void beforeLocalConstructing(IModelPlayerAPI modelPlayer, float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - modelPlayerAPI.load(); - - allInstances.add(new WeakReference(modelPlayer)); - - if(modelPlayerAPI != null) - modelPlayerAPI.beforeLocalConstructing(paramFloat1, paramFloat2, paramInt1, paramInt2); - } - - public static void afterLocalConstructing(IModelPlayerAPI modelPlayer, float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - modelPlayerAPI.afterLocalConstructing(paramFloat1, paramFloat2, paramInt1, paramInt2); - } - - public static ModelPlayerBase getModelPlayerBase(IModelPlayerAPI modelPlayer, String baseId) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.getModelPlayerBase(baseId); - return null; - } - - public static Set getModelPlayerBaseIds(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - Set result = null; - if(modelPlayerAPI != null) - result = modelPlayerAPI.getModelPlayerBaseIds(); - else - result = Collections.emptySet(); - return result; - } - - public static float getExpandParameter(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.paramFloat1; - return 0; - } - - public static float getYOffsetParameter(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.paramFloat2; - return 0; - } - - public static int getTextureWidthParameter(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.paramInt1; - return 0; - } - - public static int getTextureHeightParameter(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.paramInt2; - return 0; - } - - public static String getModelPlayerType(IModelPlayerAPI modelPlayer) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.type != null) - return modelPlayerAPI.type; - return "other"; - } - - public static Object dynamic(IModelPlayerAPI modelPlayer, String key, Object[] parameters) - { - ModelPlayerAPI modelPlayerAPI = modelPlayer.getModelPlayerAPI(); - if(modelPlayerAPI != null) - return modelPlayerAPI.dynamic(key, parameters); - return null; - } - - private static void sortBases(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - new ModelPlayerBaseSorter(list, allBaseSuperiors, allBaseInferiors, methodName).Sort(); - } - - private final static Map EmptySortMap = Collections.unmodifiableMap(new HashMap()); - - private static void sortDynamicBases(Map> lists, Map> allBaseSuperiors, Map> allBaseInferiors, String key) - { - List types = lists.get(key); - if(types != null && types.size() > 1) - sortBases(types, getDynamicSorters(key, types, allBaseSuperiors), getDynamicSorters(key, types, allBaseInferiors), key); - } - - private static Map getDynamicSorters(String key, List toSort, Map> allBaseValues) - { - Map superiors = null; - - Iterator ids = toSort.iterator(); - while(ids.hasNext()) - { - String id = ids.next(); - Map idSuperiors = allBaseValues.get(id); - if(idSuperiors == null) - continue; - - String[] keySuperiorIds = idSuperiors.get(key); - if(keySuperiorIds != null && keySuperiorIds.length > 0) - { - if(superiors == null) - superiors = new HashMap(1); - superiors.put(id, keySuperiorIds); - } - } - - return superiors != null ? superiors : EmptySortMap; - } - - private ModelPlayerAPI(IModelPlayerAPI modelPlayer, float paramFloat1, float paramFloat2, int paramInt1, int paramInt2, String type) - { - this.modelPlayer = modelPlayer; - this.paramFloat1 = paramFloat1; - this.paramFloat2 = paramFloat2; - this.paramInt1 = paramInt1; - this.paramInt2 = paramInt2; - this.type = type; - } - - private void load() - { - Iterator iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String id = iterator.next(); - ModelPlayerBase toAttach = createModelPlayerBase(id); - toAttach.beforeBaseAttach(false); - allBaseObjects.put(id, toAttach); - baseObjectsToId.put(toAttach, id); - } - - beforeLocalConstructingHooks = create(beforeLocalConstructingHookTypes); - afterLocalConstructingHooks = create(afterLocalConstructingHookTypes); - - updateModelPlayerBases(); - - iterator = allBaseObjects.keySet().iterator(); - while(iterator.hasNext()) - allBaseObjects.get(iterator.next()).afterBaseAttach(false); - } - - private ModelPlayerBase createModelPlayerBase(String id) - { - Constructor contructor = allBaseConstructors.get(id); - - ModelPlayerBase base; - try - { - if(contructor.getParameterTypes().length == 1) - base = (ModelPlayerBase)contructor.newInstance(this); - else - base = (ModelPlayerBase)contructor.newInstance(this, id); - } - catch (Exception e) - { - throw new RuntimeException("Exception while creating a ModelPlayerBase of type '" + contructor.getDeclaringClass() + "'", e); - } - return base; - } - - private void updateModelPlayerBases() - { - beforeGetRandomModelBoxHooks = create(beforeGetRandomModelBoxHookTypes); - overrideGetRandomModelBoxHooks = create(overrideGetRandomModelBoxHookTypes); - afterGetRandomModelBoxHooks = create(afterGetRandomModelBoxHookTypes); - isGetRandomModelBoxModded = - beforeGetRandomModelBoxHooks != null || - overrideGetRandomModelBoxHooks != null || - afterGetRandomModelBoxHooks != null; - - beforeGetTextureOffsetHooks = create(beforeGetTextureOffsetHookTypes); - overrideGetTextureOffsetHooks = create(overrideGetTextureOffsetHookTypes); - afterGetTextureOffsetHooks = create(afterGetTextureOffsetHookTypes); - isGetTextureOffsetModded = - beforeGetTextureOffsetHooks != null || - overrideGetTextureOffsetHooks != null || - afterGetTextureOffsetHooks != null; - - beforeRenderHooks = create(beforeRenderHookTypes); - overrideRenderHooks = create(overrideRenderHookTypes); - afterRenderHooks = create(afterRenderHookTypes); - isRenderModded = - beforeRenderHooks != null || - overrideRenderHooks != null || - afterRenderHooks != null; - - beforeRenderCloakHooks = create(beforeRenderCloakHookTypes); - overrideRenderCloakHooks = create(overrideRenderCloakHookTypes); - afterRenderCloakHooks = create(afterRenderCloakHookTypes); - isRenderCloakModded = - beforeRenderCloakHooks != null || - overrideRenderCloakHooks != null || - afterRenderCloakHooks != null; - - beforeRenderEarsHooks = create(beforeRenderEarsHookTypes); - overrideRenderEarsHooks = create(overrideRenderEarsHookTypes); - afterRenderEarsHooks = create(afterRenderEarsHookTypes); - isRenderEarsModded = - beforeRenderEarsHooks != null || - overrideRenderEarsHooks != null || - afterRenderEarsHooks != null; - - beforeSetLivingAnimationsHooks = create(beforeSetLivingAnimationsHookTypes); - overrideSetLivingAnimationsHooks = create(overrideSetLivingAnimationsHookTypes); - afterSetLivingAnimationsHooks = create(afterSetLivingAnimationsHookTypes); - isSetLivingAnimationsModded = - beforeSetLivingAnimationsHooks != null || - overrideSetLivingAnimationsHooks != null || - afterSetLivingAnimationsHooks != null; - - beforeSetRotationAnglesHooks = create(beforeSetRotationAnglesHookTypes); - overrideSetRotationAnglesHooks = create(overrideSetRotationAnglesHookTypes); - afterSetRotationAnglesHooks = create(afterSetRotationAnglesHookTypes); - isSetRotationAnglesModded = - beforeSetRotationAnglesHooks != null || - overrideSetRotationAnglesHooks != null || - afterSetRotationAnglesHooks != null; - - beforeSetTextureOffsetHooks = create(beforeSetTextureOffsetHookTypes); - overrideSetTextureOffsetHooks = create(overrideSetTextureOffsetHookTypes); - afterSetTextureOffsetHooks = create(afterSetTextureOffsetHookTypes); - isSetTextureOffsetModded = - beforeSetTextureOffsetHooks != null || - overrideSetTextureOffsetHooks != null || - afterSetTextureOffsetHooks != null; - - } - - private void attachModelPlayerBase(String id) - { - ModelPlayerBase toAttach = createModelPlayerBase(id); - toAttach.beforeBaseAttach(true); - allBaseObjects.put(id, toAttach); - updateModelPlayerBases(); - toAttach.afterBaseAttach(true); - } - - private void detachModelPlayerBase(String id) - { - ModelPlayerBase toDetach = allBaseObjects.get(id); - toDetach.beforeBaseDetach(true); - allBaseObjects.remove(id); - toDetach.afterBaseDetach(true); - } - - private ModelPlayerBase[] create(List types) - { - if(types.isEmpty()) - return null; - - ModelPlayerBase[] result = new ModelPlayerBase[types.size()]; - for(int i = 0; i < result.length; i++) - result[i] = getModelPlayerBase(types.get(i)); - return result; - } - - private void beforeLocalConstructing(float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - if(beforeLocalConstructingHooks != null) - for(int i = beforeLocalConstructingHooks.length - 1; i >= 0 ; i--) - beforeLocalConstructingHooks[i].beforeLocalConstructing(paramFloat1, paramFloat2, paramInt1, paramInt2); - beforeLocalConstructingHooks = null; - } - - private void afterLocalConstructing(float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - if(afterLocalConstructingHooks != null) - for(int i = 0; i < afterLocalConstructingHooks.length; i++) - afterLocalConstructingHooks[i].afterLocalConstructing(paramFloat1, paramFloat2, paramInt1, paramInt2); - afterLocalConstructingHooks = null; - } - - public ModelPlayerBase getModelPlayerBase(String id) - { - return allBaseObjects.get(id); - } - - public Set getModelPlayerBaseIds() - { - return unmodifiableAllBaseIds; - } - - public Object dynamic(String key, Object[] parameters) - { - key = key.replace('.', '_').replace(' ', '_'); - executeAll(key, parameters, beforeDynamicHookTypes, beforeDynamicHookMethods, true); - Object result = dynamicOverwritten(key, parameters, null); - executeAll(key, parameters, afterDynamicHookTypes, afterDynamicHookMethods, false); - return result; - } - - public Object dynamicOverwritten(String key, Object[] parameters, ModelPlayerBase overwriter) - { - List overrideIds = overrideDynamicHookTypes.get(key); - - String id = null; - if(overrideIds != null) - if(overwriter != null) - { - id = baseObjectsToId.get(overwriter); - int index = overrideIds.indexOf(id); - if(index > 0) - id = overrideIds.get(index - 1); - else - id = null; - } - else if(overrideIds.size() > 0) - id = overrideIds.get(overrideIds.size() - 1); - - Map, Map> methodMap; - - if(id == null) - { - id = keysToVirtualIds.get(key); - if(id == null) - return null; - methodMap = virtualDynamicHookMethods; - } - else - methodMap = overrideDynamicHookMethods; - - Map methods = methodMap.get(allBaseConstructors.get(id).getDeclaringClass()); - if(methods == null) - return null; - - Method method = methods.get(key); - if(method == null) - return null; - - return execute(getModelPlayerBase(id), method, parameters); - } - - private void executeAll(String key, Object[] parameters, Map> dynamicHookTypes, Map, Map> dynamicHookMethods, boolean reverse) - { - List beforeIds = dynamicHookTypes.get(key); - if(beforeIds == null) - return; - - for(int i= reverse ? beforeIds.size() - 1 : 0; reverse ? i >= 0 : i < beforeIds.size(); i = i + (reverse ? -1 : 1)) - { - String id = beforeIds.get(i); - ModelPlayerBase base = getModelPlayerBase(id); - Class type = base.getClass(); - - Map methods = dynamicHookMethods.get(type); - if(methods == null) - continue; - - Method method = methods.get(key); - if(method == null) - continue; - - execute(base, method, parameters); - } - } - - private Object execute(ModelPlayerBase base, Method method, Object[] parameters) - { - try - { - return method.invoke(base, parameters); - } - catch(Exception e) - { - throw new RuntimeException("Exception while invoking dynamic method", e); - } - } - - public static net.minecraft.client.model.ModelRenderer getRandomModelBox(IModelPlayerAPI target, java.util.Random paramRandom) - { - net.minecraft.client.model.ModelRenderer _result; - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isGetRandomModelBoxModded) - _result = modelPlayerAPI.getRandomModelBox(paramRandom); - else - _result = target.localGetRandomModelBox(paramRandom); - return _result; - } - - private net.minecraft.client.model.ModelRenderer getRandomModelBox(java.util.Random paramRandom) - { - if(beforeGetRandomModelBoxHooks != null) - for(int i = beforeGetRandomModelBoxHooks.length - 1; i >= 0 ; i--) - beforeGetRandomModelBoxHooks[i].beforeGetRandomModelBox(paramRandom); - - net.minecraft.client.model.ModelRenderer _result; - if(overrideGetRandomModelBoxHooks != null) - _result = overrideGetRandomModelBoxHooks[overrideGetRandomModelBoxHooks.length - 1].getRandomModelBox(paramRandom); - else - _result = modelPlayer.localGetRandomModelBox(paramRandom); - - if(afterGetRandomModelBoxHooks != null) - for(int i = 0; i < afterGetRandomModelBoxHooks.length; i++) - afterGetRandomModelBoxHooks[i].afterGetRandomModelBox(paramRandom); - - return _result; - } - - protected ModelPlayerBase GetOverwrittenGetRandomModelBox(ModelPlayerBase overWriter) - { - if (overrideGetRandomModelBoxHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetRandomModelBoxHooks.length; i++) - if(overrideGetRandomModelBoxHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetRandomModelBoxHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetRandomModelBoxHookTypes = new LinkedList(); - private final static List overrideGetRandomModelBoxHookTypes = new LinkedList(); - private final static List afterGetRandomModelBoxHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeGetRandomModelBoxHooks; - private ModelPlayerBase[] overrideGetRandomModelBoxHooks; - private ModelPlayerBase[] afterGetRandomModelBoxHooks; - - public boolean isGetRandomModelBoxModded; - - private static final Map allBaseBeforeGetRandomModelBoxSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetRandomModelBoxInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetRandomModelBoxSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetRandomModelBoxInferiors = new Hashtable(0); - private static final Map allBaseAfterGetRandomModelBoxSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetRandomModelBoxInferiors = new Hashtable(0); - - public static net.minecraft.client.model.TextureOffset getTextureOffset(IModelPlayerAPI target, String paramString) - { - net.minecraft.client.model.TextureOffset _result; - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isGetTextureOffsetModded) - _result = modelPlayerAPI.getTextureOffset(paramString); - else - _result = target.localGetTextureOffset(paramString); - return _result; - } - - private net.minecraft.client.model.TextureOffset getTextureOffset(String paramString) - { - if(beforeGetTextureOffsetHooks != null) - for(int i = beforeGetTextureOffsetHooks.length - 1; i >= 0 ; i--) - beforeGetTextureOffsetHooks[i].beforeGetTextureOffset(paramString); - - net.minecraft.client.model.TextureOffset _result; - if(overrideGetTextureOffsetHooks != null) - _result = overrideGetTextureOffsetHooks[overrideGetTextureOffsetHooks.length - 1].getTextureOffset(paramString); - else - _result = modelPlayer.localGetTextureOffset(paramString); - - if(afterGetTextureOffsetHooks != null) - for(int i = 0; i < afterGetTextureOffsetHooks.length; i++) - afterGetTextureOffsetHooks[i].afterGetTextureOffset(paramString); - - return _result; - } - - protected ModelPlayerBase GetOverwrittenGetTextureOffset(ModelPlayerBase overWriter) - { - if (overrideGetTextureOffsetHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetTextureOffsetHooks.length; i++) - if(overrideGetTextureOffsetHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetTextureOffsetHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetTextureOffsetHookTypes = new LinkedList(); - private final static List overrideGetTextureOffsetHookTypes = new LinkedList(); - private final static List afterGetTextureOffsetHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeGetTextureOffsetHooks; - private ModelPlayerBase[] overrideGetTextureOffsetHooks; - private ModelPlayerBase[] afterGetTextureOffsetHooks; - - public boolean isGetTextureOffsetModded; - - private static final Map allBaseBeforeGetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetTextureOffsetInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetTextureOffsetInferiors = new Hashtable(0); - private static final Map allBaseAfterGetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetTextureOffsetInferiors = new Hashtable(0); - - public static void render(IModelPlayerAPI target, net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isRenderModded) - modelPlayerAPI.render(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else - target.localRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - } - - private void render(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - if(beforeRenderHooks != null) - for(int i = beforeRenderHooks.length - 1; i >= 0 ; i--) - beforeRenderHooks[i].beforeRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - if(overrideRenderHooks != null) - overrideRenderHooks[overrideRenderHooks.length - 1].render(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else - modelPlayer.localRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - if(afterRenderHooks != null) - for(int i = 0; i < afterRenderHooks.length; i++) - afterRenderHooks[i].afterRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - } - - protected ModelPlayerBase GetOverwrittenRender(ModelPlayerBase overWriter) - { - if (overrideRenderHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderHooks.length; i++) - if(overrideRenderHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderHookTypes = new LinkedList(); - private final static List overrideRenderHookTypes = new LinkedList(); - private final static List afterRenderHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeRenderHooks; - private ModelPlayerBase[] overrideRenderHooks; - private ModelPlayerBase[] afterRenderHooks; - - public boolean isRenderModded; - - private static final Map allBaseBeforeRenderSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderInferiors = new Hashtable(0); - - public static void renderCloak(IModelPlayerAPI target, float paramFloat) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isRenderCloakModded) - modelPlayerAPI.renderCloak(paramFloat); - else - target.localRenderCloak(paramFloat); - } - - private void renderCloak(float paramFloat) - { - if(beforeRenderCloakHooks != null) - for(int i = beforeRenderCloakHooks.length - 1; i >= 0 ; i--) - beforeRenderCloakHooks[i].beforeRenderCloak(paramFloat); - - if(overrideRenderCloakHooks != null) - overrideRenderCloakHooks[overrideRenderCloakHooks.length - 1].renderCloak(paramFloat); - else - modelPlayer.localRenderCloak(paramFloat); - - if(afterRenderCloakHooks != null) - for(int i = 0; i < afterRenderCloakHooks.length; i++) - afterRenderCloakHooks[i].afterRenderCloak(paramFloat); - - } - - protected ModelPlayerBase GetOverwrittenRenderCloak(ModelPlayerBase overWriter) - { - if (overrideRenderCloakHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderCloakHooks.length; i++) - if(overrideRenderCloakHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderCloakHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderCloakHookTypes = new LinkedList(); - private final static List overrideRenderCloakHookTypes = new LinkedList(); - private final static List afterRenderCloakHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeRenderCloakHooks; - private ModelPlayerBase[] overrideRenderCloakHooks; - private ModelPlayerBase[] afterRenderCloakHooks; - - public boolean isRenderCloakModded; - - private static final Map allBaseBeforeRenderCloakSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderCloakInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderCloakSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderCloakInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderCloakSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderCloakInferiors = new Hashtable(0); - - public static void renderEars(IModelPlayerAPI target, float paramFloat) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isRenderEarsModded) - modelPlayerAPI.renderEars(paramFloat); - else - target.localRenderEars(paramFloat); - } - - private void renderEars(float paramFloat) - { - if(beforeRenderEarsHooks != null) - for(int i = beforeRenderEarsHooks.length - 1; i >= 0 ; i--) - beforeRenderEarsHooks[i].beforeRenderEars(paramFloat); - - if(overrideRenderEarsHooks != null) - overrideRenderEarsHooks[overrideRenderEarsHooks.length - 1].renderEars(paramFloat); - else - modelPlayer.localRenderEars(paramFloat); - - if(afterRenderEarsHooks != null) - for(int i = 0; i < afterRenderEarsHooks.length; i++) - afterRenderEarsHooks[i].afterRenderEars(paramFloat); - - } - - protected ModelPlayerBase GetOverwrittenRenderEars(ModelPlayerBase overWriter) - { - if (overrideRenderEarsHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderEarsHooks.length; i++) - if(overrideRenderEarsHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderEarsHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderEarsHookTypes = new LinkedList(); - private final static List overrideRenderEarsHookTypes = new LinkedList(); - private final static List afterRenderEarsHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeRenderEarsHooks; - private ModelPlayerBase[] overrideRenderEarsHooks; - private ModelPlayerBase[] afterRenderEarsHooks; - - public boolean isRenderEarsModded; - - private static final Map allBaseBeforeRenderEarsSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderEarsInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderEarsSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderEarsInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderEarsSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderEarsInferiors = new Hashtable(0); - - public static void setLivingAnimations(IModelPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isSetLivingAnimationsModded) - modelPlayerAPI.setLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - else - target.localSetLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - } - - private void setLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3) - { - if(beforeSetLivingAnimationsHooks != null) - for(int i = beforeSetLivingAnimationsHooks.length - 1; i >= 0 ; i--) - beforeSetLivingAnimationsHooks[i].beforeSetLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - - if(overrideSetLivingAnimationsHooks != null) - overrideSetLivingAnimationsHooks[overrideSetLivingAnimationsHooks.length - 1].setLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - else - modelPlayer.localSetLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - - if(afterSetLivingAnimationsHooks != null) - for(int i = 0; i < afterSetLivingAnimationsHooks.length; i++) - afterSetLivingAnimationsHooks[i].afterSetLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - - } - - protected ModelPlayerBase GetOverwrittenSetLivingAnimations(ModelPlayerBase overWriter) - { - if (overrideSetLivingAnimationsHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetLivingAnimationsHooks.length; i++) - if(overrideSetLivingAnimationsHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetLivingAnimationsHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetLivingAnimationsHookTypes = new LinkedList(); - private final static List overrideSetLivingAnimationsHookTypes = new LinkedList(); - private final static List afterSetLivingAnimationsHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeSetLivingAnimationsHooks; - private ModelPlayerBase[] overrideSetLivingAnimationsHooks; - private ModelPlayerBase[] afterSetLivingAnimationsHooks; - - public boolean isSetLivingAnimationsModded; - - private static final Map allBaseBeforeSetLivingAnimationsSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetLivingAnimationsInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetLivingAnimationsSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetLivingAnimationsInferiors = new Hashtable(0); - private static final Map allBaseAfterSetLivingAnimationsSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetLivingAnimationsInferiors = new Hashtable(0); - - public static void setRotationAngles(IModelPlayerAPI target, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isSetRotationAnglesModded) - modelPlayerAPI.setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - else - target.localSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - } - - private void setRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity) - { - if(beforeSetRotationAnglesHooks != null) - for(int i = beforeSetRotationAnglesHooks.length - 1; i >= 0 ; i--) - beforeSetRotationAnglesHooks[i].beforeSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - - if(overrideSetRotationAnglesHooks != null) - overrideSetRotationAnglesHooks[overrideSetRotationAnglesHooks.length - 1].setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - else - modelPlayer.localSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - - if(afterSetRotationAnglesHooks != null) - for(int i = 0; i < afterSetRotationAnglesHooks.length; i++) - afterSetRotationAnglesHooks[i].afterSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - - } - - protected ModelPlayerBase GetOverwrittenSetRotationAngles(ModelPlayerBase overWriter) - { - if (overrideSetRotationAnglesHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetRotationAnglesHooks.length; i++) - if(overrideSetRotationAnglesHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetRotationAnglesHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetRotationAnglesHookTypes = new LinkedList(); - private final static List overrideSetRotationAnglesHookTypes = new LinkedList(); - private final static List afterSetRotationAnglesHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeSetRotationAnglesHooks; - private ModelPlayerBase[] overrideSetRotationAnglesHooks; - private ModelPlayerBase[] afterSetRotationAnglesHooks; - - public boolean isSetRotationAnglesModded; - - private static final Map allBaseBeforeSetRotationAnglesSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetRotationAnglesInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetRotationAnglesSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetRotationAnglesInferiors = new Hashtable(0); - private static final Map allBaseAfterSetRotationAnglesSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetRotationAnglesInferiors = new Hashtable(0); - - public static void setTextureOffset(IModelPlayerAPI target, String paramString, int paramInt1, int paramInt2) - { - ModelPlayerAPI modelPlayerAPI = target.getModelPlayerAPI(); - if(modelPlayerAPI != null && modelPlayerAPI.isSetTextureOffsetModded) - modelPlayerAPI.setTextureOffset(paramString, paramInt1, paramInt2); - else - target.localSetTextureOffset(paramString, paramInt1, paramInt2); - } - - private void setTextureOffset(String paramString, int paramInt1, int paramInt2) - { - if(beforeSetTextureOffsetHooks != null) - for(int i = beforeSetTextureOffsetHooks.length - 1; i >= 0 ; i--) - beforeSetTextureOffsetHooks[i].beforeSetTextureOffset(paramString, paramInt1, paramInt2); - - if(overrideSetTextureOffsetHooks != null) - overrideSetTextureOffsetHooks[overrideSetTextureOffsetHooks.length - 1].setTextureOffset(paramString, paramInt1, paramInt2); - else - modelPlayer.localSetTextureOffset(paramString, paramInt1, paramInt2); - - if(afterSetTextureOffsetHooks != null) - for(int i = 0; i < afterSetTextureOffsetHooks.length; i++) - afterSetTextureOffsetHooks[i].afterSetTextureOffset(paramString, paramInt1, paramInt2); - - } - - protected ModelPlayerBase GetOverwrittenSetTextureOffset(ModelPlayerBase overWriter) - { - if (overrideSetTextureOffsetHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetTextureOffsetHooks.length; i++) - if(overrideSetTextureOffsetHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetTextureOffsetHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetTextureOffsetHookTypes = new LinkedList(); - private final static List overrideSetTextureOffsetHookTypes = new LinkedList(); - private final static List afterSetTextureOffsetHookTypes = new LinkedList(); - - private ModelPlayerBase[] beforeSetTextureOffsetHooks; - private ModelPlayerBase[] overrideSetTextureOffsetHooks; - private ModelPlayerBase[] afterSetTextureOffsetHooks; - - public boolean isSetTextureOffsetModded; - - private static final Map allBaseBeforeSetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetTextureOffsetInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetTextureOffsetInferiors = new Hashtable(0); - private static final Map allBaseAfterSetTextureOffsetSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetTextureOffsetInferiors = new Hashtable(0); - - - protected final IModelPlayerAPI modelPlayer; - private final float paramFloat1; - private final float paramFloat2; - private final int paramInt1; - private final int paramInt2; - private final String type; - - private final static Set keys = new HashSet(); - private final static Map keysToVirtualIds = new HashMap(); - private final static Set> dynamicTypes = new HashSet>(); - - private final static Map, Map> virtualDynamicHookMethods = new HashMap, Map>(); - - private final static Map, Map> beforeDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> overrideDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> afterDynamicHookMethods = new HashMap, Map>(); - - private final static List beforeLocalConstructingHookTypes = new LinkedList(); - private final static List afterLocalConstructingHookTypes = new LinkedList(); - - private static final Map> beforeDynamicHookTypes = new Hashtable>(0); - private static final Map> overrideDynamicHookTypes = new Hashtable>(0); - private static final Map> afterDynamicHookTypes = new Hashtable>(0); - - private ModelPlayerBase[] beforeLocalConstructingHooks; - private ModelPlayerBase[] afterLocalConstructingHooks; - - private final Map baseObjectsToId = new Hashtable(); - private final Map allBaseObjects = new Hashtable(); - private final Set unmodifiableAllBaseIds = Collections.unmodifiableSet(allBaseObjects.keySet()); - - private static final Map> allBaseConstructors = new Hashtable>(); - private static final Set unmodifiableAllIds = Collections.unmodifiableSet(allBaseConstructors.keySet()); - - private static final Map allBaseBeforeLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeLocalConstructingInferiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingInferiors = new Hashtable(0); - - private static final Map> allBaseBeforeDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseBeforeDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicInferiors = new Hashtable>(0); - - private static boolean initialized = false; -} diff --git a/src/main/java/api/player/model/ModelPlayerBase.java b/src/main/java/api/player/model/ModelPlayerBase.java deleted file mode 100644 index 2af21ca5..00000000 --- a/src/main/java/api/player/model/ModelPlayerBase.java +++ /dev/null @@ -1,227 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -public abstract class ModelPlayerBase -{ - public ModelPlayerBase(ModelPlayerAPI modelPlayerAPI) - { - this.internalModelPlayerAPI = modelPlayerAPI; - this.modelPlayerAPI = modelPlayerAPI.modelPlayer; - this.modelPlayer = modelPlayerAPI.modelPlayer.getModelPlayer(); - } - - public void beforeBaseAttach(boolean onTheFly) - { - } - - public void afterBaseAttach(boolean onTheFly) - { - } - - public void beforeLocalConstructing(float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - } - - public void afterLocalConstructing(float paramFloat1, float paramFloat2, int paramInt1, int paramInt2) - { - } - - public void beforeBaseDetach(boolean onTheFly) - { - } - - public void afterBaseDetach(boolean onTheFly) - { - } - - public Object dynamic(String key, Object[] parameters) - { - return internalModelPlayerAPI.dynamicOverwritten(key, parameters, this); - } - - public final int hashCode() - { - return super.hashCode(); - } - - public void beforeGetRandomModelBox(java.util.Random paramRandom) - { - } - - public net.minecraft.client.model.ModelRenderer getRandomModelBox(java.util.Random paramRandom) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenGetRandomModelBox(this); - - net.minecraft.client.model.ModelRenderer _result; - if(overwritten == null) - _result = modelPlayerAPI.localGetRandomModelBox(paramRandom); - else if(overwritten != this) - _result = overwritten.getRandomModelBox(paramRandom); - else - _result = null; - - return _result; - } - - public void afterGetRandomModelBox(java.util.Random paramRandom) - { - } - - public void beforeGetTextureOffset(String paramString) - { - } - - public net.minecraft.client.model.TextureOffset getTextureOffset(String paramString) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenGetTextureOffset(this); - - net.minecraft.client.model.TextureOffset _result; - if(overwritten == null) - _result = modelPlayerAPI.localGetTextureOffset(paramString); - else if(overwritten != this) - _result = overwritten.getTextureOffset(paramString); - else - _result = null; - - return _result; - } - - public void afterGetTextureOffset(String paramString) - { - } - - public void beforeRender(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - } - - public void render(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenRender(this); - - if(overwritten == null) - modelPlayerAPI.localRender(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else if(overwritten != this) - overwritten.render(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - } - - public void afterRender(net.minecraft.entity.Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - } - - public void beforeRenderCloak(float paramFloat) - { - } - - public void renderCloak(float paramFloat) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenRenderCloak(this); - - if(overwritten == null) - modelPlayerAPI.localRenderCloak(paramFloat); - else if(overwritten != this) - overwritten.renderCloak(paramFloat); - - } - - public void afterRenderCloak(float paramFloat) - { - } - - public void beforeRenderEars(float paramFloat) - { - } - - public void renderEars(float paramFloat) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenRenderEars(this); - - if(overwritten == null) - modelPlayerAPI.localRenderEars(paramFloat); - else if(overwritten != this) - overwritten.renderEars(paramFloat); - - } - - public void afterRenderEars(float paramFloat) - { - } - - public void beforeSetLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void setLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenSetLivingAnimations(this); - - if(overwritten == null) - modelPlayerAPI.localSetLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - else if(overwritten != this) - overwritten.setLivingAnimations(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3); - - } - - public void afterSetLivingAnimations(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void beforeSetRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity) - { - } - - public void setRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenSetRotationAngles(this); - - if(overwritten == null) - modelPlayerAPI.localSetRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - else if(overwritten != this) - overwritten.setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity); - - } - - public void afterSetRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, net.minecraft.entity.Entity paramEntity) - { - } - - public void beforeSetTextureOffset(String paramString, int paramInt1, int paramInt2) - { - } - - public void setTextureOffset(String paramString, int paramInt1, int paramInt2) - { - ModelPlayerBase overwritten = internalModelPlayerAPI.GetOverwrittenSetTextureOffset(this); - - if(overwritten == null) - modelPlayerAPI.localSetTextureOffset(paramString, paramInt1, paramInt2); - else if(overwritten != this) - overwritten.setTextureOffset(paramString, paramInt1, paramInt2); - - } - - public void afterSetTextureOffset(String paramString, int paramInt1, int paramInt2) - { - } - - protected final api.player.model.ModelPlayer modelPlayer; - protected final IModelPlayer modelPlayerAPI; - private final ModelPlayerAPI internalModelPlayerAPI; -} diff --git a/src/main/java/api/player/model/ModelPlayerBaseSorter.java b/src/main/java/api/player/model/ModelPlayerBaseSorter.java deleted file mode 100644 index 054c40b7..00000000 --- a/src/main/java/api/player/model/ModelPlayerBaseSorter.java +++ /dev/null @@ -1,259 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -import java.util.*; - -public final class ModelPlayerBaseSorter -{ - public ModelPlayerBaseSorter(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - this.list = list; - this.allBaseSuperiors = allBaseSuperiors; - this.allBaseInferiors = allBaseInferiors; - this.methodName = methodName; - } - - public void Sort() - { - if(list.size() <= 1) - return; - - if(explicitInferiors != null) - explicitInferiors.clear(); - - if(explicitSuperiors != null) - explicitSuperiors.clear(); - - if(directInferiorsMap != null) - directInferiorsMap.clear(); - - if(allInferiors != null) - allInferiors.clear(); - - for(int i = 0; i < list.size(); i++) - { - String baseId = list.get(i); - - String[] inferiorNames = allBaseInferiors.get(baseId); - boolean hasInferiors = inferiorNames != null && inferiorNames.length > 0; - - String[] superiorNames = allBaseSuperiors.get(baseId); - boolean hasSuperiors = superiorNames != null && superiorNames.length > 0; - - if((hasInferiors || hasSuperiors) && directInferiorsMap == null) - directInferiorsMap = new Hashtable>(); - - if(hasInferiors) - explicitInferiors = build(baseId, explicitInferiors, directInferiorsMap, null, inferiorNames); - - if(hasSuperiors) - explicitSuperiors = build(baseId, explicitSuperiors, null, directInferiorsMap, superiorNames); - } - if(directInferiorsMap != null) - { - for(int i = 0; i < list.size() - 1; i++) - for(int n = i + 1; n < list.size(); n++) - { - String left = list.get(i); - String right = list.get(n); - - Set leftInferiors = null, rightInferiors = null; - if(explicitInferiors != null) - { - leftInferiors = explicitInferiors.get(left); - rightInferiors = explicitInferiors.get(right); - } - - Set leftSuperiors = null, rightSuperiors = null; - if(explicitSuperiors != null) - { - leftSuperiors = explicitSuperiors.get(left); - rightSuperiors = explicitSuperiors.get(right); - } - - boolean leftWantsToBeInferiorToRight = leftSuperiors != null && leftSuperiors.contains(right); - boolean leftWantsToBeSuperiorToRight = leftInferiors != null && leftInferiors.contains(right); - - boolean rightWantsToBeInferiorToLeft = rightSuperiors != null && rightSuperiors.contains(left); - boolean rightWantsToBeSuperiorToLeft = rightInferiors != null && rightInferiors.contains(left); - - if(leftWantsToBeInferiorToRight && rightWantsToBeInferiorToLeft) - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be inferior to '" + right + "' and '" + right + "' wants to be inferior to '" + left + "'"); - if(leftWantsToBeSuperiorToRight && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior to '" + right + "' and '" + right + "' wants to be superior to '" + left + "'"); - - if(leftWantsToBeInferiorToRight && leftWantsToBeSuperiorToRight) - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior and inferior to '" + right + "'"); - if(rightWantsToBeInferiorToLeft && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. '" + right + "' wants to be superior and inferior to '" + left + "'"); - } - - if(allInferiors == null) - allInferiors = new Hashtable>(); - - for(int i = 0; i < list.size(); i++) - build(list.get(i), null); - } - - if (withoutSuperiors == null) - withoutSuperiors = new LinkedList(); - - int offset = 0; - int size = list.size(); - - while(size > 1) - { - withoutSuperiors.clear(); - for(int i = offset; i < offset + size; i++) - withoutSuperiors.add(list.get(i)); - - if(allInferiors != null) - for(int i = offset; i < offset + size; i++) - { - Set inferiors = allInferiors.get(list.get(i)); - if (inferiors != null) - withoutSuperiors.removeAll(inferiors); - } - - boolean initial = true; - for(int i = offset; i < offset + size; i++) - { - String key = list.get(i); - if(withoutSuperiors.contains(key)) - { - if(initial) - { - Set inferiors = null; - if(allInferiors != null) - inferiors = allInferiors.get(key); - if(inferiors == null || inferiors.isEmpty()) - { - withoutSuperiors.remove(key); - size--; - offset++; - continue; - } - } - list.remove(i--); - size--; - } - initial = false; - } - list.addAll(offset + size, withoutSuperiors); - } - } - - private Set build(String type, String startType) - { - Set inferiors = allInferiors.get(type); - if(inferiors == null) - { - inferiors = build(type, null, startType != null ? startType : type); - if(inferiors == null) - inferiors = Empty; - allInferiors.put(type, inferiors); - } - return inferiors; - } - - private Set build(String type, Set inferiors, String startType) - { - Set directInferiors = directInferiorsMap.get(type); - if(directInferiors == null) - return inferiors; - - if(inferiors == null) - inferiors = new HashSet(); - - Iterator iter = directInferiors.iterator(); - while(iter.hasNext()) - { - String inferiorType = iter.next(); - if(inferiorType == startType) - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + startType + "'"); - if(list.contains(inferiorType)) - inferiors.add(inferiorType); - - Set inferiorSet; - try - { - inferiorSet = build(inferiorType, startType); - } - catch(UnsupportedOperationException uoe) - { - throw new UnsupportedOperationException("Can not sort ModelPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + inferiorType + "'", uoe); - } - - if(inferiorSet != Empty) - inferiors.addAll(inferiorSet); - } - return inferiors; - } - - private static Map> build(String baseId, Map> map, Map> directMap, Map> otherDirectMap, String[] names) - { - if(map == null) - map = new Hashtable>(); - - Set types = new HashSet(); - for(int n = 0; n < names.length; n++) - { - if(names[n] != null) - types.add(names[n]); - } - - if(directMap != null) - getOrCreateSet(directMap, baseId).addAll(types); - - if(otherDirectMap != null) - { - Iterator iter = types.iterator(); - while(iter.hasNext()) - getOrCreateSet(otherDirectMap, iter.next()).add(baseId); - } - - map.put(baseId, types); - return map; - } - - private static Set getOrCreateSet(Map> map, String key) - { - Set value = map.get(key); - if(value != null) - return value; - - value = new HashSet(); - map.put(key, value); - return value; - } - - private Map> explicitInferiors; - private Map> explicitSuperiors; - private Map> directInferiorsMap; - private Map> allInferiors; - private List withoutSuperiors; - - private final List list; - private final Map allBaseSuperiors; - private final Map allBaseInferiors; - private final String methodName; - - private static final Set Empty = new HashSet(); -} diff --git a/src/main/java/api/player/model/ModelPlayerBaseSorting.java b/src/main/java/api/player/model/ModelPlayerBaseSorting.java deleted file mode 100644 index bddc6a26..00000000 --- a/src/main/java/api/player/model/ModelPlayerBaseSorting.java +++ /dev/null @@ -1,693 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -import java.util.*; - -public final class ModelPlayerBaseSorting -{ - private String[] beforeLocalConstructingSuperiors = null; - private String[] beforeLocalConstructingInferiors = null; - private String[] afterLocalConstructingSuperiors = null; - private String[] afterLocalConstructingInferiors = null; - - private Map dynamicBeforeSuperiors = null; - private Map dynamicBeforeInferiors = null; - private Map dynamicOverrideSuperiors = null; - private Map dynamicOverrideInferiors = null; - private Map dynamicAfterSuperiors = null; - private Map dynamicAfterInferiors = null; - - private String[] beforeGetRandomModelBoxSuperiors = null; - private String[] beforeGetRandomModelBoxInferiors = null; - private String[] overrideGetRandomModelBoxSuperiors = null; - private String[] overrideGetRandomModelBoxInferiors = null; - private String[] afterGetRandomModelBoxSuperiors = null; - private String[] afterGetRandomModelBoxInferiors = null; - - private String[] beforeGetTextureOffsetSuperiors = null; - private String[] beforeGetTextureOffsetInferiors = null; - private String[] overrideGetTextureOffsetSuperiors = null; - private String[] overrideGetTextureOffsetInferiors = null; - private String[] afterGetTextureOffsetSuperiors = null; - private String[] afterGetTextureOffsetInferiors = null; - - private String[] beforeRenderSuperiors = null; - private String[] beforeRenderInferiors = null; - private String[] overrideRenderSuperiors = null; - private String[] overrideRenderInferiors = null; - private String[] afterRenderSuperiors = null; - private String[] afterRenderInferiors = null; - - private String[] beforeRenderCloakSuperiors = null; - private String[] beforeRenderCloakInferiors = null; - private String[] overrideRenderCloakSuperiors = null; - private String[] overrideRenderCloakInferiors = null; - private String[] afterRenderCloakSuperiors = null; - private String[] afterRenderCloakInferiors = null; - - private String[] beforeRenderEarsSuperiors = null; - private String[] beforeRenderEarsInferiors = null; - private String[] overrideRenderEarsSuperiors = null; - private String[] overrideRenderEarsInferiors = null; - private String[] afterRenderEarsSuperiors = null; - private String[] afterRenderEarsInferiors = null; - - private String[] beforeSetLivingAnimationsSuperiors = null; - private String[] beforeSetLivingAnimationsInferiors = null; - private String[] overrideSetLivingAnimationsSuperiors = null; - private String[] overrideSetLivingAnimationsInferiors = null; - private String[] afterSetLivingAnimationsSuperiors = null; - private String[] afterSetLivingAnimationsInferiors = null; - - private String[] beforeSetRotationAnglesSuperiors = null; - private String[] beforeSetRotationAnglesInferiors = null; - private String[] overrideSetRotationAnglesSuperiors = null; - private String[] overrideSetRotationAnglesInferiors = null; - private String[] afterSetRotationAnglesSuperiors = null; - private String[] afterSetRotationAnglesInferiors = null; - - private String[] beforeSetTextureOffsetSuperiors = null; - private String[] beforeSetTextureOffsetInferiors = null; - private String[] overrideSetTextureOffsetSuperiors = null; - private String[] overrideSetTextureOffsetInferiors = null; - private String[] afterSetTextureOffsetSuperiors = null; - private String[] afterSetTextureOffsetInferiors = null; - - - public String[] getBeforeLocalConstructingSuperiors() - { - return beforeLocalConstructingSuperiors; - } - - public String[] getBeforeLocalConstructingInferiors() - { - return beforeLocalConstructingInferiors; - } - - public String[] getAfterLocalConstructingSuperiors() - { - return afterLocalConstructingSuperiors; - } - - public String[] getAfterLocalConstructingInferiors() - { - return afterLocalConstructingInferiors; - } - - public void setBeforeLocalConstructingSuperiors(String[] value) - { - beforeLocalConstructingSuperiors = value; - } - - public void setBeforeLocalConstructingInferiors(String[] value) - { - beforeLocalConstructingInferiors = value; - } - - public void setAfterLocalConstructingSuperiors(String[] value) - { - afterLocalConstructingSuperiors = value; - } - - public void setAfterLocalConstructingInferiors(String[] value) - { - afterLocalConstructingInferiors = value; - } - - public Map getDynamicBeforeSuperiors() - { - return dynamicBeforeSuperiors; - } - - public Map getDynamicBeforeInferiors() - { - return dynamicBeforeInferiors; - } - - public Map getDynamicOverrideSuperiors() - { - return dynamicOverrideSuperiors; - } - - public Map getDynamicOverrideInferiors() - { - return dynamicOverrideInferiors; - } - - public Map getDynamicAfterSuperiors() - { - return dynamicAfterSuperiors; - } - - public Map getDynamicAfterInferiors() - { - return dynamicAfterInferiors; - } - - public void setDynamicBeforeSuperiors(String name, String[] superiors) - { - dynamicBeforeSuperiors = setDynamic(name, superiors, dynamicBeforeSuperiors); - } - - public void setDynamicBeforeInferiors(String name, String[] inferiors) - { - dynamicBeforeInferiors = setDynamic(name, inferiors, dynamicBeforeInferiors); - } - - public void setDynamicOverrideSuperiors(String name, String[] superiors) - { - dynamicOverrideSuperiors = setDynamic(name, superiors, dynamicOverrideSuperiors); - } - - public void setDynamicOverrideInferiors(String name, String[] inferiors) - { - dynamicOverrideInferiors = setDynamic(name, inferiors, dynamicOverrideInferiors); - } - - public void setDynamicAfterSuperiors(String name, String[] superiors) - { - dynamicAfterSuperiors = setDynamic(name, superiors, dynamicAfterSuperiors); - } - - public void setDynamicAfterInferiors(String name, String[] inferiors) - { - dynamicAfterInferiors = setDynamic(name, inferiors, dynamicAfterInferiors); - } - - private Map setDynamic(String name, String[] names, Map map) - { - if(name == null) - throw new IllegalArgumentException("Parameter 'name' may not be null"); - - if(names == null) - { - if(map != null) - map.remove(name); - return map; - } - - if(map == null) - map = new HashMap(); - map.put(name, names); - - return map; - } - - public String[] getBeforeGetRandomModelBoxSuperiors() - { - return beforeGetRandomModelBoxSuperiors; - } - - public String[] getBeforeGetRandomModelBoxInferiors() - { - return beforeGetRandomModelBoxInferiors; - } - - public String[] getOverrideGetRandomModelBoxSuperiors() - { - return overrideGetRandomModelBoxSuperiors; - } - - public String[] getOverrideGetRandomModelBoxInferiors() - { - return overrideGetRandomModelBoxInferiors; - } - - public String[] getAfterGetRandomModelBoxSuperiors() - { - return afterGetRandomModelBoxSuperiors; - } - - public String[] getAfterGetRandomModelBoxInferiors() - { - return afterGetRandomModelBoxInferiors; - } - - public void setBeforeGetRandomModelBoxSuperiors(String[] value) - { - beforeGetRandomModelBoxSuperiors = value; - } - - public void setBeforeGetRandomModelBoxInferiors(String[] value) - { - beforeGetRandomModelBoxInferiors = value; - } - - public void setOverrideGetRandomModelBoxSuperiors(String[] value) - { - overrideGetRandomModelBoxSuperiors = value; - } - - public void setOverrideGetRandomModelBoxInferiors(String[] value) - { - overrideGetRandomModelBoxInferiors = value; - } - - public void setAfterGetRandomModelBoxSuperiors(String[] value) - { - afterGetRandomModelBoxSuperiors = value; - } - - public void setAfterGetRandomModelBoxInferiors(String[] value) - { - afterGetRandomModelBoxInferiors = value; - } - - public String[] getBeforeGetTextureOffsetSuperiors() - { - return beforeGetTextureOffsetSuperiors; - } - - public String[] getBeforeGetTextureOffsetInferiors() - { - return beforeGetTextureOffsetInferiors; - } - - public String[] getOverrideGetTextureOffsetSuperiors() - { - return overrideGetTextureOffsetSuperiors; - } - - public String[] getOverrideGetTextureOffsetInferiors() - { - return overrideGetTextureOffsetInferiors; - } - - public String[] getAfterGetTextureOffsetSuperiors() - { - return afterGetTextureOffsetSuperiors; - } - - public String[] getAfterGetTextureOffsetInferiors() - { - return afterGetTextureOffsetInferiors; - } - - public void setBeforeGetTextureOffsetSuperiors(String[] value) - { - beforeGetTextureOffsetSuperiors = value; - } - - public void setBeforeGetTextureOffsetInferiors(String[] value) - { - beforeGetTextureOffsetInferiors = value; - } - - public void setOverrideGetTextureOffsetSuperiors(String[] value) - { - overrideGetTextureOffsetSuperiors = value; - } - - public void setOverrideGetTextureOffsetInferiors(String[] value) - { - overrideGetTextureOffsetInferiors = value; - } - - public void setAfterGetTextureOffsetSuperiors(String[] value) - { - afterGetTextureOffsetSuperiors = value; - } - - public void setAfterGetTextureOffsetInferiors(String[] value) - { - afterGetTextureOffsetInferiors = value; - } - - public String[] getBeforeRenderSuperiors() - { - return beforeRenderSuperiors; - } - - public String[] getBeforeRenderInferiors() - { - return beforeRenderInferiors; - } - - public String[] getOverrideRenderSuperiors() - { - return overrideRenderSuperiors; - } - - public String[] getOverrideRenderInferiors() - { - return overrideRenderInferiors; - } - - public String[] getAfterRenderSuperiors() - { - return afterRenderSuperiors; - } - - public String[] getAfterRenderInferiors() - { - return afterRenderInferiors; - } - - public void setBeforeRenderSuperiors(String[] value) - { - beforeRenderSuperiors = value; - } - - public void setBeforeRenderInferiors(String[] value) - { - beforeRenderInferiors = value; - } - - public void setOverrideRenderSuperiors(String[] value) - { - overrideRenderSuperiors = value; - } - - public void setOverrideRenderInferiors(String[] value) - { - overrideRenderInferiors = value; - } - - public void setAfterRenderSuperiors(String[] value) - { - afterRenderSuperiors = value; - } - - public void setAfterRenderInferiors(String[] value) - { - afterRenderInferiors = value; - } - - public String[] getBeforeRenderCloakSuperiors() - { - return beforeRenderCloakSuperiors; - } - - public String[] getBeforeRenderCloakInferiors() - { - return beforeRenderCloakInferiors; - } - - public String[] getOverrideRenderCloakSuperiors() - { - return overrideRenderCloakSuperiors; - } - - public String[] getOverrideRenderCloakInferiors() - { - return overrideRenderCloakInferiors; - } - - public String[] getAfterRenderCloakSuperiors() - { - return afterRenderCloakSuperiors; - } - - public String[] getAfterRenderCloakInferiors() - { - return afterRenderCloakInferiors; - } - - public void setBeforeRenderCloakSuperiors(String[] value) - { - beforeRenderCloakSuperiors = value; - } - - public void setBeforeRenderCloakInferiors(String[] value) - { - beforeRenderCloakInferiors = value; - } - - public void setOverrideRenderCloakSuperiors(String[] value) - { - overrideRenderCloakSuperiors = value; - } - - public void setOverrideRenderCloakInferiors(String[] value) - { - overrideRenderCloakInferiors = value; - } - - public void setAfterRenderCloakSuperiors(String[] value) - { - afterRenderCloakSuperiors = value; - } - - public void setAfterRenderCloakInferiors(String[] value) - { - afterRenderCloakInferiors = value; - } - - public String[] getBeforeRenderEarsSuperiors() - { - return beforeRenderEarsSuperiors; - } - - public String[] getBeforeRenderEarsInferiors() - { - return beforeRenderEarsInferiors; - } - - public String[] getOverrideRenderEarsSuperiors() - { - return overrideRenderEarsSuperiors; - } - - public String[] getOverrideRenderEarsInferiors() - { - return overrideRenderEarsInferiors; - } - - public String[] getAfterRenderEarsSuperiors() - { - return afterRenderEarsSuperiors; - } - - public String[] getAfterRenderEarsInferiors() - { - return afterRenderEarsInferiors; - } - - public void setBeforeRenderEarsSuperiors(String[] value) - { - beforeRenderEarsSuperiors = value; - } - - public void setBeforeRenderEarsInferiors(String[] value) - { - beforeRenderEarsInferiors = value; - } - - public void setOverrideRenderEarsSuperiors(String[] value) - { - overrideRenderEarsSuperiors = value; - } - - public void setOverrideRenderEarsInferiors(String[] value) - { - overrideRenderEarsInferiors = value; - } - - public void setAfterRenderEarsSuperiors(String[] value) - { - afterRenderEarsSuperiors = value; - } - - public void setAfterRenderEarsInferiors(String[] value) - { - afterRenderEarsInferiors = value; - } - - public String[] getBeforeSetLivingAnimationsSuperiors() - { - return beforeSetLivingAnimationsSuperiors; - } - - public String[] getBeforeSetLivingAnimationsInferiors() - { - return beforeSetLivingAnimationsInferiors; - } - - public String[] getOverrideSetLivingAnimationsSuperiors() - { - return overrideSetLivingAnimationsSuperiors; - } - - public String[] getOverrideSetLivingAnimationsInferiors() - { - return overrideSetLivingAnimationsInferiors; - } - - public String[] getAfterSetLivingAnimationsSuperiors() - { - return afterSetLivingAnimationsSuperiors; - } - - public String[] getAfterSetLivingAnimationsInferiors() - { - return afterSetLivingAnimationsInferiors; - } - - public void setBeforeSetLivingAnimationsSuperiors(String[] value) - { - beforeSetLivingAnimationsSuperiors = value; - } - - public void setBeforeSetLivingAnimationsInferiors(String[] value) - { - beforeSetLivingAnimationsInferiors = value; - } - - public void setOverrideSetLivingAnimationsSuperiors(String[] value) - { - overrideSetLivingAnimationsSuperiors = value; - } - - public void setOverrideSetLivingAnimationsInferiors(String[] value) - { - overrideSetLivingAnimationsInferiors = value; - } - - public void setAfterSetLivingAnimationsSuperiors(String[] value) - { - afterSetLivingAnimationsSuperiors = value; - } - - public void setAfterSetLivingAnimationsInferiors(String[] value) - { - afterSetLivingAnimationsInferiors = value; - } - - public String[] getBeforeSetRotationAnglesSuperiors() - { - return beforeSetRotationAnglesSuperiors; - } - - public String[] getBeforeSetRotationAnglesInferiors() - { - return beforeSetRotationAnglesInferiors; - } - - public String[] getOverrideSetRotationAnglesSuperiors() - { - return overrideSetRotationAnglesSuperiors; - } - - public String[] getOverrideSetRotationAnglesInferiors() - { - return overrideSetRotationAnglesInferiors; - } - - public String[] getAfterSetRotationAnglesSuperiors() - { - return afterSetRotationAnglesSuperiors; - } - - public String[] getAfterSetRotationAnglesInferiors() - { - return afterSetRotationAnglesInferiors; - } - - public void setBeforeSetRotationAnglesSuperiors(String[] value) - { - beforeSetRotationAnglesSuperiors = value; - } - - public void setBeforeSetRotationAnglesInferiors(String[] value) - { - beforeSetRotationAnglesInferiors = value; - } - - public void setOverrideSetRotationAnglesSuperiors(String[] value) - { - overrideSetRotationAnglesSuperiors = value; - } - - public void setOverrideSetRotationAnglesInferiors(String[] value) - { - overrideSetRotationAnglesInferiors = value; - } - - public void setAfterSetRotationAnglesSuperiors(String[] value) - { - afterSetRotationAnglesSuperiors = value; - } - - public void setAfterSetRotationAnglesInferiors(String[] value) - { - afterSetRotationAnglesInferiors = value; - } - - public String[] getBeforeSetTextureOffsetSuperiors() - { - return beforeSetTextureOffsetSuperiors; - } - - public String[] getBeforeSetTextureOffsetInferiors() - { - return beforeSetTextureOffsetInferiors; - } - - public String[] getOverrideSetTextureOffsetSuperiors() - { - return overrideSetTextureOffsetSuperiors; - } - - public String[] getOverrideSetTextureOffsetInferiors() - { - return overrideSetTextureOffsetInferiors; - } - - public String[] getAfterSetTextureOffsetSuperiors() - { - return afterSetTextureOffsetSuperiors; - } - - public String[] getAfterSetTextureOffsetInferiors() - { - return afterSetTextureOffsetInferiors; - } - - public void setBeforeSetTextureOffsetSuperiors(String[] value) - { - beforeSetTextureOffsetSuperiors = value; - } - - public void setBeforeSetTextureOffsetInferiors(String[] value) - { - beforeSetTextureOffsetInferiors = value; - } - - public void setOverrideSetTextureOffsetSuperiors(String[] value) - { - overrideSetTextureOffsetSuperiors = value; - } - - public void setOverrideSetTextureOffsetInferiors(String[] value) - { - overrideSetTextureOffsetInferiors = value; - } - - public void setAfterSetTextureOffsetSuperiors(String[] value) - { - afterSetTextureOffsetSuperiors = value; - } - - public void setAfterSetTextureOffsetInferiors(String[] value) - { - afterSetTextureOffsetInferiors = value; - } - -} diff --git a/src/main/java/api/player/model/ModelPlayerClassVisitor.java b/src/main/java/api/player/model/ModelPlayerClassVisitor.java deleted file mode 100644 index b8414072..00000000 --- a/src/main/java/api/player/model/ModelPlayerClassVisitor.java +++ /dev/null @@ -1,903 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -import java.io.*; - -import org.objectweb.asm.*; - -public final class ModelPlayerClassVisitor extends ClassVisitor -{ - public static final String targetClassName = "api.player.model.ModelPlayer"; - public static final String obfuscatedClassReference = "api/player/model/ModelPlayer"; - public static final String obfuscatedSuperClassReference = "bhm"; - public static final String deobfuscatedClassReference = "api/player/model/ModelPlayer"; - public static final String deobfuscateSuperClassReference = "net/minecraft/client/model/ModelBiped"; - - private boolean hadLocalGetRandomModelBox; - private boolean hadLocalGetTextureOffset; - private boolean hadLocalRender; - private boolean hadLocalRenderCloak; - private boolean hadLocalRenderEars; - private boolean hadLocalSetLivingAnimations; - private boolean hadLocalSetRotationAngles; - private boolean hadLocalSetTextureOffset; - - public static byte[] transform(byte[] bytes, boolean isObfuscated) - { - try - { - ByteArrayInputStream in = new ByteArrayInputStream(bytes); - ClassReader cr = new ClassReader(in); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - ModelPlayerClassVisitor p = new ModelPlayerClassVisitor(cw, isObfuscated); - - cr.accept(p, 0); - - byte[] result = cw.toByteArray(); - in.close(); - return result; - } - catch(IOException ioe) - { - throw new RuntimeException(ioe); - } - } - - private final boolean isObfuscated; - - public ModelPlayerClassVisitor(ClassVisitor classVisitor, boolean isObfuscated) - { - super(262144, classVisitor); - this.isObfuscated = isObfuscated; - } - - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - { - if(isObfuscated && superName.equals("net/minecraft/client/model/ModelBiped")) - superName = "bhm"; - String[] newInterfaces = new String[interfaces.length + 1]; - for(int i=0; i") && desc.equals("()V")) - { - desc = "(Ljava/lang/String;)V"; - - MethodVisitor mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "", "()V", signature, exceptions); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitInsn(Opcodes.ACONST_NULL); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "api/player/model/ModelPlayer", "", desc); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - return new ModelPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated, false, 1); - } - - if(name.equals("") && desc.equals("(F)V")) - { - desc = "(FLjava/lang/String;)V"; - - MethodVisitor mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "", "(F)V", signature, exceptions); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitInsn(Opcodes.ACONST_NULL); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "api/player/model/ModelPlayer", "", desc); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - return new ModelPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated, false, 2); - } - - if(name.equals("") && desc.equals("(FFII)V")) - { - desc = "(FFIILjava/lang/String;)V"; - - MethodVisitor mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "", "(FFII)V", signature, exceptions); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitInsn(Opcodes.ACONST_NULL); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "api/player/model/ModelPlayer", "", desc); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - return new ModelPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated, true, 5); - } - - - if(name.equals(isObfuscated ? "a" : "getRandomModelBox") && desc.equals(isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;")) - { - hadLocalGetRandomModelBox = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localGetRandomModelBox", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getTextureOffset") && desc.equals(isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;")) - { - hadLocalGetTextureOffset = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localGetTextureOffset", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "render") && desc.equals(isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V")) - { - hadLocalRender = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localRender", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "c" : "renderCloak") && desc.equals("(F)V")) - { - hadLocalRenderCloak = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localRenderCloak", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "renderEars") && desc.equals("(F)V")) - { - hadLocalRenderEars = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localRenderEars", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setLivingAnimations") && desc.equals(isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V")) - { - hadLocalSetLivingAnimations = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localSetLivingAnimations", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setRotationAngles") && desc.equals(isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V")) - { - hadLocalSetRotationAngles = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localSetRotationAngles", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setTextureOffset") && desc.equals("(Ljava/lang/String;II)V")) - { - hadLocalSetTextureOffset = true; - return super.visitMethod(Opcodes.ACC_PUBLIC, "localSetTextureOffset", desc, signature, exceptions); - } - - return super.visitMethod(access, name, desc, signature, exceptions); - } - - public void visitEnd() - { - MethodVisitor mv; - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getRandomModelBox", "(Lapi/player/model/IModelPlayerAPI;Ljava/util/Random;)" + (isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "getRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "getRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetRandomModelBox) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localGetRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "getRandomModelBox", "" + (isObfuscated ? "(Ljava/util/Random;)Lbix;" : "(Ljava/util/Random;)Lnet/minecraft/client/model/ModelRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getTextureOffset", "(Lapi/player/model/IModelPlayerAPI;Ljava/lang/String;)" + (isObfuscated ? "Lbiy;" : "Lnet/minecraft/client/model/TextureOffset;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "getTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "getTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetTextureOffset) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localGetTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "getTextureOffset", "" + (isObfuscated ? "(Ljava/lang/String;)Lbiy;" : "(Ljava/lang/String;)Lnet/minecraft/client/model/TextureOffset;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "render", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "render", "(Lapi/player/model/IModelPlayerAPI;" + (isObfuscated ? "Lsa;FFFFFF" : "Lnet/minecraft/entity/Entity;FFFFFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRender", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "render", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRender", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "render", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRender) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localRender", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "render", "" + (isObfuscated ? "(Lsa;FFFFFF)V" : "(Lnet/minecraft/entity/Entity;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "c" : "renderCloak", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "renderCloak", "(Lapi/player/model/IModelPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderCloak", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "c" : "renderCloak", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderCloak", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "c" : "renderCloak", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderCloak) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localRenderCloak", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "c" : "renderCloak", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "renderEars", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "renderEars", "(Lapi/player/model/IModelPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderEars", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "b" : "renderEars", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderEars", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "b" : "renderEars", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderEars) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localRenderEars", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "b" : "renderEars", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "setLivingAnimations", "(Lapi/player/model/IModelPlayerAPI;" + (isObfuscated ? "Lsv;FFF" : "Lnet/minecraft/entity/EntityLivingBase;FFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "setLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetLivingAnimations) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localSetLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setLivingAnimations", "" + (isObfuscated ? "(Lsv;FFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "setRotationAngles", "(Lapi/player/model/IModelPlayerAPI;" + (isObfuscated ? "FFFFFFLsa;" : "FFFFFFLnet/minecraft/entity/Entity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "setRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetRotationAngles) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localSetRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setRotationAngles", "" + (isObfuscated ? "(FFFFFFLsa;)V" : "(FFFFFFLnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setTextureOffset", "(Ljava/lang/String;II)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "setTextureOffset", "(Lapi/player/model/IModelPlayerAPI;Ljava/lang/String;II)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetTextureOffset", "(Ljava/lang/String;II)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "api/player/model/ModelPlayer", isObfuscated ? "a" : "setTextureOffset", "(Ljava/lang/String;II)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetTextureOffset", "(Ljava/lang/String;II)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setTextureOffset", "(Ljava/lang/String;II)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetTextureOffset) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "localSetTextureOffset", "(Ljava/lang/String;II)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped", isObfuscated ? "a" : "setTextureOffset", "(Ljava/lang/String;II)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAimedBowField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "o" : "aimedBow", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAimedBowField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "o" : "aimedBow", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedBodyField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "e" : "bipedBody", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedBodyField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "e" : "bipedBody", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedCloakField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "k" : "bipedCloak", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedCloakField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "k" : "bipedCloak", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedEarsField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "j" : "bipedEars", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedEarsField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "j" : "bipedEars", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedHeadField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "c" : "bipedHead", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedHeadField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "c" : "bipedHead", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedHeadwearField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "d" : "bipedHeadwear", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedHeadwearField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "d" : "bipedHeadwear", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedLeftArmField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "g" : "bipedLeftArm", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedLeftArmField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "g" : "bipedLeftArm", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedLeftLegField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "i" : "bipedLeftLeg", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedLeftLegField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "i" : "bipedLeftLeg", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedRightArmField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "f" : "bipedRightArm", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedRightArmField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "f" : "bipedRightArm", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBipedRightLegField", isObfuscated ? "()Lbix;" : "()Lnet/minecraft/client/model/ModelRenderer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "h" : "bipedRightLeg", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBipedRightLegField", isObfuscated ? "(Lbix;)V" : "(Lnet/minecraft/client/model/ModelRenderer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "h" : "bipedRightLeg", isObfuscated ? "Lbix;" : "Lnet/minecraft/client/model/ModelRenderer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBoxListField", "()Ljava/util/List;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "r" : "boxList", "Ljava/util/List;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setBoxListField", "(Ljava/util/List;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "r" : "boxList", "Ljava/util/List;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHeldItemLeftField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "l" : "heldItemLeft", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHeldItemLeftField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "l" : "heldItemLeft", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHeldItemRightField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "m" : "heldItemRight", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHeldItemRightField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "m" : "heldItemRight", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsChildField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "s" : "isChild", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsChildField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "s" : "isChild", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsRidingField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "q" : "isRiding", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsRidingField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "q" : "isRiding", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsSneakField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "n" : "isSneak", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsSneakField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "n" : "isSneak", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getOnGroundField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "p" : "onGround", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setOnGroundField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "p" : "onGround", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTextureHeightField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "u" : "textureHeight", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTextureHeightField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "u" : "textureHeight", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTextureWidthField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", isObfuscated ? "t" : "textureWidth", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTextureWidthField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", isObfuscated ? "t" : "textureWidth", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelPlayerBase", "(Ljava/lang/String;)Lapi/player/model/ModelPlayerBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getModelPlayerBase", "(Lapi/player/model/IModelPlayerAPI;Ljava/lang/String;)Lapi/player/model/ModelPlayerBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelPlayerBaseIds", "()Ljava/util/Set;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getModelPlayerBaseIds", "(Lapi/player/model/IModelPlayerAPI;)Ljava/util/Set;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExpandParameter", "()F", null, null); - mv.visitVarInsn(/*Opcodes*/25/*ALOAD*/, /*0*/0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getExpandParameter", "(Lapi/player/model/IModelPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getYOffsetParameter", "()F", null, null); - mv.visitVarInsn(/*Opcodes*/25/*ALOAD*/, /*0*/0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getYOffsetParameter", "(Lapi/player/model/IModelPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 1); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTextureWidthParameter", "()I", null, null); - mv.visitVarInsn(/*Opcodes*/25/*ALOAD*/, /*0*/0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getTextureWidthParameter", "(Lapi/player/model/IModelPlayerAPI;)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 2); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTextureHeightParameter", "()I", null, null); - mv.visitVarInsn(/*Opcodes*/25/*ALOAD*/, /*0*/0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getTextureHeightParameter", "(Lapi/player/model/IModelPlayerAPI;)I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 3); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelPlayerType", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getModelPlayerType", "(Lapi/player/model/IModelPlayerAPI;)Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "dynamic", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "dynamic", "(Lapi/player/model/IModelPlayerAPI;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelPlayerAPI", "()Lapi/player/model/ModelPlayerAPI;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, "api/player/model/ModelPlayer", "modelPlayerAPI", "Lapi/player/model/ModelPlayerAPI;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelPlayer", "()Lapi/player/model/ModelPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC, "getAllInstances", "()[Lapi/player/model/ModelPlayer;", null, null); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "getAllInstances", "()[Lapi/player/model/ModelPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - cv.visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_FINAL, "modelPlayerAPI", "Lapi/player/model/ModelPlayerAPI;", null, null); - } -} diff --git a/src/main/java/api/player/model/ModelPlayerConstructorVisitor.java b/src/main/java/api/player/model/ModelPlayerConstructorVisitor.java deleted file mode 100644 index b48e8fc2..00000000 --- a/src/main/java/api/player/model/ModelPlayerConstructorVisitor.java +++ /dev/null @@ -1,81 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.model; - -import org.objectweb.asm.*; - -public final class ModelPlayerConstructorVisitor extends MethodVisitor -{ - private final boolean isObfuscated; - private final boolean createApi; - private final int parameterOffset; - - public ModelPlayerConstructorVisitor(MethodVisitor paramMethodVisitor, boolean isObfuscated, boolean createApi, int parameterOffset) - { - super(262144, paramMethodVisitor); - this.isObfuscated = isObfuscated; - this.createApi = createApi; - this.parameterOffset = parameterOffset; - } - - public void visitMethodInsn(int opcode, String owner, String name, String desc) - { - if(isObfuscated && name.equals("") && owner.equals("net/minecraft/client/model/ModelBiped")) - owner = "bhm"; - if(name.equals("") && owner.equals("api/player/model/ModelPlayer")) - { - desc = desc.substring(0, desc.indexOf(")")) + "Ljava/lang/String;)V"; - mv.visitVarInsn(Opcodes.ALOAD, parameterOffset); - } - super.visitMethodInsn(opcode, owner, name, desc); - if(createApi && name.equals("") && owner.equals(isObfuscated ? "bhm" : "net/minecraft/client/model/ModelBiped")) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "create", "(Lapi/player/model/IModelPlayerAPI;FFIILjava/lang/String;)Lapi/player/model/ModelPlayerAPI;"); - mv.visitFieldInsn(Opcodes.PUTFIELD, "api/player/model/ModelPlayer", "modelPlayerAPI", "Lapi/player/model/ModelPlayerAPI;"); - - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.FLOAD, 1); - mv.visitIntInsn(Opcodes.FLOAD, 2); - mv.visitIntInsn(Opcodes.ILOAD, 3); - mv.visitIntInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "beforeLocalConstructing", "(Lapi/player/model/IModelPlayerAPI;FFII)V"); - } - } - - public void visitInsn(int opcode) - { - if(createApi && opcode == Opcodes.RETURN) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.FLOAD, 1); - mv.visitIntInsn(Opcodes.FLOAD, 2); - mv.visitIntInsn(Opcodes.ILOAD, 3); - mv.visitIntInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/model/ModelPlayerAPI", "afterLocalConstructing", "(Lapi/player/model/IModelPlayerAPI;FFII)V"); - } - super.visitInsn(opcode); - } -} diff --git a/src/main/java/api/player/render/IRenderPlayer.java b/src/main/java/api/player/render/IRenderPlayer.java deleted file mode 100644 index 975c4b9f..00000000 --- a/src/main/java/api/player/render/IRenderPlayer.java +++ /dev/null @@ -1,215 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -public interface IRenderPlayer -{ - RenderPlayerBase getRenderPlayerBase(String baseId); - - java.util.Set getRenderPlayerBaseIds(); - - Object dynamic(String key, Object[] parameters); - - boolean realDoRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - boolean superDoRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - boolean localDoRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void realDoRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void superDoRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void localDoRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - int realGetColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2); - - int superGetColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2); - - int localGetColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2); - - float realGetDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - float superGetDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - float localGetDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - net.minecraft.client.gui.FontRenderer realGetFontRendererFromRenderManager(); - - net.minecraft.client.gui.FontRenderer superGetFontRendererFromRenderManager(); - - net.minecraft.client.gui.FontRenderer localGetFontRendererFromRenderManager(); - - net.minecraft.util.ResourceLocation realGetResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer); - - net.minecraft.util.ResourceLocation localGetResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer); - - float realHandleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - float superHandleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - float localHandleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - int realInheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat); - - int superInheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat); - - int localInheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat); - - void realLoadTexture(net.minecraft.util.ResourceLocation paramResourceLocation); - - void superLoadTexture(net.minecraft.util.ResourceLocation paramResourceLocation); - - void localLoadTexture(net.minecraft.util.ResourceLocation paramResourceLocation); - - void realLoadTextureOfEntity(net.minecraft.entity.Entity paramEntity); - - void superLoadTextureOfEntity(net.minecraft.entity.Entity paramEntity); - - void localLoadTextureOfEntity(net.minecraft.entity.Entity paramEntity); - - void realPassSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3); - - void superPassSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3); - - void localPassSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3); - - boolean realPerformStaticEntityRebuild(); - - boolean superPerformStaticEntityRebuild(); - - boolean localPerformStaticEntityRebuild(); - - void realRenderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - void superRenderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - void localRenderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - void realRenderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer); - - void localRenderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer); - - void realRenderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt); - - void superRenderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt); - - void localRenderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt); - - void realRenderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void superRenderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void localRenderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); - - void realRenderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void localRenderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2); - - void realRenderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4); - - void localRenderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4); - - void realRenderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat); - - void localRenderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat); - - void realRenderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3); - - void localRenderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3); - - void realRenderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat); - - void localRenderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat); - - float realRenderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - float superRenderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - float localRenderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat); - - void realRotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3); - - void localRotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3); - - int realSetArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat); - - int localSetArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat); - - void realSetPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat); - - void localSetPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat); - - void realSetRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager); - - void superSetRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager); - - void localSetRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager); - - void realSetRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase); - - void superSetRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase); - - void localSetRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase); - - void realUpdateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister); - - void superUpdateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister); - - void localUpdateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister); - - net.minecraft.client.model.ModelBase getMainModelField(); - - void setMainModelField(net.minecraft.client.model.ModelBase mainModel); - - net.minecraft.client.model.ModelBiped getModelArmorField(); - - void setModelArmorField(net.minecraft.client.model.ModelBiped modelArmor); - - net.minecraft.client.model.ModelBiped getModelArmorChestplateField(); - - void setModelArmorChestplateField(net.minecraft.client.model.ModelBiped modelArmorChestplate); - - net.minecraft.client.model.ModelBiped getModelBipedMainField(); - - void setModelBipedMainField(net.minecraft.client.model.ModelBiped modelBipedMain); - - net.minecraft.client.renderer.RenderBlocks getRenderBlocksField(); - - void setRenderBlocksField(net.minecraft.client.renderer.RenderBlocks renderBlocks); - - net.minecraft.client.renderer.entity.RenderManager getRenderManagerField(); - - void setRenderManagerField(net.minecraft.client.renderer.entity.RenderManager renderManager); - - net.minecraft.client.model.ModelBase getRenderPassModelField(); - - void setRenderPassModelField(net.minecraft.client.model.ModelBase renderPassModel); - - float getShadowOpaqueField(); - - void setShadowOpaqueField(float shadowOpaque); - - float getShadowSizeField(); - - void setShadowSizeField(float shadowSize); - - net.minecraft.util.ResourceLocation getSteveTexturesField(); - -} diff --git a/src/main/java/api/player/render/IRenderPlayerAPI.java b/src/main/java/api/player/render/IRenderPlayerAPI.java deleted file mode 100644 index 987f13c8..00000000 --- a/src/main/java/api/player/render/IRenderPlayerAPI.java +++ /dev/null @@ -1,26 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -public interface IRenderPlayerAPI extends IRenderPlayer -{ - RenderPlayerAPI getRenderPlayerAPI(); - - net.minecraft.client.renderer.entity.RenderPlayer getRenderPlayer(); -} diff --git a/src/main/java/api/player/render/RenderPlayerAPI.java b/src/main/java/api/player/render/RenderPlayerAPI.java deleted file mode 100644 index 6a536025..00000000 --- a/src/main/java/api/player/render/RenderPlayerAPI.java +++ /dev/null @@ -1,3395 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -import java.io.*; -import java.text.*; -import java.util.*; -import java.util.logging.*; -import java.lang.ref.*; -import java.lang.reflect.*; - -public final class RenderPlayerAPI -{ - private final static Class[] Class = new Class[] { RenderPlayerAPI.class }; - private final static Class[] Classes = new Class[] { RenderPlayerAPI.class, String.class }; - - private static boolean isCreated; - private static final Logger logger = Logger.getLogger("RenderPlayerAPI"); - - private static void log(String text) - { - System.out.println(text); - logger.fine(text); - } - - public static void register(String id, Class baseClass) - { - register(id, baseClass, null); - } - - public static void register(String id, Class baseClass, RenderPlayerBaseSorting baseSorting) - { - try - { - register(baseClass, id, baseSorting); - } - catch(RuntimeException exception) - { - if(id != null) - log("Render Player: failed to register id '" + id + "'"); - else - log("Render Player: failed to register RenderPlayerBase"); - - throw exception; - } - } - - private static void register(Class baseClass, String id, RenderPlayerBaseSorting baseSorting) - { - if(!isCreated) - { - try - { - Method mandatory = net.minecraft.client.renderer.entity.RenderPlayer.class.getMethod("getRenderPlayerBase", String.class); - if (mandatory.getReturnType() != RenderPlayerBase.class) - throw new NoSuchMethodException(RenderPlayerBase.class.getName() + " " + net.minecraft.client.renderer.entity.RenderPlayer.class.getName() + ".getRenderPlayerBase(" + String.class.getName() + ")"); - } - catch(NoSuchMethodException exception) - { - String[] errorMessageParts = new String[] - { - "========================================", - "The API \"Render Player\" version " + api.player.forge.RenderPlayerAPIPlugin.Version + " of the mod \"Render Player API Core " + api.player.forge.RenderPlayerAPIPlugin.Version + "\" can not be created!", - "----------------------------------------", - "Mandatory member method \"{0} getRenderPlayerBase({3})\" not found in class \"{1}\".", - "There are three scenarios this can happen:", - "* Minecraft Forge is missing a Render Player API Core which Minecraft version matches its own.", - " Download and install the latest Render Player API Core for the Minecraft version you were trying to run.", - "* The code of the class \"{2}\" of Render Player API Core has been modified beyond recognition by another Minecraft Forge coremod.", - " Try temporary deinstallation of other core mods to find the culprit and deinstall it permanently to fix this specific problem.", - "* Render Player API Core has not been installed correctly.", - " Deinstall Render Player API Core and install it again following the installation instructions in the readme file.", - "========================================" - }; - - String baseRenderPlayerClassName = RenderPlayerBase.class.getName(); - String targetClassName = net.minecraft.client.renderer.entity.RenderPlayer.class.getName(); - String targetClassFileName = targetClassName.replace(".", File.separator); - String stringClassName = String.class.getName(); - - for(int i=0; i allreadyRegistered = allBaseConstructors.get(id); - if(allreadyRegistered != null) - throw new IllegalArgumentException("The class '" + baseClass.getName() + "' can not be registered with the id '" + id + "' because the class '" + allreadyRegistered.getDeclaringClass().getName() + "' has allready been registered with the same id"); - - Constructor baseConstructor; - try - { - baseConstructor = baseClass.getDeclaredConstructor(Classes); - } - catch (Throwable t) - { - try - { - baseConstructor = baseClass.getDeclaredConstructor(Class); - } - catch(Throwable s) - { - throw new IllegalArgumentException("Can not find necessary constructor with one argument of type '" + RenderPlayerAPI.class.getName() + "' and eventually a second argument of type 'String' in the class '" + baseClass.getName() + "'", t); - } - } - - allBaseConstructors.put(id, baseConstructor); - - if(baseSorting != null) - { - addSorting(id, allBaseBeforeLocalConstructingSuperiors, baseSorting.getBeforeLocalConstructingSuperiors()); - addSorting(id, allBaseBeforeLocalConstructingInferiors, baseSorting.getBeforeLocalConstructingInferiors()); - addSorting(id, allBaseAfterLocalConstructingSuperiors, baseSorting.getAfterLocalConstructingSuperiors()); - addSorting(id, allBaseAfterLocalConstructingInferiors, baseSorting.getAfterLocalConstructingInferiors()); - - addDynamicSorting(id, allBaseBeforeDynamicSuperiors, baseSorting.getDynamicBeforeSuperiors()); - addDynamicSorting(id, allBaseBeforeDynamicInferiors, baseSorting.getDynamicBeforeInferiors()); - addDynamicSorting(id, allBaseOverrideDynamicSuperiors, baseSorting.getDynamicOverrideSuperiors()); - addDynamicSorting(id, allBaseOverrideDynamicInferiors, baseSorting.getDynamicOverrideInferiors()); - addDynamicSorting(id, allBaseAfterDynamicSuperiors, baseSorting.getDynamicAfterSuperiors()); - addDynamicSorting(id, allBaseAfterDynamicInferiors, baseSorting.getDynamicAfterInferiors()); - - addSorting(id, allBaseBeforeDoRenderLabelSuperiors, baseSorting.getBeforeDoRenderLabelSuperiors()); - addSorting(id, allBaseBeforeDoRenderLabelInferiors, baseSorting.getBeforeDoRenderLabelInferiors()); - addSorting(id, allBaseOverrideDoRenderLabelSuperiors, baseSorting.getOverrideDoRenderLabelSuperiors()); - addSorting(id, allBaseOverrideDoRenderLabelInferiors, baseSorting.getOverrideDoRenderLabelInferiors()); - addSorting(id, allBaseAfterDoRenderLabelSuperiors, baseSorting.getAfterDoRenderLabelSuperiors()); - addSorting(id, allBaseAfterDoRenderLabelInferiors, baseSorting.getAfterDoRenderLabelInferiors()); - - addSorting(id, allBaseBeforeDoRenderShadowAndFireSuperiors, baseSorting.getBeforeDoRenderShadowAndFireSuperiors()); - addSorting(id, allBaseBeforeDoRenderShadowAndFireInferiors, baseSorting.getBeforeDoRenderShadowAndFireInferiors()); - addSorting(id, allBaseOverrideDoRenderShadowAndFireSuperiors, baseSorting.getOverrideDoRenderShadowAndFireSuperiors()); - addSorting(id, allBaseOverrideDoRenderShadowAndFireInferiors, baseSorting.getOverrideDoRenderShadowAndFireInferiors()); - addSorting(id, allBaseAfterDoRenderShadowAndFireSuperiors, baseSorting.getAfterDoRenderShadowAndFireSuperiors()); - addSorting(id, allBaseAfterDoRenderShadowAndFireInferiors, baseSorting.getAfterDoRenderShadowAndFireInferiors()); - - addSorting(id, allBaseBeforeGetColorMultiplierSuperiors, baseSorting.getBeforeGetColorMultiplierSuperiors()); - addSorting(id, allBaseBeforeGetColorMultiplierInferiors, baseSorting.getBeforeGetColorMultiplierInferiors()); - addSorting(id, allBaseOverrideGetColorMultiplierSuperiors, baseSorting.getOverrideGetColorMultiplierSuperiors()); - addSorting(id, allBaseOverrideGetColorMultiplierInferiors, baseSorting.getOverrideGetColorMultiplierInferiors()); - addSorting(id, allBaseAfterGetColorMultiplierSuperiors, baseSorting.getAfterGetColorMultiplierSuperiors()); - addSorting(id, allBaseAfterGetColorMultiplierInferiors, baseSorting.getAfterGetColorMultiplierInferiors()); - - addSorting(id, allBaseBeforeGetDeathMaxRotationSuperiors, baseSorting.getBeforeGetDeathMaxRotationSuperiors()); - addSorting(id, allBaseBeforeGetDeathMaxRotationInferiors, baseSorting.getBeforeGetDeathMaxRotationInferiors()); - addSorting(id, allBaseOverrideGetDeathMaxRotationSuperiors, baseSorting.getOverrideGetDeathMaxRotationSuperiors()); - addSorting(id, allBaseOverrideGetDeathMaxRotationInferiors, baseSorting.getOverrideGetDeathMaxRotationInferiors()); - addSorting(id, allBaseAfterGetDeathMaxRotationSuperiors, baseSorting.getAfterGetDeathMaxRotationSuperiors()); - addSorting(id, allBaseAfterGetDeathMaxRotationInferiors, baseSorting.getAfterGetDeathMaxRotationInferiors()); - - addSorting(id, allBaseBeforeGetFontRendererFromRenderManagerSuperiors, baseSorting.getBeforeGetFontRendererFromRenderManagerSuperiors()); - addSorting(id, allBaseBeforeGetFontRendererFromRenderManagerInferiors, baseSorting.getBeforeGetFontRendererFromRenderManagerInferiors()); - addSorting(id, allBaseOverrideGetFontRendererFromRenderManagerSuperiors, baseSorting.getOverrideGetFontRendererFromRenderManagerSuperiors()); - addSorting(id, allBaseOverrideGetFontRendererFromRenderManagerInferiors, baseSorting.getOverrideGetFontRendererFromRenderManagerInferiors()); - addSorting(id, allBaseAfterGetFontRendererFromRenderManagerSuperiors, baseSorting.getAfterGetFontRendererFromRenderManagerSuperiors()); - addSorting(id, allBaseAfterGetFontRendererFromRenderManagerInferiors, baseSorting.getAfterGetFontRendererFromRenderManagerInferiors()); - - addSorting(id, allBaseBeforeGetResourceLocationFromPlayerSuperiors, baseSorting.getBeforeGetResourceLocationFromPlayerSuperiors()); - addSorting(id, allBaseBeforeGetResourceLocationFromPlayerInferiors, baseSorting.getBeforeGetResourceLocationFromPlayerInferiors()); - addSorting(id, allBaseOverrideGetResourceLocationFromPlayerSuperiors, baseSorting.getOverrideGetResourceLocationFromPlayerSuperiors()); - addSorting(id, allBaseOverrideGetResourceLocationFromPlayerInferiors, baseSorting.getOverrideGetResourceLocationFromPlayerInferiors()); - addSorting(id, allBaseAfterGetResourceLocationFromPlayerSuperiors, baseSorting.getAfterGetResourceLocationFromPlayerSuperiors()); - addSorting(id, allBaseAfterGetResourceLocationFromPlayerInferiors, baseSorting.getAfterGetResourceLocationFromPlayerInferiors()); - - addSorting(id, allBaseBeforeHandleRotationFloatSuperiors, baseSorting.getBeforeHandleRotationFloatSuperiors()); - addSorting(id, allBaseBeforeHandleRotationFloatInferiors, baseSorting.getBeforeHandleRotationFloatInferiors()); - addSorting(id, allBaseOverrideHandleRotationFloatSuperiors, baseSorting.getOverrideHandleRotationFloatSuperiors()); - addSorting(id, allBaseOverrideHandleRotationFloatInferiors, baseSorting.getOverrideHandleRotationFloatInferiors()); - addSorting(id, allBaseAfterHandleRotationFloatSuperiors, baseSorting.getAfterHandleRotationFloatSuperiors()); - addSorting(id, allBaseAfterHandleRotationFloatInferiors, baseSorting.getAfterHandleRotationFloatInferiors()); - - addSorting(id, allBaseBeforeInheritRenderPassSuperiors, baseSorting.getBeforeInheritRenderPassSuperiors()); - addSorting(id, allBaseBeforeInheritRenderPassInferiors, baseSorting.getBeforeInheritRenderPassInferiors()); - addSorting(id, allBaseOverrideInheritRenderPassSuperiors, baseSorting.getOverrideInheritRenderPassSuperiors()); - addSorting(id, allBaseOverrideInheritRenderPassInferiors, baseSorting.getOverrideInheritRenderPassInferiors()); - addSorting(id, allBaseAfterInheritRenderPassSuperiors, baseSorting.getAfterInheritRenderPassSuperiors()); - addSorting(id, allBaseAfterInheritRenderPassInferiors, baseSorting.getAfterInheritRenderPassInferiors()); - - addSorting(id, allBaseBeforeLoadTextureSuperiors, baseSorting.getBeforeLoadTextureSuperiors()); - addSorting(id, allBaseBeforeLoadTextureInferiors, baseSorting.getBeforeLoadTextureInferiors()); - addSorting(id, allBaseOverrideLoadTextureSuperiors, baseSorting.getOverrideLoadTextureSuperiors()); - addSorting(id, allBaseOverrideLoadTextureInferiors, baseSorting.getOverrideLoadTextureInferiors()); - addSorting(id, allBaseAfterLoadTextureSuperiors, baseSorting.getAfterLoadTextureSuperiors()); - addSorting(id, allBaseAfterLoadTextureInferiors, baseSorting.getAfterLoadTextureInferiors()); - - addSorting(id, allBaseBeforeLoadTextureOfEntitySuperiors, baseSorting.getBeforeLoadTextureOfEntitySuperiors()); - addSorting(id, allBaseBeforeLoadTextureOfEntityInferiors, baseSorting.getBeforeLoadTextureOfEntityInferiors()); - addSorting(id, allBaseOverrideLoadTextureOfEntitySuperiors, baseSorting.getOverrideLoadTextureOfEntitySuperiors()); - addSorting(id, allBaseOverrideLoadTextureOfEntityInferiors, baseSorting.getOverrideLoadTextureOfEntityInferiors()); - addSorting(id, allBaseAfterLoadTextureOfEntitySuperiors, baseSorting.getAfterLoadTextureOfEntitySuperiors()); - addSorting(id, allBaseAfterLoadTextureOfEntityInferiors, baseSorting.getAfterLoadTextureOfEntityInferiors()); - - addSorting(id, allBaseBeforePassSpecialRenderSuperiors, baseSorting.getBeforePassSpecialRenderSuperiors()); - addSorting(id, allBaseBeforePassSpecialRenderInferiors, baseSorting.getBeforePassSpecialRenderInferiors()); - addSorting(id, allBaseOverridePassSpecialRenderSuperiors, baseSorting.getOverridePassSpecialRenderSuperiors()); - addSorting(id, allBaseOverridePassSpecialRenderInferiors, baseSorting.getOverridePassSpecialRenderInferiors()); - addSorting(id, allBaseAfterPassSpecialRenderSuperiors, baseSorting.getAfterPassSpecialRenderSuperiors()); - addSorting(id, allBaseAfterPassSpecialRenderInferiors, baseSorting.getAfterPassSpecialRenderInferiors()); - - addSorting(id, allBaseBeforePerformStaticEntityRebuildSuperiors, baseSorting.getBeforePerformStaticEntityRebuildSuperiors()); - addSorting(id, allBaseBeforePerformStaticEntityRebuildInferiors, baseSorting.getBeforePerformStaticEntityRebuildInferiors()); - addSorting(id, allBaseOverridePerformStaticEntityRebuildSuperiors, baseSorting.getOverridePerformStaticEntityRebuildSuperiors()); - addSorting(id, allBaseOverridePerformStaticEntityRebuildInferiors, baseSorting.getOverridePerformStaticEntityRebuildInferiors()); - addSorting(id, allBaseAfterPerformStaticEntityRebuildSuperiors, baseSorting.getAfterPerformStaticEntityRebuildSuperiors()); - addSorting(id, allBaseAfterPerformStaticEntityRebuildInferiors, baseSorting.getAfterPerformStaticEntityRebuildInferiors()); - - addSorting(id, allBaseBeforeRenderArrowsStuckInEntitySuperiors, baseSorting.getBeforeRenderArrowsStuckInEntitySuperiors()); - addSorting(id, allBaseBeforeRenderArrowsStuckInEntityInferiors, baseSorting.getBeforeRenderArrowsStuckInEntityInferiors()); - addSorting(id, allBaseOverrideRenderArrowsStuckInEntitySuperiors, baseSorting.getOverrideRenderArrowsStuckInEntitySuperiors()); - addSorting(id, allBaseOverrideRenderArrowsStuckInEntityInferiors, baseSorting.getOverrideRenderArrowsStuckInEntityInferiors()); - addSorting(id, allBaseAfterRenderArrowsStuckInEntitySuperiors, baseSorting.getAfterRenderArrowsStuckInEntitySuperiors()); - addSorting(id, allBaseAfterRenderArrowsStuckInEntityInferiors, baseSorting.getAfterRenderArrowsStuckInEntityInferiors()); - - addSorting(id, allBaseBeforeRenderFirstPersonArmSuperiors, baseSorting.getBeforeRenderFirstPersonArmSuperiors()); - addSorting(id, allBaseBeforeRenderFirstPersonArmInferiors, baseSorting.getBeforeRenderFirstPersonArmInferiors()); - addSorting(id, allBaseOverrideRenderFirstPersonArmSuperiors, baseSorting.getOverrideRenderFirstPersonArmSuperiors()); - addSorting(id, allBaseOverrideRenderFirstPersonArmInferiors, baseSorting.getOverrideRenderFirstPersonArmInferiors()); - addSorting(id, allBaseAfterRenderFirstPersonArmSuperiors, baseSorting.getAfterRenderFirstPersonArmSuperiors()); - addSorting(id, allBaseAfterRenderFirstPersonArmInferiors, baseSorting.getAfterRenderFirstPersonArmInferiors()); - - addSorting(id, allBaseBeforeRenderLivingLabelSuperiors, baseSorting.getBeforeRenderLivingLabelSuperiors()); - addSorting(id, allBaseBeforeRenderLivingLabelInferiors, baseSorting.getBeforeRenderLivingLabelInferiors()); - addSorting(id, allBaseOverrideRenderLivingLabelSuperiors, baseSorting.getOverrideRenderLivingLabelSuperiors()); - addSorting(id, allBaseOverrideRenderLivingLabelInferiors, baseSorting.getOverrideRenderLivingLabelInferiors()); - addSorting(id, allBaseAfterRenderLivingLabelSuperiors, baseSorting.getAfterRenderLivingLabelSuperiors()); - addSorting(id, allBaseAfterRenderLivingLabelInferiors, baseSorting.getAfterRenderLivingLabelInferiors()); - - addSorting(id, allBaseBeforeRenderModelSuperiors, baseSorting.getBeforeRenderModelSuperiors()); - addSorting(id, allBaseBeforeRenderModelInferiors, baseSorting.getBeforeRenderModelInferiors()); - addSorting(id, allBaseOverrideRenderModelSuperiors, baseSorting.getOverrideRenderModelSuperiors()); - addSorting(id, allBaseOverrideRenderModelInferiors, baseSorting.getOverrideRenderModelInferiors()); - addSorting(id, allBaseAfterRenderModelSuperiors, baseSorting.getAfterRenderModelSuperiors()); - addSorting(id, allBaseAfterRenderModelInferiors, baseSorting.getAfterRenderModelInferiors()); - - addSorting(id, allBaseBeforeRenderPlayerSuperiors, baseSorting.getBeforeRenderPlayerSuperiors()); - addSorting(id, allBaseBeforeRenderPlayerInferiors, baseSorting.getBeforeRenderPlayerInferiors()); - addSorting(id, allBaseOverrideRenderPlayerSuperiors, baseSorting.getOverrideRenderPlayerSuperiors()); - addSorting(id, allBaseOverrideRenderPlayerInferiors, baseSorting.getOverrideRenderPlayerInferiors()); - addSorting(id, allBaseAfterRenderPlayerSuperiors, baseSorting.getAfterRenderPlayerSuperiors()); - addSorting(id, allBaseAfterRenderPlayerInferiors, baseSorting.getAfterRenderPlayerInferiors()); - - addSorting(id, allBaseBeforeRenderPlayerNameAndScoreLabelSuperiors, baseSorting.getBeforeRenderPlayerNameAndScoreLabelSuperiors()); - addSorting(id, allBaseBeforeRenderPlayerNameAndScoreLabelInferiors, baseSorting.getBeforeRenderPlayerNameAndScoreLabelInferiors()); - addSorting(id, allBaseOverrideRenderPlayerNameAndScoreLabelSuperiors, baseSorting.getOverrideRenderPlayerNameAndScoreLabelSuperiors()); - addSorting(id, allBaseOverrideRenderPlayerNameAndScoreLabelInferiors, baseSorting.getOverrideRenderPlayerNameAndScoreLabelInferiors()); - addSorting(id, allBaseAfterRenderPlayerNameAndScoreLabelSuperiors, baseSorting.getAfterRenderPlayerNameAndScoreLabelSuperiors()); - addSorting(id, allBaseAfterRenderPlayerNameAndScoreLabelInferiors, baseSorting.getAfterRenderPlayerNameAndScoreLabelInferiors()); - - addSorting(id, allBaseBeforeRenderPlayerScaleSuperiors, baseSorting.getBeforeRenderPlayerScaleSuperiors()); - addSorting(id, allBaseBeforeRenderPlayerScaleInferiors, baseSorting.getBeforeRenderPlayerScaleInferiors()); - addSorting(id, allBaseOverrideRenderPlayerScaleSuperiors, baseSorting.getOverrideRenderPlayerScaleSuperiors()); - addSorting(id, allBaseOverrideRenderPlayerScaleInferiors, baseSorting.getOverrideRenderPlayerScaleInferiors()); - addSorting(id, allBaseAfterRenderPlayerScaleSuperiors, baseSorting.getAfterRenderPlayerScaleSuperiors()); - addSorting(id, allBaseAfterRenderPlayerScaleInferiors, baseSorting.getAfterRenderPlayerScaleInferiors()); - - addSorting(id, allBaseBeforeRenderPlayerSleepSuperiors, baseSorting.getBeforeRenderPlayerSleepSuperiors()); - addSorting(id, allBaseBeforeRenderPlayerSleepInferiors, baseSorting.getBeforeRenderPlayerSleepInferiors()); - addSorting(id, allBaseOverrideRenderPlayerSleepSuperiors, baseSorting.getOverrideRenderPlayerSleepSuperiors()); - addSorting(id, allBaseOverrideRenderPlayerSleepInferiors, baseSorting.getOverrideRenderPlayerSleepInferiors()); - addSorting(id, allBaseAfterRenderPlayerSleepSuperiors, baseSorting.getAfterRenderPlayerSleepSuperiors()); - addSorting(id, allBaseAfterRenderPlayerSleepInferiors, baseSorting.getAfterRenderPlayerSleepInferiors()); - - addSorting(id, allBaseBeforeRenderSpecialsSuperiors, baseSorting.getBeforeRenderSpecialsSuperiors()); - addSorting(id, allBaseBeforeRenderSpecialsInferiors, baseSorting.getBeforeRenderSpecialsInferiors()); - addSorting(id, allBaseOverrideRenderSpecialsSuperiors, baseSorting.getOverrideRenderSpecialsSuperiors()); - addSorting(id, allBaseOverrideRenderSpecialsInferiors, baseSorting.getOverrideRenderSpecialsInferiors()); - addSorting(id, allBaseAfterRenderSpecialsSuperiors, baseSorting.getAfterRenderSpecialsSuperiors()); - addSorting(id, allBaseAfterRenderSpecialsInferiors, baseSorting.getAfterRenderSpecialsInferiors()); - - addSorting(id, allBaseBeforeRenderSwingProgressSuperiors, baseSorting.getBeforeRenderSwingProgressSuperiors()); - addSorting(id, allBaseBeforeRenderSwingProgressInferiors, baseSorting.getBeforeRenderSwingProgressInferiors()); - addSorting(id, allBaseOverrideRenderSwingProgressSuperiors, baseSorting.getOverrideRenderSwingProgressSuperiors()); - addSorting(id, allBaseOverrideRenderSwingProgressInferiors, baseSorting.getOverrideRenderSwingProgressInferiors()); - addSorting(id, allBaseAfterRenderSwingProgressSuperiors, baseSorting.getAfterRenderSwingProgressSuperiors()); - addSorting(id, allBaseAfterRenderSwingProgressInferiors, baseSorting.getAfterRenderSwingProgressInferiors()); - - addSorting(id, allBaseBeforeRotatePlayerSuperiors, baseSorting.getBeforeRotatePlayerSuperiors()); - addSorting(id, allBaseBeforeRotatePlayerInferiors, baseSorting.getBeforeRotatePlayerInferiors()); - addSorting(id, allBaseOverrideRotatePlayerSuperiors, baseSorting.getOverrideRotatePlayerSuperiors()); - addSorting(id, allBaseOverrideRotatePlayerInferiors, baseSorting.getOverrideRotatePlayerInferiors()); - addSorting(id, allBaseAfterRotatePlayerSuperiors, baseSorting.getAfterRotatePlayerSuperiors()); - addSorting(id, allBaseAfterRotatePlayerInferiors, baseSorting.getAfterRotatePlayerInferiors()); - - addSorting(id, allBaseBeforeSetArmorModelSuperiors, baseSorting.getBeforeSetArmorModelSuperiors()); - addSorting(id, allBaseBeforeSetArmorModelInferiors, baseSorting.getBeforeSetArmorModelInferiors()); - addSorting(id, allBaseOverrideSetArmorModelSuperiors, baseSorting.getOverrideSetArmorModelSuperiors()); - addSorting(id, allBaseOverrideSetArmorModelInferiors, baseSorting.getOverrideSetArmorModelInferiors()); - addSorting(id, allBaseAfterSetArmorModelSuperiors, baseSorting.getAfterSetArmorModelSuperiors()); - addSorting(id, allBaseAfterSetArmorModelInferiors, baseSorting.getAfterSetArmorModelInferiors()); - - addSorting(id, allBaseBeforeSetPassArmorModelSuperiors, baseSorting.getBeforeSetPassArmorModelSuperiors()); - addSorting(id, allBaseBeforeSetPassArmorModelInferiors, baseSorting.getBeforeSetPassArmorModelInferiors()); - addSorting(id, allBaseOverrideSetPassArmorModelSuperiors, baseSorting.getOverrideSetPassArmorModelSuperiors()); - addSorting(id, allBaseOverrideSetPassArmorModelInferiors, baseSorting.getOverrideSetPassArmorModelInferiors()); - addSorting(id, allBaseAfterSetPassArmorModelSuperiors, baseSorting.getAfterSetPassArmorModelSuperiors()); - addSorting(id, allBaseAfterSetPassArmorModelInferiors, baseSorting.getAfterSetPassArmorModelInferiors()); - - addSorting(id, allBaseBeforeSetRenderManagerSuperiors, baseSorting.getBeforeSetRenderManagerSuperiors()); - addSorting(id, allBaseBeforeSetRenderManagerInferiors, baseSorting.getBeforeSetRenderManagerInferiors()); - addSorting(id, allBaseOverrideSetRenderManagerSuperiors, baseSorting.getOverrideSetRenderManagerSuperiors()); - addSorting(id, allBaseOverrideSetRenderManagerInferiors, baseSorting.getOverrideSetRenderManagerInferiors()); - addSorting(id, allBaseAfterSetRenderManagerSuperiors, baseSorting.getAfterSetRenderManagerSuperiors()); - addSorting(id, allBaseAfterSetRenderManagerInferiors, baseSorting.getAfterSetRenderManagerInferiors()); - - addSorting(id, allBaseBeforeSetRenderPassModelSuperiors, baseSorting.getBeforeSetRenderPassModelSuperiors()); - addSorting(id, allBaseBeforeSetRenderPassModelInferiors, baseSorting.getBeforeSetRenderPassModelInferiors()); - addSorting(id, allBaseOverrideSetRenderPassModelSuperiors, baseSorting.getOverrideSetRenderPassModelSuperiors()); - addSorting(id, allBaseOverrideSetRenderPassModelInferiors, baseSorting.getOverrideSetRenderPassModelInferiors()); - addSorting(id, allBaseAfterSetRenderPassModelSuperiors, baseSorting.getAfterSetRenderPassModelSuperiors()); - addSorting(id, allBaseAfterSetRenderPassModelInferiors, baseSorting.getAfterSetRenderPassModelInferiors()); - - addSorting(id, allBaseBeforeUpdateIconsSuperiors, baseSorting.getBeforeUpdateIconsSuperiors()); - addSorting(id, allBaseBeforeUpdateIconsInferiors, baseSorting.getBeforeUpdateIconsInferiors()); - addSorting(id, allBaseOverrideUpdateIconsSuperiors, baseSorting.getOverrideUpdateIconsSuperiors()); - addSorting(id, allBaseOverrideUpdateIconsInferiors, baseSorting.getOverrideUpdateIconsInferiors()); - addSorting(id, allBaseAfterUpdateIconsSuperiors, baseSorting.getAfterUpdateIconsSuperiors()); - addSorting(id, allBaseAfterUpdateIconsInferiors, baseSorting.getAfterUpdateIconsInferiors()); - - } - - addMethod(id, baseClass, beforeLocalConstructingHookTypes, "beforeLocalConstructing"); - addMethod(id, baseClass, afterLocalConstructingHookTypes, "afterLocalConstructing"); - - - addMethod(id, baseClass, beforeDoRenderLabelHookTypes, "beforeDoRenderLabel", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, overrideDoRenderLabelHookTypes, "doRenderLabel", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, afterDoRenderLabelHookTypes, "afterDoRenderLabel", net.minecraft.entity.EntityLivingBase.class); - - addMethod(id, baseClass, beforeDoRenderShadowAndFireHookTypes, "beforeDoRenderShadowAndFire", net.minecraft.entity.Entity.class, double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, overrideDoRenderShadowAndFireHookTypes, "doRenderShadowAndFire", net.minecraft.entity.Entity.class, double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, afterDoRenderShadowAndFireHookTypes, "afterDoRenderShadowAndFire", net.minecraft.entity.Entity.class, double.class, double.class, double.class, float.class, float.class); - - addMethod(id, baseClass, beforeGetColorMultiplierHookTypes, "beforeGetColorMultiplier", net.minecraft.entity.EntityLivingBase.class, float.class, float.class); - addMethod(id, baseClass, overrideGetColorMultiplierHookTypes, "getColorMultiplier", net.minecraft.entity.EntityLivingBase.class, float.class, float.class); - addMethod(id, baseClass, afterGetColorMultiplierHookTypes, "afterGetColorMultiplier", net.minecraft.entity.EntityLivingBase.class, float.class, float.class); - - addMethod(id, baseClass, beforeGetDeathMaxRotationHookTypes, "beforeGetDeathMaxRotation", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, overrideGetDeathMaxRotationHookTypes, "getDeathMaxRotation", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, afterGetDeathMaxRotationHookTypes, "afterGetDeathMaxRotation", net.minecraft.entity.EntityLivingBase.class); - - addMethod(id, baseClass, beforeGetFontRendererFromRenderManagerHookTypes, "beforeGetFontRendererFromRenderManager"); - addMethod(id, baseClass, overrideGetFontRendererFromRenderManagerHookTypes, "getFontRendererFromRenderManager"); - addMethod(id, baseClass, afterGetFontRendererFromRenderManagerHookTypes, "afterGetFontRendererFromRenderManager"); - - addMethod(id, baseClass, beforeGetResourceLocationFromPlayerHookTypes, "beforeGetResourceLocationFromPlayer", net.minecraft.client.entity.AbstractClientPlayer.class); - addMethod(id, baseClass, overrideGetResourceLocationFromPlayerHookTypes, "getResourceLocationFromPlayer", net.minecraft.client.entity.AbstractClientPlayer.class); - addMethod(id, baseClass, afterGetResourceLocationFromPlayerHookTypes, "afterGetResourceLocationFromPlayer", net.minecraft.client.entity.AbstractClientPlayer.class); - - addMethod(id, baseClass, beforeHandleRotationFloatHookTypes, "beforeHandleRotationFloat", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, overrideHandleRotationFloatHookTypes, "handleRotationFloat", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, afterHandleRotationFloatHookTypes, "afterHandleRotationFloat", net.minecraft.entity.EntityLivingBase.class, float.class); - - addMethod(id, baseClass, beforeInheritRenderPassHookTypes, "beforeInheritRenderPass", net.minecraft.entity.EntityLivingBase.class, int.class, float.class); - addMethod(id, baseClass, overrideInheritRenderPassHookTypes, "inheritRenderPass", net.minecraft.entity.EntityLivingBase.class, int.class, float.class); - addMethod(id, baseClass, afterInheritRenderPassHookTypes, "afterInheritRenderPass", net.minecraft.entity.EntityLivingBase.class, int.class, float.class); - - addMethod(id, baseClass, beforeLoadTextureHookTypes, "beforeLoadTexture", net.minecraft.util.ResourceLocation.class); - addMethod(id, baseClass, overrideLoadTextureHookTypes, "loadTexture", net.minecraft.util.ResourceLocation.class); - addMethod(id, baseClass, afterLoadTextureHookTypes, "afterLoadTexture", net.minecraft.util.ResourceLocation.class); - - addMethod(id, baseClass, beforeLoadTextureOfEntityHookTypes, "beforeLoadTextureOfEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideLoadTextureOfEntityHookTypes, "loadTextureOfEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterLoadTextureOfEntityHookTypes, "afterLoadTextureOfEntity", net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforePassSpecialRenderHookTypes, "beforePassSpecialRender", net.minecraft.entity.EntityLivingBase.class, double.class, double.class, double.class); - addMethod(id, baseClass, overridePassSpecialRenderHookTypes, "passSpecialRender", net.minecraft.entity.EntityLivingBase.class, double.class, double.class, double.class); - addMethod(id, baseClass, afterPassSpecialRenderHookTypes, "afterPassSpecialRender", net.minecraft.entity.EntityLivingBase.class, double.class, double.class, double.class); - - addMethod(id, baseClass, beforePerformStaticEntityRebuildHookTypes, "beforePerformStaticEntityRebuild"); - addMethod(id, baseClass, overridePerformStaticEntityRebuildHookTypes, "performStaticEntityRebuild"); - addMethod(id, baseClass, afterPerformStaticEntityRebuildHookTypes, "afterPerformStaticEntityRebuild"); - - addMethod(id, baseClass, beforeRenderArrowsStuckInEntityHookTypes, "beforeRenderArrowsStuckInEntity", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, overrideRenderArrowsStuckInEntityHookTypes, "renderArrowsStuckInEntity", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, afterRenderArrowsStuckInEntityHookTypes, "afterRenderArrowsStuckInEntity", net.minecraft.entity.EntityLivingBase.class, float.class); - - addMethod(id, baseClass, beforeRenderFirstPersonArmHookTypes, "beforeRenderFirstPersonArm", net.minecraft.entity.player.EntityPlayer.class); - addMethod(id, baseClass, overrideRenderFirstPersonArmHookTypes, "renderFirstPersonArm", net.minecraft.entity.player.EntityPlayer.class); - addMethod(id, baseClass, afterRenderFirstPersonArmHookTypes, "afterRenderFirstPersonArm", net.minecraft.entity.player.EntityPlayer.class); - - addMethod(id, baseClass, beforeRenderLivingLabelHookTypes, "beforeRenderLivingLabel", net.minecraft.entity.Entity.class, String.class, double.class, double.class, double.class, int.class); - addMethod(id, baseClass, overrideRenderLivingLabelHookTypes, "renderLivingLabel", net.minecraft.entity.Entity.class, String.class, double.class, double.class, double.class, int.class); - addMethod(id, baseClass, afterRenderLivingLabelHookTypes, "afterRenderLivingLabel", net.minecraft.entity.Entity.class, String.class, double.class, double.class, double.class, int.class); - - addMethod(id, baseClass, beforeRenderModelHookTypes, "beforeRenderModel", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class, float.class, float.class, float.class); - addMethod(id, baseClass, overrideRenderModelHookTypes, "renderModel", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class, float.class, float.class, float.class); - addMethod(id, baseClass, afterRenderModelHookTypes, "afterRenderModel", net.minecraft.entity.EntityLivingBase.class, float.class, float.class, float.class, float.class, float.class, float.class); - - addMethod(id, baseClass, beforeRenderPlayerHookTypes, "beforeRenderPlayer", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, overrideRenderPlayerHookTypes, "renderPlayer", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, float.class, float.class); - addMethod(id, baseClass, afterRenderPlayerHookTypes, "afterRenderPlayer", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, float.class, float.class); - - addMethod(id, baseClass, beforeRenderPlayerNameAndScoreLabelHookTypes, "beforeRenderPlayerNameAndScoreLabel", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, String.class, float.class, double.class); - addMethod(id, baseClass, overrideRenderPlayerNameAndScoreLabelHookTypes, "renderPlayerNameAndScoreLabel", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, String.class, float.class, double.class); - addMethod(id, baseClass, afterRenderPlayerNameAndScoreLabelHookTypes, "afterRenderPlayerNameAndScoreLabel", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class, String.class, float.class, double.class); - - addMethod(id, baseClass, beforeRenderPlayerScaleHookTypes, "beforeRenderPlayerScale", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - addMethod(id, baseClass, overrideRenderPlayerScaleHookTypes, "renderPlayerScale", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - addMethod(id, baseClass, afterRenderPlayerScaleHookTypes, "afterRenderPlayerScale", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - - addMethod(id, baseClass, beforeRenderPlayerSleepHookTypes, "beforeRenderPlayerSleep", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class); - addMethod(id, baseClass, overrideRenderPlayerSleepHookTypes, "renderPlayerSleep", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class); - addMethod(id, baseClass, afterRenderPlayerSleepHookTypes, "afterRenderPlayerSleep", net.minecraft.client.entity.AbstractClientPlayer.class, double.class, double.class, double.class); - - addMethod(id, baseClass, beforeRenderSpecialsHookTypes, "beforeRenderSpecials", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - addMethod(id, baseClass, overrideRenderSpecialsHookTypes, "renderSpecials", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - addMethod(id, baseClass, afterRenderSpecialsHookTypes, "afterRenderSpecials", net.minecraft.client.entity.AbstractClientPlayer.class, float.class); - - addMethod(id, baseClass, beforeRenderSwingProgressHookTypes, "beforeRenderSwingProgress", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, overrideRenderSwingProgressHookTypes, "renderSwingProgress", net.minecraft.entity.EntityLivingBase.class, float.class); - addMethod(id, baseClass, afterRenderSwingProgressHookTypes, "afterRenderSwingProgress", net.minecraft.entity.EntityLivingBase.class, float.class); - - addMethod(id, baseClass, beforeRotatePlayerHookTypes, "beforeRotatePlayer", net.minecraft.client.entity.AbstractClientPlayer.class, float.class, float.class, float.class); - addMethod(id, baseClass, overrideRotatePlayerHookTypes, "rotatePlayer", net.minecraft.client.entity.AbstractClientPlayer.class, float.class, float.class, float.class); - addMethod(id, baseClass, afterRotatePlayerHookTypes, "afterRotatePlayer", net.minecraft.client.entity.AbstractClientPlayer.class, float.class, float.class, float.class); - - addMethod(id, baseClass, beforeSetArmorModelHookTypes, "beforeSetArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - addMethod(id, baseClass, overrideSetArmorModelHookTypes, "setArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - addMethod(id, baseClass, afterSetArmorModelHookTypes, "afterSetArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - - addMethod(id, baseClass, beforeSetPassArmorModelHookTypes, "beforeSetPassArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - addMethod(id, baseClass, overrideSetPassArmorModelHookTypes, "setPassArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - addMethod(id, baseClass, afterSetPassArmorModelHookTypes, "afterSetPassArmorModel", net.minecraft.client.entity.AbstractClientPlayer.class, int.class, float.class); - - addMethod(id, baseClass, beforeSetRenderManagerHookTypes, "beforeSetRenderManager", net.minecraft.client.renderer.entity.RenderManager.class); - addMethod(id, baseClass, overrideSetRenderManagerHookTypes, "setRenderManager", net.minecraft.client.renderer.entity.RenderManager.class); - addMethod(id, baseClass, afterSetRenderManagerHookTypes, "afterSetRenderManager", net.minecraft.client.renderer.entity.RenderManager.class); - - addMethod(id, baseClass, beforeSetRenderPassModelHookTypes, "beforeSetRenderPassModel", net.minecraft.client.model.ModelBase.class); - addMethod(id, baseClass, overrideSetRenderPassModelHookTypes, "setRenderPassModel", net.minecraft.client.model.ModelBase.class); - addMethod(id, baseClass, afterSetRenderPassModelHookTypes, "afterSetRenderPassModel", net.minecraft.client.model.ModelBase.class); - - addMethod(id, baseClass, beforeUpdateIconsHookTypes, "beforeUpdateIcons", net.minecraft.client.renderer.texture.IIconRegister.class); - addMethod(id, baseClass, overrideUpdateIconsHookTypes, "updateIcons", net.minecraft.client.renderer.texture.IIconRegister.class); - addMethod(id, baseClass, afterUpdateIconsHookTypes, "afterUpdateIcons", net.minecraft.client.renderer.texture.IIconRegister.class); - - - addDynamicMethods(id, baseClass); - - addDynamicKeys(id, baseClass, beforeDynamicHookMethods, beforeDynamicHookTypes); - addDynamicKeys(id, baseClass, overrideDynamicHookMethods, overrideDynamicHookTypes); - addDynamicKeys(id, baseClass, afterDynamicHookMethods, afterDynamicHookTypes); - - initialize(); - - for(IRenderPlayerAPI instance : getAllInstancesList()) - instance.getRenderPlayerAPI().attachRenderPlayerBase(id); - - System.out.println("Render Player: registered " + id); - logger.fine("Render Player: registered class '" + baseClass.getName() + "' with id '" + id + "'"); - - initialized = false; - } - - public static boolean unregister(String id) - { - if(id == null) - return false; - - Constructor constructor = allBaseConstructors.remove(id); - if(constructor == null) - return false; - - for(IRenderPlayerAPI instance : getAllInstancesList()) - instance.getRenderPlayerAPI().detachRenderPlayerBase(id); - - beforeLocalConstructingHookTypes.remove(id); - afterLocalConstructingHookTypes.remove(id); - - allBaseBeforeDoRenderLabelSuperiors.remove(id); - allBaseBeforeDoRenderLabelInferiors.remove(id); - allBaseOverrideDoRenderLabelSuperiors.remove(id); - allBaseOverrideDoRenderLabelInferiors.remove(id); - allBaseAfterDoRenderLabelSuperiors.remove(id); - allBaseAfterDoRenderLabelInferiors.remove(id); - - beforeDoRenderLabelHookTypes.remove(id); - overrideDoRenderLabelHookTypes.remove(id); - afterDoRenderLabelHookTypes.remove(id); - - allBaseBeforeDoRenderShadowAndFireSuperiors.remove(id); - allBaseBeforeDoRenderShadowAndFireInferiors.remove(id); - allBaseOverrideDoRenderShadowAndFireSuperiors.remove(id); - allBaseOverrideDoRenderShadowAndFireInferiors.remove(id); - allBaseAfterDoRenderShadowAndFireSuperiors.remove(id); - allBaseAfterDoRenderShadowAndFireInferiors.remove(id); - - beforeDoRenderShadowAndFireHookTypes.remove(id); - overrideDoRenderShadowAndFireHookTypes.remove(id); - afterDoRenderShadowAndFireHookTypes.remove(id); - - allBaseBeforeGetColorMultiplierSuperiors.remove(id); - allBaseBeforeGetColorMultiplierInferiors.remove(id); - allBaseOverrideGetColorMultiplierSuperiors.remove(id); - allBaseOverrideGetColorMultiplierInferiors.remove(id); - allBaseAfterGetColorMultiplierSuperiors.remove(id); - allBaseAfterGetColorMultiplierInferiors.remove(id); - - beforeGetColorMultiplierHookTypes.remove(id); - overrideGetColorMultiplierHookTypes.remove(id); - afterGetColorMultiplierHookTypes.remove(id); - - allBaseBeforeGetDeathMaxRotationSuperiors.remove(id); - allBaseBeforeGetDeathMaxRotationInferiors.remove(id); - allBaseOverrideGetDeathMaxRotationSuperiors.remove(id); - allBaseOverrideGetDeathMaxRotationInferiors.remove(id); - allBaseAfterGetDeathMaxRotationSuperiors.remove(id); - allBaseAfterGetDeathMaxRotationInferiors.remove(id); - - beforeGetDeathMaxRotationHookTypes.remove(id); - overrideGetDeathMaxRotationHookTypes.remove(id); - afterGetDeathMaxRotationHookTypes.remove(id); - - allBaseBeforeGetFontRendererFromRenderManagerSuperiors.remove(id); - allBaseBeforeGetFontRendererFromRenderManagerInferiors.remove(id); - allBaseOverrideGetFontRendererFromRenderManagerSuperiors.remove(id); - allBaseOverrideGetFontRendererFromRenderManagerInferiors.remove(id); - allBaseAfterGetFontRendererFromRenderManagerSuperiors.remove(id); - allBaseAfterGetFontRendererFromRenderManagerInferiors.remove(id); - - beforeGetFontRendererFromRenderManagerHookTypes.remove(id); - overrideGetFontRendererFromRenderManagerHookTypes.remove(id); - afterGetFontRendererFromRenderManagerHookTypes.remove(id); - - allBaseBeforeGetResourceLocationFromPlayerSuperiors.remove(id); - allBaseBeforeGetResourceLocationFromPlayerInferiors.remove(id); - allBaseOverrideGetResourceLocationFromPlayerSuperiors.remove(id); - allBaseOverrideGetResourceLocationFromPlayerInferiors.remove(id); - allBaseAfterGetResourceLocationFromPlayerSuperiors.remove(id); - allBaseAfterGetResourceLocationFromPlayerInferiors.remove(id); - - beforeGetResourceLocationFromPlayerHookTypes.remove(id); - overrideGetResourceLocationFromPlayerHookTypes.remove(id); - afterGetResourceLocationFromPlayerHookTypes.remove(id); - - allBaseBeforeHandleRotationFloatSuperiors.remove(id); - allBaseBeforeHandleRotationFloatInferiors.remove(id); - allBaseOverrideHandleRotationFloatSuperiors.remove(id); - allBaseOverrideHandleRotationFloatInferiors.remove(id); - allBaseAfterHandleRotationFloatSuperiors.remove(id); - allBaseAfterHandleRotationFloatInferiors.remove(id); - - beforeHandleRotationFloatHookTypes.remove(id); - overrideHandleRotationFloatHookTypes.remove(id); - afterHandleRotationFloatHookTypes.remove(id); - - allBaseBeforeInheritRenderPassSuperiors.remove(id); - allBaseBeforeInheritRenderPassInferiors.remove(id); - allBaseOverrideInheritRenderPassSuperiors.remove(id); - allBaseOverrideInheritRenderPassInferiors.remove(id); - allBaseAfterInheritRenderPassSuperiors.remove(id); - allBaseAfterInheritRenderPassInferiors.remove(id); - - beforeInheritRenderPassHookTypes.remove(id); - overrideInheritRenderPassHookTypes.remove(id); - afterInheritRenderPassHookTypes.remove(id); - - allBaseBeforeLoadTextureSuperiors.remove(id); - allBaseBeforeLoadTextureInferiors.remove(id); - allBaseOverrideLoadTextureSuperiors.remove(id); - allBaseOverrideLoadTextureInferiors.remove(id); - allBaseAfterLoadTextureSuperiors.remove(id); - allBaseAfterLoadTextureInferiors.remove(id); - - beforeLoadTextureHookTypes.remove(id); - overrideLoadTextureHookTypes.remove(id); - afterLoadTextureHookTypes.remove(id); - - allBaseBeforeLoadTextureOfEntitySuperiors.remove(id); - allBaseBeforeLoadTextureOfEntityInferiors.remove(id); - allBaseOverrideLoadTextureOfEntitySuperiors.remove(id); - allBaseOverrideLoadTextureOfEntityInferiors.remove(id); - allBaseAfterLoadTextureOfEntitySuperiors.remove(id); - allBaseAfterLoadTextureOfEntityInferiors.remove(id); - - beforeLoadTextureOfEntityHookTypes.remove(id); - overrideLoadTextureOfEntityHookTypes.remove(id); - afterLoadTextureOfEntityHookTypes.remove(id); - - allBaseBeforePassSpecialRenderSuperiors.remove(id); - allBaseBeforePassSpecialRenderInferiors.remove(id); - allBaseOverridePassSpecialRenderSuperiors.remove(id); - allBaseOverridePassSpecialRenderInferiors.remove(id); - allBaseAfterPassSpecialRenderSuperiors.remove(id); - allBaseAfterPassSpecialRenderInferiors.remove(id); - - beforePassSpecialRenderHookTypes.remove(id); - overridePassSpecialRenderHookTypes.remove(id); - afterPassSpecialRenderHookTypes.remove(id); - - allBaseBeforePerformStaticEntityRebuildSuperiors.remove(id); - allBaseBeforePerformStaticEntityRebuildInferiors.remove(id); - allBaseOverridePerformStaticEntityRebuildSuperiors.remove(id); - allBaseOverridePerformStaticEntityRebuildInferiors.remove(id); - allBaseAfterPerformStaticEntityRebuildSuperiors.remove(id); - allBaseAfterPerformStaticEntityRebuildInferiors.remove(id); - - beforePerformStaticEntityRebuildHookTypes.remove(id); - overridePerformStaticEntityRebuildHookTypes.remove(id); - afterPerformStaticEntityRebuildHookTypes.remove(id); - - allBaseBeforeRenderArrowsStuckInEntitySuperiors.remove(id); - allBaseBeforeRenderArrowsStuckInEntityInferiors.remove(id); - allBaseOverrideRenderArrowsStuckInEntitySuperiors.remove(id); - allBaseOverrideRenderArrowsStuckInEntityInferiors.remove(id); - allBaseAfterRenderArrowsStuckInEntitySuperiors.remove(id); - allBaseAfterRenderArrowsStuckInEntityInferiors.remove(id); - - beforeRenderArrowsStuckInEntityHookTypes.remove(id); - overrideRenderArrowsStuckInEntityHookTypes.remove(id); - afterRenderArrowsStuckInEntityHookTypes.remove(id); - - allBaseBeforeRenderFirstPersonArmSuperiors.remove(id); - allBaseBeforeRenderFirstPersonArmInferiors.remove(id); - allBaseOverrideRenderFirstPersonArmSuperiors.remove(id); - allBaseOverrideRenderFirstPersonArmInferiors.remove(id); - allBaseAfterRenderFirstPersonArmSuperiors.remove(id); - allBaseAfterRenderFirstPersonArmInferiors.remove(id); - - beforeRenderFirstPersonArmHookTypes.remove(id); - overrideRenderFirstPersonArmHookTypes.remove(id); - afterRenderFirstPersonArmHookTypes.remove(id); - - allBaseBeforeRenderLivingLabelSuperiors.remove(id); - allBaseBeforeRenderLivingLabelInferiors.remove(id); - allBaseOverrideRenderLivingLabelSuperiors.remove(id); - allBaseOverrideRenderLivingLabelInferiors.remove(id); - allBaseAfterRenderLivingLabelSuperiors.remove(id); - allBaseAfterRenderLivingLabelInferiors.remove(id); - - beforeRenderLivingLabelHookTypes.remove(id); - overrideRenderLivingLabelHookTypes.remove(id); - afterRenderLivingLabelHookTypes.remove(id); - - allBaseBeforeRenderModelSuperiors.remove(id); - allBaseBeforeRenderModelInferiors.remove(id); - allBaseOverrideRenderModelSuperiors.remove(id); - allBaseOverrideRenderModelInferiors.remove(id); - allBaseAfterRenderModelSuperiors.remove(id); - allBaseAfterRenderModelInferiors.remove(id); - - beforeRenderModelHookTypes.remove(id); - overrideRenderModelHookTypes.remove(id); - afterRenderModelHookTypes.remove(id); - - allBaseBeforeRenderPlayerSuperiors.remove(id); - allBaseBeforeRenderPlayerInferiors.remove(id); - allBaseOverrideRenderPlayerSuperiors.remove(id); - allBaseOverrideRenderPlayerInferiors.remove(id); - allBaseAfterRenderPlayerSuperiors.remove(id); - allBaseAfterRenderPlayerInferiors.remove(id); - - beforeRenderPlayerHookTypes.remove(id); - overrideRenderPlayerHookTypes.remove(id); - afterRenderPlayerHookTypes.remove(id); - - allBaseBeforeRenderPlayerNameAndScoreLabelSuperiors.remove(id); - allBaseBeforeRenderPlayerNameAndScoreLabelInferiors.remove(id); - allBaseOverrideRenderPlayerNameAndScoreLabelSuperiors.remove(id); - allBaseOverrideRenderPlayerNameAndScoreLabelInferiors.remove(id); - allBaseAfterRenderPlayerNameAndScoreLabelSuperiors.remove(id); - allBaseAfterRenderPlayerNameAndScoreLabelInferiors.remove(id); - - beforeRenderPlayerNameAndScoreLabelHookTypes.remove(id); - overrideRenderPlayerNameAndScoreLabelHookTypes.remove(id); - afterRenderPlayerNameAndScoreLabelHookTypes.remove(id); - - allBaseBeforeRenderPlayerScaleSuperiors.remove(id); - allBaseBeforeRenderPlayerScaleInferiors.remove(id); - allBaseOverrideRenderPlayerScaleSuperiors.remove(id); - allBaseOverrideRenderPlayerScaleInferiors.remove(id); - allBaseAfterRenderPlayerScaleSuperiors.remove(id); - allBaseAfterRenderPlayerScaleInferiors.remove(id); - - beforeRenderPlayerScaleHookTypes.remove(id); - overrideRenderPlayerScaleHookTypes.remove(id); - afterRenderPlayerScaleHookTypes.remove(id); - - allBaseBeforeRenderPlayerSleepSuperiors.remove(id); - allBaseBeforeRenderPlayerSleepInferiors.remove(id); - allBaseOverrideRenderPlayerSleepSuperiors.remove(id); - allBaseOverrideRenderPlayerSleepInferiors.remove(id); - allBaseAfterRenderPlayerSleepSuperiors.remove(id); - allBaseAfterRenderPlayerSleepInferiors.remove(id); - - beforeRenderPlayerSleepHookTypes.remove(id); - overrideRenderPlayerSleepHookTypes.remove(id); - afterRenderPlayerSleepHookTypes.remove(id); - - allBaseBeforeRenderSpecialsSuperiors.remove(id); - allBaseBeforeRenderSpecialsInferiors.remove(id); - allBaseOverrideRenderSpecialsSuperiors.remove(id); - allBaseOverrideRenderSpecialsInferiors.remove(id); - allBaseAfterRenderSpecialsSuperiors.remove(id); - allBaseAfterRenderSpecialsInferiors.remove(id); - - beforeRenderSpecialsHookTypes.remove(id); - overrideRenderSpecialsHookTypes.remove(id); - afterRenderSpecialsHookTypes.remove(id); - - allBaseBeforeRenderSwingProgressSuperiors.remove(id); - allBaseBeforeRenderSwingProgressInferiors.remove(id); - allBaseOverrideRenderSwingProgressSuperiors.remove(id); - allBaseOverrideRenderSwingProgressInferiors.remove(id); - allBaseAfterRenderSwingProgressSuperiors.remove(id); - allBaseAfterRenderSwingProgressInferiors.remove(id); - - beforeRenderSwingProgressHookTypes.remove(id); - overrideRenderSwingProgressHookTypes.remove(id); - afterRenderSwingProgressHookTypes.remove(id); - - allBaseBeforeRotatePlayerSuperiors.remove(id); - allBaseBeforeRotatePlayerInferiors.remove(id); - allBaseOverrideRotatePlayerSuperiors.remove(id); - allBaseOverrideRotatePlayerInferiors.remove(id); - allBaseAfterRotatePlayerSuperiors.remove(id); - allBaseAfterRotatePlayerInferiors.remove(id); - - beforeRotatePlayerHookTypes.remove(id); - overrideRotatePlayerHookTypes.remove(id); - afterRotatePlayerHookTypes.remove(id); - - allBaseBeforeSetArmorModelSuperiors.remove(id); - allBaseBeforeSetArmorModelInferiors.remove(id); - allBaseOverrideSetArmorModelSuperiors.remove(id); - allBaseOverrideSetArmorModelInferiors.remove(id); - allBaseAfterSetArmorModelSuperiors.remove(id); - allBaseAfterSetArmorModelInferiors.remove(id); - - beforeSetArmorModelHookTypes.remove(id); - overrideSetArmorModelHookTypes.remove(id); - afterSetArmorModelHookTypes.remove(id); - - allBaseBeforeSetPassArmorModelSuperiors.remove(id); - allBaseBeforeSetPassArmorModelInferiors.remove(id); - allBaseOverrideSetPassArmorModelSuperiors.remove(id); - allBaseOverrideSetPassArmorModelInferiors.remove(id); - allBaseAfterSetPassArmorModelSuperiors.remove(id); - allBaseAfterSetPassArmorModelInferiors.remove(id); - - beforeSetPassArmorModelHookTypes.remove(id); - overrideSetPassArmorModelHookTypes.remove(id); - afterSetPassArmorModelHookTypes.remove(id); - - allBaseBeforeSetRenderManagerSuperiors.remove(id); - allBaseBeforeSetRenderManagerInferiors.remove(id); - allBaseOverrideSetRenderManagerSuperiors.remove(id); - allBaseOverrideSetRenderManagerInferiors.remove(id); - allBaseAfterSetRenderManagerSuperiors.remove(id); - allBaseAfterSetRenderManagerInferiors.remove(id); - - beforeSetRenderManagerHookTypes.remove(id); - overrideSetRenderManagerHookTypes.remove(id); - afterSetRenderManagerHookTypes.remove(id); - - allBaseBeforeSetRenderPassModelSuperiors.remove(id); - allBaseBeforeSetRenderPassModelInferiors.remove(id); - allBaseOverrideSetRenderPassModelSuperiors.remove(id); - allBaseOverrideSetRenderPassModelInferiors.remove(id); - allBaseAfterSetRenderPassModelSuperiors.remove(id); - allBaseAfterSetRenderPassModelInferiors.remove(id); - - beforeSetRenderPassModelHookTypes.remove(id); - overrideSetRenderPassModelHookTypes.remove(id); - afterSetRenderPassModelHookTypes.remove(id); - - allBaseBeforeUpdateIconsSuperiors.remove(id); - allBaseBeforeUpdateIconsInferiors.remove(id); - allBaseOverrideUpdateIconsSuperiors.remove(id); - allBaseOverrideUpdateIconsInferiors.remove(id); - allBaseAfterUpdateIconsSuperiors.remove(id); - allBaseAfterUpdateIconsInferiors.remove(id); - - beforeUpdateIconsHookTypes.remove(id); - overrideUpdateIconsHookTypes.remove(id); - afterUpdateIconsHookTypes.remove(id); - - for(IRenderPlayerAPI instance : getAllInstancesList()) - instance.getRenderPlayerAPI().updateRenderPlayerBases(); - - Iterator iterator = keysToVirtualIds.keySet().iterator(); - while(iterator.hasNext()) - { - String key = iterator.next(); - if(keysToVirtualIds.get(key).equals(id)) - keysToVirtualIds.remove(key); - } - - boolean otherFound = false; - Class type = constructor.getDeclaringClass(); - - iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String otherId = iterator.next(); - Class otherType = allBaseConstructors.get(otherId).getDeclaringClass(); - if(!otherId.equals(id) && otherType.equals(type)) - { - otherFound = true; - break; - } - } - - if(!otherFound) - { - dynamicTypes.remove(type); - - virtualDynamicHookMethods.remove(type); - - beforeDynamicHookMethods.remove(type); - overrideDynamicHookMethods.remove(type); - afterDynamicHookMethods.remove(type); - } - - removeDynamicHookTypes(id, beforeDynamicHookTypes); - removeDynamicHookTypes(id, overrideDynamicHookTypes); - removeDynamicHookTypes(id, afterDynamicHookTypes); - - allBaseBeforeDynamicSuperiors.remove(id); - allBaseBeforeDynamicInferiors.remove(id); - allBaseOverrideDynamicSuperiors.remove(id); - allBaseOverrideDynamicInferiors.remove(id); - allBaseAfterDynamicSuperiors.remove(id); - allBaseAfterDynamicInferiors.remove(id); - - log("RenderPlayerAPI: unregistered id '" + id + "'"); - - return true; - } - - public static void removeDynamicHookTypes(String id, Map> map) - { - Iterator keys = map.keySet().iterator(); - while(keys.hasNext()) - map.get(keys.next()).remove(id); - } - - public static Set getRegisteredIds() - { - return unmodifiableAllIds; - } - - private static void addSorting(String id, Map map, String[] values) - { - if(values != null && values.length > 0) - map.put(id, values); - } - - private static void addDynamicSorting(String id, Map> map, Map values) - { - if(values != null && values.size() > 0) - map.put(id, values); - } - - private static boolean addMethod(String id, Class baseClass, List list, String methodName, Class... _parameterTypes) - { - try - { - Method method = baseClass.getMethod(methodName, _parameterTypes); - boolean isOverridden = method.getDeclaringClass() != RenderPlayerBase.class; - if(isOverridden) - list.add(id); - return isOverridden; - } - catch(Exception e) - { - throw new RuntimeException("Can not reflect method '" + methodName + "' of class '" + baseClass.getName() + "'", e); - } - } - - private static void addDynamicMethods(String id, Class baseClass) - { - if(!dynamicTypes.add(baseClass)) - return; - - Map virtuals = null; - Map befores = null; - Map overrides = null; - Map afters = null; - - Method[] methods = baseClass.getDeclaredMethods(); - for(int i=0; i= 8 && name.substring(0, 8).equalsIgnoreCase("override")) - { - name = name.substring(8); - override = true; - } - else if(name.length() >= 6 && name.substring(0, 6).equalsIgnoreCase("before")) - { - before = true; - name = name.substring(6); - } - else if(name.length() >= 5 && name.substring(0, 5).equalsIgnoreCase("after")) - { - after = true; - name = name.substring(5); - } - } - - if(name.length() >= 1 && (before || virtual || override || after)) - name = name.substring(0,1).toLowerCase() + name.substring(1); - - while(name.charAt(0) == '_') - name = name.substring(1); - - if(name.length() == 0) - throw new RuntimeException("Can not process dynamic hook method with no key"); - - keys.add(name); - - if(virtual) - { - if(keysToVirtualIds.containsKey(name)) - throw new RuntimeException("Can not process more than one dynamic virtual method"); - - keysToVirtualIds.put(name, id); - virtuals = addDynamicMethod(name, method, virtuals); - } - else if(before) - befores = addDynamicMethod(name, method, befores); - else if(after) - afters = addDynamicMethod(name, method, afters); - else - overrides = addDynamicMethod(name, method, overrides); - } - - if(virtuals != null) - virtualDynamicHookMethods.put(baseClass, virtuals); - if(befores != null) - beforeDynamicHookMethods.put(baseClass, befores); - if(overrides != null) - overrideDynamicHookMethods.put(baseClass, overrides); - if(afters != null) - afterDynamicHookMethods.put(baseClass, afters); - } - - private static void addDynamicKeys(String id, Class baseClass, Map, Map> dynamicHookMethods, Map> dynamicHookTypes) - { - Map methods = dynamicHookMethods.get(baseClass); - if(methods == null || methods.size() == 0) - return; - - Iterator keys = methods.keySet().iterator(); - while(keys.hasNext()) - { - String key = keys.next(); - if(!dynamicHookTypes.containsKey(key)) - dynamicHookTypes.put(key, new ArrayList(1)); - dynamicHookTypes.get(key).add(id); - } - } - - private static Map addDynamicMethod(String key, Method method, Map methods) - { - if(methods == null) - methods = new HashMap(); - if(methods.containsKey(key)) - throw new RuntimeException("method with key '" + key + "' allready exists"); - methods.put(key, method); - return methods; - } - - public static RenderPlayerAPI create(IRenderPlayerAPI renderPlayer) - { - if(allBaseConstructors.size() > 0 && !initialized) - initialize(); - return new RenderPlayerAPI(renderPlayer); - } - - private static void initialize() - { - sortBases(beforeLocalConstructingHookTypes, allBaseBeforeLocalConstructingSuperiors, allBaseBeforeLocalConstructingInferiors, "beforeLocalConstructing"); - sortBases(afterLocalConstructingHookTypes, allBaseAfterLocalConstructingSuperiors, allBaseAfterLocalConstructingInferiors, "afterLocalConstructing"); - - Iterator keyIterator = keys.iterator(); - while(keyIterator.hasNext()) - { - String key = keyIterator.next(); - sortDynamicBases(beforeDynamicHookTypes, allBaseBeforeDynamicSuperiors, allBaseBeforeDynamicInferiors, key); - sortDynamicBases(overrideDynamicHookTypes, allBaseOverrideDynamicSuperiors, allBaseOverrideDynamicInferiors, key); - sortDynamicBases(afterDynamicHookTypes, allBaseAfterDynamicSuperiors, allBaseAfterDynamicInferiors, key); - } - - sortBases(beforeDoRenderLabelHookTypes, allBaseBeforeDoRenderLabelSuperiors, allBaseBeforeDoRenderLabelInferiors, "beforeDoRenderLabel"); - sortBases(overrideDoRenderLabelHookTypes, allBaseOverrideDoRenderLabelSuperiors, allBaseOverrideDoRenderLabelInferiors, "overrideDoRenderLabel"); - sortBases(afterDoRenderLabelHookTypes, allBaseAfterDoRenderLabelSuperiors, allBaseAfterDoRenderLabelInferiors, "afterDoRenderLabel"); - - sortBases(beforeDoRenderShadowAndFireHookTypes, allBaseBeforeDoRenderShadowAndFireSuperiors, allBaseBeforeDoRenderShadowAndFireInferiors, "beforeDoRenderShadowAndFire"); - sortBases(overrideDoRenderShadowAndFireHookTypes, allBaseOverrideDoRenderShadowAndFireSuperiors, allBaseOverrideDoRenderShadowAndFireInferiors, "overrideDoRenderShadowAndFire"); - sortBases(afterDoRenderShadowAndFireHookTypes, allBaseAfterDoRenderShadowAndFireSuperiors, allBaseAfterDoRenderShadowAndFireInferiors, "afterDoRenderShadowAndFire"); - - sortBases(beforeGetColorMultiplierHookTypes, allBaseBeforeGetColorMultiplierSuperiors, allBaseBeforeGetColorMultiplierInferiors, "beforeGetColorMultiplier"); - sortBases(overrideGetColorMultiplierHookTypes, allBaseOverrideGetColorMultiplierSuperiors, allBaseOverrideGetColorMultiplierInferiors, "overrideGetColorMultiplier"); - sortBases(afterGetColorMultiplierHookTypes, allBaseAfterGetColorMultiplierSuperiors, allBaseAfterGetColorMultiplierInferiors, "afterGetColorMultiplier"); - - sortBases(beforeGetDeathMaxRotationHookTypes, allBaseBeforeGetDeathMaxRotationSuperiors, allBaseBeforeGetDeathMaxRotationInferiors, "beforeGetDeathMaxRotation"); - sortBases(overrideGetDeathMaxRotationHookTypes, allBaseOverrideGetDeathMaxRotationSuperiors, allBaseOverrideGetDeathMaxRotationInferiors, "overrideGetDeathMaxRotation"); - sortBases(afterGetDeathMaxRotationHookTypes, allBaseAfterGetDeathMaxRotationSuperiors, allBaseAfterGetDeathMaxRotationInferiors, "afterGetDeathMaxRotation"); - - sortBases(beforeGetFontRendererFromRenderManagerHookTypes, allBaseBeforeGetFontRendererFromRenderManagerSuperiors, allBaseBeforeGetFontRendererFromRenderManagerInferiors, "beforeGetFontRendererFromRenderManager"); - sortBases(overrideGetFontRendererFromRenderManagerHookTypes, allBaseOverrideGetFontRendererFromRenderManagerSuperiors, allBaseOverrideGetFontRendererFromRenderManagerInferiors, "overrideGetFontRendererFromRenderManager"); - sortBases(afterGetFontRendererFromRenderManagerHookTypes, allBaseAfterGetFontRendererFromRenderManagerSuperiors, allBaseAfterGetFontRendererFromRenderManagerInferiors, "afterGetFontRendererFromRenderManager"); - - sortBases(beforeGetResourceLocationFromPlayerHookTypes, allBaseBeforeGetResourceLocationFromPlayerSuperiors, allBaseBeforeGetResourceLocationFromPlayerInferiors, "beforeGetResourceLocationFromPlayer"); - sortBases(overrideGetResourceLocationFromPlayerHookTypes, allBaseOverrideGetResourceLocationFromPlayerSuperiors, allBaseOverrideGetResourceLocationFromPlayerInferiors, "overrideGetResourceLocationFromPlayer"); - sortBases(afterGetResourceLocationFromPlayerHookTypes, allBaseAfterGetResourceLocationFromPlayerSuperiors, allBaseAfterGetResourceLocationFromPlayerInferiors, "afterGetResourceLocationFromPlayer"); - - sortBases(beforeHandleRotationFloatHookTypes, allBaseBeforeHandleRotationFloatSuperiors, allBaseBeforeHandleRotationFloatInferiors, "beforeHandleRotationFloat"); - sortBases(overrideHandleRotationFloatHookTypes, allBaseOverrideHandleRotationFloatSuperiors, allBaseOverrideHandleRotationFloatInferiors, "overrideHandleRotationFloat"); - sortBases(afterHandleRotationFloatHookTypes, allBaseAfterHandleRotationFloatSuperiors, allBaseAfterHandleRotationFloatInferiors, "afterHandleRotationFloat"); - - sortBases(beforeInheritRenderPassHookTypes, allBaseBeforeInheritRenderPassSuperiors, allBaseBeforeInheritRenderPassInferiors, "beforeInheritRenderPass"); - sortBases(overrideInheritRenderPassHookTypes, allBaseOverrideInheritRenderPassSuperiors, allBaseOverrideInheritRenderPassInferiors, "overrideInheritRenderPass"); - sortBases(afterInheritRenderPassHookTypes, allBaseAfterInheritRenderPassSuperiors, allBaseAfterInheritRenderPassInferiors, "afterInheritRenderPass"); - - sortBases(beforeLoadTextureHookTypes, allBaseBeforeLoadTextureSuperiors, allBaseBeforeLoadTextureInferiors, "beforeLoadTexture"); - sortBases(overrideLoadTextureHookTypes, allBaseOverrideLoadTextureSuperiors, allBaseOverrideLoadTextureInferiors, "overrideLoadTexture"); - sortBases(afterLoadTextureHookTypes, allBaseAfterLoadTextureSuperiors, allBaseAfterLoadTextureInferiors, "afterLoadTexture"); - - sortBases(beforeLoadTextureOfEntityHookTypes, allBaseBeforeLoadTextureOfEntitySuperiors, allBaseBeforeLoadTextureOfEntityInferiors, "beforeLoadTextureOfEntity"); - sortBases(overrideLoadTextureOfEntityHookTypes, allBaseOverrideLoadTextureOfEntitySuperiors, allBaseOverrideLoadTextureOfEntityInferiors, "overrideLoadTextureOfEntity"); - sortBases(afterLoadTextureOfEntityHookTypes, allBaseAfterLoadTextureOfEntitySuperiors, allBaseAfterLoadTextureOfEntityInferiors, "afterLoadTextureOfEntity"); - - sortBases(beforePassSpecialRenderHookTypes, allBaseBeforePassSpecialRenderSuperiors, allBaseBeforePassSpecialRenderInferiors, "beforePassSpecialRender"); - sortBases(overridePassSpecialRenderHookTypes, allBaseOverridePassSpecialRenderSuperiors, allBaseOverridePassSpecialRenderInferiors, "overridePassSpecialRender"); - sortBases(afterPassSpecialRenderHookTypes, allBaseAfterPassSpecialRenderSuperiors, allBaseAfterPassSpecialRenderInferiors, "afterPassSpecialRender"); - - sortBases(beforePerformStaticEntityRebuildHookTypes, allBaseBeforePerformStaticEntityRebuildSuperiors, allBaseBeforePerformStaticEntityRebuildInferiors, "beforePerformStaticEntityRebuild"); - sortBases(overridePerformStaticEntityRebuildHookTypes, allBaseOverridePerformStaticEntityRebuildSuperiors, allBaseOverridePerformStaticEntityRebuildInferiors, "overridePerformStaticEntityRebuild"); - sortBases(afterPerformStaticEntityRebuildHookTypes, allBaseAfterPerformStaticEntityRebuildSuperiors, allBaseAfterPerformStaticEntityRebuildInferiors, "afterPerformStaticEntityRebuild"); - - sortBases(beforeRenderArrowsStuckInEntityHookTypes, allBaseBeforeRenderArrowsStuckInEntitySuperiors, allBaseBeforeRenderArrowsStuckInEntityInferiors, "beforeRenderArrowsStuckInEntity"); - sortBases(overrideRenderArrowsStuckInEntityHookTypes, allBaseOverrideRenderArrowsStuckInEntitySuperiors, allBaseOverrideRenderArrowsStuckInEntityInferiors, "overrideRenderArrowsStuckInEntity"); - sortBases(afterRenderArrowsStuckInEntityHookTypes, allBaseAfterRenderArrowsStuckInEntitySuperiors, allBaseAfterRenderArrowsStuckInEntityInferiors, "afterRenderArrowsStuckInEntity"); - - sortBases(beforeRenderFirstPersonArmHookTypes, allBaseBeforeRenderFirstPersonArmSuperiors, allBaseBeforeRenderFirstPersonArmInferiors, "beforeRenderFirstPersonArm"); - sortBases(overrideRenderFirstPersonArmHookTypes, allBaseOverrideRenderFirstPersonArmSuperiors, allBaseOverrideRenderFirstPersonArmInferiors, "overrideRenderFirstPersonArm"); - sortBases(afterRenderFirstPersonArmHookTypes, allBaseAfterRenderFirstPersonArmSuperiors, allBaseAfterRenderFirstPersonArmInferiors, "afterRenderFirstPersonArm"); - - sortBases(beforeRenderLivingLabelHookTypes, allBaseBeforeRenderLivingLabelSuperiors, allBaseBeforeRenderLivingLabelInferiors, "beforeRenderLivingLabel"); - sortBases(overrideRenderLivingLabelHookTypes, allBaseOverrideRenderLivingLabelSuperiors, allBaseOverrideRenderLivingLabelInferiors, "overrideRenderLivingLabel"); - sortBases(afterRenderLivingLabelHookTypes, allBaseAfterRenderLivingLabelSuperiors, allBaseAfterRenderLivingLabelInferiors, "afterRenderLivingLabel"); - - sortBases(beforeRenderModelHookTypes, allBaseBeforeRenderModelSuperiors, allBaseBeforeRenderModelInferiors, "beforeRenderModel"); - sortBases(overrideRenderModelHookTypes, allBaseOverrideRenderModelSuperiors, allBaseOverrideRenderModelInferiors, "overrideRenderModel"); - sortBases(afterRenderModelHookTypes, allBaseAfterRenderModelSuperiors, allBaseAfterRenderModelInferiors, "afterRenderModel"); - - sortBases(beforeRenderPlayerHookTypes, allBaseBeforeRenderPlayerSuperiors, allBaseBeforeRenderPlayerInferiors, "beforeRenderPlayer"); - sortBases(overrideRenderPlayerHookTypes, allBaseOverrideRenderPlayerSuperiors, allBaseOverrideRenderPlayerInferiors, "overrideRenderPlayer"); - sortBases(afterRenderPlayerHookTypes, allBaseAfterRenderPlayerSuperiors, allBaseAfterRenderPlayerInferiors, "afterRenderPlayer"); - - sortBases(beforeRenderPlayerNameAndScoreLabelHookTypes, allBaseBeforeRenderPlayerNameAndScoreLabelSuperiors, allBaseBeforeRenderPlayerNameAndScoreLabelInferiors, "beforeRenderPlayerNameAndScoreLabel"); - sortBases(overrideRenderPlayerNameAndScoreLabelHookTypes, allBaseOverrideRenderPlayerNameAndScoreLabelSuperiors, allBaseOverrideRenderPlayerNameAndScoreLabelInferiors, "overrideRenderPlayerNameAndScoreLabel"); - sortBases(afterRenderPlayerNameAndScoreLabelHookTypes, allBaseAfterRenderPlayerNameAndScoreLabelSuperiors, allBaseAfterRenderPlayerNameAndScoreLabelInferiors, "afterRenderPlayerNameAndScoreLabel"); - - sortBases(beforeRenderPlayerScaleHookTypes, allBaseBeforeRenderPlayerScaleSuperiors, allBaseBeforeRenderPlayerScaleInferiors, "beforeRenderPlayerScale"); - sortBases(overrideRenderPlayerScaleHookTypes, allBaseOverrideRenderPlayerScaleSuperiors, allBaseOverrideRenderPlayerScaleInferiors, "overrideRenderPlayerScale"); - sortBases(afterRenderPlayerScaleHookTypes, allBaseAfterRenderPlayerScaleSuperiors, allBaseAfterRenderPlayerScaleInferiors, "afterRenderPlayerScale"); - - sortBases(beforeRenderPlayerSleepHookTypes, allBaseBeforeRenderPlayerSleepSuperiors, allBaseBeforeRenderPlayerSleepInferiors, "beforeRenderPlayerSleep"); - sortBases(overrideRenderPlayerSleepHookTypes, allBaseOverrideRenderPlayerSleepSuperiors, allBaseOverrideRenderPlayerSleepInferiors, "overrideRenderPlayerSleep"); - sortBases(afterRenderPlayerSleepHookTypes, allBaseAfterRenderPlayerSleepSuperiors, allBaseAfterRenderPlayerSleepInferiors, "afterRenderPlayerSleep"); - - sortBases(beforeRenderSpecialsHookTypes, allBaseBeforeRenderSpecialsSuperiors, allBaseBeforeRenderSpecialsInferiors, "beforeRenderSpecials"); - sortBases(overrideRenderSpecialsHookTypes, allBaseOverrideRenderSpecialsSuperiors, allBaseOverrideRenderSpecialsInferiors, "overrideRenderSpecials"); - sortBases(afterRenderSpecialsHookTypes, allBaseAfterRenderSpecialsSuperiors, allBaseAfterRenderSpecialsInferiors, "afterRenderSpecials"); - - sortBases(beforeRenderSwingProgressHookTypes, allBaseBeforeRenderSwingProgressSuperiors, allBaseBeforeRenderSwingProgressInferiors, "beforeRenderSwingProgress"); - sortBases(overrideRenderSwingProgressHookTypes, allBaseOverrideRenderSwingProgressSuperiors, allBaseOverrideRenderSwingProgressInferiors, "overrideRenderSwingProgress"); - sortBases(afterRenderSwingProgressHookTypes, allBaseAfterRenderSwingProgressSuperiors, allBaseAfterRenderSwingProgressInferiors, "afterRenderSwingProgress"); - - sortBases(beforeRotatePlayerHookTypes, allBaseBeforeRotatePlayerSuperiors, allBaseBeforeRotatePlayerInferiors, "beforeRotatePlayer"); - sortBases(overrideRotatePlayerHookTypes, allBaseOverrideRotatePlayerSuperiors, allBaseOverrideRotatePlayerInferiors, "overrideRotatePlayer"); - sortBases(afterRotatePlayerHookTypes, allBaseAfterRotatePlayerSuperiors, allBaseAfterRotatePlayerInferiors, "afterRotatePlayer"); - - sortBases(beforeSetArmorModelHookTypes, allBaseBeforeSetArmorModelSuperiors, allBaseBeforeSetArmorModelInferiors, "beforeSetArmorModel"); - sortBases(overrideSetArmorModelHookTypes, allBaseOverrideSetArmorModelSuperiors, allBaseOverrideSetArmorModelInferiors, "overrideSetArmorModel"); - sortBases(afterSetArmorModelHookTypes, allBaseAfterSetArmorModelSuperiors, allBaseAfterSetArmorModelInferiors, "afterSetArmorModel"); - - sortBases(beforeSetPassArmorModelHookTypes, allBaseBeforeSetPassArmorModelSuperiors, allBaseBeforeSetPassArmorModelInferiors, "beforeSetPassArmorModel"); - sortBases(overrideSetPassArmorModelHookTypes, allBaseOverrideSetPassArmorModelSuperiors, allBaseOverrideSetPassArmorModelInferiors, "overrideSetPassArmorModel"); - sortBases(afterSetPassArmorModelHookTypes, allBaseAfterSetPassArmorModelSuperiors, allBaseAfterSetPassArmorModelInferiors, "afterSetPassArmorModel"); - - sortBases(beforeSetRenderManagerHookTypes, allBaseBeforeSetRenderManagerSuperiors, allBaseBeforeSetRenderManagerInferiors, "beforeSetRenderManager"); - sortBases(overrideSetRenderManagerHookTypes, allBaseOverrideSetRenderManagerSuperiors, allBaseOverrideSetRenderManagerInferiors, "overrideSetRenderManager"); - sortBases(afterSetRenderManagerHookTypes, allBaseAfterSetRenderManagerSuperiors, allBaseAfterSetRenderManagerInferiors, "afterSetRenderManager"); - - sortBases(beforeSetRenderPassModelHookTypes, allBaseBeforeSetRenderPassModelSuperiors, allBaseBeforeSetRenderPassModelInferiors, "beforeSetRenderPassModel"); - sortBases(overrideSetRenderPassModelHookTypes, allBaseOverrideSetRenderPassModelSuperiors, allBaseOverrideSetRenderPassModelInferiors, "overrideSetRenderPassModel"); - sortBases(afterSetRenderPassModelHookTypes, allBaseAfterSetRenderPassModelSuperiors, allBaseAfterSetRenderPassModelInferiors, "afterSetRenderPassModel"); - - sortBases(beforeUpdateIconsHookTypes, allBaseBeforeUpdateIconsSuperiors, allBaseBeforeUpdateIconsInferiors, "beforeUpdateIcons"); - sortBases(overrideUpdateIconsHookTypes, allBaseOverrideUpdateIconsSuperiors, allBaseOverrideUpdateIconsInferiors, "overrideUpdateIcons"); - sortBases(afterUpdateIconsHookTypes, allBaseAfterUpdateIconsSuperiors, allBaseAfterUpdateIconsInferiors, "afterUpdateIcons"); - - initialized = true; - } - - private static List getAllInstancesList() - { - List result = new ArrayList(); - for(Iterator> iterator = allInstances.iterator(); iterator.hasNext();) - { - IRenderPlayerAPI instance = iterator.next().get(); - if(instance != null) - result.add(instance); - else - iterator.remove(); - } - return result; - } - - private static List> allInstances = new ArrayList>(); - - public static net.minecraft.client.renderer.entity.RenderPlayer[] getAllInstances() - { - List allInstances = getAllInstancesList(); - return allInstances.toArray(new net.minecraft.client.renderer.entity.RenderPlayer[allInstances.size()]); - } - - public static void beforeLocalConstructing(IRenderPlayerAPI renderPlayer) - { - RenderPlayerAPI renderPlayerAPI = renderPlayer.getRenderPlayerAPI(); - if(renderPlayerAPI != null) - renderPlayerAPI.load(); - - allInstances.add(new WeakReference(renderPlayer)); - - if(renderPlayerAPI != null) - renderPlayerAPI.beforeLocalConstructing(); - } - - public static void afterLocalConstructing(IRenderPlayerAPI renderPlayer) - { - RenderPlayerAPI renderPlayerAPI = renderPlayer.getRenderPlayerAPI(); - if(renderPlayerAPI != null) - renderPlayerAPI.afterLocalConstructing(); - } - - public static RenderPlayerBase getRenderPlayerBase(IRenderPlayerAPI renderPlayer, String baseId) - { - RenderPlayerAPI renderPlayerAPI = renderPlayer.getRenderPlayerAPI(); - if(renderPlayerAPI != null) - return renderPlayerAPI.getRenderPlayerBase(baseId); - return null; - } - - public static Set getRenderPlayerBaseIds(IRenderPlayerAPI renderPlayer) - { - RenderPlayerAPI renderPlayerAPI = renderPlayer.getRenderPlayerAPI(); - Set result = null; - if(renderPlayerAPI != null) - result = renderPlayerAPI.getRenderPlayerBaseIds(); - else - result = Collections.emptySet(); - return result; - } - - public static Object dynamic(IRenderPlayerAPI renderPlayer, String key, Object[] parameters) - { - RenderPlayerAPI renderPlayerAPI = renderPlayer.getRenderPlayerAPI(); - if(renderPlayerAPI != null) - return renderPlayerAPI.dynamic(key, parameters); - return null; - } - - private static void sortBases(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - new RenderPlayerBaseSorter(list, allBaseSuperiors, allBaseInferiors, methodName).Sort(); - } - - private final static Map EmptySortMap = Collections.unmodifiableMap(new HashMap()); - - private static void sortDynamicBases(Map> lists, Map> allBaseSuperiors, Map> allBaseInferiors, String key) - { - List types = lists.get(key); - if(types != null && types.size() > 1) - sortBases(types, getDynamicSorters(key, types, allBaseSuperiors), getDynamicSorters(key, types, allBaseInferiors), key); - } - - private static Map getDynamicSorters(String key, List toSort, Map> allBaseValues) - { - Map superiors = null; - - Iterator ids = toSort.iterator(); - while(ids.hasNext()) - { - String id = ids.next(); - Map idSuperiors = allBaseValues.get(id); - if(idSuperiors == null) - continue; - - String[] keySuperiorIds = idSuperiors.get(key); - if(keySuperiorIds != null && keySuperiorIds.length > 0) - { - if(superiors == null) - superiors = new HashMap(1); - superiors.put(id, keySuperiorIds); - } - } - - return superiors != null ? superiors : EmptySortMap; - } - - private RenderPlayerAPI(IRenderPlayerAPI renderPlayer) - { - this.renderPlayer = renderPlayer; - } - - private void load() - { - Iterator iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String id = iterator.next(); - RenderPlayerBase toAttach = createRenderPlayerBase(id); - toAttach.beforeBaseAttach(false); - allBaseObjects.put(id, toAttach); - baseObjectsToId.put(toAttach, id); - } - - beforeLocalConstructingHooks = create(beforeLocalConstructingHookTypes); - afterLocalConstructingHooks = create(afterLocalConstructingHookTypes); - - updateRenderPlayerBases(); - - iterator = allBaseObjects.keySet().iterator(); - while(iterator.hasNext()) - allBaseObjects.get(iterator.next()).afterBaseAttach(false); - } - - private RenderPlayerBase createRenderPlayerBase(String id) - { - Constructor contructor = allBaseConstructors.get(id); - - RenderPlayerBase base; - try - { - if(contructor.getParameterTypes().length == 1) - base = (RenderPlayerBase)contructor.newInstance(this); - else - base = (RenderPlayerBase)contructor.newInstance(this, id); - } - catch (Exception e) - { - throw new RuntimeException("Exception while creating a RenderPlayerBase of type '" + contructor.getDeclaringClass() + "'", e); - } - return base; - } - - private void updateRenderPlayerBases() - { - beforeDoRenderLabelHooks = create(beforeDoRenderLabelHookTypes); - overrideDoRenderLabelHooks = create(overrideDoRenderLabelHookTypes); - afterDoRenderLabelHooks = create(afterDoRenderLabelHookTypes); - isDoRenderLabelModded = - beforeDoRenderLabelHooks != null || - overrideDoRenderLabelHooks != null || - afterDoRenderLabelHooks != null; - - beforeDoRenderShadowAndFireHooks = create(beforeDoRenderShadowAndFireHookTypes); - overrideDoRenderShadowAndFireHooks = create(overrideDoRenderShadowAndFireHookTypes); - afterDoRenderShadowAndFireHooks = create(afterDoRenderShadowAndFireHookTypes); - isDoRenderShadowAndFireModded = - beforeDoRenderShadowAndFireHooks != null || - overrideDoRenderShadowAndFireHooks != null || - afterDoRenderShadowAndFireHooks != null; - - beforeGetColorMultiplierHooks = create(beforeGetColorMultiplierHookTypes); - overrideGetColorMultiplierHooks = create(overrideGetColorMultiplierHookTypes); - afterGetColorMultiplierHooks = create(afterGetColorMultiplierHookTypes); - isGetColorMultiplierModded = - beforeGetColorMultiplierHooks != null || - overrideGetColorMultiplierHooks != null || - afterGetColorMultiplierHooks != null; - - beforeGetDeathMaxRotationHooks = create(beforeGetDeathMaxRotationHookTypes); - overrideGetDeathMaxRotationHooks = create(overrideGetDeathMaxRotationHookTypes); - afterGetDeathMaxRotationHooks = create(afterGetDeathMaxRotationHookTypes); - isGetDeathMaxRotationModded = - beforeGetDeathMaxRotationHooks != null || - overrideGetDeathMaxRotationHooks != null || - afterGetDeathMaxRotationHooks != null; - - beforeGetFontRendererFromRenderManagerHooks = create(beforeGetFontRendererFromRenderManagerHookTypes); - overrideGetFontRendererFromRenderManagerHooks = create(overrideGetFontRendererFromRenderManagerHookTypes); - afterGetFontRendererFromRenderManagerHooks = create(afterGetFontRendererFromRenderManagerHookTypes); - isGetFontRendererFromRenderManagerModded = - beforeGetFontRendererFromRenderManagerHooks != null || - overrideGetFontRendererFromRenderManagerHooks != null || - afterGetFontRendererFromRenderManagerHooks != null; - - beforeGetResourceLocationFromPlayerHooks = create(beforeGetResourceLocationFromPlayerHookTypes); - overrideGetResourceLocationFromPlayerHooks = create(overrideGetResourceLocationFromPlayerHookTypes); - afterGetResourceLocationFromPlayerHooks = create(afterGetResourceLocationFromPlayerHookTypes); - isGetResourceLocationFromPlayerModded = - beforeGetResourceLocationFromPlayerHooks != null || - overrideGetResourceLocationFromPlayerHooks != null || - afterGetResourceLocationFromPlayerHooks != null; - - beforeHandleRotationFloatHooks = create(beforeHandleRotationFloatHookTypes); - overrideHandleRotationFloatHooks = create(overrideHandleRotationFloatHookTypes); - afterHandleRotationFloatHooks = create(afterHandleRotationFloatHookTypes); - isHandleRotationFloatModded = - beforeHandleRotationFloatHooks != null || - overrideHandleRotationFloatHooks != null || - afterHandleRotationFloatHooks != null; - - beforeInheritRenderPassHooks = create(beforeInheritRenderPassHookTypes); - overrideInheritRenderPassHooks = create(overrideInheritRenderPassHookTypes); - afterInheritRenderPassHooks = create(afterInheritRenderPassHookTypes); - isInheritRenderPassModded = - beforeInheritRenderPassHooks != null || - overrideInheritRenderPassHooks != null || - afterInheritRenderPassHooks != null; - - beforeLoadTextureHooks = create(beforeLoadTextureHookTypes); - overrideLoadTextureHooks = create(overrideLoadTextureHookTypes); - afterLoadTextureHooks = create(afterLoadTextureHookTypes); - isLoadTextureModded = - beforeLoadTextureHooks != null || - overrideLoadTextureHooks != null || - afterLoadTextureHooks != null; - - beforeLoadTextureOfEntityHooks = create(beforeLoadTextureOfEntityHookTypes); - overrideLoadTextureOfEntityHooks = create(overrideLoadTextureOfEntityHookTypes); - afterLoadTextureOfEntityHooks = create(afterLoadTextureOfEntityHookTypes); - isLoadTextureOfEntityModded = - beforeLoadTextureOfEntityHooks != null || - overrideLoadTextureOfEntityHooks != null || - afterLoadTextureOfEntityHooks != null; - - beforePassSpecialRenderHooks = create(beforePassSpecialRenderHookTypes); - overridePassSpecialRenderHooks = create(overridePassSpecialRenderHookTypes); - afterPassSpecialRenderHooks = create(afterPassSpecialRenderHookTypes); - isPassSpecialRenderModded = - beforePassSpecialRenderHooks != null || - overridePassSpecialRenderHooks != null || - afterPassSpecialRenderHooks != null; - - beforePerformStaticEntityRebuildHooks = create(beforePerformStaticEntityRebuildHookTypes); - overridePerformStaticEntityRebuildHooks = create(overridePerformStaticEntityRebuildHookTypes); - afterPerformStaticEntityRebuildHooks = create(afterPerformStaticEntityRebuildHookTypes); - isPerformStaticEntityRebuildModded = - beforePerformStaticEntityRebuildHooks != null || - overridePerformStaticEntityRebuildHooks != null || - afterPerformStaticEntityRebuildHooks != null; - - beforeRenderArrowsStuckInEntityHooks = create(beforeRenderArrowsStuckInEntityHookTypes); - overrideRenderArrowsStuckInEntityHooks = create(overrideRenderArrowsStuckInEntityHookTypes); - afterRenderArrowsStuckInEntityHooks = create(afterRenderArrowsStuckInEntityHookTypes); - isRenderArrowsStuckInEntityModded = - beforeRenderArrowsStuckInEntityHooks != null || - overrideRenderArrowsStuckInEntityHooks != null || - afterRenderArrowsStuckInEntityHooks != null; - - beforeRenderFirstPersonArmHooks = create(beforeRenderFirstPersonArmHookTypes); - overrideRenderFirstPersonArmHooks = create(overrideRenderFirstPersonArmHookTypes); - afterRenderFirstPersonArmHooks = create(afterRenderFirstPersonArmHookTypes); - isRenderFirstPersonArmModded = - beforeRenderFirstPersonArmHooks != null || - overrideRenderFirstPersonArmHooks != null || - afterRenderFirstPersonArmHooks != null; - - beforeRenderLivingLabelHooks = create(beforeRenderLivingLabelHookTypes); - overrideRenderLivingLabelHooks = create(overrideRenderLivingLabelHookTypes); - afterRenderLivingLabelHooks = create(afterRenderLivingLabelHookTypes); - isRenderLivingLabelModded = - beforeRenderLivingLabelHooks != null || - overrideRenderLivingLabelHooks != null || - afterRenderLivingLabelHooks != null; - - beforeRenderModelHooks = create(beforeRenderModelHookTypes); - overrideRenderModelHooks = create(overrideRenderModelHookTypes); - afterRenderModelHooks = create(afterRenderModelHookTypes); - isRenderModelModded = - beforeRenderModelHooks != null || - overrideRenderModelHooks != null || - afterRenderModelHooks != null; - - beforeRenderPlayerHooks = create(beforeRenderPlayerHookTypes); - overrideRenderPlayerHooks = create(overrideRenderPlayerHookTypes); - afterRenderPlayerHooks = create(afterRenderPlayerHookTypes); - isRenderPlayerModded = - beforeRenderPlayerHooks != null || - overrideRenderPlayerHooks != null || - afterRenderPlayerHooks != null; - - beforeRenderPlayerNameAndScoreLabelHooks = create(beforeRenderPlayerNameAndScoreLabelHookTypes); - overrideRenderPlayerNameAndScoreLabelHooks = create(overrideRenderPlayerNameAndScoreLabelHookTypes); - afterRenderPlayerNameAndScoreLabelHooks = create(afterRenderPlayerNameAndScoreLabelHookTypes); - isRenderPlayerNameAndScoreLabelModded = - beforeRenderPlayerNameAndScoreLabelHooks != null || - overrideRenderPlayerNameAndScoreLabelHooks != null || - afterRenderPlayerNameAndScoreLabelHooks != null; - - beforeRenderPlayerScaleHooks = create(beforeRenderPlayerScaleHookTypes); - overrideRenderPlayerScaleHooks = create(overrideRenderPlayerScaleHookTypes); - afterRenderPlayerScaleHooks = create(afterRenderPlayerScaleHookTypes); - isRenderPlayerScaleModded = - beforeRenderPlayerScaleHooks != null || - overrideRenderPlayerScaleHooks != null || - afterRenderPlayerScaleHooks != null; - - beforeRenderPlayerSleepHooks = create(beforeRenderPlayerSleepHookTypes); - overrideRenderPlayerSleepHooks = create(overrideRenderPlayerSleepHookTypes); - afterRenderPlayerSleepHooks = create(afterRenderPlayerSleepHookTypes); - isRenderPlayerSleepModded = - beforeRenderPlayerSleepHooks != null || - overrideRenderPlayerSleepHooks != null || - afterRenderPlayerSleepHooks != null; - - beforeRenderSpecialsHooks = create(beforeRenderSpecialsHookTypes); - overrideRenderSpecialsHooks = create(overrideRenderSpecialsHookTypes); - afterRenderSpecialsHooks = create(afterRenderSpecialsHookTypes); - isRenderSpecialsModded = - beforeRenderSpecialsHooks != null || - overrideRenderSpecialsHooks != null || - afterRenderSpecialsHooks != null; - - beforeRenderSwingProgressHooks = create(beforeRenderSwingProgressHookTypes); - overrideRenderSwingProgressHooks = create(overrideRenderSwingProgressHookTypes); - afterRenderSwingProgressHooks = create(afterRenderSwingProgressHookTypes); - isRenderSwingProgressModded = - beforeRenderSwingProgressHooks != null || - overrideRenderSwingProgressHooks != null || - afterRenderSwingProgressHooks != null; - - beforeRotatePlayerHooks = create(beforeRotatePlayerHookTypes); - overrideRotatePlayerHooks = create(overrideRotatePlayerHookTypes); - afterRotatePlayerHooks = create(afterRotatePlayerHookTypes); - isRotatePlayerModded = - beforeRotatePlayerHooks != null || - overrideRotatePlayerHooks != null || - afterRotatePlayerHooks != null; - - beforeSetArmorModelHooks = create(beforeSetArmorModelHookTypes); - overrideSetArmorModelHooks = create(overrideSetArmorModelHookTypes); - afterSetArmorModelHooks = create(afterSetArmorModelHookTypes); - isSetArmorModelModded = - beforeSetArmorModelHooks != null || - overrideSetArmorModelHooks != null || - afterSetArmorModelHooks != null; - - beforeSetPassArmorModelHooks = create(beforeSetPassArmorModelHookTypes); - overrideSetPassArmorModelHooks = create(overrideSetPassArmorModelHookTypes); - afterSetPassArmorModelHooks = create(afterSetPassArmorModelHookTypes); - isSetPassArmorModelModded = - beforeSetPassArmorModelHooks != null || - overrideSetPassArmorModelHooks != null || - afterSetPassArmorModelHooks != null; - - beforeSetRenderManagerHooks = create(beforeSetRenderManagerHookTypes); - overrideSetRenderManagerHooks = create(overrideSetRenderManagerHookTypes); - afterSetRenderManagerHooks = create(afterSetRenderManagerHookTypes); - isSetRenderManagerModded = - beforeSetRenderManagerHooks != null || - overrideSetRenderManagerHooks != null || - afterSetRenderManagerHooks != null; - - beforeSetRenderPassModelHooks = create(beforeSetRenderPassModelHookTypes); - overrideSetRenderPassModelHooks = create(overrideSetRenderPassModelHookTypes); - afterSetRenderPassModelHooks = create(afterSetRenderPassModelHookTypes); - isSetRenderPassModelModded = - beforeSetRenderPassModelHooks != null || - overrideSetRenderPassModelHooks != null || - afterSetRenderPassModelHooks != null; - - beforeUpdateIconsHooks = create(beforeUpdateIconsHookTypes); - overrideUpdateIconsHooks = create(overrideUpdateIconsHookTypes); - afterUpdateIconsHooks = create(afterUpdateIconsHookTypes); - isUpdateIconsModded = - beforeUpdateIconsHooks != null || - overrideUpdateIconsHooks != null || - afterUpdateIconsHooks != null; - - } - - private void attachRenderPlayerBase(String id) - { - RenderPlayerBase toAttach = createRenderPlayerBase(id); - toAttach.beforeBaseAttach(true); - allBaseObjects.put(id, toAttach); - updateRenderPlayerBases(); - toAttach.afterBaseAttach(true); - } - - private void detachRenderPlayerBase(String id) - { - RenderPlayerBase toDetach = allBaseObjects.get(id); - toDetach.beforeBaseDetach(true); - allBaseObjects.remove(id); - toDetach.afterBaseDetach(true); - } - - private RenderPlayerBase[] create(List types) - { - if(types.isEmpty()) - return null; - - RenderPlayerBase[] result = new RenderPlayerBase[types.size()]; - for(int i = 0; i < result.length; i++) - result[i] = getRenderPlayerBase(types.get(i)); - return result; - } - - private void beforeLocalConstructing() - { - if(beforeLocalConstructingHooks != null) - for(int i = beforeLocalConstructingHooks.length - 1; i >= 0 ; i--) - beforeLocalConstructingHooks[i].beforeLocalConstructing(); - beforeLocalConstructingHooks = null; - } - - private void afterLocalConstructing() - { - if(afterLocalConstructingHooks != null) - for(int i = 0; i < afterLocalConstructingHooks.length; i++) - afterLocalConstructingHooks[i].afterLocalConstructing(); - afterLocalConstructingHooks = null; - } - - public RenderPlayerBase getRenderPlayerBase(String id) - { - return allBaseObjects.get(id); - } - - public Set getRenderPlayerBaseIds() - { - return unmodifiableAllBaseIds; - } - - public Object dynamic(String key, Object[] parameters) - { - key = key.replace('.', '_').replace(' ', '_'); - executeAll(key, parameters, beforeDynamicHookTypes, beforeDynamicHookMethods, true); - Object result = dynamicOverwritten(key, parameters, null); - executeAll(key, parameters, afterDynamicHookTypes, afterDynamicHookMethods, false); - return result; - } - - public Object dynamicOverwritten(String key, Object[] parameters, RenderPlayerBase overwriter) - { - List overrideIds = overrideDynamicHookTypes.get(key); - - String id = null; - if(overrideIds != null) - if(overwriter != null) - { - id = baseObjectsToId.get(overwriter); - int index = overrideIds.indexOf(id); - if(index > 0) - id = overrideIds.get(index - 1); - else - id = null; - } - else if(overrideIds.size() > 0) - id = overrideIds.get(overrideIds.size() - 1); - - Map, Map> methodMap; - - if(id == null) - { - id = keysToVirtualIds.get(key); - if(id == null) - return null; - methodMap = virtualDynamicHookMethods; - } - else - methodMap = overrideDynamicHookMethods; - - Map methods = methodMap.get(allBaseConstructors.get(id).getDeclaringClass()); - if(methods == null) - return null; - - Method method = methods.get(key); - if(method == null) - return null; - - return execute(getRenderPlayerBase(id), method, parameters); - } - - private void executeAll(String key, Object[] parameters, Map> dynamicHookTypes, Map, Map> dynamicHookMethods, boolean reverse) - { - List beforeIds = dynamicHookTypes.get(key); - if(beforeIds == null) - return; - - for(int i= reverse ? beforeIds.size() - 1 : 0; reverse ? i >= 0 : i < beforeIds.size(); i = i + (reverse ? -1 : 1)) - { - String id = beforeIds.get(i); - RenderPlayerBase base = getRenderPlayerBase(id); - Class type = base.getClass(); - - Map methods = dynamicHookMethods.get(type); - if(methods == null) - continue; - - Method method = methods.get(key); - if(method == null) - continue; - - execute(base, method, parameters); - } - } - - private Object execute(RenderPlayerBase base, Method method, Object[] parameters) - { - try - { - return method.invoke(base, parameters); - } - catch(Exception e) - { - throw new RuntimeException("Exception while invoking dynamic method", e); - } - } - - public static boolean doRenderLabel(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - boolean _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isDoRenderLabelModded) - _result = renderPlayerAPI.doRenderLabel(paramEntityLivingBase); - else - _result = target.localDoRenderLabel(paramEntityLivingBase); - return _result; - } - - private boolean doRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - if(beforeDoRenderLabelHooks != null) - for(int i = beforeDoRenderLabelHooks.length - 1; i >= 0 ; i--) - beforeDoRenderLabelHooks[i].beforeDoRenderLabel(paramEntityLivingBase); - - boolean _result; - if(overrideDoRenderLabelHooks != null) - _result = overrideDoRenderLabelHooks[overrideDoRenderLabelHooks.length - 1].doRenderLabel(paramEntityLivingBase); - else - _result = renderPlayer.localDoRenderLabel(paramEntityLivingBase); - - if(afterDoRenderLabelHooks != null) - for(int i = 0; i < afterDoRenderLabelHooks.length; i++) - afterDoRenderLabelHooks[i].afterDoRenderLabel(paramEntityLivingBase); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenDoRenderLabel(RenderPlayerBase overWriter) - { - if (overrideDoRenderLabelHooks == null) - return overWriter; - - for(int i = 0; i < overrideDoRenderLabelHooks.length; i++) - if(overrideDoRenderLabelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDoRenderLabelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDoRenderLabelHookTypes = new LinkedList(); - private final static List overrideDoRenderLabelHookTypes = new LinkedList(); - private final static List afterDoRenderLabelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeDoRenderLabelHooks; - private RenderPlayerBase[] overrideDoRenderLabelHooks; - private RenderPlayerBase[] afterDoRenderLabelHooks; - - public boolean isDoRenderLabelModded; - - private static final Map allBaseBeforeDoRenderLabelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDoRenderLabelInferiors = new Hashtable(0); - private static final Map allBaseOverrideDoRenderLabelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDoRenderLabelInferiors = new Hashtable(0); - private static final Map allBaseAfterDoRenderLabelSuperiors = new Hashtable(0); - private static final Map allBaseAfterDoRenderLabelInferiors = new Hashtable(0); - - public static void doRenderShadowAndFire(IRenderPlayerAPI target, net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isDoRenderShadowAndFireModded) - renderPlayerAPI.doRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - target.localDoRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - } - - private void doRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - if(beforeDoRenderShadowAndFireHooks != null) - for(int i = beforeDoRenderShadowAndFireHooks.length - 1; i >= 0 ; i--) - beforeDoRenderShadowAndFireHooks[i].beforeDoRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(overrideDoRenderShadowAndFireHooks != null) - overrideDoRenderShadowAndFireHooks[overrideDoRenderShadowAndFireHooks.length - 1].doRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - renderPlayer.localDoRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(afterDoRenderShadowAndFireHooks != null) - for(int i = 0; i < afterDoRenderShadowAndFireHooks.length; i++) - afterDoRenderShadowAndFireHooks[i].afterDoRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - protected RenderPlayerBase GetOverwrittenDoRenderShadowAndFire(RenderPlayerBase overWriter) - { - if (overrideDoRenderShadowAndFireHooks == null) - return overWriter; - - for(int i = 0; i < overrideDoRenderShadowAndFireHooks.length; i++) - if(overrideDoRenderShadowAndFireHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDoRenderShadowAndFireHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDoRenderShadowAndFireHookTypes = new LinkedList(); - private final static List overrideDoRenderShadowAndFireHookTypes = new LinkedList(); - private final static List afterDoRenderShadowAndFireHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeDoRenderShadowAndFireHooks; - private RenderPlayerBase[] overrideDoRenderShadowAndFireHooks; - private RenderPlayerBase[] afterDoRenderShadowAndFireHooks; - - public boolean isDoRenderShadowAndFireModded; - - private static final Map allBaseBeforeDoRenderShadowAndFireSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDoRenderShadowAndFireInferiors = new Hashtable(0); - private static final Map allBaseOverrideDoRenderShadowAndFireSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDoRenderShadowAndFireInferiors = new Hashtable(0); - private static final Map allBaseAfterDoRenderShadowAndFireSuperiors = new Hashtable(0); - private static final Map allBaseAfterDoRenderShadowAndFireInferiors = new Hashtable(0); - - public static int getColorMultiplier(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2) - { - int _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isGetColorMultiplierModded) - _result = renderPlayerAPI.getColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - else - _result = target.localGetColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - return _result; - } - - private int getColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2) - { - if(beforeGetColorMultiplierHooks != null) - for(int i = beforeGetColorMultiplierHooks.length - 1; i >= 0 ; i--) - beforeGetColorMultiplierHooks[i].beforeGetColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - - int _result; - if(overrideGetColorMultiplierHooks != null) - _result = overrideGetColorMultiplierHooks[overrideGetColorMultiplierHooks.length - 1].getColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - else - _result = renderPlayer.localGetColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - - if(afterGetColorMultiplierHooks != null) - for(int i = 0; i < afterGetColorMultiplierHooks.length; i++) - afterGetColorMultiplierHooks[i].afterGetColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenGetColorMultiplier(RenderPlayerBase overWriter) - { - if (overrideGetColorMultiplierHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetColorMultiplierHooks.length; i++) - if(overrideGetColorMultiplierHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetColorMultiplierHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetColorMultiplierHookTypes = new LinkedList(); - private final static List overrideGetColorMultiplierHookTypes = new LinkedList(); - private final static List afterGetColorMultiplierHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeGetColorMultiplierHooks; - private RenderPlayerBase[] overrideGetColorMultiplierHooks; - private RenderPlayerBase[] afterGetColorMultiplierHooks; - - public boolean isGetColorMultiplierModded; - - private static final Map allBaseBeforeGetColorMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetColorMultiplierInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetColorMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetColorMultiplierInferiors = new Hashtable(0); - private static final Map allBaseAfterGetColorMultiplierSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetColorMultiplierInferiors = new Hashtable(0); - - public static float getDeathMaxRotation(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - float _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isGetDeathMaxRotationModded) - _result = renderPlayerAPI.getDeathMaxRotation(paramEntityLivingBase); - else - _result = target.localGetDeathMaxRotation(paramEntityLivingBase); - return _result; - } - - private float getDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - if(beforeGetDeathMaxRotationHooks != null) - for(int i = beforeGetDeathMaxRotationHooks.length - 1; i >= 0 ; i--) - beforeGetDeathMaxRotationHooks[i].beforeGetDeathMaxRotation(paramEntityLivingBase); - - float _result; - if(overrideGetDeathMaxRotationHooks != null) - _result = overrideGetDeathMaxRotationHooks[overrideGetDeathMaxRotationHooks.length - 1].getDeathMaxRotation(paramEntityLivingBase); - else - _result = renderPlayer.localGetDeathMaxRotation(paramEntityLivingBase); - - if(afterGetDeathMaxRotationHooks != null) - for(int i = 0; i < afterGetDeathMaxRotationHooks.length; i++) - afterGetDeathMaxRotationHooks[i].afterGetDeathMaxRotation(paramEntityLivingBase); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenGetDeathMaxRotation(RenderPlayerBase overWriter) - { - if (overrideGetDeathMaxRotationHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetDeathMaxRotationHooks.length; i++) - if(overrideGetDeathMaxRotationHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetDeathMaxRotationHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetDeathMaxRotationHookTypes = new LinkedList(); - private final static List overrideGetDeathMaxRotationHookTypes = new LinkedList(); - private final static List afterGetDeathMaxRotationHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeGetDeathMaxRotationHooks; - private RenderPlayerBase[] overrideGetDeathMaxRotationHooks; - private RenderPlayerBase[] afterGetDeathMaxRotationHooks; - - public boolean isGetDeathMaxRotationModded; - - private static final Map allBaseBeforeGetDeathMaxRotationSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetDeathMaxRotationInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetDeathMaxRotationSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetDeathMaxRotationInferiors = new Hashtable(0); - private static final Map allBaseAfterGetDeathMaxRotationSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetDeathMaxRotationInferiors = new Hashtable(0); - - public static net.minecraft.client.gui.FontRenderer getFontRendererFromRenderManager(IRenderPlayerAPI target) - { - net.minecraft.client.gui.FontRenderer _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isGetFontRendererFromRenderManagerModded) - _result = renderPlayerAPI.getFontRendererFromRenderManager(); - else - _result = target.localGetFontRendererFromRenderManager(); - return _result; - } - - private net.minecraft.client.gui.FontRenderer getFontRendererFromRenderManager() - { - if(beforeGetFontRendererFromRenderManagerHooks != null) - for(int i = beforeGetFontRendererFromRenderManagerHooks.length - 1; i >= 0 ; i--) - beforeGetFontRendererFromRenderManagerHooks[i].beforeGetFontRendererFromRenderManager(); - - net.minecraft.client.gui.FontRenderer _result; - if(overrideGetFontRendererFromRenderManagerHooks != null) - _result = overrideGetFontRendererFromRenderManagerHooks[overrideGetFontRendererFromRenderManagerHooks.length - 1].getFontRendererFromRenderManager(); - else - _result = renderPlayer.localGetFontRendererFromRenderManager(); - - if(afterGetFontRendererFromRenderManagerHooks != null) - for(int i = 0; i < afterGetFontRendererFromRenderManagerHooks.length; i++) - afterGetFontRendererFromRenderManagerHooks[i].afterGetFontRendererFromRenderManager(); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenGetFontRendererFromRenderManager(RenderPlayerBase overWriter) - { - if (overrideGetFontRendererFromRenderManagerHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetFontRendererFromRenderManagerHooks.length; i++) - if(overrideGetFontRendererFromRenderManagerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetFontRendererFromRenderManagerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetFontRendererFromRenderManagerHookTypes = new LinkedList(); - private final static List overrideGetFontRendererFromRenderManagerHookTypes = new LinkedList(); - private final static List afterGetFontRendererFromRenderManagerHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeGetFontRendererFromRenderManagerHooks; - private RenderPlayerBase[] overrideGetFontRendererFromRenderManagerHooks; - private RenderPlayerBase[] afterGetFontRendererFromRenderManagerHooks; - - public boolean isGetFontRendererFromRenderManagerModded; - - private static final Map allBaseBeforeGetFontRendererFromRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetFontRendererFromRenderManagerInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetFontRendererFromRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetFontRendererFromRenderManagerInferiors = new Hashtable(0); - private static final Map allBaseAfterGetFontRendererFromRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetFontRendererFromRenderManagerInferiors = new Hashtable(0); - - public static net.minecraft.util.ResourceLocation getResourceLocationFromPlayer(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer) - { - net.minecraft.util.ResourceLocation _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isGetResourceLocationFromPlayerModded) - _result = renderPlayerAPI.getResourceLocationFromPlayer(paramAbstractClientPlayer); - else - _result = target.localGetResourceLocationFromPlayer(paramAbstractClientPlayer); - return _result; - } - - private net.minecraft.util.ResourceLocation getResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer) - { - if(beforeGetResourceLocationFromPlayerHooks != null) - for(int i = beforeGetResourceLocationFromPlayerHooks.length - 1; i >= 0 ; i--) - beforeGetResourceLocationFromPlayerHooks[i].beforeGetResourceLocationFromPlayer(paramAbstractClientPlayer); - - net.minecraft.util.ResourceLocation _result; - if(overrideGetResourceLocationFromPlayerHooks != null) - _result = overrideGetResourceLocationFromPlayerHooks[overrideGetResourceLocationFromPlayerHooks.length - 1].getResourceLocationFromPlayer(paramAbstractClientPlayer); - else - _result = renderPlayer.localGetResourceLocationFromPlayer(paramAbstractClientPlayer); - - if(afterGetResourceLocationFromPlayerHooks != null) - for(int i = 0; i < afterGetResourceLocationFromPlayerHooks.length; i++) - afterGetResourceLocationFromPlayerHooks[i].afterGetResourceLocationFromPlayer(paramAbstractClientPlayer); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenGetResourceLocationFromPlayer(RenderPlayerBase overWriter) - { - if (overrideGetResourceLocationFromPlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetResourceLocationFromPlayerHooks.length; i++) - if(overrideGetResourceLocationFromPlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetResourceLocationFromPlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetResourceLocationFromPlayerHookTypes = new LinkedList(); - private final static List overrideGetResourceLocationFromPlayerHookTypes = new LinkedList(); - private final static List afterGetResourceLocationFromPlayerHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeGetResourceLocationFromPlayerHooks; - private RenderPlayerBase[] overrideGetResourceLocationFromPlayerHooks; - private RenderPlayerBase[] afterGetResourceLocationFromPlayerHooks; - - public boolean isGetResourceLocationFromPlayerModded; - - private static final Map allBaseBeforeGetResourceLocationFromPlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetResourceLocationFromPlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetResourceLocationFromPlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetResourceLocationFromPlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterGetResourceLocationFromPlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetResourceLocationFromPlayerInferiors = new Hashtable(0); - - public static float handleRotationFloat(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - float _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isHandleRotationFloatModded) - _result = renderPlayerAPI.handleRotationFloat(paramEntityLivingBase, paramFloat); - else - _result = target.localHandleRotationFloat(paramEntityLivingBase, paramFloat); - return _result; - } - - private float handleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - if(beforeHandleRotationFloatHooks != null) - for(int i = beforeHandleRotationFloatHooks.length - 1; i >= 0 ; i--) - beforeHandleRotationFloatHooks[i].beforeHandleRotationFloat(paramEntityLivingBase, paramFloat); - - float _result; - if(overrideHandleRotationFloatHooks != null) - _result = overrideHandleRotationFloatHooks[overrideHandleRotationFloatHooks.length - 1].handleRotationFloat(paramEntityLivingBase, paramFloat); - else - _result = renderPlayer.localHandleRotationFloat(paramEntityLivingBase, paramFloat); - - if(afterHandleRotationFloatHooks != null) - for(int i = 0; i < afterHandleRotationFloatHooks.length; i++) - afterHandleRotationFloatHooks[i].afterHandleRotationFloat(paramEntityLivingBase, paramFloat); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenHandleRotationFloat(RenderPlayerBase overWriter) - { - if (overrideHandleRotationFloatHooks == null) - return overWriter; - - for(int i = 0; i < overrideHandleRotationFloatHooks.length; i++) - if(overrideHandleRotationFloatHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideHandleRotationFloatHooks[i - 1]; - - return overWriter; - } - - private final static List beforeHandleRotationFloatHookTypes = new LinkedList(); - private final static List overrideHandleRotationFloatHookTypes = new LinkedList(); - private final static List afterHandleRotationFloatHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeHandleRotationFloatHooks; - private RenderPlayerBase[] overrideHandleRotationFloatHooks; - private RenderPlayerBase[] afterHandleRotationFloatHooks; - - public boolean isHandleRotationFloatModded; - - private static final Map allBaseBeforeHandleRotationFloatSuperiors = new Hashtable(0); - private static final Map allBaseBeforeHandleRotationFloatInferiors = new Hashtable(0); - private static final Map allBaseOverrideHandleRotationFloatSuperiors = new Hashtable(0); - private static final Map allBaseOverrideHandleRotationFloatInferiors = new Hashtable(0); - private static final Map allBaseAfterHandleRotationFloatSuperiors = new Hashtable(0); - private static final Map allBaseAfterHandleRotationFloatInferiors = new Hashtable(0); - - public static int inheritRenderPass(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat) - { - int _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isInheritRenderPassModded) - _result = renderPlayerAPI.inheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - else - _result = target.localInheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - return _result; - } - - private int inheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat) - { - if(beforeInheritRenderPassHooks != null) - for(int i = beforeInheritRenderPassHooks.length - 1; i >= 0 ; i--) - beforeInheritRenderPassHooks[i].beforeInheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - - int _result; - if(overrideInheritRenderPassHooks != null) - _result = overrideInheritRenderPassHooks[overrideInheritRenderPassHooks.length - 1].inheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - else - _result = renderPlayer.localInheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - - if(afterInheritRenderPassHooks != null) - for(int i = 0; i < afterInheritRenderPassHooks.length; i++) - afterInheritRenderPassHooks[i].afterInheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenInheritRenderPass(RenderPlayerBase overWriter) - { - if (overrideInheritRenderPassHooks == null) - return overWriter; - - for(int i = 0; i < overrideInheritRenderPassHooks.length; i++) - if(overrideInheritRenderPassHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideInheritRenderPassHooks[i - 1]; - - return overWriter; - } - - private final static List beforeInheritRenderPassHookTypes = new LinkedList(); - private final static List overrideInheritRenderPassHookTypes = new LinkedList(); - private final static List afterInheritRenderPassHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeInheritRenderPassHooks; - private RenderPlayerBase[] overrideInheritRenderPassHooks; - private RenderPlayerBase[] afterInheritRenderPassHooks; - - public boolean isInheritRenderPassModded; - - private static final Map allBaseBeforeInheritRenderPassSuperiors = new Hashtable(0); - private static final Map allBaseBeforeInheritRenderPassInferiors = new Hashtable(0); - private static final Map allBaseOverrideInheritRenderPassSuperiors = new Hashtable(0); - private static final Map allBaseOverrideInheritRenderPassInferiors = new Hashtable(0); - private static final Map allBaseAfterInheritRenderPassSuperiors = new Hashtable(0); - private static final Map allBaseAfterInheritRenderPassInferiors = new Hashtable(0); - - public static void loadTexture(IRenderPlayerAPI target, net.minecraft.util.ResourceLocation paramResourceLocation) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isLoadTextureModded) - renderPlayerAPI.loadTexture(paramResourceLocation); - else - target.localLoadTexture(paramResourceLocation); - } - - private void loadTexture(net.minecraft.util.ResourceLocation paramResourceLocation) - { - if(beforeLoadTextureHooks != null) - for(int i = beforeLoadTextureHooks.length - 1; i >= 0 ; i--) - beforeLoadTextureHooks[i].beforeLoadTexture(paramResourceLocation); - - if(overrideLoadTextureHooks != null) - overrideLoadTextureHooks[overrideLoadTextureHooks.length - 1].loadTexture(paramResourceLocation); - else - renderPlayer.localLoadTexture(paramResourceLocation); - - if(afterLoadTextureHooks != null) - for(int i = 0; i < afterLoadTextureHooks.length; i++) - afterLoadTextureHooks[i].afterLoadTexture(paramResourceLocation); - - } - - protected RenderPlayerBase GetOverwrittenLoadTexture(RenderPlayerBase overWriter) - { - if (overrideLoadTextureHooks == null) - return overWriter; - - for(int i = 0; i < overrideLoadTextureHooks.length; i++) - if(overrideLoadTextureHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideLoadTextureHooks[i - 1]; - - return overWriter; - } - - private final static List beforeLoadTextureHookTypes = new LinkedList(); - private final static List overrideLoadTextureHookTypes = new LinkedList(); - private final static List afterLoadTextureHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeLoadTextureHooks; - private RenderPlayerBase[] overrideLoadTextureHooks; - private RenderPlayerBase[] afterLoadTextureHooks; - - public boolean isLoadTextureModded; - - private static final Map allBaseBeforeLoadTextureSuperiors = new Hashtable(0); - private static final Map allBaseBeforeLoadTextureInferiors = new Hashtable(0); - private static final Map allBaseOverrideLoadTextureSuperiors = new Hashtable(0); - private static final Map allBaseOverrideLoadTextureInferiors = new Hashtable(0); - private static final Map allBaseAfterLoadTextureSuperiors = new Hashtable(0); - private static final Map allBaseAfterLoadTextureInferiors = new Hashtable(0); - - public static void loadTextureOfEntity(IRenderPlayerAPI target, net.minecraft.entity.Entity paramEntity) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isLoadTextureOfEntityModded) - renderPlayerAPI.loadTextureOfEntity(paramEntity); - else - target.localLoadTextureOfEntity(paramEntity); - } - - private void loadTextureOfEntity(net.minecraft.entity.Entity paramEntity) - { - if(beforeLoadTextureOfEntityHooks != null) - for(int i = beforeLoadTextureOfEntityHooks.length - 1; i >= 0 ; i--) - beforeLoadTextureOfEntityHooks[i].beforeLoadTextureOfEntity(paramEntity); - - if(overrideLoadTextureOfEntityHooks != null) - overrideLoadTextureOfEntityHooks[overrideLoadTextureOfEntityHooks.length - 1].loadTextureOfEntity(paramEntity); - else - renderPlayer.localLoadTextureOfEntity(paramEntity); - - if(afterLoadTextureOfEntityHooks != null) - for(int i = 0; i < afterLoadTextureOfEntityHooks.length; i++) - afterLoadTextureOfEntityHooks[i].afterLoadTextureOfEntity(paramEntity); - - } - - protected RenderPlayerBase GetOverwrittenLoadTextureOfEntity(RenderPlayerBase overWriter) - { - if (overrideLoadTextureOfEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideLoadTextureOfEntityHooks.length; i++) - if(overrideLoadTextureOfEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideLoadTextureOfEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeLoadTextureOfEntityHookTypes = new LinkedList(); - private final static List overrideLoadTextureOfEntityHookTypes = new LinkedList(); - private final static List afterLoadTextureOfEntityHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeLoadTextureOfEntityHooks; - private RenderPlayerBase[] overrideLoadTextureOfEntityHooks; - private RenderPlayerBase[] afterLoadTextureOfEntityHooks; - - public boolean isLoadTextureOfEntityModded; - - private static final Map allBaseBeforeLoadTextureOfEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeLoadTextureOfEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideLoadTextureOfEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideLoadTextureOfEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterLoadTextureOfEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterLoadTextureOfEntityInferiors = new Hashtable(0); - - public static void passSpecialRender(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isPassSpecialRenderModded) - renderPlayerAPI.passSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - else - target.localPassSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - } - - private void passSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforePassSpecialRenderHooks != null) - for(int i = beforePassSpecialRenderHooks.length - 1; i >= 0 ; i--) - beforePassSpecialRenderHooks[i].beforePassSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - - if(overridePassSpecialRenderHooks != null) - overridePassSpecialRenderHooks[overridePassSpecialRenderHooks.length - 1].passSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - else - renderPlayer.localPassSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - - if(afterPassSpecialRenderHooks != null) - for(int i = 0; i < afterPassSpecialRenderHooks.length; i++) - afterPassSpecialRenderHooks[i].afterPassSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - - } - - protected RenderPlayerBase GetOverwrittenPassSpecialRender(RenderPlayerBase overWriter) - { - if (overridePassSpecialRenderHooks == null) - return overWriter; - - for(int i = 0; i < overridePassSpecialRenderHooks.length; i++) - if(overridePassSpecialRenderHooks[i] == overWriter) - if(i == 0) - return null; - else - return overridePassSpecialRenderHooks[i - 1]; - - return overWriter; - } - - private final static List beforePassSpecialRenderHookTypes = new LinkedList(); - private final static List overridePassSpecialRenderHookTypes = new LinkedList(); - private final static List afterPassSpecialRenderHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforePassSpecialRenderHooks; - private RenderPlayerBase[] overridePassSpecialRenderHooks; - private RenderPlayerBase[] afterPassSpecialRenderHooks; - - public boolean isPassSpecialRenderModded; - - private static final Map allBaseBeforePassSpecialRenderSuperiors = new Hashtable(0); - private static final Map allBaseBeforePassSpecialRenderInferiors = new Hashtable(0); - private static final Map allBaseOverridePassSpecialRenderSuperiors = new Hashtable(0); - private static final Map allBaseOverridePassSpecialRenderInferiors = new Hashtable(0); - private static final Map allBaseAfterPassSpecialRenderSuperiors = new Hashtable(0); - private static final Map allBaseAfterPassSpecialRenderInferiors = new Hashtable(0); - - public static boolean performStaticEntityRebuild(IRenderPlayerAPI target) - { - boolean _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isPerformStaticEntityRebuildModded) - _result = renderPlayerAPI.performStaticEntityRebuild(); - else - _result = target.localPerformStaticEntityRebuild(); - return _result; - } - - private boolean performStaticEntityRebuild() - { - if(beforePerformStaticEntityRebuildHooks != null) - for(int i = beforePerformStaticEntityRebuildHooks.length - 1; i >= 0 ; i--) - beforePerformStaticEntityRebuildHooks[i].beforePerformStaticEntityRebuild(); - - boolean _result; - if(overridePerformStaticEntityRebuildHooks != null) - _result = overridePerformStaticEntityRebuildHooks[overridePerformStaticEntityRebuildHooks.length - 1].performStaticEntityRebuild(); - else - _result = renderPlayer.localPerformStaticEntityRebuild(); - - if(afterPerformStaticEntityRebuildHooks != null) - for(int i = 0; i < afterPerformStaticEntityRebuildHooks.length; i++) - afterPerformStaticEntityRebuildHooks[i].afterPerformStaticEntityRebuild(); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenPerformStaticEntityRebuild(RenderPlayerBase overWriter) - { - if (overridePerformStaticEntityRebuildHooks == null) - return overWriter; - - for(int i = 0; i < overridePerformStaticEntityRebuildHooks.length; i++) - if(overridePerformStaticEntityRebuildHooks[i] == overWriter) - if(i == 0) - return null; - else - return overridePerformStaticEntityRebuildHooks[i - 1]; - - return overWriter; - } - - private final static List beforePerformStaticEntityRebuildHookTypes = new LinkedList(); - private final static List overridePerformStaticEntityRebuildHookTypes = new LinkedList(); - private final static List afterPerformStaticEntityRebuildHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforePerformStaticEntityRebuildHooks; - private RenderPlayerBase[] overridePerformStaticEntityRebuildHooks; - private RenderPlayerBase[] afterPerformStaticEntityRebuildHooks; - - public boolean isPerformStaticEntityRebuildModded; - - private static final Map allBaseBeforePerformStaticEntityRebuildSuperiors = new Hashtable(0); - private static final Map allBaseBeforePerformStaticEntityRebuildInferiors = new Hashtable(0); - private static final Map allBaseOverridePerformStaticEntityRebuildSuperiors = new Hashtable(0); - private static final Map allBaseOverridePerformStaticEntityRebuildInferiors = new Hashtable(0); - private static final Map allBaseAfterPerformStaticEntityRebuildSuperiors = new Hashtable(0); - private static final Map allBaseAfterPerformStaticEntityRebuildInferiors = new Hashtable(0); - - public static void renderArrowsStuckInEntity(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderArrowsStuckInEntityModded) - renderPlayerAPI.renderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - else - target.localRenderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - } - - private void renderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - if(beforeRenderArrowsStuckInEntityHooks != null) - for(int i = beforeRenderArrowsStuckInEntityHooks.length - 1; i >= 0 ; i--) - beforeRenderArrowsStuckInEntityHooks[i].beforeRenderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - - if(overrideRenderArrowsStuckInEntityHooks != null) - overrideRenderArrowsStuckInEntityHooks[overrideRenderArrowsStuckInEntityHooks.length - 1].renderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - else - renderPlayer.localRenderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - - if(afterRenderArrowsStuckInEntityHooks != null) - for(int i = 0; i < afterRenderArrowsStuckInEntityHooks.length; i++) - afterRenderArrowsStuckInEntityHooks[i].afterRenderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - - } - - protected RenderPlayerBase GetOverwrittenRenderArrowsStuckInEntity(RenderPlayerBase overWriter) - { - if (overrideRenderArrowsStuckInEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderArrowsStuckInEntityHooks.length; i++) - if(overrideRenderArrowsStuckInEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderArrowsStuckInEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderArrowsStuckInEntityHookTypes = new LinkedList(); - private final static List overrideRenderArrowsStuckInEntityHookTypes = new LinkedList(); - private final static List afterRenderArrowsStuckInEntityHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderArrowsStuckInEntityHooks; - private RenderPlayerBase[] overrideRenderArrowsStuckInEntityHooks; - private RenderPlayerBase[] afterRenderArrowsStuckInEntityHooks; - - public boolean isRenderArrowsStuckInEntityModded; - - private static final Map allBaseBeforeRenderArrowsStuckInEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderArrowsStuckInEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderArrowsStuckInEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderArrowsStuckInEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderArrowsStuckInEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderArrowsStuckInEntityInferiors = new Hashtable(0); - - public static void renderFirstPersonArm(IRenderPlayerAPI target, net.minecraft.entity.player.EntityPlayer paramEntityPlayer) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderFirstPersonArmModded) - renderPlayerAPI.renderFirstPersonArm(paramEntityPlayer); - else - target.localRenderFirstPersonArm(paramEntityPlayer); - } - - private void renderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer) - { - if(beforeRenderFirstPersonArmHooks != null) - for(int i = beforeRenderFirstPersonArmHooks.length - 1; i >= 0 ; i--) - beforeRenderFirstPersonArmHooks[i].beforeRenderFirstPersonArm(paramEntityPlayer); - - if(overrideRenderFirstPersonArmHooks != null) - overrideRenderFirstPersonArmHooks[overrideRenderFirstPersonArmHooks.length - 1].renderFirstPersonArm(paramEntityPlayer); - else - renderPlayer.localRenderFirstPersonArm(paramEntityPlayer); - - if(afterRenderFirstPersonArmHooks != null) - for(int i = 0; i < afterRenderFirstPersonArmHooks.length; i++) - afterRenderFirstPersonArmHooks[i].afterRenderFirstPersonArm(paramEntityPlayer); - - } - - protected RenderPlayerBase GetOverwrittenRenderFirstPersonArm(RenderPlayerBase overWriter) - { - if (overrideRenderFirstPersonArmHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderFirstPersonArmHooks.length; i++) - if(overrideRenderFirstPersonArmHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderFirstPersonArmHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderFirstPersonArmHookTypes = new LinkedList(); - private final static List overrideRenderFirstPersonArmHookTypes = new LinkedList(); - private final static List afterRenderFirstPersonArmHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderFirstPersonArmHooks; - private RenderPlayerBase[] overrideRenderFirstPersonArmHooks; - private RenderPlayerBase[] afterRenderFirstPersonArmHooks; - - public boolean isRenderFirstPersonArmModded; - - private static final Map allBaseBeforeRenderFirstPersonArmSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderFirstPersonArmInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderFirstPersonArmSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderFirstPersonArmInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderFirstPersonArmSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderFirstPersonArmInferiors = new Hashtable(0); - - public static void renderLivingLabel(IRenderPlayerAPI target, net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderLivingLabelModded) - renderPlayerAPI.renderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - else - target.localRenderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - } - - private void renderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt) - { - if(beforeRenderLivingLabelHooks != null) - for(int i = beforeRenderLivingLabelHooks.length - 1; i >= 0 ; i--) - beforeRenderLivingLabelHooks[i].beforeRenderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - - if(overrideRenderLivingLabelHooks != null) - overrideRenderLivingLabelHooks[overrideRenderLivingLabelHooks.length - 1].renderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - else - renderPlayer.localRenderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - - if(afterRenderLivingLabelHooks != null) - for(int i = 0; i < afterRenderLivingLabelHooks.length; i++) - afterRenderLivingLabelHooks[i].afterRenderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - - } - - protected RenderPlayerBase GetOverwrittenRenderLivingLabel(RenderPlayerBase overWriter) - { - if (overrideRenderLivingLabelHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderLivingLabelHooks.length; i++) - if(overrideRenderLivingLabelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderLivingLabelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderLivingLabelHookTypes = new LinkedList(); - private final static List overrideRenderLivingLabelHookTypes = new LinkedList(); - private final static List afterRenderLivingLabelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderLivingLabelHooks; - private RenderPlayerBase[] overrideRenderLivingLabelHooks; - private RenderPlayerBase[] afterRenderLivingLabelHooks; - - public boolean isRenderLivingLabelModded; - - private static final Map allBaseBeforeRenderLivingLabelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderLivingLabelInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderLivingLabelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderLivingLabelInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderLivingLabelSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderLivingLabelInferiors = new Hashtable(0); - - public static void renderModel(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderModelModded) - renderPlayerAPI.renderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else - target.localRenderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - } - - private void renderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - if(beforeRenderModelHooks != null) - for(int i = beforeRenderModelHooks.length - 1; i >= 0 ; i--) - beforeRenderModelHooks[i].beforeRenderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - if(overrideRenderModelHooks != null) - overrideRenderModelHooks[overrideRenderModelHooks.length - 1].renderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else - renderPlayer.localRenderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - if(afterRenderModelHooks != null) - for(int i = 0; i < afterRenderModelHooks.length; i++) - afterRenderModelHooks[i].afterRenderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - } - - protected RenderPlayerBase GetOverwrittenRenderModel(RenderPlayerBase overWriter) - { - if (overrideRenderModelHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderModelHooks.length; i++) - if(overrideRenderModelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderModelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderModelHookTypes = new LinkedList(); - private final static List overrideRenderModelHookTypes = new LinkedList(); - private final static List afterRenderModelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderModelHooks; - private RenderPlayerBase[] overrideRenderModelHooks; - private RenderPlayerBase[] afterRenderModelHooks; - - public boolean isRenderModelModded; - - private static final Map allBaseBeforeRenderModelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderModelInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderModelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderModelInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderModelSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderModelInferiors = new Hashtable(0); - - public static void renderPlayer(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderPlayerModded) - renderPlayerAPI.renderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - target.localRenderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - } - - private void renderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - if(beforeRenderPlayerHooks != null) - for(int i = beforeRenderPlayerHooks.length - 1; i >= 0 ; i--) - beforeRenderPlayerHooks[i].beforeRenderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(overrideRenderPlayerHooks != null) - overrideRenderPlayerHooks[overrideRenderPlayerHooks.length - 1].renderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else - renderPlayer.localRenderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - if(afterRenderPlayerHooks != null) - for(int i = 0; i < afterRenderPlayerHooks.length; i++) - afterRenderPlayerHooks[i].afterRenderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - protected RenderPlayerBase GetOverwrittenRenderPlayer(RenderPlayerBase overWriter) - { - if (overrideRenderPlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderPlayerHooks.length; i++) - if(overrideRenderPlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderPlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderPlayerHookTypes = new LinkedList(); - private final static List overrideRenderPlayerHookTypes = new LinkedList(); - private final static List afterRenderPlayerHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderPlayerHooks; - private RenderPlayerBase[] overrideRenderPlayerHooks; - private RenderPlayerBase[] afterRenderPlayerHooks; - - public boolean isRenderPlayerModded; - - private static final Map allBaseBeforeRenderPlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderPlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerInferiors = new Hashtable(0); - - public static void renderPlayerNameAndScoreLabel(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderPlayerNameAndScoreLabelModded) - renderPlayerAPI.renderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - else - target.localRenderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - } - - private void renderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4) - { - if(beforeRenderPlayerNameAndScoreLabelHooks != null) - for(int i = beforeRenderPlayerNameAndScoreLabelHooks.length - 1; i >= 0 ; i--) - beforeRenderPlayerNameAndScoreLabelHooks[i].beforeRenderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - - if(overrideRenderPlayerNameAndScoreLabelHooks != null) - overrideRenderPlayerNameAndScoreLabelHooks[overrideRenderPlayerNameAndScoreLabelHooks.length - 1].renderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - else - renderPlayer.localRenderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - - if(afterRenderPlayerNameAndScoreLabelHooks != null) - for(int i = 0; i < afterRenderPlayerNameAndScoreLabelHooks.length; i++) - afterRenderPlayerNameAndScoreLabelHooks[i].afterRenderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - - } - - protected RenderPlayerBase GetOverwrittenRenderPlayerNameAndScoreLabel(RenderPlayerBase overWriter) - { - if (overrideRenderPlayerNameAndScoreLabelHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderPlayerNameAndScoreLabelHooks.length; i++) - if(overrideRenderPlayerNameAndScoreLabelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderPlayerNameAndScoreLabelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderPlayerNameAndScoreLabelHookTypes = new LinkedList(); - private final static List overrideRenderPlayerNameAndScoreLabelHookTypes = new LinkedList(); - private final static List afterRenderPlayerNameAndScoreLabelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderPlayerNameAndScoreLabelHooks; - private RenderPlayerBase[] overrideRenderPlayerNameAndScoreLabelHooks; - private RenderPlayerBase[] afterRenderPlayerNameAndScoreLabelHooks; - - public boolean isRenderPlayerNameAndScoreLabelModded; - - private static final Map allBaseBeforeRenderPlayerNameAndScoreLabelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderPlayerNameAndScoreLabelInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerNameAndScoreLabelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerNameAndScoreLabelInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerNameAndScoreLabelSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerNameAndScoreLabelInferiors = new Hashtable(0); - - public static void renderPlayerScale(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderPlayerScaleModded) - renderPlayerAPI.renderPlayerScale(paramAbstractClientPlayer, paramFloat); - else - target.localRenderPlayerScale(paramAbstractClientPlayer, paramFloat); - } - - private void renderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - if(beforeRenderPlayerScaleHooks != null) - for(int i = beforeRenderPlayerScaleHooks.length - 1; i >= 0 ; i--) - beforeRenderPlayerScaleHooks[i].beforeRenderPlayerScale(paramAbstractClientPlayer, paramFloat); - - if(overrideRenderPlayerScaleHooks != null) - overrideRenderPlayerScaleHooks[overrideRenderPlayerScaleHooks.length - 1].renderPlayerScale(paramAbstractClientPlayer, paramFloat); - else - renderPlayer.localRenderPlayerScale(paramAbstractClientPlayer, paramFloat); - - if(afterRenderPlayerScaleHooks != null) - for(int i = 0; i < afterRenderPlayerScaleHooks.length; i++) - afterRenderPlayerScaleHooks[i].afterRenderPlayerScale(paramAbstractClientPlayer, paramFloat); - - } - - protected RenderPlayerBase GetOverwrittenRenderPlayerScale(RenderPlayerBase overWriter) - { - if (overrideRenderPlayerScaleHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderPlayerScaleHooks.length; i++) - if(overrideRenderPlayerScaleHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderPlayerScaleHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderPlayerScaleHookTypes = new LinkedList(); - private final static List overrideRenderPlayerScaleHookTypes = new LinkedList(); - private final static List afterRenderPlayerScaleHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderPlayerScaleHooks; - private RenderPlayerBase[] overrideRenderPlayerScaleHooks; - private RenderPlayerBase[] afterRenderPlayerScaleHooks; - - public boolean isRenderPlayerScaleModded; - - private static final Map allBaseBeforeRenderPlayerScaleSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderPlayerScaleInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerScaleSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerScaleInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerScaleSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerScaleInferiors = new Hashtable(0); - - public static void renderPlayerSleep(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderPlayerSleepModded) - renderPlayerAPI.renderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - else - target.localRenderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - } - - private void renderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeRenderPlayerSleepHooks != null) - for(int i = beforeRenderPlayerSleepHooks.length - 1; i >= 0 ; i--) - beforeRenderPlayerSleepHooks[i].beforeRenderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - - if(overrideRenderPlayerSleepHooks != null) - overrideRenderPlayerSleepHooks[overrideRenderPlayerSleepHooks.length - 1].renderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - else - renderPlayer.localRenderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - - if(afterRenderPlayerSleepHooks != null) - for(int i = 0; i < afterRenderPlayerSleepHooks.length; i++) - afterRenderPlayerSleepHooks[i].afterRenderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - - } - - protected RenderPlayerBase GetOverwrittenRenderPlayerSleep(RenderPlayerBase overWriter) - { - if (overrideRenderPlayerSleepHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderPlayerSleepHooks.length; i++) - if(overrideRenderPlayerSleepHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderPlayerSleepHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderPlayerSleepHookTypes = new LinkedList(); - private final static List overrideRenderPlayerSleepHookTypes = new LinkedList(); - private final static List afterRenderPlayerSleepHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderPlayerSleepHooks; - private RenderPlayerBase[] overrideRenderPlayerSleepHooks; - private RenderPlayerBase[] afterRenderPlayerSleepHooks; - - public boolean isRenderPlayerSleepModded; - - private static final Map allBaseBeforeRenderPlayerSleepSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderPlayerSleepInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerSleepSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderPlayerSleepInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerSleepSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderPlayerSleepInferiors = new Hashtable(0); - - public static void renderSpecials(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderSpecialsModded) - renderPlayerAPI.renderSpecials(paramAbstractClientPlayer, paramFloat); - else - target.localRenderSpecials(paramAbstractClientPlayer, paramFloat); - } - - private void renderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - if(beforeRenderSpecialsHooks != null) - for(int i = beforeRenderSpecialsHooks.length - 1; i >= 0 ; i--) - beforeRenderSpecialsHooks[i].beforeRenderSpecials(paramAbstractClientPlayer, paramFloat); - - if(overrideRenderSpecialsHooks != null) - overrideRenderSpecialsHooks[overrideRenderSpecialsHooks.length - 1].renderSpecials(paramAbstractClientPlayer, paramFloat); - else - renderPlayer.localRenderSpecials(paramAbstractClientPlayer, paramFloat); - - if(afterRenderSpecialsHooks != null) - for(int i = 0; i < afterRenderSpecialsHooks.length; i++) - afterRenderSpecialsHooks[i].afterRenderSpecials(paramAbstractClientPlayer, paramFloat); - - } - - protected RenderPlayerBase GetOverwrittenRenderSpecials(RenderPlayerBase overWriter) - { - if (overrideRenderSpecialsHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderSpecialsHooks.length; i++) - if(overrideRenderSpecialsHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderSpecialsHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderSpecialsHookTypes = new LinkedList(); - private final static List overrideRenderSpecialsHookTypes = new LinkedList(); - private final static List afterRenderSpecialsHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderSpecialsHooks; - private RenderPlayerBase[] overrideRenderSpecialsHooks; - private RenderPlayerBase[] afterRenderSpecialsHooks; - - public boolean isRenderSpecialsModded; - - private static final Map allBaseBeforeRenderSpecialsSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderSpecialsInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderSpecialsSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderSpecialsInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderSpecialsSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderSpecialsInferiors = new Hashtable(0); - - public static float renderSwingProgress(IRenderPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - float _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRenderSwingProgressModded) - _result = renderPlayerAPI.renderSwingProgress(paramEntityLivingBase, paramFloat); - else - _result = target.localRenderSwingProgress(paramEntityLivingBase, paramFloat); - return _result; - } - - private float renderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - if(beforeRenderSwingProgressHooks != null) - for(int i = beforeRenderSwingProgressHooks.length - 1; i >= 0 ; i--) - beforeRenderSwingProgressHooks[i].beforeRenderSwingProgress(paramEntityLivingBase, paramFloat); - - float _result; - if(overrideRenderSwingProgressHooks != null) - _result = overrideRenderSwingProgressHooks[overrideRenderSwingProgressHooks.length - 1].renderSwingProgress(paramEntityLivingBase, paramFloat); - else - _result = renderPlayer.localRenderSwingProgress(paramEntityLivingBase, paramFloat); - - if(afterRenderSwingProgressHooks != null) - for(int i = 0; i < afterRenderSwingProgressHooks.length; i++) - afterRenderSwingProgressHooks[i].afterRenderSwingProgress(paramEntityLivingBase, paramFloat); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenRenderSwingProgress(RenderPlayerBase overWriter) - { - if (overrideRenderSwingProgressHooks == null) - return overWriter; - - for(int i = 0; i < overrideRenderSwingProgressHooks.length; i++) - if(overrideRenderSwingProgressHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRenderSwingProgressHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRenderSwingProgressHookTypes = new LinkedList(); - private final static List overrideRenderSwingProgressHookTypes = new LinkedList(); - private final static List afterRenderSwingProgressHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRenderSwingProgressHooks; - private RenderPlayerBase[] overrideRenderSwingProgressHooks; - private RenderPlayerBase[] afterRenderSwingProgressHooks; - - public boolean isRenderSwingProgressModded; - - private static final Map allBaseBeforeRenderSwingProgressSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRenderSwingProgressInferiors = new Hashtable(0); - private static final Map allBaseOverrideRenderSwingProgressSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRenderSwingProgressInferiors = new Hashtable(0); - private static final Map allBaseAfterRenderSwingProgressSuperiors = new Hashtable(0); - private static final Map allBaseAfterRenderSwingProgressInferiors = new Hashtable(0); - - public static void rotatePlayer(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isRotatePlayerModded) - renderPlayerAPI.rotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - else - target.localRotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - } - - private void rotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3) - { - if(beforeRotatePlayerHooks != null) - for(int i = beforeRotatePlayerHooks.length - 1; i >= 0 ; i--) - beforeRotatePlayerHooks[i].beforeRotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - - if(overrideRotatePlayerHooks != null) - overrideRotatePlayerHooks[overrideRotatePlayerHooks.length - 1].rotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - else - renderPlayer.localRotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - - if(afterRotatePlayerHooks != null) - for(int i = 0; i < afterRotatePlayerHooks.length; i++) - afterRotatePlayerHooks[i].afterRotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - - } - - protected RenderPlayerBase GetOverwrittenRotatePlayer(RenderPlayerBase overWriter) - { - if (overrideRotatePlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideRotatePlayerHooks.length; i++) - if(overrideRotatePlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideRotatePlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeRotatePlayerHookTypes = new LinkedList(); - private final static List overrideRotatePlayerHookTypes = new LinkedList(); - private final static List afterRotatePlayerHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeRotatePlayerHooks; - private RenderPlayerBase[] overrideRotatePlayerHooks; - private RenderPlayerBase[] afterRotatePlayerHooks; - - public boolean isRotatePlayerModded; - - private static final Map allBaseBeforeRotatePlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeRotatePlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideRotatePlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideRotatePlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterRotatePlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterRotatePlayerInferiors = new Hashtable(0); - - public static int setArmorModel(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - int _result; - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isSetArmorModelModded) - _result = renderPlayerAPI.setArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else - _result = target.localSetArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - return _result; - } - - private int setArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - if(beforeSetArmorModelHooks != null) - for(int i = beforeSetArmorModelHooks.length - 1; i >= 0 ; i--) - beforeSetArmorModelHooks[i].beforeSetArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - int _result; - if(overrideSetArmorModelHooks != null) - _result = overrideSetArmorModelHooks[overrideSetArmorModelHooks.length - 1].setArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else - _result = renderPlayer.localSetArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - if(afterSetArmorModelHooks != null) - for(int i = 0; i < afterSetArmorModelHooks.length; i++) - afterSetArmorModelHooks[i].afterSetArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - return _result; - } - - protected RenderPlayerBase GetOverwrittenSetArmorModel(RenderPlayerBase overWriter) - { - if (overrideSetArmorModelHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetArmorModelHooks.length; i++) - if(overrideSetArmorModelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetArmorModelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetArmorModelHookTypes = new LinkedList(); - private final static List overrideSetArmorModelHookTypes = new LinkedList(); - private final static List afterSetArmorModelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeSetArmorModelHooks; - private RenderPlayerBase[] overrideSetArmorModelHooks; - private RenderPlayerBase[] afterSetArmorModelHooks; - - public boolean isSetArmorModelModded; - - private static final Map allBaseBeforeSetArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetArmorModelInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetArmorModelInferiors = new Hashtable(0); - private static final Map allBaseAfterSetArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetArmorModelInferiors = new Hashtable(0); - - public static void setPassArmorModel(IRenderPlayerAPI target, net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isSetPassArmorModelModded) - renderPlayerAPI.setPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else - target.localSetPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - } - - private void setPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - if(beforeSetPassArmorModelHooks != null) - for(int i = beforeSetPassArmorModelHooks.length - 1; i >= 0 ; i--) - beforeSetPassArmorModelHooks[i].beforeSetPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - if(overrideSetPassArmorModelHooks != null) - overrideSetPassArmorModelHooks[overrideSetPassArmorModelHooks.length - 1].setPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else - renderPlayer.localSetPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - if(afterSetPassArmorModelHooks != null) - for(int i = 0; i < afterSetPassArmorModelHooks.length; i++) - afterSetPassArmorModelHooks[i].afterSetPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - } - - protected RenderPlayerBase GetOverwrittenSetPassArmorModel(RenderPlayerBase overWriter) - { - if (overrideSetPassArmorModelHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetPassArmorModelHooks.length; i++) - if(overrideSetPassArmorModelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetPassArmorModelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetPassArmorModelHookTypes = new LinkedList(); - private final static List overrideSetPassArmorModelHookTypes = new LinkedList(); - private final static List afterSetPassArmorModelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeSetPassArmorModelHooks; - private RenderPlayerBase[] overrideSetPassArmorModelHooks; - private RenderPlayerBase[] afterSetPassArmorModelHooks; - - public boolean isSetPassArmorModelModded; - - private static final Map allBaseBeforeSetPassArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetPassArmorModelInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetPassArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetPassArmorModelInferiors = new Hashtable(0); - private static final Map allBaseAfterSetPassArmorModelSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetPassArmorModelInferiors = new Hashtable(0); - - public static void setRenderManager(IRenderPlayerAPI target, net.minecraft.client.renderer.entity.RenderManager paramRenderManager) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isSetRenderManagerModded) - renderPlayerAPI.setRenderManager(paramRenderManager); - else - target.localSetRenderManager(paramRenderManager); - } - - private void setRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager) - { - if(beforeSetRenderManagerHooks != null) - for(int i = beforeSetRenderManagerHooks.length - 1; i >= 0 ; i--) - beforeSetRenderManagerHooks[i].beforeSetRenderManager(paramRenderManager); - - if(overrideSetRenderManagerHooks != null) - overrideSetRenderManagerHooks[overrideSetRenderManagerHooks.length - 1].setRenderManager(paramRenderManager); - else - renderPlayer.localSetRenderManager(paramRenderManager); - - if(afterSetRenderManagerHooks != null) - for(int i = 0; i < afterSetRenderManagerHooks.length; i++) - afterSetRenderManagerHooks[i].afterSetRenderManager(paramRenderManager); - - } - - protected RenderPlayerBase GetOverwrittenSetRenderManager(RenderPlayerBase overWriter) - { - if (overrideSetRenderManagerHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetRenderManagerHooks.length; i++) - if(overrideSetRenderManagerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetRenderManagerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetRenderManagerHookTypes = new LinkedList(); - private final static List overrideSetRenderManagerHookTypes = new LinkedList(); - private final static List afterSetRenderManagerHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeSetRenderManagerHooks; - private RenderPlayerBase[] overrideSetRenderManagerHooks; - private RenderPlayerBase[] afterSetRenderManagerHooks; - - public boolean isSetRenderManagerModded; - - private static final Map allBaseBeforeSetRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetRenderManagerInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetRenderManagerInferiors = new Hashtable(0); - private static final Map allBaseAfterSetRenderManagerSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetRenderManagerInferiors = new Hashtable(0); - - public static void setRenderPassModel(IRenderPlayerAPI target, net.minecraft.client.model.ModelBase paramModelBase) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isSetRenderPassModelModded) - renderPlayerAPI.setRenderPassModel(paramModelBase); - else - target.localSetRenderPassModel(paramModelBase); - } - - private void setRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase) - { - if(beforeSetRenderPassModelHooks != null) - for(int i = beforeSetRenderPassModelHooks.length - 1; i >= 0 ; i--) - beforeSetRenderPassModelHooks[i].beforeSetRenderPassModel(paramModelBase); - - if(overrideSetRenderPassModelHooks != null) - overrideSetRenderPassModelHooks[overrideSetRenderPassModelHooks.length - 1].setRenderPassModel(paramModelBase); - else - renderPlayer.localSetRenderPassModel(paramModelBase); - - if(afterSetRenderPassModelHooks != null) - for(int i = 0; i < afterSetRenderPassModelHooks.length; i++) - afterSetRenderPassModelHooks[i].afterSetRenderPassModel(paramModelBase); - - } - - protected RenderPlayerBase GetOverwrittenSetRenderPassModel(RenderPlayerBase overWriter) - { - if (overrideSetRenderPassModelHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetRenderPassModelHooks.length; i++) - if(overrideSetRenderPassModelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetRenderPassModelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetRenderPassModelHookTypes = new LinkedList(); - private final static List overrideSetRenderPassModelHookTypes = new LinkedList(); - private final static List afterSetRenderPassModelHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeSetRenderPassModelHooks; - private RenderPlayerBase[] overrideSetRenderPassModelHooks; - private RenderPlayerBase[] afterSetRenderPassModelHooks; - - public boolean isSetRenderPassModelModded; - - private static final Map allBaseBeforeSetRenderPassModelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetRenderPassModelInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetRenderPassModelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetRenderPassModelInferiors = new Hashtable(0); - private static final Map allBaseAfterSetRenderPassModelSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetRenderPassModelInferiors = new Hashtable(0); - - public static void updateIcons(IRenderPlayerAPI target, net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister) - { - RenderPlayerAPI renderPlayerAPI = target.getRenderPlayerAPI(); - if(renderPlayerAPI != null && renderPlayerAPI.isUpdateIconsModded) - renderPlayerAPI.updateIcons(paramIIconRegister); - else - target.localUpdateIcons(paramIIconRegister); - } - - private void updateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister) - { - if(beforeUpdateIconsHooks != null) - for(int i = beforeUpdateIconsHooks.length - 1; i >= 0 ; i--) - beforeUpdateIconsHooks[i].beforeUpdateIcons(paramIIconRegister); - - if(overrideUpdateIconsHooks != null) - overrideUpdateIconsHooks[overrideUpdateIconsHooks.length - 1].updateIcons(paramIIconRegister); - else - renderPlayer.localUpdateIcons(paramIIconRegister); - - if(afterUpdateIconsHooks != null) - for(int i = 0; i < afterUpdateIconsHooks.length; i++) - afterUpdateIconsHooks[i].afterUpdateIcons(paramIIconRegister); - - } - - protected RenderPlayerBase GetOverwrittenUpdateIcons(RenderPlayerBase overWriter) - { - if (overrideUpdateIconsHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdateIconsHooks.length; i++) - if(overrideUpdateIconsHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdateIconsHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdateIconsHookTypes = new LinkedList(); - private final static List overrideUpdateIconsHookTypes = new LinkedList(); - private final static List afterUpdateIconsHookTypes = new LinkedList(); - - private RenderPlayerBase[] beforeUpdateIconsHooks; - private RenderPlayerBase[] overrideUpdateIconsHooks; - private RenderPlayerBase[] afterUpdateIconsHooks; - - public boolean isUpdateIconsModded; - - private static final Map allBaseBeforeUpdateIconsSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdateIconsInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateIconsSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateIconsInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdateIconsSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdateIconsInferiors = new Hashtable(0); - - - protected final IRenderPlayerAPI renderPlayer; - - private final static Set keys = new HashSet(); - private final static Map keysToVirtualIds = new HashMap(); - private final static Set> dynamicTypes = new HashSet>(); - - private final static Map, Map> virtualDynamicHookMethods = new HashMap, Map>(); - - private final static Map, Map> beforeDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> overrideDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> afterDynamicHookMethods = new HashMap, Map>(); - - private final static List beforeLocalConstructingHookTypes = new LinkedList(); - private final static List afterLocalConstructingHookTypes = new LinkedList(); - - private static final Map> beforeDynamicHookTypes = new Hashtable>(0); - private static final Map> overrideDynamicHookTypes = new Hashtable>(0); - private static final Map> afterDynamicHookTypes = new Hashtable>(0); - - private RenderPlayerBase[] beforeLocalConstructingHooks; - private RenderPlayerBase[] afterLocalConstructingHooks; - - private final Map baseObjectsToId = new Hashtable(); - private final Map allBaseObjects = new Hashtable(); - private final Set unmodifiableAllBaseIds = Collections.unmodifiableSet(allBaseObjects.keySet()); - - private static final Map> allBaseConstructors = new Hashtable>(); - private static final Set unmodifiableAllIds = Collections.unmodifiableSet(allBaseConstructors.keySet()); - - private static final Map allBaseBeforeLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeLocalConstructingInferiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingInferiors = new Hashtable(0); - - private static final Map> allBaseBeforeDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseBeforeDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicInferiors = new Hashtable>(0); - - private static boolean initialized = false; -} diff --git a/src/main/java/api/player/render/RenderPlayerBase.java b/src/main/java/api/player/render/RenderPlayerBase.java deleted file mode 100644 index cd2199e0..00000000 --- a/src/main/java/api/player/render/RenderPlayerBase.java +++ /dev/null @@ -1,639 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -public abstract class RenderPlayerBase -{ - public RenderPlayerBase(RenderPlayerAPI renderPlayerAPI) - { - this.internalRenderPlayerAPI = renderPlayerAPI; - this.renderPlayerAPI = renderPlayerAPI.renderPlayer; - this.renderPlayer = renderPlayerAPI.renderPlayer.getRenderPlayer(); - } - - public void beforeBaseAttach(boolean onTheFly) - { - } - - public void afterBaseAttach(boolean onTheFly) - { - } - - public void beforeLocalConstructing() - { - } - - public void afterLocalConstructing() - { - } - - public void beforeBaseDetach(boolean onTheFly) - { - } - - public void afterBaseDetach(boolean onTheFly) - { - } - - public Object dynamic(String key, Object[] parameters) - { - return internalRenderPlayerAPI.dynamicOverwritten(key, parameters, this); - } - - public final int hashCode() - { - return super.hashCode(); - } - - public void beforeDoRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public boolean doRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenDoRenderLabel(this); - - boolean _result; - if(overwritten == null) - _result = renderPlayerAPI.localDoRenderLabel(paramEntityLivingBase); - else if(overwritten != this) - _result = overwritten.doRenderLabel(paramEntityLivingBase); - else - _result = false; - - return _result; - } - - public void afterDoRenderLabel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void beforeDoRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void doRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenDoRenderShadowAndFire(this); - - if(overwritten == null) - renderPlayerAPI.localDoRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else if(overwritten != this) - overwritten.doRenderShadowAndFire(paramEntity, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - public void afterDoRenderShadowAndFire(net.minecraft.entity.Entity paramEntity, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void beforeGetColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2) - { - } - - public int getColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenGetColorMultiplier(this); - - int _result; - if(overwritten == null) - _result = renderPlayerAPI.localGetColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - else if(overwritten != this) - _result = overwritten.getColorMultiplier(paramEntityLivingBase, paramFloat1, paramFloat2); - else - _result = 0; - - return _result; - } - - public void afterGetColorMultiplier(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2) - { - } - - public void beforeGetDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public float getDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenGetDeathMaxRotation(this); - - float _result; - if(overwritten == null) - _result = renderPlayerAPI.localGetDeathMaxRotation(paramEntityLivingBase); - else if(overwritten != this) - _result = overwritten.getDeathMaxRotation(paramEntityLivingBase); - else - _result = 0; - - return _result; - } - - public void afterGetDeathMaxRotation(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void beforeGetFontRendererFromRenderManager() - { - } - - public net.minecraft.client.gui.FontRenderer getFontRendererFromRenderManager() - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenGetFontRendererFromRenderManager(this); - - net.minecraft.client.gui.FontRenderer _result; - if(overwritten == null) - _result = renderPlayerAPI.localGetFontRendererFromRenderManager(); - else if(overwritten != this) - _result = overwritten.getFontRendererFromRenderManager(); - else - _result = null; - - return _result; - } - - public void afterGetFontRendererFromRenderManager() - { - } - - public void beforeGetResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer) - { - } - - public net.minecraft.util.ResourceLocation getResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenGetResourceLocationFromPlayer(this); - - net.minecraft.util.ResourceLocation _result; - if(overwritten == null) - _result = renderPlayerAPI.localGetResourceLocationFromPlayer(paramAbstractClientPlayer); - else if(overwritten != this) - _result = overwritten.getResourceLocationFromPlayer(paramAbstractClientPlayer); - else - _result = null; - - return _result; - } - - public void afterGetResourceLocationFromPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer) - { - } - - public void beforeHandleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public float handleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenHandleRotationFloat(this); - - float _result; - if(overwritten == null) - _result = renderPlayerAPI.localHandleRotationFloat(paramEntityLivingBase, paramFloat); - else if(overwritten != this) - _result = overwritten.handleRotationFloat(paramEntityLivingBase, paramFloat); - else - _result = 0; - - return _result; - } - - public void afterHandleRotationFloat(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public void beforeInheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat) - { - } - - public int inheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenInheritRenderPass(this); - - int _result; - if(overwritten == null) - _result = renderPlayerAPI.localInheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - else if(overwritten != this) - _result = overwritten.inheritRenderPass(paramEntityLivingBase, paramInt, paramFloat); - else - _result = 0; - - return _result; - } - - public void afterInheritRenderPass(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, int paramInt, float paramFloat) - { - } - - public void beforeLoadTexture(net.minecraft.util.ResourceLocation paramResourceLocation) - { - } - - public void loadTexture(net.minecraft.util.ResourceLocation paramResourceLocation) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenLoadTexture(this); - - if(overwritten == null) - renderPlayerAPI.localLoadTexture(paramResourceLocation); - else if(overwritten != this) - overwritten.loadTexture(paramResourceLocation); - - } - - public void afterLoadTexture(net.minecraft.util.ResourceLocation paramResourceLocation) - { - } - - public void beforeLoadTextureOfEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public void loadTextureOfEntity(net.minecraft.entity.Entity paramEntity) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenLoadTextureOfEntity(this); - - if(overwritten == null) - renderPlayerAPI.localLoadTextureOfEntity(paramEntity); - else if(overwritten != this) - overwritten.loadTextureOfEntity(paramEntity); - - } - - public void afterLoadTextureOfEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public void beforePassSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void passSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenPassSpecialRender(this); - - if(overwritten == null) - renderPlayerAPI.localPassSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.passSpecialRender(paramEntityLivingBase, paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterPassSpecialRender(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforePerformStaticEntityRebuild() - { - } - - public boolean performStaticEntityRebuild() - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenPerformStaticEntityRebuild(this); - - boolean _result; - if(overwritten == null) - _result = renderPlayerAPI.localPerformStaticEntityRebuild(); - else if(overwritten != this) - _result = overwritten.performStaticEntityRebuild(); - else - _result = false; - - return _result; - } - - public void afterPerformStaticEntityRebuild() - { - } - - public void beforeRenderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public void renderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderArrowsStuckInEntity(this); - - if(overwritten == null) - renderPlayerAPI.localRenderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - else if(overwritten != this) - overwritten.renderArrowsStuckInEntity(paramEntityLivingBase, paramFloat); - - } - - public void afterRenderArrowsStuckInEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public void beforeRenderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer) - { - } - - public void renderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderFirstPersonArm(this); - - if(overwritten == null) - renderPlayerAPI.localRenderFirstPersonArm(paramEntityPlayer); - else if(overwritten != this) - overwritten.renderFirstPersonArm(paramEntityPlayer); - - } - - public void afterRenderFirstPersonArm(net.minecraft.entity.player.EntityPlayer paramEntityPlayer) - { - } - - public void beforeRenderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt) - { - } - - public void renderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderLivingLabel(this); - - if(overwritten == null) - renderPlayerAPI.localRenderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - else if(overwritten != this) - overwritten.renderLivingLabel(paramEntity, paramString, paramDouble1, paramDouble2, paramDouble3, paramInt); - - } - - public void afterRenderLivingLabel(net.minecraft.entity.Entity paramEntity, String paramString, double paramDouble1, double paramDouble2, double paramDouble3, int paramInt) - { - } - - public void beforeRenderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - } - - public void renderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderModel(this); - - if(overwritten == null) - renderPlayerAPI.localRenderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - else if(overwritten != this) - overwritten.renderModel(paramEntityLivingBase, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6); - - } - - public void afterRenderModel(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6) - { - } - - public void beforeRenderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void renderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderPlayer(this); - - if(overwritten == null) - renderPlayerAPI.localRenderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - else if(overwritten != this) - overwritten.renderPlayer(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramFloat1, paramFloat2); - - } - - public void afterRenderPlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) - { - } - - public void beforeRenderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4) - { - } - - public void renderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderPlayerNameAndScoreLabel(this); - - if(overwritten == null) - renderPlayerAPI.localRenderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - else if(overwritten != this) - overwritten.renderPlayerNameAndScoreLabel(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3, paramString, paramFloat, paramDouble4); - - } - - public void afterRenderPlayerNameAndScoreLabel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3, String paramString, float paramFloat, double paramDouble4) - { - } - - public void beforeRenderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - } - - public void renderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderPlayerScale(this); - - if(overwritten == null) - renderPlayerAPI.localRenderPlayerScale(paramAbstractClientPlayer, paramFloat); - else if(overwritten != this) - overwritten.renderPlayerScale(paramAbstractClientPlayer, paramFloat); - - } - - public void afterRenderPlayerScale(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - } - - public void beforeRenderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void renderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderPlayerSleep(this); - - if(overwritten == null) - renderPlayerAPI.localRenderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.renderPlayerSleep(paramAbstractClientPlayer, paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterRenderPlayerSleep(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeRenderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - } - - public void renderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderSpecials(this); - - if(overwritten == null) - renderPlayerAPI.localRenderSpecials(paramAbstractClientPlayer, paramFloat); - else if(overwritten != this) - overwritten.renderSpecials(paramAbstractClientPlayer, paramFloat); - - } - - public void afterRenderSpecials(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat) - { - } - - public void beforeRenderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public float renderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRenderSwingProgress(this); - - float _result; - if(overwritten == null) - _result = renderPlayerAPI.localRenderSwingProgress(paramEntityLivingBase, paramFloat); - else if(overwritten != this) - _result = overwritten.renderSwingProgress(paramEntityLivingBase, paramFloat); - else - _result = 0; - - return _result; - } - - public void afterRenderSwingProgress(net.minecraft.entity.EntityLivingBase paramEntityLivingBase, float paramFloat) - { - } - - public void beforeRotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void rotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenRotatePlayer(this); - - if(overwritten == null) - renderPlayerAPI.localRotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - else if(overwritten != this) - overwritten.rotatePlayer(paramAbstractClientPlayer, paramFloat1, paramFloat2, paramFloat3); - - } - - public void afterRotatePlayer(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void beforeSetArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - } - - public int setArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenSetArmorModel(this); - - int _result; - if(overwritten == null) - _result = renderPlayerAPI.localSetArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else if(overwritten != this) - _result = overwritten.setArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else - _result = 0; - - return _result; - } - - public void afterSetArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - } - - public void beforeSetPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - } - - public void setPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenSetPassArmorModel(this); - - if(overwritten == null) - renderPlayerAPI.localSetPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - else if(overwritten != this) - overwritten.setPassArmorModel(paramAbstractClientPlayer, paramInt, paramFloat); - - } - - public void afterSetPassArmorModel(net.minecraft.client.entity.AbstractClientPlayer paramAbstractClientPlayer, int paramInt, float paramFloat) - { - } - - public void beforeSetRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager) - { - } - - public void setRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenSetRenderManager(this); - - if(overwritten == null) - renderPlayerAPI.localSetRenderManager(paramRenderManager); - else if(overwritten != this) - overwritten.setRenderManager(paramRenderManager); - - } - - public void afterSetRenderManager(net.minecraft.client.renderer.entity.RenderManager paramRenderManager) - { - } - - public void beforeSetRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase) - { - } - - public void setRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenSetRenderPassModel(this); - - if(overwritten == null) - renderPlayerAPI.localSetRenderPassModel(paramModelBase); - else if(overwritten != this) - overwritten.setRenderPassModel(paramModelBase); - - } - - public void afterSetRenderPassModel(net.minecraft.client.model.ModelBase paramModelBase) - { - } - - public void beforeUpdateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister) - { - } - - public void updateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister) - { - RenderPlayerBase overwritten = internalRenderPlayerAPI.GetOverwrittenUpdateIcons(this); - - if(overwritten == null) - renderPlayerAPI.localUpdateIcons(paramIIconRegister); - else if(overwritten != this) - overwritten.updateIcons(paramIIconRegister); - - } - - public void afterUpdateIcons(net.minecraft.client.renderer.texture.IIconRegister paramIIconRegister) - { - } - - protected final net.minecraft.client.renderer.entity.RenderPlayer renderPlayer; - protected final IRenderPlayer renderPlayerAPI; - private final RenderPlayerAPI internalRenderPlayerAPI; -} diff --git a/src/main/java/api/player/render/RenderPlayerBaseSorter.java b/src/main/java/api/player/render/RenderPlayerBaseSorter.java deleted file mode 100644 index bc557655..00000000 --- a/src/main/java/api/player/render/RenderPlayerBaseSorter.java +++ /dev/null @@ -1,259 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -import java.util.*; - -public final class RenderPlayerBaseSorter -{ - public RenderPlayerBaseSorter(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - this.list = list; - this.allBaseSuperiors = allBaseSuperiors; - this.allBaseInferiors = allBaseInferiors; - this.methodName = methodName; - } - - public void Sort() - { - if(list.size() <= 1) - return; - - if(explicitInferiors != null) - explicitInferiors.clear(); - - if(explicitSuperiors != null) - explicitSuperiors.clear(); - - if(directInferiorsMap != null) - directInferiorsMap.clear(); - - if(allInferiors != null) - allInferiors.clear(); - - for(int i = 0; i < list.size(); i++) - { - String baseId = list.get(i); - - String[] inferiorNames = allBaseInferiors.get(baseId); - boolean hasInferiors = inferiorNames != null && inferiorNames.length > 0; - - String[] superiorNames = allBaseSuperiors.get(baseId); - boolean hasSuperiors = superiorNames != null && superiorNames.length > 0; - - if((hasInferiors || hasSuperiors) && directInferiorsMap == null) - directInferiorsMap = new Hashtable>(); - - if(hasInferiors) - explicitInferiors = build(baseId, explicitInferiors, directInferiorsMap, null, inferiorNames); - - if(hasSuperiors) - explicitSuperiors = build(baseId, explicitSuperiors, null, directInferiorsMap, superiorNames); - } - if(directInferiorsMap != null) - { - for(int i = 0; i < list.size() - 1; i++) - for(int n = i + 1; n < list.size(); n++) - { - String left = list.get(i); - String right = list.get(n); - - Set leftInferiors = null, rightInferiors = null; - if(explicitInferiors != null) - { - leftInferiors = explicitInferiors.get(left); - rightInferiors = explicitInferiors.get(right); - } - - Set leftSuperiors = null, rightSuperiors = null; - if(explicitSuperiors != null) - { - leftSuperiors = explicitSuperiors.get(left); - rightSuperiors = explicitSuperiors.get(right); - } - - boolean leftWantsToBeInferiorToRight = leftSuperiors != null && leftSuperiors.contains(right); - boolean leftWantsToBeSuperiorToRight = leftInferiors != null && leftInferiors.contains(right); - - boolean rightWantsToBeInferiorToLeft = rightSuperiors != null && rightSuperiors.contains(left); - boolean rightWantsToBeSuperiorToLeft = rightInferiors != null && rightInferiors.contains(left); - - if(leftWantsToBeInferiorToRight && rightWantsToBeInferiorToLeft) - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be inferior to '" + right + "' and '" + right + "' wants to be inferior to '" + left + "'"); - if(leftWantsToBeSuperiorToRight && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior to '" + right + "' and '" + right + "' wants to be superior to '" + left + "'"); - - if(leftWantsToBeInferiorToRight && leftWantsToBeSuperiorToRight) - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior and inferior to '" + right + "'"); - if(rightWantsToBeInferiorToLeft && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. '" + right + "' wants to be superior and inferior to '" + left + "'"); - } - - if(allInferiors == null) - allInferiors = new Hashtable>(); - - for(int i = 0; i < list.size(); i++) - build(list.get(i), null); - } - - if (withoutSuperiors == null) - withoutSuperiors = new LinkedList(); - - int offset = 0; - int size = list.size(); - - while(size > 1) - { - withoutSuperiors.clear(); - for(int i = offset; i < offset + size; i++) - withoutSuperiors.add(list.get(i)); - - if(allInferiors != null) - for(int i = offset; i < offset + size; i++) - { - Set inferiors = allInferiors.get(list.get(i)); - if (inferiors != null) - withoutSuperiors.removeAll(inferiors); - } - - boolean initial = true; - for(int i = offset; i < offset + size; i++) - { - String key = list.get(i); - if(withoutSuperiors.contains(key)) - { - if(initial) - { - Set inferiors = null; - if(allInferiors != null) - inferiors = allInferiors.get(key); - if(inferiors == null || inferiors.isEmpty()) - { - withoutSuperiors.remove(key); - size--; - offset++; - continue; - } - } - list.remove(i--); - size--; - } - initial = false; - } - list.addAll(offset + size, withoutSuperiors); - } - } - - private Set build(String type, String startType) - { - Set inferiors = allInferiors.get(type); - if(inferiors == null) - { - inferiors = build(type, null, startType != null ? startType : type); - if(inferiors == null) - inferiors = Empty; - allInferiors.put(type, inferiors); - } - return inferiors; - } - - private Set build(String type, Set inferiors, String startType) - { - Set directInferiors = directInferiorsMap.get(type); - if(directInferiors == null) - return inferiors; - - if(inferiors == null) - inferiors = new HashSet(); - - Iterator iter = directInferiors.iterator(); - while(iter.hasNext()) - { - String inferiorType = iter.next(); - if(inferiorType == startType) - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + startType + "'"); - if(list.contains(inferiorType)) - inferiors.add(inferiorType); - - Set inferiorSet; - try - { - inferiorSet = build(inferiorType, startType); - } - catch(UnsupportedOperationException uoe) - { - throw new UnsupportedOperationException("Can not sort RenderPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + inferiorType + "'", uoe); - } - - if(inferiorSet != Empty) - inferiors.addAll(inferiorSet); - } - return inferiors; - } - - private static Map> build(String baseId, Map> map, Map> directMap, Map> otherDirectMap, String[] names) - { - if(map == null) - map = new Hashtable>(); - - Set types = new HashSet(); - for(int n = 0; n < names.length; n++) - { - if(names[n] != null) - types.add(names[n]); - } - - if(directMap != null) - getOrCreateSet(directMap, baseId).addAll(types); - - if(otherDirectMap != null) - { - Iterator iter = types.iterator(); - while(iter.hasNext()) - getOrCreateSet(otherDirectMap, iter.next()).add(baseId); - } - - map.put(baseId, types); - return map; - } - - private static Set getOrCreateSet(Map> map, String key) - { - Set value = map.get(key); - if(value != null) - return value; - - value = new HashSet(); - map.put(key, value); - return value; - } - - private Map> explicitInferiors; - private Map> explicitSuperiors; - private Map> directInferiorsMap; - private Map> allInferiors; - private List withoutSuperiors; - - private final List list; - private final Map allBaseSuperiors; - private final Map allBaseInferiors; - private final String methodName; - - private static final Set Empty = new HashSet(); -} diff --git a/src/main/java/api/player/render/RenderPlayerBaseSorting.java b/src/main/java/api/player/render/RenderPlayerBaseSorting.java deleted file mode 100644 index ddd0b5e4..00000000 --- a/src/main/java/api/player/render/RenderPlayerBaseSorting.java +++ /dev/null @@ -1,2033 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -import java.util.*; - -public final class RenderPlayerBaseSorting -{ - private String[] beforeLocalConstructingSuperiors = null; - private String[] beforeLocalConstructingInferiors = null; - private String[] afterLocalConstructingSuperiors = null; - private String[] afterLocalConstructingInferiors = null; - - private Map dynamicBeforeSuperiors = null; - private Map dynamicBeforeInferiors = null; - private Map dynamicOverrideSuperiors = null; - private Map dynamicOverrideInferiors = null; - private Map dynamicAfterSuperiors = null; - private Map dynamicAfterInferiors = null; - - private String[] beforeDoRenderLabelSuperiors = null; - private String[] beforeDoRenderLabelInferiors = null; - private String[] overrideDoRenderLabelSuperiors = null; - private String[] overrideDoRenderLabelInferiors = null; - private String[] afterDoRenderLabelSuperiors = null; - private String[] afterDoRenderLabelInferiors = null; - - private String[] beforeDoRenderShadowAndFireSuperiors = null; - private String[] beforeDoRenderShadowAndFireInferiors = null; - private String[] overrideDoRenderShadowAndFireSuperiors = null; - private String[] overrideDoRenderShadowAndFireInferiors = null; - private String[] afterDoRenderShadowAndFireSuperiors = null; - private String[] afterDoRenderShadowAndFireInferiors = null; - - private String[] beforeGetColorMultiplierSuperiors = null; - private String[] beforeGetColorMultiplierInferiors = null; - private String[] overrideGetColorMultiplierSuperiors = null; - private String[] overrideGetColorMultiplierInferiors = null; - private String[] afterGetColorMultiplierSuperiors = null; - private String[] afterGetColorMultiplierInferiors = null; - - private String[] beforeGetDeathMaxRotationSuperiors = null; - private String[] beforeGetDeathMaxRotationInferiors = null; - private String[] overrideGetDeathMaxRotationSuperiors = null; - private String[] overrideGetDeathMaxRotationInferiors = null; - private String[] afterGetDeathMaxRotationSuperiors = null; - private String[] afterGetDeathMaxRotationInferiors = null; - - private String[] beforeGetFontRendererFromRenderManagerSuperiors = null; - private String[] beforeGetFontRendererFromRenderManagerInferiors = null; - private String[] overrideGetFontRendererFromRenderManagerSuperiors = null; - private String[] overrideGetFontRendererFromRenderManagerInferiors = null; - private String[] afterGetFontRendererFromRenderManagerSuperiors = null; - private String[] afterGetFontRendererFromRenderManagerInferiors = null; - - private String[] beforeGetResourceLocationFromPlayerSuperiors = null; - private String[] beforeGetResourceLocationFromPlayerInferiors = null; - private String[] overrideGetResourceLocationFromPlayerSuperiors = null; - private String[] overrideGetResourceLocationFromPlayerInferiors = null; - private String[] afterGetResourceLocationFromPlayerSuperiors = null; - private String[] afterGetResourceLocationFromPlayerInferiors = null; - - private String[] beforeHandleRotationFloatSuperiors = null; - private String[] beforeHandleRotationFloatInferiors = null; - private String[] overrideHandleRotationFloatSuperiors = null; - private String[] overrideHandleRotationFloatInferiors = null; - private String[] afterHandleRotationFloatSuperiors = null; - private String[] afterHandleRotationFloatInferiors = null; - - private String[] beforeInheritRenderPassSuperiors = null; - private String[] beforeInheritRenderPassInferiors = null; - private String[] overrideInheritRenderPassSuperiors = null; - private String[] overrideInheritRenderPassInferiors = null; - private String[] afterInheritRenderPassSuperiors = null; - private String[] afterInheritRenderPassInferiors = null; - - private String[] beforeLoadTextureSuperiors = null; - private String[] beforeLoadTextureInferiors = null; - private String[] overrideLoadTextureSuperiors = null; - private String[] overrideLoadTextureInferiors = null; - private String[] afterLoadTextureSuperiors = null; - private String[] afterLoadTextureInferiors = null; - - private String[] beforeLoadTextureOfEntitySuperiors = null; - private String[] beforeLoadTextureOfEntityInferiors = null; - private String[] overrideLoadTextureOfEntitySuperiors = null; - private String[] overrideLoadTextureOfEntityInferiors = null; - private String[] afterLoadTextureOfEntitySuperiors = null; - private String[] afterLoadTextureOfEntityInferiors = null; - - private String[] beforePassSpecialRenderSuperiors = null; - private String[] beforePassSpecialRenderInferiors = null; - private String[] overridePassSpecialRenderSuperiors = null; - private String[] overridePassSpecialRenderInferiors = null; - private String[] afterPassSpecialRenderSuperiors = null; - private String[] afterPassSpecialRenderInferiors = null; - - private String[] beforePerformStaticEntityRebuildSuperiors = null; - private String[] beforePerformStaticEntityRebuildInferiors = null; - private String[] overridePerformStaticEntityRebuildSuperiors = null; - private String[] overridePerformStaticEntityRebuildInferiors = null; - private String[] afterPerformStaticEntityRebuildSuperiors = null; - private String[] afterPerformStaticEntityRebuildInferiors = null; - - private String[] beforeRenderArrowsStuckInEntitySuperiors = null; - private String[] beforeRenderArrowsStuckInEntityInferiors = null; - private String[] overrideRenderArrowsStuckInEntitySuperiors = null; - private String[] overrideRenderArrowsStuckInEntityInferiors = null; - private String[] afterRenderArrowsStuckInEntitySuperiors = null; - private String[] afterRenderArrowsStuckInEntityInferiors = null; - - private String[] beforeRenderFirstPersonArmSuperiors = null; - private String[] beforeRenderFirstPersonArmInferiors = null; - private String[] overrideRenderFirstPersonArmSuperiors = null; - private String[] overrideRenderFirstPersonArmInferiors = null; - private String[] afterRenderFirstPersonArmSuperiors = null; - private String[] afterRenderFirstPersonArmInferiors = null; - - private String[] beforeRenderLivingLabelSuperiors = null; - private String[] beforeRenderLivingLabelInferiors = null; - private String[] overrideRenderLivingLabelSuperiors = null; - private String[] overrideRenderLivingLabelInferiors = null; - private String[] afterRenderLivingLabelSuperiors = null; - private String[] afterRenderLivingLabelInferiors = null; - - private String[] beforeRenderModelSuperiors = null; - private String[] beforeRenderModelInferiors = null; - private String[] overrideRenderModelSuperiors = null; - private String[] overrideRenderModelInferiors = null; - private String[] afterRenderModelSuperiors = null; - private String[] afterRenderModelInferiors = null; - - private String[] beforeRenderPlayerSuperiors = null; - private String[] beforeRenderPlayerInferiors = null; - private String[] overrideRenderPlayerSuperiors = null; - private String[] overrideRenderPlayerInferiors = null; - private String[] afterRenderPlayerSuperiors = null; - private String[] afterRenderPlayerInferiors = null; - - private String[] beforeRenderPlayerNameAndScoreLabelSuperiors = null; - private String[] beforeRenderPlayerNameAndScoreLabelInferiors = null; - private String[] overrideRenderPlayerNameAndScoreLabelSuperiors = null; - private String[] overrideRenderPlayerNameAndScoreLabelInferiors = null; - private String[] afterRenderPlayerNameAndScoreLabelSuperiors = null; - private String[] afterRenderPlayerNameAndScoreLabelInferiors = null; - - private String[] beforeRenderPlayerScaleSuperiors = null; - private String[] beforeRenderPlayerScaleInferiors = null; - private String[] overrideRenderPlayerScaleSuperiors = null; - private String[] overrideRenderPlayerScaleInferiors = null; - private String[] afterRenderPlayerScaleSuperiors = null; - private String[] afterRenderPlayerScaleInferiors = null; - - private String[] beforeRenderPlayerSleepSuperiors = null; - private String[] beforeRenderPlayerSleepInferiors = null; - private String[] overrideRenderPlayerSleepSuperiors = null; - private String[] overrideRenderPlayerSleepInferiors = null; - private String[] afterRenderPlayerSleepSuperiors = null; - private String[] afterRenderPlayerSleepInferiors = null; - - private String[] beforeRenderSpecialsSuperiors = null; - private String[] beforeRenderSpecialsInferiors = null; - private String[] overrideRenderSpecialsSuperiors = null; - private String[] overrideRenderSpecialsInferiors = null; - private String[] afterRenderSpecialsSuperiors = null; - private String[] afterRenderSpecialsInferiors = null; - - private String[] beforeRenderSwingProgressSuperiors = null; - private String[] beforeRenderSwingProgressInferiors = null; - private String[] overrideRenderSwingProgressSuperiors = null; - private String[] overrideRenderSwingProgressInferiors = null; - private String[] afterRenderSwingProgressSuperiors = null; - private String[] afterRenderSwingProgressInferiors = null; - - private String[] beforeRotatePlayerSuperiors = null; - private String[] beforeRotatePlayerInferiors = null; - private String[] overrideRotatePlayerSuperiors = null; - private String[] overrideRotatePlayerInferiors = null; - private String[] afterRotatePlayerSuperiors = null; - private String[] afterRotatePlayerInferiors = null; - - private String[] beforeSetArmorModelSuperiors = null; - private String[] beforeSetArmorModelInferiors = null; - private String[] overrideSetArmorModelSuperiors = null; - private String[] overrideSetArmorModelInferiors = null; - private String[] afterSetArmorModelSuperiors = null; - private String[] afterSetArmorModelInferiors = null; - - private String[] beforeSetPassArmorModelSuperiors = null; - private String[] beforeSetPassArmorModelInferiors = null; - private String[] overrideSetPassArmorModelSuperiors = null; - private String[] overrideSetPassArmorModelInferiors = null; - private String[] afterSetPassArmorModelSuperiors = null; - private String[] afterSetPassArmorModelInferiors = null; - - private String[] beforeSetRenderManagerSuperiors = null; - private String[] beforeSetRenderManagerInferiors = null; - private String[] overrideSetRenderManagerSuperiors = null; - private String[] overrideSetRenderManagerInferiors = null; - private String[] afterSetRenderManagerSuperiors = null; - private String[] afterSetRenderManagerInferiors = null; - - private String[] beforeSetRenderPassModelSuperiors = null; - private String[] beforeSetRenderPassModelInferiors = null; - private String[] overrideSetRenderPassModelSuperiors = null; - private String[] overrideSetRenderPassModelInferiors = null; - private String[] afterSetRenderPassModelSuperiors = null; - private String[] afterSetRenderPassModelInferiors = null; - - private String[] beforeUpdateIconsSuperiors = null; - private String[] beforeUpdateIconsInferiors = null; - private String[] overrideUpdateIconsSuperiors = null; - private String[] overrideUpdateIconsInferiors = null; - private String[] afterUpdateIconsSuperiors = null; - private String[] afterUpdateIconsInferiors = null; - - - public String[] getBeforeLocalConstructingSuperiors() - { - return beforeLocalConstructingSuperiors; - } - - public String[] getBeforeLocalConstructingInferiors() - { - return beforeLocalConstructingInferiors; - } - - public String[] getAfterLocalConstructingSuperiors() - { - return afterLocalConstructingSuperiors; - } - - public String[] getAfterLocalConstructingInferiors() - { - return afterLocalConstructingInferiors; - } - - public void setBeforeLocalConstructingSuperiors(String[] value) - { - beforeLocalConstructingSuperiors = value; - } - - public void setBeforeLocalConstructingInferiors(String[] value) - { - beforeLocalConstructingInferiors = value; - } - - public void setAfterLocalConstructingSuperiors(String[] value) - { - afterLocalConstructingSuperiors = value; - } - - public void setAfterLocalConstructingInferiors(String[] value) - { - afterLocalConstructingInferiors = value; - } - - public Map getDynamicBeforeSuperiors() - { - return dynamicBeforeSuperiors; - } - - public Map getDynamicBeforeInferiors() - { - return dynamicBeforeInferiors; - } - - public Map getDynamicOverrideSuperiors() - { - return dynamicOverrideSuperiors; - } - - public Map getDynamicOverrideInferiors() - { - return dynamicOverrideInferiors; - } - - public Map getDynamicAfterSuperiors() - { - return dynamicAfterSuperiors; - } - - public Map getDynamicAfterInferiors() - { - return dynamicAfterInferiors; - } - - public void setDynamicBeforeSuperiors(String name, String[] superiors) - { - dynamicBeforeSuperiors = setDynamic(name, superiors, dynamicBeforeSuperiors); - } - - public void setDynamicBeforeInferiors(String name, String[] inferiors) - { - dynamicBeforeInferiors = setDynamic(name, inferiors, dynamicBeforeInferiors); - } - - public void setDynamicOverrideSuperiors(String name, String[] superiors) - { - dynamicOverrideSuperiors = setDynamic(name, superiors, dynamicOverrideSuperiors); - } - - public void setDynamicOverrideInferiors(String name, String[] inferiors) - { - dynamicOverrideInferiors = setDynamic(name, inferiors, dynamicOverrideInferiors); - } - - public void setDynamicAfterSuperiors(String name, String[] superiors) - { - dynamicAfterSuperiors = setDynamic(name, superiors, dynamicAfterSuperiors); - } - - public void setDynamicAfterInferiors(String name, String[] inferiors) - { - dynamicAfterInferiors = setDynamic(name, inferiors, dynamicAfterInferiors); - } - - private Map setDynamic(String name, String[] names, Map map) - { - if(name == null) - throw new IllegalArgumentException("Parameter 'name' may not be null"); - - if(names == null) - { - if(map != null) - map.remove(name); - return map; - } - - if(map == null) - map = new HashMap(); - map.put(name, names); - - return map; - } - - public String[] getBeforeDoRenderLabelSuperiors() - { - return beforeDoRenderLabelSuperiors; - } - - public String[] getBeforeDoRenderLabelInferiors() - { - return beforeDoRenderLabelInferiors; - } - - public String[] getOverrideDoRenderLabelSuperiors() - { - return overrideDoRenderLabelSuperiors; - } - - public String[] getOverrideDoRenderLabelInferiors() - { - return overrideDoRenderLabelInferiors; - } - - public String[] getAfterDoRenderLabelSuperiors() - { - return afterDoRenderLabelSuperiors; - } - - public String[] getAfterDoRenderLabelInferiors() - { - return afterDoRenderLabelInferiors; - } - - public void setBeforeDoRenderLabelSuperiors(String[] value) - { - beforeDoRenderLabelSuperiors = value; - } - - public void setBeforeDoRenderLabelInferiors(String[] value) - { - beforeDoRenderLabelInferiors = value; - } - - public void setOverrideDoRenderLabelSuperiors(String[] value) - { - overrideDoRenderLabelSuperiors = value; - } - - public void setOverrideDoRenderLabelInferiors(String[] value) - { - overrideDoRenderLabelInferiors = value; - } - - public void setAfterDoRenderLabelSuperiors(String[] value) - { - afterDoRenderLabelSuperiors = value; - } - - public void setAfterDoRenderLabelInferiors(String[] value) - { - afterDoRenderLabelInferiors = value; - } - - public String[] getBeforeDoRenderShadowAndFireSuperiors() - { - return beforeDoRenderShadowAndFireSuperiors; - } - - public String[] getBeforeDoRenderShadowAndFireInferiors() - { - return beforeDoRenderShadowAndFireInferiors; - } - - public String[] getOverrideDoRenderShadowAndFireSuperiors() - { - return overrideDoRenderShadowAndFireSuperiors; - } - - public String[] getOverrideDoRenderShadowAndFireInferiors() - { - return overrideDoRenderShadowAndFireInferiors; - } - - public String[] getAfterDoRenderShadowAndFireSuperiors() - { - return afterDoRenderShadowAndFireSuperiors; - } - - public String[] getAfterDoRenderShadowAndFireInferiors() - { - return afterDoRenderShadowAndFireInferiors; - } - - public void setBeforeDoRenderShadowAndFireSuperiors(String[] value) - { - beforeDoRenderShadowAndFireSuperiors = value; - } - - public void setBeforeDoRenderShadowAndFireInferiors(String[] value) - { - beforeDoRenderShadowAndFireInferiors = value; - } - - public void setOverrideDoRenderShadowAndFireSuperiors(String[] value) - { - overrideDoRenderShadowAndFireSuperiors = value; - } - - public void setOverrideDoRenderShadowAndFireInferiors(String[] value) - { - overrideDoRenderShadowAndFireInferiors = value; - } - - public void setAfterDoRenderShadowAndFireSuperiors(String[] value) - { - afterDoRenderShadowAndFireSuperiors = value; - } - - public void setAfterDoRenderShadowAndFireInferiors(String[] value) - { - afterDoRenderShadowAndFireInferiors = value; - } - - public String[] getBeforeGetColorMultiplierSuperiors() - { - return beforeGetColorMultiplierSuperiors; - } - - public String[] getBeforeGetColorMultiplierInferiors() - { - return beforeGetColorMultiplierInferiors; - } - - public String[] getOverrideGetColorMultiplierSuperiors() - { - return overrideGetColorMultiplierSuperiors; - } - - public String[] getOverrideGetColorMultiplierInferiors() - { - return overrideGetColorMultiplierInferiors; - } - - public String[] getAfterGetColorMultiplierSuperiors() - { - return afterGetColorMultiplierSuperiors; - } - - public String[] getAfterGetColorMultiplierInferiors() - { - return afterGetColorMultiplierInferiors; - } - - public void setBeforeGetColorMultiplierSuperiors(String[] value) - { - beforeGetColorMultiplierSuperiors = value; - } - - public void setBeforeGetColorMultiplierInferiors(String[] value) - { - beforeGetColorMultiplierInferiors = value; - } - - public void setOverrideGetColorMultiplierSuperiors(String[] value) - { - overrideGetColorMultiplierSuperiors = value; - } - - public void setOverrideGetColorMultiplierInferiors(String[] value) - { - overrideGetColorMultiplierInferiors = value; - } - - public void setAfterGetColorMultiplierSuperiors(String[] value) - { - afterGetColorMultiplierSuperiors = value; - } - - public void setAfterGetColorMultiplierInferiors(String[] value) - { - afterGetColorMultiplierInferiors = value; - } - - public String[] getBeforeGetDeathMaxRotationSuperiors() - { - return beforeGetDeathMaxRotationSuperiors; - } - - public String[] getBeforeGetDeathMaxRotationInferiors() - { - return beforeGetDeathMaxRotationInferiors; - } - - public String[] getOverrideGetDeathMaxRotationSuperiors() - { - return overrideGetDeathMaxRotationSuperiors; - } - - public String[] getOverrideGetDeathMaxRotationInferiors() - { - return overrideGetDeathMaxRotationInferiors; - } - - public String[] getAfterGetDeathMaxRotationSuperiors() - { - return afterGetDeathMaxRotationSuperiors; - } - - public String[] getAfterGetDeathMaxRotationInferiors() - { - return afterGetDeathMaxRotationInferiors; - } - - public void setBeforeGetDeathMaxRotationSuperiors(String[] value) - { - beforeGetDeathMaxRotationSuperiors = value; - } - - public void setBeforeGetDeathMaxRotationInferiors(String[] value) - { - beforeGetDeathMaxRotationInferiors = value; - } - - public void setOverrideGetDeathMaxRotationSuperiors(String[] value) - { - overrideGetDeathMaxRotationSuperiors = value; - } - - public void setOverrideGetDeathMaxRotationInferiors(String[] value) - { - overrideGetDeathMaxRotationInferiors = value; - } - - public void setAfterGetDeathMaxRotationSuperiors(String[] value) - { - afterGetDeathMaxRotationSuperiors = value; - } - - public void setAfterGetDeathMaxRotationInferiors(String[] value) - { - afterGetDeathMaxRotationInferiors = value; - } - - public String[] getBeforeGetFontRendererFromRenderManagerSuperiors() - { - return beforeGetFontRendererFromRenderManagerSuperiors; - } - - public String[] getBeforeGetFontRendererFromRenderManagerInferiors() - { - return beforeGetFontRendererFromRenderManagerInferiors; - } - - public String[] getOverrideGetFontRendererFromRenderManagerSuperiors() - { - return overrideGetFontRendererFromRenderManagerSuperiors; - } - - public String[] getOverrideGetFontRendererFromRenderManagerInferiors() - { - return overrideGetFontRendererFromRenderManagerInferiors; - } - - public String[] getAfterGetFontRendererFromRenderManagerSuperiors() - { - return afterGetFontRendererFromRenderManagerSuperiors; - } - - public String[] getAfterGetFontRendererFromRenderManagerInferiors() - { - return afterGetFontRendererFromRenderManagerInferiors; - } - - public void setBeforeGetFontRendererFromRenderManagerSuperiors(String[] value) - { - beforeGetFontRendererFromRenderManagerSuperiors = value; - } - - public void setBeforeGetFontRendererFromRenderManagerInferiors(String[] value) - { - beforeGetFontRendererFromRenderManagerInferiors = value; - } - - public void setOverrideGetFontRendererFromRenderManagerSuperiors(String[] value) - { - overrideGetFontRendererFromRenderManagerSuperiors = value; - } - - public void setOverrideGetFontRendererFromRenderManagerInferiors(String[] value) - { - overrideGetFontRendererFromRenderManagerInferiors = value; - } - - public void setAfterGetFontRendererFromRenderManagerSuperiors(String[] value) - { - afterGetFontRendererFromRenderManagerSuperiors = value; - } - - public void setAfterGetFontRendererFromRenderManagerInferiors(String[] value) - { - afterGetFontRendererFromRenderManagerInferiors = value; - } - - public String[] getBeforeGetResourceLocationFromPlayerSuperiors() - { - return beforeGetResourceLocationFromPlayerSuperiors; - } - - public String[] getBeforeGetResourceLocationFromPlayerInferiors() - { - return beforeGetResourceLocationFromPlayerInferiors; - } - - public String[] getOverrideGetResourceLocationFromPlayerSuperiors() - { - return overrideGetResourceLocationFromPlayerSuperiors; - } - - public String[] getOverrideGetResourceLocationFromPlayerInferiors() - { - return overrideGetResourceLocationFromPlayerInferiors; - } - - public String[] getAfterGetResourceLocationFromPlayerSuperiors() - { - return afterGetResourceLocationFromPlayerSuperiors; - } - - public String[] getAfterGetResourceLocationFromPlayerInferiors() - { - return afterGetResourceLocationFromPlayerInferiors; - } - - public void setBeforeGetResourceLocationFromPlayerSuperiors(String[] value) - { - beforeGetResourceLocationFromPlayerSuperiors = value; - } - - public void setBeforeGetResourceLocationFromPlayerInferiors(String[] value) - { - beforeGetResourceLocationFromPlayerInferiors = value; - } - - public void setOverrideGetResourceLocationFromPlayerSuperiors(String[] value) - { - overrideGetResourceLocationFromPlayerSuperiors = value; - } - - public void setOverrideGetResourceLocationFromPlayerInferiors(String[] value) - { - overrideGetResourceLocationFromPlayerInferiors = value; - } - - public void setAfterGetResourceLocationFromPlayerSuperiors(String[] value) - { - afterGetResourceLocationFromPlayerSuperiors = value; - } - - public void setAfterGetResourceLocationFromPlayerInferiors(String[] value) - { - afterGetResourceLocationFromPlayerInferiors = value; - } - - public String[] getBeforeHandleRotationFloatSuperiors() - { - return beforeHandleRotationFloatSuperiors; - } - - public String[] getBeforeHandleRotationFloatInferiors() - { - return beforeHandleRotationFloatInferiors; - } - - public String[] getOverrideHandleRotationFloatSuperiors() - { - return overrideHandleRotationFloatSuperiors; - } - - public String[] getOverrideHandleRotationFloatInferiors() - { - return overrideHandleRotationFloatInferiors; - } - - public String[] getAfterHandleRotationFloatSuperiors() - { - return afterHandleRotationFloatSuperiors; - } - - public String[] getAfterHandleRotationFloatInferiors() - { - return afterHandleRotationFloatInferiors; - } - - public void setBeforeHandleRotationFloatSuperiors(String[] value) - { - beforeHandleRotationFloatSuperiors = value; - } - - public void setBeforeHandleRotationFloatInferiors(String[] value) - { - beforeHandleRotationFloatInferiors = value; - } - - public void setOverrideHandleRotationFloatSuperiors(String[] value) - { - overrideHandleRotationFloatSuperiors = value; - } - - public void setOverrideHandleRotationFloatInferiors(String[] value) - { - overrideHandleRotationFloatInferiors = value; - } - - public void setAfterHandleRotationFloatSuperiors(String[] value) - { - afterHandleRotationFloatSuperiors = value; - } - - public void setAfterHandleRotationFloatInferiors(String[] value) - { - afterHandleRotationFloatInferiors = value; - } - - public String[] getBeforeInheritRenderPassSuperiors() - { - return beforeInheritRenderPassSuperiors; - } - - public String[] getBeforeInheritRenderPassInferiors() - { - return beforeInheritRenderPassInferiors; - } - - public String[] getOverrideInheritRenderPassSuperiors() - { - return overrideInheritRenderPassSuperiors; - } - - public String[] getOverrideInheritRenderPassInferiors() - { - return overrideInheritRenderPassInferiors; - } - - public String[] getAfterInheritRenderPassSuperiors() - { - return afterInheritRenderPassSuperiors; - } - - public String[] getAfterInheritRenderPassInferiors() - { - return afterInheritRenderPassInferiors; - } - - public void setBeforeInheritRenderPassSuperiors(String[] value) - { - beforeInheritRenderPassSuperiors = value; - } - - public void setBeforeInheritRenderPassInferiors(String[] value) - { - beforeInheritRenderPassInferiors = value; - } - - public void setOverrideInheritRenderPassSuperiors(String[] value) - { - overrideInheritRenderPassSuperiors = value; - } - - public void setOverrideInheritRenderPassInferiors(String[] value) - { - overrideInheritRenderPassInferiors = value; - } - - public void setAfterInheritRenderPassSuperiors(String[] value) - { - afterInheritRenderPassSuperiors = value; - } - - public void setAfterInheritRenderPassInferiors(String[] value) - { - afterInheritRenderPassInferiors = value; - } - - public String[] getBeforeLoadTextureSuperiors() - { - return beforeLoadTextureSuperiors; - } - - public String[] getBeforeLoadTextureInferiors() - { - return beforeLoadTextureInferiors; - } - - public String[] getOverrideLoadTextureSuperiors() - { - return overrideLoadTextureSuperiors; - } - - public String[] getOverrideLoadTextureInferiors() - { - return overrideLoadTextureInferiors; - } - - public String[] getAfterLoadTextureSuperiors() - { - return afterLoadTextureSuperiors; - } - - public String[] getAfterLoadTextureInferiors() - { - return afterLoadTextureInferiors; - } - - public void setBeforeLoadTextureSuperiors(String[] value) - { - beforeLoadTextureSuperiors = value; - } - - public void setBeforeLoadTextureInferiors(String[] value) - { - beforeLoadTextureInferiors = value; - } - - public void setOverrideLoadTextureSuperiors(String[] value) - { - overrideLoadTextureSuperiors = value; - } - - public void setOverrideLoadTextureInferiors(String[] value) - { - overrideLoadTextureInferiors = value; - } - - public void setAfterLoadTextureSuperiors(String[] value) - { - afterLoadTextureSuperiors = value; - } - - public void setAfterLoadTextureInferiors(String[] value) - { - afterLoadTextureInferiors = value; - } - - public String[] getBeforeLoadTextureOfEntitySuperiors() - { - return beforeLoadTextureOfEntitySuperiors; - } - - public String[] getBeforeLoadTextureOfEntityInferiors() - { - return beforeLoadTextureOfEntityInferiors; - } - - public String[] getOverrideLoadTextureOfEntitySuperiors() - { - return overrideLoadTextureOfEntitySuperiors; - } - - public String[] getOverrideLoadTextureOfEntityInferiors() - { - return overrideLoadTextureOfEntityInferiors; - } - - public String[] getAfterLoadTextureOfEntitySuperiors() - { - return afterLoadTextureOfEntitySuperiors; - } - - public String[] getAfterLoadTextureOfEntityInferiors() - { - return afterLoadTextureOfEntityInferiors; - } - - public void setBeforeLoadTextureOfEntitySuperiors(String[] value) - { - beforeLoadTextureOfEntitySuperiors = value; - } - - public void setBeforeLoadTextureOfEntityInferiors(String[] value) - { - beforeLoadTextureOfEntityInferiors = value; - } - - public void setOverrideLoadTextureOfEntitySuperiors(String[] value) - { - overrideLoadTextureOfEntitySuperiors = value; - } - - public void setOverrideLoadTextureOfEntityInferiors(String[] value) - { - overrideLoadTextureOfEntityInferiors = value; - } - - public void setAfterLoadTextureOfEntitySuperiors(String[] value) - { - afterLoadTextureOfEntitySuperiors = value; - } - - public void setAfterLoadTextureOfEntityInferiors(String[] value) - { - afterLoadTextureOfEntityInferiors = value; - } - - public String[] getBeforePassSpecialRenderSuperiors() - { - return beforePassSpecialRenderSuperiors; - } - - public String[] getBeforePassSpecialRenderInferiors() - { - return beforePassSpecialRenderInferiors; - } - - public String[] getOverridePassSpecialRenderSuperiors() - { - return overridePassSpecialRenderSuperiors; - } - - public String[] getOverridePassSpecialRenderInferiors() - { - return overridePassSpecialRenderInferiors; - } - - public String[] getAfterPassSpecialRenderSuperiors() - { - return afterPassSpecialRenderSuperiors; - } - - public String[] getAfterPassSpecialRenderInferiors() - { - return afterPassSpecialRenderInferiors; - } - - public void setBeforePassSpecialRenderSuperiors(String[] value) - { - beforePassSpecialRenderSuperiors = value; - } - - public void setBeforePassSpecialRenderInferiors(String[] value) - { - beforePassSpecialRenderInferiors = value; - } - - public void setOverridePassSpecialRenderSuperiors(String[] value) - { - overridePassSpecialRenderSuperiors = value; - } - - public void setOverridePassSpecialRenderInferiors(String[] value) - { - overridePassSpecialRenderInferiors = value; - } - - public void setAfterPassSpecialRenderSuperiors(String[] value) - { - afterPassSpecialRenderSuperiors = value; - } - - public void setAfterPassSpecialRenderInferiors(String[] value) - { - afterPassSpecialRenderInferiors = value; - } - - public String[] getBeforePerformStaticEntityRebuildSuperiors() - { - return beforePerformStaticEntityRebuildSuperiors; - } - - public String[] getBeforePerformStaticEntityRebuildInferiors() - { - return beforePerformStaticEntityRebuildInferiors; - } - - public String[] getOverridePerformStaticEntityRebuildSuperiors() - { - return overridePerformStaticEntityRebuildSuperiors; - } - - public String[] getOverridePerformStaticEntityRebuildInferiors() - { - return overridePerformStaticEntityRebuildInferiors; - } - - public String[] getAfterPerformStaticEntityRebuildSuperiors() - { - return afterPerformStaticEntityRebuildSuperiors; - } - - public String[] getAfterPerformStaticEntityRebuildInferiors() - { - return afterPerformStaticEntityRebuildInferiors; - } - - public void setBeforePerformStaticEntityRebuildSuperiors(String[] value) - { - beforePerformStaticEntityRebuildSuperiors = value; - } - - public void setBeforePerformStaticEntityRebuildInferiors(String[] value) - { - beforePerformStaticEntityRebuildInferiors = value; - } - - public void setOverridePerformStaticEntityRebuildSuperiors(String[] value) - { - overridePerformStaticEntityRebuildSuperiors = value; - } - - public void setOverridePerformStaticEntityRebuildInferiors(String[] value) - { - overridePerformStaticEntityRebuildInferiors = value; - } - - public void setAfterPerformStaticEntityRebuildSuperiors(String[] value) - { - afterPerformStaticEntityRebuildSuperiors = value; - } - - public void setAfterPerformStaticEntityRebuildInferiors(String[] value) - { - afterPerformStaticEntityRebuildInferiors = value; - } - - public String[] getBeforeRenderArrowsStuckInEntitySuperiors() - { - return beforeRenderArrowsStuckInEntitySuperiors; - } - - public String[] getBeforeRenderArrowsStuckInEntityInferiors() - { - return beforeRenderArrowsStuckInEntityInferiors; - } - - public String[] getOverrideRenderArrowsStuckInEntitySuperiors() - { - return overrideRenderArrowsStuckInEntitySuperiors; - } - - public String[] getOverrideRenderArrowsStuckInEntityInferiors() - { - return overrideRenderArrowsStuckInEntityInferiors; - } - - public String[] getAfterRenderArrowsStuckInEntitySuperiors() - { - return afterRenderArrowsStuckInEntitySuperiors; - } - - public String[] getAfterRenderArrowsStuckInEntityInferiors() - { - return afterRenderArrowsStuckInEntityInferiors; - } - - public void setBeforeRenderArrowsStuckInEntitySuperiors(String[] value) - { - beforeRenderArrowsStuckInEntitySuperiors = value; - } - - public void setBeforeRenderArrowsStuckInEntityInferiors(String[] value) - { - beforeRenderArrowsStuckInEntityInferiors = value; - } - - public void setOverrideRenderArrowsStuckInEntitySuperiors(String[] value) - { - overrideRenderArrowsStuckInEntitySuperiors = value; - } - - public void setOverrideRenderArrowsStuckInEntityInferiors(String[] value) - { - overrideRenderArrowsStuckInEntityInferiors = value; - } - - public void setAfterRenderArrowsStuckInEntitySuperiors(String[] value) - { - afterRenderArrowsStuckInEntitySuperiors = value; - } - - public void setAfterRenderArrowsStuckInEntityInferiors(String[] value) - { - afterRenderArrowsStuckInEntityInferiors = value; - } - - public String[] getBeforeRenderFirstPersonArmSuperiors() - { - return beforeRenderFirstPersonArmSuperiors; - } - - public String[] getBeforeRenderFirstPersonArmInferiors() - { - return beforeRenderFirstPersonArmInferiors; - } - - public String[] getOverrideRenderFirstPersonArmSuperiors() - { - return overrideRenderFirstPersonArmSuperiors; - } - - public String[] getOverrideRenderFirstPersonArmInferiors() - { - return overrideRenderFirstPersonArmInferiors; - } - - public String[] getAfterRenderFirstPersonArmSuperiors() - { - return afterRenderFirstPersonArmSuperiors; - } - - public String[] getAfterRenderFirstPersonArmInferiors() - { - return afterRenderFirstPersonArmInferiors; - } - - public void setBeforeRenderFirstPersonArmSuperiors(String[] value) - { - beforeRenderFirstPersonArmSuperiors = value; - } - - public void setBeforeRenderFirstPersonArmInferiors(String[] value) - { - beforeRenderFirstPersonArmInferiors = value; - } - - public void setOverrideRenderFirstPersonArmSuperiors(String[] value) - { - overrideRenderFirstPersonArmSuperiors = value; - } - - public void setOverrideRenderFirstPersonArmInferiors(String[] value) - { - overrideRenderFirstPersonArmInferiors = value; - } - - public void setAfterRenderFirstPersonArmSuperiors(String[] value) - { - afterRenderFirstPersonArmSuperiors = value; - } - - public void setAfterRenderFirstPersonArmInferiors(String[] value) - { - afterRenderFirstPersonArmInferiors = value; - } - - public String[] getBeforeRenderLivingLabelSuperiors() - { - return beforeRenderLivingLabelSuperiors; - } - - public String[] getBeforeRenderLivingLabelInferiors() - { - return beforeRenderLivingLabelInferiors; - } - - public String[] getOverrideRenderLivingLabelSuperiors() - { - return overrideRenderLivingLabelSuperiors; - } - - public String[] getOverrideRenderLivingLabelInferiors() - { - return overrideRenderLivingLabelInferiors; - } - - public String[] getAfterRenderLivingLabelSuperiors() - { - return afterRenderLivingLabelSuperiors; - } - - public String[] getAfterRenderLivingLabelInferiors() - { - return afterRenderLivingLabelInferiors; - } - - public void setBeforeRenderLivingLabelSuperiors(String[] value) - { - beforeRenderLivingLabelSuperiors = value; - } - - public void setBeforeRenderLivingLabelInferiors(String[] value) - { - beforeRenderLivingLabelInferiors = value; - } - - public void setOverrideRenderLivingLabelSuperiors(String[] value) - { - overrideRenderLivingLabelSuperiors = value; - } - - public void setOverrideRenderLivingLabelInferiors(String[] value) - { - overrideRenderLivingLabelInferiors = value; - } - - public void setAfterRenderLivingLabelSuperiors(String[] value) - { - afterRenderLivingLabelSuperiors = value; - } - - public void setAfterRenderLivingLabelInferiors(String[] value) - { - afterRenderLivingLabelInferiors = value; - } - - public String[] getBeforeRenderModelSuperiors() - { - return beforeRenderModelSuperiors; - } - - public String[] getBeforeRenderModelInferiors() - { - return beforeRenderModelInferiors; - } - - public String[] getOverrideRenderModelSuperiors() - { - return overrideRenderModelSuperiors; - } - - public String[] getOverrideRenderModelInferiors() - { - return overrideRenderModelInferiors; - } - - public String[] getAfterRenderModelSuperiors() - { - return afterRenderModelSuperiors; - } - - public String[] getAfterRenderModelInferiors() - { - return afterRenderModelInferiors; - } - - public void setBeforeRenderModelSuperiors(String[] value) - { - beforeRenderModelSuperiors = value; - } - - public void setBeforeRenderModelInferiors(String[] value) - { - beforeRenderModelInferiors = value; - } - - public void setOverrideRenderModelSuperiors(String[] value) - { - overrideRenderModelSuperiors = value; - } - - public void setOverrideRenderModelInferiors(String[] value) - { - overrideRenderModelInferiors = value; - } - - public void setAfterRenderModelSuperiors(String[] value) - { - afterRenderModelSuperiors = value; - } - - public void setAfterRenderModelInferiors(String[] value) - { - afterRenderModelInferiors = value; - } - - public String[] getBeforeRenderPlayerSuperiors() - { - return beforeRenderPlayerSuperiors; - } - - public String[] getBeforeRenderPlayerInferiors() - { - return beforeRenderPlayerInferiors; - } - - public String[] getOverrideRenderPlayerSuperiors() - { - return overrideRenderPlayerSuperiors; - } - - public String[] getOverrideRenderPlayerInferiors() - { - return overrideRenderPlayerInferiors; - } - - public String[] getAfterRenderPlayerSuperiors() - { - return afterRenderPlayerSuperiors; - } - - public String[] getAfterRenderPlayerInferiors() - { - return afterRenderPlayerInferiors; - } - - public void setBeforeRenderPlayerSuperiors(String[] value) - { - beforeRenderPlayerSuperiors = value; - } - - public void setBeforeRenderPlayerInferiors(String[] value) - { - beforeRenderPlayerInferiors = value; - } - - public void setOverrideRenderPlayerSuperiors(String[] value) - { - overrideRenderPlayerSuperiors = value; - } - - public void setOverrideRenderPlayerInferiors(String[] value) - { - overrideRenderPlayerInferiors = value; - } - - public void setAfterRenderPlayerSuperiors(String[] value) - { - afterRenderPlayerSuperiors = value; - } - - public void setAfterRenderPlayerInferiors(String[] value) - { - afterRenderPlayerInferiors = value; - } - - public String[] getBeforeRenderPlayerNameAndScoreLabelSuperiors() - { - return beforeRenderPlayerNameAndScoreLabelSuperiors; - } - - public String[] getBeforeRenderPlayerNameAndScoreLabelInferiors() - { - return beforeRenderPlayerNameAndScoreLabelInferiors; - } - - public String[] getOverrideRenderPlayerNameAndScoreLabelSuperiors() - { - return overrideRenderPlayerNameAndScoreLabelSuperiors; - } - - public String[] getOverrideRenderPlayerNameAndScoreLabelInferiors() - { - return overrideRenderPlayerNameAndScoreLabelInferiors; - } - - public String[] getAfterRenderPlayerNameAndScoreLabelSuperiors() - { - return afterRenderPlayerNameAndScoreLabelSuperiors; - } - - public String[] getAfterRenderPlayerNameAndScoreLabelInferiors() - { - return afterRenderPlayerNameAndScoreLabelInferiors; - } - - public void setBeforeRenderPlayerNameAndScoreLabelSuperiors(String[] value) - { - beforeRenderPlayerNameAndScoreLabelSuperiors = value; - } - - public void setBeforeRenderPlayerNameAndScoreLabelInferiors(String[] value) - { - beforeRenderPlayerNameAndScoreLabelInferiors = value; - } - - public void setOverrideRenderPlayerNameAndScoreLabelSuperiors(String[] value) - { - overrideRenderPlayerNameAndScoreLabelSuperiors = value; - } - - public void setOverrideRenderPlayerNameAndScoreLabelInferiors(String[] value) - { - overrideRenderPlayerNameAndScoreLabelInferiors = value; - } - - public void setAfterRenderPlayerNameAndScoreLabelSuperiors(String[] value) - { - afterRenderPlayerNameAndScoreLabelSuperiors = value; - } - - public void setAfterRenderPlayerNameAndScoreLabelInferiors(String[] value) - { - afterRenderPlayerNameAndScoreLabelInferiors = value; - } - - public String[] getBeforeRenderPlayerScaleSuperiors() - { - return beforeRenderPlayerScaleSuperiors; - } - - public String[] getBeforeRenderPlayerScaleInferiors() - { - return beforeRenderPlayerScaleInferiors; - } - - public String[] getOverrideRenderPlayerScaleSuperiors() - { - return overrideRenderPlayerScaleSuperiors; - } - - public String[] getOverrideRenderPlayerScaleInferiors() - { - return overrideRenderPlayerScaleInferiors; - } - - public String[] getAfterRenderPlayerScaleSuperiors() - { - return afterRenderPlayerScaleSuperiors; - } - - public String[] getAfterRenderPlayerScaleInferiors() - { - return afterRenderPlayerScaleInferiors; - } - - public void setBeforeRenderPlayerScaleSuperiors(String[] value) - { - beforeRenderPlayerScaleSuperiors = value; - } - - public void setBeforeRenderPlayerScaleInferiors(String[] value) - { - beforeRenderPlayerScaleInferiors = value; - } - - public void setOverrideRenderPlayerScaleSuperiors(String[] value) - { - overrideRenderPlayerScaleSuperiors = value; - } - - public void setOverrideRenderPlayerScaleInferiors(String[] value) - { - overrideRenderPlayerScaleInferiors = value; - } - - public void setAfterRenderPlayerScaleSuperiors(String[] value) - { - afterRenderPlayerScaleSuperiors = value; - } - - public void setAfterRenderPlayerScaleInferiors(String[] value) - { - afterRenderPlayerScaleInferiors = value; - } - - public String[] getBeforeRenderPlayerSleepSuperiors() - { - return beforeRenderPlayerSleepSuperiors; - } - - public String[] getBeforeRenderPlayerSleepInferiors() - { - return beforeRenderPlayerSleepInferiors; - } - - public String[] getOverrideRenderPlayerSleepSuperiors() - { - return overrideRenderPlayerSleepSuperiors; - } - - public String[] getOverrideRenderPlayerSleepInferiors() - { - return overrideRenderPlayerSleepInferiors; - } - - public String[] getAfterRenderPlayerSleepSuperiors() - { - return afterRenderPlayerSleepSuperiors; - } - - public String[] getAfterRenderPlayerSleepInferiors() - { - return afterRenderPlayerSleepInferiors; - } - - public void setBeforeRenderPlayerSleepSuperiors(String[] value) - { - beforeRenderPlayerSleepSuperiors = value; - } - - public void setBeforeRenderPlayerSleepInferiors(String[] value) - { - beforeRenderPlayerSleepInferiors = value; - } - - public void setOverrideRenderPlayerSleepSuperiors(String[] value) - { - overrideRenderPlayerSleepSuperiors = value; - } - - public void setOverrideRenderPlayerSleepInferiors(String[] value) - { - overrideRenderPlayerSleepInferiors = value; - } - - public void setAfterRenderPlayerSleepSuperiors(String[] value) - { - afterRenderPlayerSleepSuperiors = value; - } - - public void setAfterRenderPlayerSleepInferiors(String[] value) - { - afterRenderPlayerSleepInferiors = value; - } - - public String[] getBeforeRenderSpecialsSuperiors() - { - return beforeRenderSpecialsSuperiors; - } - - public String[] getBeforeRenderSpecialsInferiors() - { - return beforeRenderSpecialsInferiors; - } - - public String[] getOverrideRenderSpecialsSuperiors() - { - return overrideRenderSpecialsSuperiors; - } - - public String[] getOverrideRenderSpecialsInferiors() - { - return overrideRenderSpecialsInferiors; - } - - public String[] getAfterRenderSpecialsSuperiors() - { - return afterRenderSpecialsSuperiors; - } - - public String[] getAfterRenderSpecialsInferiors() - { - return afterRenderSpecialsInferiors; - } - - public void setBeforeRenderSpecialsSuperiors(String[] value) - { - beforeRenderSpecialsSuperiors = value; - } - - public void setBeforeRenderSpecialsInferiors(String[] value) - { - beforeRenderSpecialsInferiors = value; - } - - public void setOverrideRenderSpecialsSuperiors(String[] value) - { - overrideRenderSpecialsSuperiors = value; - } - - public void setOverrideRenderSpecialsInferiors(String[] value) - { - overrideRenderSpecialsInferiors = value; - } - - public void setAfterRenderSpecialsSuperiors(String[] value) - { - afterRenderSpecialsSuperiors = value; - } - - public void setAfterRenderSpecialsInferiors(String[] value) - { - afterRenderSpecialsInferiors = value; - } - - public String[] getBeforeRenderSwingProgressSuperiors() - { - return beforeRenderSwingProgressSuperiors; - } - - public String[] getBeforeRenderSwingProgressInferiors() - { - return beforeRenderSwingProgressInferiors; - } - - public String[] getOverrideRenderSwingProgressSuperiors() - { - return overrideRenderSwingProgressSuperiors; - } - - public String[] getOverrideRenderSwingProgressInferiors() - { - return overrideRenderSwingProgressInferiors; - } - - public String[] getAfterRenderSwingProgressSuperiors() - { - return afterRenderSwingProgressSuperiors; - } - - public String[] getAfterRenderSwingProgressInferiors() - { - return afterRenderSwingProgressInferiors; - } - - public void setBeforeRenderSwingProgressSuperiors(String[] value) - { - beforeRenderSwingProgressSuperiors = value; - } - - public void setBeforeRenderSwingProgressInferiors(String[] value) - { - beforeRenderSwingProgressInferiors = value; - } - - public void setOverrideRenderSwingProgressSuperiors(String[] value) - { - overrideRenderSwingProgressSuperiors = value; - } - - public void setOverrideRenderSwingProgressInferiors(String[] value) - { - overrideRenderSwingProgressInferiors = value; - } - - public void setAfterRenderSwingProgressSuperiors(String[] value) - { - afterRenderSwingProgressSuperiors = value; - } - - public void setAfterRenderSwingProgressInferiors(String[] value) - { - afterRenderSwingProgressInferiors = value; - } - - public String[] getBeforeRotatePlayerSuperiors() - { - return beforeRotatePlayerSuperiors; - } - - public String[] getBeforeRotatePlayerInferiors() - { - return beforeRotatePlayerInferiors; - } - - public String[] getOverrideRotatePlayerSuperiors() - { - return overrideRotatePlayerSuperiors; - } - - public String[] getOverrideRotatePlayerInferiors() - { - return overrideRotatePlayerInferiors; - } - - public String[] getAfterRotatePlayerSuperiors() - { - return afterRotatePlayerSuperiors; - } - - public String[] getAfterRotatePlayerInferiors() - { - return afterRotatePlayerInferiors; - } - - public void setBeforeRotatePlayerSuperiors(String[] value) - { - beforeRotatePlayerSuperiors = value; - } - - public void setBeforeRotatePlayerInferiors(String[] value) - { - beforeRotatePlayerInferiors = value; - } - - public void setOverrideRotatePlayerSuperiors(String[] value) - { - overrideRotatePlayerSuperiors = value; - } - - public void setOverrideRotatePlayerInferiors(String[] value) - { - overrideRotatePlayerInferiors = value; - } - - public void setAfterRotatePlayerSuperiors(String[] value) - { - afterRotatePlayerSuperiors = value; - } - - public void setAfterRotatePlayerInferiors(String[] value) - { - afterRotatePlayerInferiors = value; - } - - public String[] getBeforeSetArmorModelSuperiors() - { - return beforeSetArmorModelSuperiors; - } - - public String[] getBeforeSetArmorModelInferiors() - { - return beforeSetArmorModelInferiors; - } - - public String[] getOverrideSetArmorModelSuperiors() - { - return overrideSetArmorModelSuperiors; - } - - public String[] getOverrideSetArmorModelInferiors() - { - return overrideSetArmorModelInferiors; - } - - public String[] getAfterSetArmorModelSuperiors() - { - return afterSetArmorModelSuperiors; - } - - public String[] getAfterSetArmorModelInferiors() - { - return afterSetArmorModelInferiors; - } - - public void setBeforeSetArmorModelSuperiors(String[] value) - { - beforeSetArmorModelSuperiors = value; - } - - public void setBeforeSetArmorModelInferiors(String[] value) - { - beforeSetArmorModelInferiors = value; - } - - public void setOverrideSetArmorModelSuperiors(String[] value) - { - overrideSetArmorModelSuperiors = value; - } - - public void setOverrideSetArmorModelInferiors(String[] value) - { - overrideSetArmorModelInferiors = value; - } - - public void setAfterSetArmorModelSuperiors(String[] value) - { - afterSetArmorModelSuperiors = value; - } - - public void setAfterSetArmorModelInferiors(String[] value) - { - afterSetArmorModelInferiors = value; - } - - public String[] getBeforeSetPassArmorModelSuperiors() - { - return beforeSetPassArmorModelSuperiors; - } - - public String[] getBeforeSetPassArmorModelInferiors() - { - return beforeSetPassArmorModelInferiors; - } - - public String[] getOverrideSetPassArmorModelSuperiors() - { - return overrideSetPassArmorModelSuperiors; - } - - public String[] getOverrideSetPassArmorModelInferiors() - { - return overrideSetPassArmorModelInferiors; - } - - public String[] getAfterSetPassArmorModelSuperiors() - { - return afterSetPassArmorModelSuperiors; - } - - public String[] getAfterSetPassArmorModelInferiors() - { - return afterSetPassArmorModelInferiors; - } - - public void setBeforeSetPassArmorModelSuperiors(String[] value) - { - beforeSetPassArmorModelSuperiors = value; - } - - public void setBeforeSetPassArmorModelInferiors(String[] value) - { - beforeSetPassArmorModelInferiors = value; - } - - public void setOverrideSetPassArmorModelSuperiors(String[] value) - { - overrideSetPassArmorModelSuperiors = value; - } - - public void setOverrideSetPassArmorModelInferiors(String[] value) - { - overrideSetPassArmorModelInferiors = value; - } - - public void setAfterSetPassArmorModelSuperiors(String[] value) - { - afterSetPassArmorModelSuperiors = value; - } - - public void setAfterSetPassArmorModelInferiors(String[] value) - { - afterSetPassArmorModelInferiors = value; - } - - public String[] getBeforeSetRenderManagerSuperiors() - { - return beforeSetRenderManagerSuperiors; - } - - public String[] getBeforeSetRenderManagerInferiors() - { - return beforeSetRenderManagerInferiors; - } - - public String[] getOverrideSetRenderManagerSuperiors() - { - return overrideSetRenderManagerSuperiors; - } - - public String[] getOverrideSetRenderManagerInferiors() - { - return overrideSetRenderManagerInferiors; - } - - public String[] getAfterSetRenderManagerSuperiors() - { - return afterSetRenderManagerSuperiors; - } - - public String[] getAfterSetRenderManagerInferiors() - { - return afterSetRenderManagerInferiors; - } - - public void setBeforeSetRenderManagerSuperiors(String[] value) - { - beforeSetRenderManagerSuperiors = value; - } - - public void setBeforeSetRenderManagerInferiors(String[] value) - { - beforeSetRenderManagerInferiors = value; - } - - public void setOverrideSetRenderManagerSuperiors(String[] value) - { - overrideSetRenderManagerSuperiors = value; - } - - public void setOverrideSetRenderManagerInferiors(String[] value) - { - overrideSetRenderManagerInferiors = value; - } - - public void setAfterSetRenderManagerSuperiors(String[] value) - { - afterSetRenderManagerSuperiors = value; - } - - public void setAfterSetRenderManagerInferiors(String[] value) - { - afterSetRenderManagerInferiors = value; - } - - public String[] getBeforeSetRenderPassModelSuperiors() - { - return beforeSetRenderPassModelSuperiors; - } - - public String[] getBeforeSetRenderPassModelInferiors() - { - return beforeSetRenderPassModelInferiors; - } - - public String[] getOverrideSetRenderPassModelSuperiors() - { - return overrideSetRenderPassModelSuperiors; - } - - public String[] getOverrideSetRenderPassModelInferiors() - { - return overrideSetRenderPassModelInferiors; - } - - public String[] getAfterSetRenderPassModelSuperiors() - { - return afterSetRenderPassModelSuperiors; - } - - public String[] getAfterSetRenderPassModelInferiors() - { - return afterSetRenderPassModelInferiors; - } - - public void setBeforeSetRenderPassModelSuperiors(String[] value) - { - beforeSetRenderPassModelSuperiors = value; - } - - public void setBeforeSetRenderPassModelInferiors(String[] value) - { - beforeSetRenderPassModelInferiors = value; - } - - public void setOverrideSetRenderPassModelSuperiors(String[] value) - { - overrideSetRenderPassModelSuperiors = value; - } - - public void setOverrideSetRenderPassModelInferiors(String[] value) - { - overrideSetRenderPassModelInferiors = value; - } - - public void setAfterSetRenderPassModelSuperiors(String[] value) - { - afterSetRenderPassModelSuperiors = value; - } - - public void setAfterSetRenderPassModelInferiors(String[] value) - { - afterSetRenderPassModelInferiors = value; - } - - public String[] getBeforeUpdateIconsSuperiors() - { - return beforeUpdateIconsSuperiors; - } - - public String[] getBeforeUpdateIconsInferiors() - { - return beforeUpdateIconsInferiors; - } - - public String[] getOverrideUpdateIconsSuperiors() - { - return overrideUpdateIconsSuperiors; - } - - public String[] getOverrideUpdateIconsInferiors() - { - return overrideUpdateIconsInferiors; - } - - public String[] getAfterUpdateIconsSuperiors() - { - return afterUpdateIconsSuperiors; - } - - public String[] getAfterUpdateIconsInferiors() - { - return afterUpdateIconsInferiors; - } - - public void setBeforeUpdateIconsSuperiors(String[] value) - { - beforeUpdateIconsSuperiors = value; - } - - public void setBeforeUpdateIconsInferiors(String[] value) - { - beforeUpdateIconsInferiors = value; - } - - public void setOverrideUpdateIconsSuperiors(String[] value) - { - overrideUpdateIconsSuperiors = value; - } - - public void setOverrideUpdateIconsInferiors(String[] value) - { - overrideUpdateIconsInferiors = value; - } - - public void setAfterUpdateIconsSuperiors(String[] value) - { - afterUpdateIconsSuperiors = value; - } - - public void setAfterUpdateIconsInferiors(String[] value) - { - afterUpdateIconsInferiors = value; - } - -} diff --git a/src/main/java/api/player/render/RenderPlayerClassVisitor.java b/src/main/java/api/player/render/RenderPlayerClassVisitor.java deleted file mode 100644 index bd34b932..00000000 --- a/src/main/java/api/player/render/RenderPlayerClassVisitor.java +++ /dev/null @@ -1,1634 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -import java.io.*; -import java.util.*; - -import org.objectweb.asm.*; - -public final class RenderPlayerClassVisitor extends ClassVisitor -{ - public static final String targetClassName = "net.minecraft.client.renderer.entity.RenderPlayer"; - - private boolean hadLocalDoRenderLabel; - private boolean hadLocalDoRenderShadowAndFire; - private boolean hadLocalGetColorMultiplier; - private boolean hadLocalGetDeathMaxRotation; - private boolean hadLocalGetFontRendererFromRenderManager; - private boolean hadLocalGetResourceLocationFromPlayer; - private boolean hadLocalHandleRotationFloat; - private boolean hadLocalInheritRenderPass; - private boolean hadLocalLoadTexture; - private boolean hadLocalLoadTextureOfEntity; - private boolean hadLocalPassSpecialRender; - private boolean hadLocalPerformStaticEntityRebuild; - private boolean hadLocalRenderArrowsStuckInEntity; - private boolean hadLocalRenderFirstPersonArm; - private boolean hadLocalRenderLivingLabel; - private boolean hadLocalRenderModel; - private boolean hadLocalRenderPlayer; - private boolean hadLocalRenderPlayerNameAndScoreLabel; - private boolean hadLocalRenderPlayerScale; - private boolean hadLocalRenderPlayerSleep; - private boolean hadLocalRenderSpecials; - private boolean hadLocalRenderSwingProgress; - private boolean hadLocalRotatePlayer; - private boolean hadLocalSetArmorModel; - private boolean hadLocalSetPassArmorModel; - private boolean hadLocalSetRenderManager; - private boolean hadLocalSetRenderPassModel; - private boolean hadLocalUpdateIcons; - - public static byte[] transform(byte[] bytes, boolean isObfuscated, Map> constructorReplacements) - { - try - { - ByteArrayInputStream in = new ByteArrayInputStream(bytes); - ClassReader cr = new ClassReader(in); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - RenderPlayerClassVisitor p = new RenderPlayerClassVisitor(cw, isObfuscated, constructorReplacements); - - cr.accept(p, 0); - - byte[] result = cw.toByteArray(); - in.close(); - return result; - } - catch(IOException ioe) - { - throw new RuntimeException(ioe); - } - } - - private final boolean isObfuscated; - private final Map> constructorReplacements; - - public RenderPlayerClassVisitor(ClassVisitor classVisitor, boolean isObfuscated, Map> constructorReplacements) - { - super(262144, classVisitor); - this.isObfuscated = isObfuscated; - this.constructorReplacements = constructorReplacements; - } - - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - { - String[] newInterfaces = new String[interfaces.length + 1]; - for(int i=0; i")) - return new RenderPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated, constructorReplacements); - - if(name.equals(isObfuscated ? "b" : "func_110813_b") && desc.equals(isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z")) - { - hadLocalDoRenderLabel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDoRenderLabel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "doRenderShadowAndFire") && desc.equals(isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V")) - { - hadLocalDoRenderShadowAndFire = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDoRenderShadowAndFire", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getColorMultiplier") && desc.equals(isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I")) - { - hadLocalGetColorMultiplier = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetColorMultiplier", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getDeathMaxRotation") && desc.equals(isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F")) - { - hadLocalGetDeathMaxRotation = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDeathMaxRotation", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "c" : "getFontRendererFromRenderManager") && desc.equals(isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;")) - { - hadLocalGetFontRendererFromRenderManager = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetFontRendererFromRenderManager", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getEntityTexture") && desc.equals(isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;")) - { - hadLocalGetResourceLocationFromPlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetResourceLocationFromPlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "handleRotationFloat") && desc.equals(isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F")) - { - hadLocalHandleRotationFloat = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleRotationFloat", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "inheritRenderPass") && desc.equals(isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I")) - { - hadLocalInheritRenderPass = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localInheritRenderPass", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "bindTexture") && desc.equals(isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V")) - { - hadLocalLoadTexture = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localLoadTexture", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "bindEntityTexture") && desc.equals(isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V")) - { - hadLocalLoadTextureOfEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localLoadTextureOfEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "passSpecialRender") && desc.equals(isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V")) - { - hadLocalPassSpecialRender = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPassSpecialRender", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "isStaticEntity") && desc.equals("()Z")) - { - hadLocalPerformStaticEntityRebuild = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPerformStaticEntityRebuild", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "renderArrowsStuckInEntity") && desc.equals(isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V")) - { - hadLocalRenderArrowsStuckInEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderArrowsStuckInEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "renderFirstPersonArm") && desc.equals(isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V")) - { - hadLocalRenderFirstPersonArm = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderFirstPersonArm", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_147906_a") && desc.equals(isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V")) - { - hadLocalRenderLivingLabel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderLivingLabel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "renderModel") && desc.equals(isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V")) - { - hadLocalRenderModel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderModel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "doRender") && desc.equals(isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V")) - { - hadLocalRenderPlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_96449_a") && desc.equals(isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V")) - { - hadLocalRenderPlayerNameAndScoreLabel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerNameAndScoreLabel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "preRenderCallback") && desc.equals(isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V")) - { - hadLocalRenderPlayerScale = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerScale", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "renderLivingAt") && desc.equals(isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V")) - { - hadLocalRenderPlayerSleep = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerSleep", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "renderEquippedItems") && desc.equals(isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V")) - { - hadLocalRenderSpecials = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderSpecials", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "renderSwingProgress") && desc.equals(isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F")) - { - hadLocalRenderSwingProgress = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderSwingProgress", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "rotateCorpse") && desc.equals(isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V")) - { - hadLocalRotatePlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRotatePlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "shouldRenderPass") && desc.equals(isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I")) - { - hadLocalSetArmorModel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetArmorModel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "func_82408_c") && desc.equals(isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V")) - { - hadLocalSetPassArmorModel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPassArmorModel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setRenderManager") && desc.equals(isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V")) - { - hadLocalSetRenderManager = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetRenderManager", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setRenderPassModel") && desc.equals(isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V")) - { - hadLocalSetRenderPassModel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetRenderPassModel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "updateIcons") && desc.equals(isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V")) - { - hadLocalUpdateIcons = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateIcons", desc, signature, exceptions); - } - - return super.visitMethod(access, name, desc, signature, exceptions); - } - - public void visitEnd() - { - MethodVisitor mv; - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "func_110813_b", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "doRenderLabel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;" : "Lnet/minecraft/entity/EntityLivingBase;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDoRenderLabel", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "func_110813_b", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDoRenderLabel", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "func_110813_b", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDoRenderLabel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDoRenderLabel", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "func_110813_b", "" + (isObfuscated ? "(Lsv;)Z" : "(Lnet/minecraft/entity/EntityLivingBase;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "doRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "doRenderShadowAndFire", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsa;DDDFF" : "Lnet/minecraft/entity/Entity;DDDFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDoRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "doRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDoRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "doRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDoRenderShadowAndFire) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDoRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "doRenderShadowAndFire", "" + (isObfuscated ? "(Lsa;DDDFF)V" : "(Lnet/minecraft/entity/Entity;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getColorMultiplier", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;FF" : "Lnet/minecraft/entity/EntityLivingBase;FF") + ")I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "getColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetColorMultiplier) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getColorMultiplier", "" + (isObfuscated ? "(Lsv;FF)I" : "(Lnet/minecraft/entity/EntityLivingBase;FF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getDeathMaxRotation", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;" : "Lnet/minecraft/entity/EntityLivingBase;") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "getDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetDeathMaxRotation) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getDeathMaxRotation", "" + (isObfuscated ? "(Lsv;)F" : "(Lnet/minecraft/entity/EntityLivingBase;)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "c" : "getFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getFontRendererFromRenderManager", "(Lapi/player/render/IRenderPlayerAPI;)" + (isObfuscated ? "Lbbu;" : "Lnet/minecraft/client/gui/FontRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "c" : "getFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "c" : "getFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetFontRendererFromRenderManager) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "c" : "getFontRendererFromRenderManager", "" + (isObfuscated ? "()Lbbu;" : "()Lnet/minecraft/client/gui/FontRenderer;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getEntityTexture", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getResourceLocationFromPlayer", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;" : "Lnet/minecraft/client/entity/AbstractClientPlayer;") + ")" + (isObfuscated ? "Lbqx;" : "Lnet/minecraft/util/ResourceLocation;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetResourceLocationFromPlayer", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "getEntityTexture", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetResourceLocationFromPlayer", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getEntityTexture", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetResourceLocationFromPlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetResourceLocationFromPlayer", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "getEntityTexture", "" + (isObfuscated ? "(Lblg;)Lbqx;" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "handleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "handleRotationFloat", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;F" : "Lnet/minecraft/entity/EntityLivingBase;F") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realHandleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "handleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superHandleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "handleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalHandleRotationFloat) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHandleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "handleRotationFloat", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "inheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "inheritRenderPass", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;IF" : "Lnet/minecraft/entity/EntityLivingBase;IF") + ")I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realInheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "inheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superInheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "inheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalInheritRenderPass) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localInheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "inheritRenderPass", "" + (isObfuscated ? "(Lsv;IF)I" : "(Lnet/minecraft/entity/EntityLivingBase;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "bindTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "loadTexture", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lbqx;" : "Lnet/minecraft/util/ResourceLocation;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realLoadTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "bindTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superLoadTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "bindTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalLoadTexture) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localLoadTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "bindTexture", "" + (isObfuscated ? "(Lbqx;)V" : "(Lnet/minecraft/util/ResourceLocation;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "bindEntityTexture", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "loadTextureOfEntity", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realLoadTextureOfEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "bindEntityTexture", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superLoadTextureOfEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "bindEntityTexture", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalLoadTextureOfEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localLoadTextureOfEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "bindEntityTexture", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "passSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "passSpecialRender", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;DDD" : "Lnet/minecraft/entity/EntityLivingBase;DDD") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realPassSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "passSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superPassSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "passSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalPassSpecialRender) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPassSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "passSpecialRender", "" + (isObfuscated ? "(Lsv;DDD)V" : "(Lnet/minecraft/entity/EntityLivingBase;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "isStaticEntity", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "performStaticEntityRebuild", "(Lapi/player/render/IRenderPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realPerformStaticEntityRebuild", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "isStaticEntity", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superPerformStaticEntityRebuild", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "isStaticEntity", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalPerformStaticEntityRebuild) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localPerformStaticEntityRebuild", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "isStaticEntity", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "renderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderArrowsStuckInEntity", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;F" : "Lnet/minecraft/entity/EntityLivingBase;F") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "e" : "renderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "e" : "renderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderArrowsStuckInEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "e" : "renderArrowsStuckInEntity", "" + (isObfuscated ? "(Lsv;F)V" : "(Lnet/minecraft/entity/EntityLivingBase;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "renderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderFirstPersonArm", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lyz;" : "Lnet/minecraft/entity/player/EntityPlayer;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "renderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderFirstPersonArm) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderFirstPersonArm", "" + (isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_147906_a", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.DLOAD, 7); - mv.visitVarInsn(Opcodes.ILOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderLivingLabel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsa;Ljava/lang/String;DDDI" : "Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderLivingLabel", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.DLOAD, 7); - mv.visitVarInsn(Opcodes.ILOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "func_147906_a", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderLivingLabel", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.DLOAD, 7); - mv.visitVarInsn(Opcodes.ILOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "func_147906_a", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderLivingLabel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderLivingLabel", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitVarInsn(Opcodes.DLOAD, 7); - mv.visitVarInsn(Opcodes.ILOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "func_147906_a", "" + (isObfuscated ? "(Lsa;Ljava/lang/String;DDDI)V" : "(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "renderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderModel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;FFFFFF" : "Lnet/minecraft/entity/EntityLivingBase;FFFFFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "renderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderModel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitVarInsn(Opcodes.FLOAD, 5); - mv.visitVarInsn(Opcodes.FLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 7); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderModel", "" + (isObfuscated ? "(Lsv;FFFFFF)V" : "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "doRender", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderPlayer", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;DDDFF" : "Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderPlayer", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "doRender", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderPlayer", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "doRender", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderPlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayer", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.FLOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "doRender", "" + (isObfuscated ? "(Lblg;DDDFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_96449_a", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitVarInsn(Opcodes.DLOAD, 10); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderPlayerNameAndScoreLabel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;DDDLjava/lang/String;FD" : "Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderPlayerNameAndScoreLabel", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitVarInsn(Opcodes.DLOAD, 10); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "func_96449_a", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderPlayerNameAndScoreLabel", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitVarInsn(Opcodes.DLOAD, 10); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "func_96449_a", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderPlayerNameAndScoreLabel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerNameAndScoreLabel", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitVarInsn(Opcodes.ALOAD, 8); - mv.visitVarInsn(Opcodes.FLOAD, 9); - mv.visitVarInsn(Opcodes.DLOAD, 10); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "func_96449_a", "" + (isObfuscated ? "(Lblg;DDDLjava/lang/String;FD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDLjava/lang/String;FD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "preRenderCallback", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderPlayerScale", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;F" : "Lnet/minecraft/client/entity/AbstractClientPlayer;F") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderPlayerScale", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "preRenderCallback", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderPlayerScale", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "preRenderCallback", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderPlayerScale) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerScale", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "preRenderCallback", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "renderLivingAt", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderPlayerSleep", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;DDD" : "Lnet/minecraft/client/entity/AbstractClientPlayer;DDD") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderPlayerSleep", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "renderLivingAt", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderPlayerSleep", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderLivingAt", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderPlayerSleep) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderPlayerSleep", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 4); - mv.visitVarInsn(Opcodes.DLOAD, 6); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderLivingAt", "" + (isObfuscated ? "(Lblg;DDD)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "renderEquippedItems", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderSpecials", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;F" : "Lnet/minecraft/client/entity/AbstractClientPlayer;F") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderSpecials", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "renderEquippedItems", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderSpecials", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderEquippedItems", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderSpecials) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderSpecials", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "renderEquippedItems", "" + (isObfuscated ? "(Lblg;F)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "renderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "renderSwingProgress", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lsv;F" : "Lnet/minecraft/entity/EntityLivingBase;F") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRenderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "d" : "renderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRenderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "d" : "renderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRenderSwingProgress) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRenderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "d" : "renderSwingProgress", "" + (isObfuscated ? "(Lsv;F)F" : "(Lnet/minecraft/entity/EntityLivingBase;F)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "rotateCorpse", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "rotatePlayer", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;FFF" : "Lnet/minecraft/client/entity/AbstractClientPlayer;FFF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realRotatePlayer", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "rotateCorpse", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superRotatePlayer", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "rotateCorpse", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalRotatePlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localRotatePlayer", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitVarInsn(Opcodes.FLOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "rotateCorpse", "" + (isObfuscated ? "(Lblg;FFF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "shouldRenderPass", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "setArmorModel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;IF" : "Lnet/minecraft/client/entity/AbstractClientPlayer;IF") + ")I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetArmorModel", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "shouldRenderPass", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetArmorModel", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "shouldRenderPass", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetArmorModel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetArmorModel", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "shouldRenderPass", "" + (isObfuscated ? "(Lblg;IF)I" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "func_82408_c", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "setPassArmorModel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lblg;IF" : "Lnet/minecraft/client/entity/AbstractClientPlayer;IF") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetPassArmorModel", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "func_82408_c", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetPassArmorModel", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "func_82408_c", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetPassArmorModel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPassArmorModel", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "b" : "func_82408_c", "" + (isObfuscated ? "(Lblg;IF)V" : "(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "setRenderManager", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lbnn;" : "Lnet/minecraft/client/renderer/entity/RenderManager;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "setRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "setRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetRenderManager) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "setRenderManager", "" + (isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "setRenderPassModel", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lbhr;" : "Lnet/minecraft/client/model/ModelBase;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "setRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "setRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetRenderPassModel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "setRenderPassModel", "" + (isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "updateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "updateIcons", "(Lapi/player/render/IRenderPlayerAPI;" + (isObfuscated ? "Lrg;" : "Lnet/minecraft/client/renderer/texture/IIconRegister;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "updateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "updateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdateIcons) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity", isObfuscated ? "a" : "updateIcons", "" + (isObfuscated ? "(Lrg;)V" : "(Lnet/minecraft/client/renderer/texture/IIconRegister;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMainModelField", isObfuscated ? "()Lbhr;" : "()Lnet/minecraft/client/model/ModelBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "i" : "mainModel", isObfuscated ? "Lbhr;" : "Lnet/minecraft/client/model/ModelBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMainModelField", isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "i" : "mainModel", isObfuscated ? "Lbhr;" : "Lnet/minecraft/client/model/ModelBase;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelArmorField", isObfuscated ? "()Lbhm;" : "()Lnet/minecraft/client/model/ModelBiped;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "h" : "modelArmor", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setModelArmorField", isObfuscated ? "(Lbhm;)V" : "(Lnet/minecraft/client/model/ModelBiped;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "h" : "modelArmor", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelArmorChestplateField", isObfuscated ? "()Lbhm;" : "()Lnet/minecraft/client/model/ModelBiped;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "g" : "modelArmorChestplate", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setModelArmorChestplateField", isObfuscated ? "(Lbhm;)V" : "(Lnet/minecraft/client/model/ModelBiped;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "g" : "modelArmorChestplate", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getModelBipedMainField", isObfuscated ? "()Lbhm;" : "()Lnet/minecraft/client/model/ModelBiped;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "f" : "modelBipedMain", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setModelBipedMainField", isObfuscated ? "(Lbhm;)V" : "(Lnet/minecraft/client/model/ModelBiped;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "f" : "modelBipedMain", isObfuscated ? "Lbhm;" : "Lnet/minecraft/client/model/ModelBiped;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderBlocksField", isObfuscated ? "()Lblm;" : "()Lnet/minecraft/client/renderer/RenderBlocks;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "c" : "field_147909_c", isObfuscated ? "Lblm;" : "Lnet/minecraft/client/renderer/RenderBlocks;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderBlocksField", isObfuscated ? "(Lblm;)V" : "(Lnet/minecraft/client/renderer/RenderBlocks;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "c" : "field_147909_c", isObfuscated ? "Lblm;" : "Lnet/minecraft/client/renderer/RenderBlocks;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderManagerField", isObfuscated ? "()Lbnn;" : "()Lnet/minecraft/client/renderer/entity/RenderManager;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "renderManager", isObfuscated ? "Lbnn;" : "Lnet/minecraft/client/renderer/entity/RenderManager;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderManagerField", isObfuscated ? "(Lbnn;)V" : "(Lnet/minecraft/client/renderer/entity/RenderManager;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "b" : "renderManager", isObfuscated ? "Lbnn;" : "Lnet/minecraft/client/renderer/entity/RenderManager;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderPassModelField", isObfuscated ? "()Lbhr;" : "()Lnet/minecraft/client/model/ModelBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "j" : "renderPassModel", isObfuscated ? "Lbhr;" : "Lnet/minecraft/client/model/ModelBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderPassModelField", isObfuscated ? "(Lbhr;)V" : "(Lnet/minecraft/client/model/ModelBase;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "j" : "renderPassModel", isObfuscated ? "Lbhr;" : "Lnet/minecraft/client/model/ModelBase;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getShadowOpaqueField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "e" : "shadowOpaque", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setShadowOpaqueField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "e" : "shadowOpaque", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getShadowSizeField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "d" : "shadowSize", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setShadowSizeField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "d" : "shadowSize", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSteveTexturesField", isObfuscated ? "()Lbqx;" : "()Lnet/minecraft/util/ResourceLocation;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", isObfuscated ? "a" : "steveTextures", isObfuscated ? "Lbqx;" : "Lnet/minecraft/util/ResourceLocation;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderPlayerBase", "(Ljava/lang/String;)Lapi/player/render/RenderPlayerBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getRenderPlayerBase", "(Lapi/player/render/IRenderPlayerAPI;Ljava/lang/String;)Lapi/player/render/RenderPlayerBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderPlayerBaseIds", "()Ljava/util/Set;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getRenderPlayerBaseIds", "(Lapi/player/render/IRenderPlayerAPI;)Ljava/util/Set;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "dynamic", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "dynamic", "(Lapi/player/render/IRenderPlayerAPI;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderPlayerAPI", "()Lapi/player/render/RenderPlayerAPI;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", "renderPlayerAPI", "Lapi/player/render/RenderPlayerAPI;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderPlayer", isObfuscated ? "()Lbop;" : "()Lnet/minecraft/client/renderer/entity/RenderPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC, "getAllInstances", isObfuscated ? "()[Lbop;" : "()[Lnet/minecraft/client/renderer/entity/RenderPlayer;", null, null); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "getAllInstances", isObfuscated ? "()[Lbop;" : "()[Lnet/minecraft/client/renderer/entity/RenderPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - cv.visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_FINAL, "renderPlayerAPI", "Lapi/player/render/RenderPlayerAPI;", null, null); - } -} diff --git a/src/main/java/api/player/render/RenderPlayerConstructorVisitor.java b/src/main/java/api/player/render/RenderPlayerConstructorVisitor.java deleted file mode 100644 index 7b9082bc..00000000 --- a/src/main/java/api/player/render/RenderPlayerConstructorVisitor.java +++ /dev/null @@ -1,89 +0,0 @@ -// ================================================================== -// This file is part of Render Player API. -// -// Render Player API is free software: you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// Render Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Render -// Player API. If not, see . -// ================================================================== - -package api.player.render; - -import java.util.*; - -import org.objectweb.asm.*; - -public final class RenderPlayerConstructorVisitor extends MethodVisitor -{ - private final boolean isObfuscated; - private final Map> constructorReplacements; - - public RenderPlayerConstructorVisitor(MethodVisitor paramMethodVisitor, boolean isObfuscated, Map> constructorReplacements) - { - super(262144, paramMethodVisitor); - this.isObfuscated = isObfuscated; - this.constructorReplacements = constructorReplacements; - } - - public void visitTypeInsn(int opcode, String type) - { - if(opcode == Opcodes.NEW && constructorReplacements != null && constructorReplacements.containsKey(type)) - { - Stack replacementOwnerList = constructorReplacements.get(type); - if(!replacementOwnerList.isEmpty()) - type = replacementOwnerList.peek(); - int typeSeparatorIndex = type.indexOf(":"); - if(typeSeparatorIndex > 0) - type = type.substring(0, typeSeparatorIndex); - } - super.visitTypeInsn(opcode, type); - } - - public void visitMethodInsn(int opcode, String owner, String name, String desc) - { - if(name.equals("") && constructorReplacements != null && constructorReplacements.containsKey(owner)) - { - Stack replacementOwnerList = constructorReplacements.get(owner); - if(!replacementOwnerList.isEmpty()) - owner = replacementOwnerList.pop(); - int typeSeparatorIndex = owner.indexOf(":"); - if(typeSeparatorIndex > 0) - { - mv.visitLdcInsn(owner.substring(typeSeparatorIndex + 1)); - owner = owner.substring(0, typeSeparatorIndex); - int resultSeparatorIndex = desc.indexOf(")"); - desc = desc.substring(0, resultSeparatorIndex) + "Ljava/lang/String;" + desc.substring(resultSeparatorIndex); - } - } - super.visitMethodInsn(opcode, owner, name, desc); - if(name.equals("") && owner.equals(isObfuscated ? "boh" : "net/minecraft/client/renderer/entity/RendererLivingEntity")) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "create", "(Lapi/player/render/IRenderPlayerAPI;)Lapi/player/render/RenderPlayerAPI;"); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "bop" : "net/minecraft/client/renderer/entity/RenderPlayer", "renderPlayerAPI", "Lapi/player/render/RenderPlayerAPI;"); - - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "beforeLocalConstructing", "(Lapi/player/render/IRenderPlayerAPI;)V"); - } - } - - public void visitInsn(int opcode) - { - if(opcode == Opcodes.RETURN) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/render/RenderPlayerAPI", "afterLocalConstructing", "(Lapi/player/render/IRenderPlayerAPI;)V"); - } - super.visitInsn(opcode); - } -} diff --git a/src/main/java/api/player/server/IServerPlayer.java b/src/main/java/api/player/server/IServerPlayer.java deleted file mode 100644 index 0e8a5e6d..00000000 --- a/src/main/java/api/player/server/IServerPlayer.java +++ /dev/null @@ -1,983 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -public interface IServerPlayer -{ - ServerPlayerBase getServerPlayerBase(String baseId); - - java.util.Set getServerPlayerBaseIds(); - - Object dynamic(String key, Object[] parameters); - - void realAddExhaustion(float paramFloat); - - void superAddExhaustion(float paramFloat); - - void localAddExhaustion(float paramFloat); - - void realAddExperience(int paramInt); - - void superAddExperience(int paramInt); - - void localAddExperience(int paramInt); - - void realAddExperienceLevel(int paramInt); - - void superAddExperienceLevel(int paramInt); - - void localAddExperienceLevel(int paramInt); - - void realAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - void superAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - void localAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3); - - boolean realAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - boolean superAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - boolean localAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void realAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - void superAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - void localAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity); - - boolean realCanBreatheUnderwater(); - - boolean superCanBreatheUnderwater(); - - boolean localCanBreatheUnderwater(); - - boolean realCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean superCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean localCanHarvestBlock(net.minecraft.block.Block paramBlock); - - boolean realCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean superCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean localCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack); - - boolean realCanTriggerWalking(); - - boolean superCanTriggerWalking(); - - boolean localCanTriggerWalking(); - - void realClonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean); - - void superClonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean); - - void localClonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean); - - void realDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void superDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void localDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat); - - void realDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void superDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void localDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory); - - void realDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void superDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void localDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser); - - void realDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void superDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void localDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace); - - void realDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - void superDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - void localDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3); - - net.minecraft.entity.item.EntityItem realDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem superDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem localDropOneItem(boolean paramBoolean); - - net.minecraft.entity.item.EntityItem realDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - net.minecraft.entity.item.EntityItem superDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - net.minecraft.entity.item.EntityItem localDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean); - - void realFall(float paramFloat); - - void superFall(float paramFloat); - - void localFall(float paramFloat); - - float realGetAIMoveSpeed(); - - float superGetAIMoveSpeed(); - - float localGetAIMoveSpeed(); - - float realGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float superGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float localGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean); - - float realGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - float superGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - float localGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt); - - double realGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - double superGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - double localGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3); - - float realGetBrightness(float paramFloat); - - float superGetBrightness(float paramFloat); - - float localGetBrightness(float paramFloat); - - float realGetEyeHeight(); - - float superGetEyeHeight(); - - float localGetEyeHeight(); - - void realHeal(float paramFloat); - - void superHeal(float paramFloat); - - void localHeal(float paramFloat); - - boolean realIsEntityInsideOpaqueBlock(); - - boolean superIsEntityInsideOpaqueBlock(); - - boolean localIsEntityInsideOpaqueBlock(); - - boolean realIsInWater(); - - boolean superIsInWater(); - - boolean localIsInWater(); - - boolean realIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean superIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean localIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial); - - boolean realIsOnLadder(); - - boolean superIsOnLadder(); - - boolean localIsOnLadder(); - - boolean realIsPlayerSleeping(); - - boolean superIsPlayerSleeping(); - - boolean localIsPlayerSleeping(); - - boolean realIsSneaking(); - - boolean superIsSneaking(); - - boolean localIsSneaking(); - - void realJump(); - - void superJump(); - - void localJump(); - - void realKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void superKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void localKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2); - - void realMountEntity(net.minecraft.entity.Entity paramEntity); - - void superMountEntity(net.minecraft.entity.Entity paramEntity); - - void localMountEntity(net.minecraft.entity.Entity paramEntity); - - void realMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void superMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void localMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3); - - void realMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void superMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void localMoveEntityWithHeading(float paramFloat1, float paramFloat2); - - void realMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void superMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void localMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3); - - void realOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void superOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void localOnDeath(net.minecraft.util.DamageSource paramDamageSource); - - void realOnLivingUpdate(); - - void superOnLivingUpdate(); - - void localOnLivingUpdate(); - - void realOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void superOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void localOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase); - - void realOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void superOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void localOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt); - - void realOnUpdate(); - - void superOnUpdate(); - - void localOnUpdate(); - - void realOnUpdateEntity(); - - void localOnUpdateEntity(); - - void realReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void superReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void localReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void realSetDead(); - - void superSetDead(); - - void localSetDead(); - - void realSetEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2); - - void localSetEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2); - - void realSetPosition(double paramDouble1, double paramDouble2, double paramDouble3); - - void superSetPosition(double paramDouble1, double paramDouble2, double paramDouble3); - - void localSetPosition(double paramDouble1, double paramDouble2, double paramDouble3); - - void realSetSneaking(boolean paramBoolean); - - void superSetSneaking(boolean paramBoolean); - - void localSetSneaking(boolean paramBoolean); - - void realSetSprinting(boolean paramBoolean); - - void superSetSprinting(boolean paramBoolean); - - void localSetSprinting(boolean paramBoolean); - - void realSwingItem(); - - void superSwingItem(); - - void localSwingItem(); - - void realUpdateEntityActionState(); - - void superUpdateEntityActionState(); - - void localUpdateEntityActionState(); - - void realUpdatePotionEffects(); - - void superUpdatePotionEffects(); - - void localUpdatePotionEffects(); - - void realUpdateRidden(); - - void superUpdateRidden(); - - void localUpdateRidden(); - - void realWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void superWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void localWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3); - - void realWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void superWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - void localWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound); - - boolean getAddedToChunkField(); - - void setAddedToChunkField(boolean addedToChunk); - - int getArrowHitTimerField(); - - void setArrowHitTimerField(int arrowHitTimer); - - int getAttackTimeField(); - - void setAttackTimeField(int attackTime); - - float getAttackedAtYawField(); - - void setAttackedAtYawField(float attackedAtYaw); - - net.minecraft.entity.player.EntityPlayer getAttackingPlayerField(); - - void setAttackingPlayerField(net.minecraft.entity.player.EntityPlayer attackingPlayer); - - net.minecraft.util.AxisAlignedBB getBoundingBoxField(); - - float getCameraPitchField(); - - void setCameraPitchField(float cameraPitch); - - float getCameraYawField(); - - void setCameraYawField(float cameraYaw); - - net.minecraft.entity.player.PlayerCapabilities getCapabilitiesField(); - - void setCapabilitiesField(net.minecraft.entity.player.PlayerCapabilities capabilities); - - boolean getChatColoursField(); - - void setChatColoursField(boolean chatColours); - - net.minecraft.entity.player.EntityPlayer.EnumChatVisibility getChatVisibilityField(); - - void setChatVisibilityField(net.minecraft.entity.player.EntityPlayer.EnumChatVisibility chatVisibility); - - int getChunkCoordXField(); - - void setChunkCoordXField(int chunkCoordX); - - int getChunkCoordYField(); - - void setChunkCoordYField(int chunkCoordY); - - int getChunkCoordZField(); - - void setChunkCoordZField(int chunkCoordZ); - - int getCurrentWindowIdField(); - - void setCurrentWindowIdField(int currentWindowId); - - net.minecraft.entity.DataWatcher getDataWatcherField(); - - void setDataWatcherField(net.minecraft.entity.DataWatcher dataWatcher); - - boolean getDeadField(); - - void setDeadField(boolean dead); - - int getDeathTimeField(); - - void setDeathTimeField(int deathTime); - - java.util.List getDestroyedItemsNetCacheField(); - - int getDimensionField(); - - void setDimensionField(int dimension); - - float getDistanceWalkedModifiedField(); - - void setDistanceWalkedModifiedField(float distanceWalkedModified); - - float getDistanceWalkedOnStepModifiedField(); - - void setDistanceWalkedOnStepModifiedField(float distanceWalkedOnStepModified); - - int getEntityAgeField(); - - void setEntityAgeField(int entityAge); - - float getEntityCollisionReductionField(); - - void setEntityCollisionReductionField(float entityCollisionReduction); - - java.util.UUID getEntityUniqueIDField(); - - void setEntityUniqueIDField(java.util.UUID entityUniqueID); - - float getExperienceField(); - - void setExperienceField(float experience); - - int getExperienceLevelField(); - - void setExperienceLevelField(int experienceLevel); - - int getExperienceTotalField(); - - void setExperienceTotalField(int experienceTotal); - - float getFallDistanceField(); - - void setFallDistanceField(float fallDistance); - - float getField_110154_aXField(); - - void setField_110154_aXField(float field_110154_aX); - - float getField_130068_bOField(); - - void setField_130068_bOField(float field_130068_bO); - - long getField_143005_bXField(); - - void setField_143005_bXField(long field_143005_bX); - - int getField_147101_bUField(); - - void setField_147101_bUField(int field_147101_bU); - - net.minecraft.stats.StatisticsFile getField_147103_bOField(); - - boolean getField_70135_KField(); - - void setField_70135_KField(boolean field_70135_K); - - float getField_70741_aBField(); - - void setField_70741_aBField(float field_70741_aB); - - float getField_70763_axField(); - - void setField_70763_axField(float field_70763_ax); - - float getField_70764_awField(); - - void setField_70764_awField(float field_70764_aw); - - float getField_70768_auField(); - - void setField_70768_auField(float field_70768_au); - - float getField_70769_aoField(); - - void setField_70769_aoField(float field_70769_ao); - - float getField_70770_apField(); - - void setField_70770_apField(float field_70770_ap); - - float getField_71079_bUField(); - - void setField_71079_bUField(float field_71079_bU); - - float getField_71082_cxField(); - - void setField_71082_cxField(float field_71082_cx); - - double getField_71085_bRField(); - - void setField_71085_bRField(double field_71085_bR); - - float getField_71089_bVField(); - - void setField_71089_bVField(float field_71089_bV); - - double getField_71091_bMField(); - - void setField_71091_bMField(double field_71091_bM); - - double getField_71094_bPField(); - - void setField_71094_bPField(double field_71094_bP); - - double getField_71095_bQField(); - - void setField_71095_bQField(double field_71095_bQ); - - double getField_71096_bNField(); - - void setField_71096_bNField(double field_71096_bN); - - double getField_71097_bOField(); - - void setField_71097_bOField(double field_71097_bO); - - int getFireResistanceField(); - - void setFireResistanceField(int fireResistance); - - net.minecraft.entity.projectile.EntityFishHook getFishEntityField(); - - void setFishEntityField(net.minecraft.entity.projectile.EntityFishHook fishEntity); - - int getFlyToggleTimerField(); - - void setFlyToggleTimerField(int flyToggleTimer); - - net.minecraft.util.FoodStats getFoodStatsField(); - - void setFoodStatsField(net.minecraft.util.FoodStats foodStats); - - boolean getForceSpawnField(); - - void setForceSpawnField(boolean forceSpawn); - - float getHeightField(); - - void setHeightField(float height); - - int getHurtResistantTimeField(); - - void setHurtResistantTimeField(int hurtResistantTime); - - int getHurtTimeField(); - - void setHurtTimeField(int hurtTime); - - boolean getIgnoreFrustumCheckField(); - - void setIgnoreFrustumCheckField(boolean ignoreFrustumCheck); - - boolean getInPortalField(); - - void setInPortalField(boolean inPortal); - - boolean getInWaterField(); - - void setInWaterField(boolean inWater); - - net.minecraft.entity.player.InventoryPlayer getInventoryField(); - - void setInventoryField(net.minecraft.entity.player.InventoryPlayer inventory); - - net.minecraft.inventory.Container getInventoryContainerField(); - - void setInventoryContainerField(net.minecraft.inventory.Container inventoryContainer); - - boolean getIsAirBorneField(); - - void setIsAirBorneField(boolean isAirBorne); - - boolean getIsChangingQuantityOnlyField(); - - void setIsChangingQuantityOnlyField(boolean isChangingQuantityOnly); - - boolean getIsCollidedField(); - - void setIsCollidedField(boolean isCollided); - - boolean getIsCollidedHorizontallyField(); - - void setIsCollidedHorizontallyField(boolean isCollidedHorizontally); - - boolean getIsCollidedVerticallyField(); - - void setIsCollidedVerticallyField(boolean isCollidedVertically); - - boolean getIsDeadField(); - - void setIsDeadField(boolean isDead); - - boolean getIsImmuneToFireField(); - - void setIsImmuneToFireField(boolean isImmuneToFire); - - boolean getIsInWebField(); - - void setIsInWebField(boolean isInWeb); - - boolean getIsJumpingField(); - - void setIsJumpingField(boolean isJumping); - - boolean getIsSwingInProgressField(); - - void setIsSwingInProgressField(boolean isSwingInProgress); - - float getJumpMovementFactorField(); - - void setJumpMovementFactorField(float jumpMovementFactor); - - float getLastDamageField(); - - void setLastDamageField(float lastDamage); - - int getLastExperienceField(); - - void setLastExperienceField(int lastExperience); - - int getLastFoodLevelField(); - - void setLastFoodLevelField(int lastFoodLevel); - - float getLastHealthField(); - - void setLastHealthField(float lastHealth); - - double getLastTickPosXField(); - - void setLastTickPosXField(double lastTickPosX); - - double getLastTickPosYField(); - - void setLastTickPosYField(double lastTickPosY); - - double getLastTickPosZField(); - - void setLastTickPosZField(double lastTickPosZ); - - float getLimbSwingField(); - - void setLimbSwingField(float limbSwing); - - float getLimbSwingAmountField(); - - void setLimbSwingAmountField(float limbSwingAmount); - - java.util.List getLoadedChunksField(); - - org.apache.logging.log4j.Logger getLoggerField(); - - double getManagedPosXField(); - - void setManagedPosXField(double managedPosX); - - double getManagedPosZField(); - - void setManagedPosZField(double managedPosZ); - - int getMaxHurtResistantTimeField(); - - void setMaxHurtResistantTimeField(int maxHurtResistantTime); - - int getMaxHurtTimeField(); - - void setMaxHurtTimeField(int maxHurtTime); - - net.minecraft.server.MinecraftServer getMcServerField(); - - double getMotionXField(); - - void setMotionXField(double motionX); - - double getMotionYField(); - - void setMotionYField(double motionY); - - double getMotionZField(); - - void setMotionZField(double motionZ); - - float getMoveForwardField(); - - void setMoveForwardField(float moveForward); - - float getMoveStrafingField(); - - void setMoveStrafingField(float moveStrafing); - - net.minecraft.entity.Entity.EnumEntitySize getMyEntitySizeField(); - - void setMyEntitySizeField(net.minecraft.entity.Entity.EnumEntitySize myEntitySize); - - int getNewPosRotationIncrementsField(); - - void setNewPosRotationIncrementsField(int newPosRotationIncrements); - - double getNewPosXField(); - - void setNewPosXField(double newPosX); - - double getNewPosYField(); - - void setNewPosYField(double newPosY); - - double getNewPosZField(); - - void setNewPosZField(double newPosZ); - - double getNewRotationPitchField(); - - void setNewRotationPitchField(double newRotationPitch); - - double getNewRotationYawField(); - - void setNewRotationYawField(double newRotationYaw); - - boolean getNoClipField(); - - void setNoClipField(boolean noClip); - - boolean getOnGroundField(); - - void setOnGroundField(boolean onGround); - - net.minecraft.inventory.Container getOpenContainerField(); - - void setOpenContainerField(net.minecraft.inventory.Container openContainer); - - int getPingField(); - - void setPingField(int ping); - - boolean getPlayerConqueredTheEndField(); - - void setPlayerConqueredTheEndField(boolean playerConqueredTheEnd); - - net.minecraft.util.ChunkCoordinates getPlayerLocationField(); - - void setPlayerLocationField(net.minecraft.util.ChunkCoordinates playerLocation); - - net.minecraft.network.NetHandlerPlayServer getPlayerNetServerHandlerField(); - - void setPlayerNetServerHandlerField(net.minecraft.network.NetHandlerPlayServer playerNetServerHandler); - - int getPortalCounterField(); - - void setPortalCounterField(int portalCounter); - - double getPosXField(); - - void setPosXField(double posX); - - double getPosYField(); - - void setPosYField(double posY); - - double getPosZField(); - - void setPosZField(double posZ); - - float getPrevCameraPitchField(); - - void setPrevCameraPitchField(float prevCameraPitch); - - float getPrevCameraYawField(); - - void setPrevCameraYawField(float prevCameraYaw); - - float getPrevDistanceWalkedModifiedField(); - - void setPrevDistanceWalkedModifiedField(float prevDistanceWalkedModified); - - float getPrevHealthField(); - - void setPrevHealthField(float prevHealth); - - float getPrevLimbSwingAmountField(); - - void setPrevLimbSwingAmountField(float prevLimbSwingAmount); - - double getPrevPosXField(); - - void setPrevPosXField(double prevPosX); - - double getPrevPosYField(); - - void setPrevPosYField(double prevPosY); - - double getPrevPosZField(); - - void setPrevPosZField(double prevPosZ); - - float getPrevRenderYawOffsetField(); - - void setPrevRenderYawOffsetField(float prevRenderYawOffset); - - float getPrevRotationPitchField(); - - void setPrevRotationPitchField(float prevRotationPitch); - - float getPrevRotationYawField(); - - void setPrevRotationYawField(float prevRotationYaw); - - float getPrevRotationYawHeadField(); - - void setPrevRotationYawHeadField(float prevRotationYawHead); - - float getPrevSwingProgressField(); - - void setPrevSwingProgressField(float prevSwingProgress); - - boolean getPreventEntitySpawningField(); - - void setPreventEntitySpawningField(boolean preventEntitySpawning); - - java.util.Random getRandField(); - - void setRandField(java.util.Random rand); - - float getRandomYawVelocityField(); - - void setRandomYawVelocityField(float randomYawVelocity); - - int getRecentlyHitField(); - - void setRecentlyHitField(int recentlyHit); - - double getRenderDistanceWeightField(); - - void setRenderDistanceWeightField(double renderDistanceWeight); - - float getRenderYawOffsetField(); - - void setRenderYawOffsetField(float renderYawOffset); - - net.minecraft.entity.Entity getRiddenByEntityField(); - - void setRiddenByEntityField(net.minecraft.entity.Entity riddenByEntity); - - net.minecraft.entity.Entity getRidingEntityField(); - - void setRidingEntityField(net.minecraft.entity.Entity ridingEntity); - - float getRotationPitchField(); - - void setRotationPitchField(float rotationPitch); - - float getRotationYawField(); - - void setRotationYawField(float rotationYaw); - - float getRotationYawHeadField(); - - void setRotationYawHeadField(float rotationYawHead); - - int getScoreValueField(); - - void setScoreValueField(int scoreValue); - - int getServerPosXField(); - - void setServerPosXField(int serverPosX); - - int getServerPosYField(); - - void setServerPosYField(int serverPosY); - - int getServerPosZField(); - - void setServerPosZField(int serverPosZ); - - boolean getSleepingField(); - - void setSleepingField(boolean sleeping); - - float getSpeedInAirField(); - - void setSpeedInAirField(float speedInAir); - - float getSpeedOnGroundField(); - - void setSpeedOnGroundField(float speedOnGround); - - float getStepHeightField(); - - void setStepHeightField(float stepHeight); - - float getSwingProgressField(); - - void setSwingProgressField(float swingProgress); - - int getSwingProgressIntField(); - - void setSwingProgressIntField(int swingProgressInt); - - int getTeleportDirectionField(); - - void setTeleportDirectionField(int teleportDirection); - - net.minecraft.server.management.ItemInWorldManager getTheItemInWorldManagerField(); - - int getTicksExistedField(); - - void setTicksExistedField(int ticksExisted); - - int getTimeUntilPortalField(); - - void setTimeUntilPortalField(int timeUntilPortal); - - java.lang.String getTranslatorField(); - - void setTranslatorField(java.lang.String translator); - - boolean getVelocityChangedField(); - - void setVelocityChangedField(boolean velocityChanged); - - boolean getWasHungryField(); - - void setWasHungryField(boolean wasHungry); - - float getWidthField(); - - void setWidthField(float width); - - net.minecraft.world.World getWorldObjField(); - - void setWorldObjField(net.minecraft.world.World worldObj); - - int getXpCooldownField(); - - void setXpCooldownField(int xpCooldown); - - float getYOffsetField(); - - void setYOffsetField(float yOffset); - - float getYSizeField(); - - void setYSizeField(float ySize); - -} diff --git a/src/main/java/api/player/server/IServerPlayerAPI.java b/src/main/java/api/player/server/IServerPlayerAPI.java deleted file mode 100644 index 29a4cf6a..00000000 --- a/src/main/java/api/player/server/IServerPlayerAPI.java +++ /dev/null @@ -1,26 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -public interface IServerPlayerAPI extends IServerPlayer -{ - ServerPlayerAPI getServerPlayerAPI(); - - net.minecraft.entity.player.EntityPlayerMP getEntityPlayerMP(); -} diff --git a/src/main/java/api/player/server/ServerPlayerAPI.java b/src/main/java/api/player/server/ServerPlayerAPI.java deleted file mode 100644 index 381c607a..00000000 --- a/src/main/java/api/player/server/ServerPlayerAPI.java +++ /dev/null @@ -1,6017 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -import java.io.*; -import java.text.*; -import java.util.*; -import java.util.logging.*; -import java.lang.reflect.*; - -public final class ServerPlayerAPI -{ - private final static Class[] Class = new Class[] { ServerPlayerAPI.class }; - private final static Class[] Classes = new Class[] { ServerPlayerAPI.class, String.class }; - - private static boolean isCreated; - private static final Logger logger = Logger.getLogger("ServerPlayerAPI"); - - private static void log(String text) - { - System.out.println(text); - logger.fine(text); - } - - public static void register(String id, Class baseClass) - { - register(id, baseClass, null); - } - - public static void register(String id, Class baseClass, ServerPlayerBaseSorting baseSorting) - { - try - { - register(baseClass, id, baseSorting); - } - catch(RuntimeException exception) - { - if(id != null) - log("Server Player: failed to register id '" + id + "'"); - else - log("Server Player: failed to register ServerPlayerBase"); - - throw exception; - } - } - - private static void register(Class baseClass, String id, ServerPlayerBaseSorting baseSorting) - { - if(!isCreated) - { - try - { - Method mandatory = net.minecraft.entity.player.EntityPlayerMP.class.getMethod("getServerPlayerBase", String.class); - if (mandatory.getReturnType() != ServerPlayerBase.class) - throw new NoSuchMethodException(ServerPlayerBase.class.getName() + " " + net.minecraft.entity.player.EntityPlayerMP.class.getName() + ".getServerPlayerBase(" + String.class.getName() + ")"); - } - catch(NoSuchMethodException exception) - { - String[] errorMessageParts = new String[] - { - "========================================", - "The API \"Server Player\" version " + api.player.forge.PlayerAPIPlugin.Version + " of the mod \"Player API Core " + api.player.forge.PlayerAPIPlugin.Version + "\" can not be created!", - "----------------------------------------", - "Mandatory member method \"{0} getServerPlayerBase({3})\" not found in class \"{1}\".", - "There are three scenarios this can happen:", - "* Minecraft Forge is missing a Player API Core which Minecraft version matches its own.", - " Download and install the latest Player API Core for the Minecraft version you were trying to run.", - "* The code of the class \"{2}\" of Player API Core has been modified beyond recognition by another Minecraft Forge coremod.", - " Try temporary deinstallation of other core mods to find the culprit and deinstall it permanently to fix this specific problem.", - "* Player API Core has not been installed correctly.", - " Deinstall Player API Core and install it again following the installation instructions in the readme file.", - "========================================" - }; - - String baseEntityPlayerMPClassName = ServerPlayerBase.class.getName(); - String targetClassName = net.minecraft.entity.player.EntityPlayerMP.class.getName(); - String targetClassFileName = targetClassName.replace(".", File.separator); - String stringClassName = String.class.getName(); - - for(int i=0; i allreadyRegistered = allBaseConstructors.get(id); - if(allreadyRegistered != null) - throw new IllegalArgumentException("The class '" + baseClass.getName() + "' can not be registered with the id '" + id + "' because the class '" + allreadyRegistered.getDeclaringClass().getName() + "' has allready been registered with the same id"); - - Constructor baseConstructor; - try - { - baseConstructor = baseClass.getDeclaredConstructor(Classes); - } - catch (Throwable t) - { - try - { - baseConstructor = baseClass.getDeclaredConstructor(Class); - } - catch(Throwable s) - { - throw new IllegalArgumentException("Can not find necessary constructor with one argument of type '" + ServerPlayerAPI.class.getName() + "' and eventually a second argument of type 'String' in the class '" + baseClass.getName() + "'", t); - } - } - - allBaseConstructors.put(id, baseConstructor); - - if(baseSorting != null) - { - addSorting(id, allBaseBeforeLocalConstructingSuperiors, baseSorting.getBeforeLocalConstructingSuperiors()); - addSorting(id, allBaseBeforeLocalConstructingInferiors, baseSorting.getBeforeLocalConstructingInferiors()); - addSorting(id, allBaseAfterLocalConstructingSuperiors, baseSorting.getAfterLocalConstructingSuperiors()); - addSorting(id, allBaseAfterLocalConstructingInferiors, baseSorting.getAfterLocalConstructingInferiors()); - - addDynamicSorting(id, allBaseBeforeDynamicSuperiors, baseSorting.getDynamicBeforeSuperiors()); - addDynamicSorting(id, allBaseBeforeDynamicInferiors, baseSorting.getDynamicBeforeInferiors()); - addDynamicSorting(id, allBaseOverrideDynamicSuperiors, baseSorting.getDynamicOverrideSuperiors()); - addDynamicSorting(id, allBaseOverrideDynamicInferiors, baseSorting.getDynamicOverrideInferiors()); - addDynamicSorting(id, allBaseAfterDynamicSuperiors, baseSorting.getDynamicAfterSuperiors()); - addDynamicSorting(id, allBaseAfterDynamicInferiors, baseSorting.getDynamicAfterInferiors()); - - addSorting(id, allBaseBeforeAddExhaustionSuperiors, baseSorting.getBeforeAddExhaustionSuperiors()); - addSorting(id, allBaseBeforeAddExhaustionInferiors, baseSorting.getBeforeAddExhaustionInferiors()); - addSorting(id, allBaseOverrideAddExhaustionSuperiors, baseSorting.getOverrideAddExhaustionSuperiors()); - addSorting(id, allBaseOverrideAddExhaustionInferiors, baseSorting.getOverrideAddExhaustionInferiors()); - addSorting(id, allBaseAfterAddExhaustionSuperiors, baseSorting.getAfterAddExhaustionSuperiors()); - addSorting(id, allBaseAfterAddExhaustionInferiors, baseSorting.getAfterAddExhaustionInferiors()); - - addSorting(id, allBaseBeforeAddExperienceSuperiors, baseSorting.getBeforeAddExperienceSuperiors()); - addSorting(id, allBaseBeforeAddExperienceInferiors, baseSorting.getBeforeAddExperienceInferiors()); - addSorting(id, allBaseOverrideAddExperienceSuperiors, baseSorting.getOverrideAddExperienceSuperiors()); - addSorting(id, allBaseOverrideAddExperienceInferiors, baseSorting.getOverrideAddExperienceInferiors()); - addSorting(id, allBaseAfterAddExperienceSuperiors, baseSorting.getAfterAddExperienceSuperiors()); - addSorting(id, allBaseAfterAddExperienceInferiors, baseSorting.getAfterAddExperienceInferiors()); - - addSorting(id, allBaseBeforeAddExperienceLevelSuperiors, baseSorting.getBeforeAddExperienceLevelSuperiors()); - addSorting(id, allBaseBeforeAddExperienceLevelInferiors, baseSorting.getBeforeAddExperienceLevelInferiors()); - addSorting(id, allBaseOverrideAddExperienceLevelSuperiors, baseSorting.getOverrideAddExperienceLevelSuperiors()); - addSorting(id, allBaseOverrideAddExperienceLevelInferiors, baseSorting.getOverrideAddExperienceLevelInferiors()); - addSorting(id, allBaseAfterAddExperienceLevelSuperiors, baseSorting.getAfterAddExperienceLevelSuperiors()); - addSorting(id, allBaseAfterAddExperienceLevelInferiors, baseSorting.getAfterAddExperienceLevelInferiors()); - - addSorting(id, allBaseBeforeAddMovementStatSuperiors, baseSorting.getBeforeAddMovementStatSuperiors()); - addSorting(id, allBaseBeforeAddMovementStatInferiors, baseSorting.getBeforeAddMovementStatInferiors()); - addSorting(id, allBaseOverrideAddMovementStatSuperiors, baseSorting.getOverrideAddMovementStatSuperiors()); - addSorting(id, allBaseOverrideAddMovementStatInferiors, baseSorting.getOverrideAddMovementStatInferiors()); - addSorting(id, allBaseAfterAddMovementStatSuperiors, baseSorting.getAfterAddMovementStatSuperiors()); - addSorting(id, allBaseAfterAddMovementStatInferiors, baseSorting.getAfterAddMovementStatInferiors()); - - addSorting(id, allBaseBeforeAttackEntityFromSuperiors, baseSorting.getBeforeAttackEntityFromSuperiors()); - addSorting(id, allBaseBeforeAttackEntityFromInferiors, baseSorting.getBeforeAttackEntityFromInferiors()); - addSorting(id, allBaseOverrideAttackEntityFromSuperiors, baseSorting.getOverrideAttackEntityFromSuperiors()); - addSorting(id, allBaseOverrideAttackEntityFromInferiors, baseSorting.getOverrideAttackEntityFromInferiors()); - addSorting(id, allBaseAfterAttackEntityFromSuperiors, baseSorting.getAfterAttackEntityFromSuperiors()); - addSorting(id, allBaseAfterAttackEntityFromInferiors, baseSorting.getAfterAttackEntityFromInferiors()); - - addSorting(id, allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getBeforeAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseBeforeAttackTargetEntityWithCurrentItemInferiors, baseSorting.getBeforeAttackTargetEntityWithCurrentItemInferiors()); - addSorting(id, allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getOverrideAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseOverrideAttackTargetEntityWithCurrentItemInferiors, baseSorting.getOverrideAttackTargetEntityWithCurrentItemInferiors()); - addSorting(id, allBaseAfterAttackTargetEntityWithCurrentItemSuperiors, baseSorting.getAfterAttackTargetEntityWithCurrentItemSuperiors()); - addSorting(id, allBaseAfterAttackTargetEntityWithCurrentItemInferiors, baseSorting.getAfterAttackTargetEntityWithCurrentItemInferiors()); - - addSorting(id, allBaseBeforeCanBreatheUnderwaterSuperiors, baseSorting.getBeforeCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseBeforeCanBreatheUnderwaterInferiors, baseSorting.getBeforeCanBreatheUnderwaterInferiors()); - addSorting(id, allBaseOverrideCanBreatheUnderwaterSuperiors, baseSorting.getOverrideCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseOverrideCanBreatheUnderwaterInferiors, baseSorting.getOverrideCanBreatheUnderwaterInferiors()); - addSorting(id, allBaseAfterCanBreatheUnderwaterSuperiors, baseSorting.getAfterCanBreatheUnderwaterSuperiors()); - addSorting(id, allBaseAfterCanBreatheUnderwaterInferiors, baseSorting.getAfterCanBreatheUnderwaterInferiors()); - - addSorting(id, allBaseBeforeCanHarvestBlockSuperiors, baseSorting.getBeforeCanHarvestBlockSuperiors()); - addSorting(id, allBaseBeforeCanHarvestBlockInferiors, baseSorting.getBeforeCanHarvestBlockInferiors()); - addSorting(id, allBaseOverrideCanHarvestBlockSuperiors, baseSorting.getOverrideCanHarvestBlockSuperiors()); - addSorting(id, allBaseOverrideCanHarvestBlockInferiors, baseSorting.getOverrideCanHarvestBlockInferiors()); - addSorting(id, allBaseAfterCanHarvestBlockSuperiors, baseSorting.getAfterCanHarvestBlockSuperiors()); - addSorting(id, allBaseAfterCanHarvestBlockInferiors, baseSorting.getAfterCanHarvestBlockInferiors()); - - addSorting(id, allBaseBeforeCanPlayerEditSuperiors, baseSorting.getBeforeCanPlayerEditSuperiors()); - addSorting(id, allBaseBeforeCanPlayerEditInferiors, baseSorting.getBeforeCanPlayerEditInferiors()); - addSorting(id, allBaseOverrideCanPlayerEditSuperiors, baseSorting.getOverrideCanPlayerEditSuperiors()); - addSorting(id, allBaseOverrideCanPlayerEditInferiors, baseSorting.getOverrideCanPlayerEditInferiors()); - addSorting(id, allBaseAfterCanPlayerEditSuperiors, baseSorting.getAfterCanPlayerEditSuperiors()); - addSorting(id, allBaseAfterCanPlayerEditInferiors, baseSorting.getAfterCanPlayerEditInferiors()); - - addSorting(id, allBaseBeforeCanTriggerWalkingSuperiors, baseSorting.getBeforeCanTriggerWalkingSuperiors()); - addSorting(id, allBaseBeforeCanTriggerWalkingInferiors, baseSorting.getBeforeCanTriggerWalkingInferiors()); - addSorting(id, allBaseOverrideCanTriggerWalkingSuperiors, baseSorting.getOverrideCanTriggerWalkingSuperiors()); - addSorting(id, allBaseOverrideCanTriggerWalkingInferiors, baseSorting.getOverrideCanTriggerWalkingInferiors()); - addSorting(id, allBaseAfterCanTriggerWalkingSuperiors, baseSorting.getAfterCanTriggerWalkingSuperiors()); - addSorting(id, allBaseAfterCanTriggerWalkingInferiors, baseSorting.getAfterCanTriggerWalkingInferiors()); - - addSorting(id, allBaseBeforeClonePlayerSuperiors, baseSorting.getBeforeClonePlayerSuperiors()); - addSorting(id, allBaseBeforeClonePlayerInferiors, baseSorting.getBeforeClonePlayerInferiors()); - addSorting(id, allBaseOverrideClonePlayerSuperiors, baseSorting.getOverrideClonePlayerSuperiors()); - addSorting(id, allBaseOverrideClonePlayerInferiors, baseSorting.getOverrideClonePlayerInferiors()); - addSorting(id, allBaseAfterClonePlayerSuperiors, baseSorting.getAfterClonePlayerSuperiors()); - addSorting(id, allBaseAfterClonePlayerInferiors, baseSorting.getAfterClonePlayerInferiors()); - - addSorting(id, allBaseBeforeDamageEntitySuperiors, baseSorting.getBeforeDamageEntitySuperiors()); - addSorting(id, allBaseBeforeDamageEntityInferiors, baseSorting.getBeforeDamageEntityInferiors()); - addSorting(id, allBaseOverrideDamageEntitySuperiors, baseSorting.getOverrideDamageEntitySuperiors()); - addSorting(id, allBaseOverrideDamageEntityInferiors, baseSorting.getOverrideDamageEntityInferiors()); - addSorting(id, allBaseAfterDamageEntitySuperiors, baseSorting.getAfterDamageEntitySuperiors()); - addSorting(id, allBaseAfterDamageEntityInferiors, baseSorting.getAfterDamageEntityInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIChestSuperiors, baseSorting.getBeforeDisplayGUIChestSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIChestInferiors, baseSorting.getBeforeDisplayGUIChestInferiors()); - addSorting(id, allBaseOverrideDisplayGUIChestSuperiors, baseSorting.getOverrideDisplayGUIChestSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIChestInferiors, baseSorting.getOverrideDisplayGUIChestInferiors()); - addSorting(id, allBaseAfterDisplayGUIChestSuperiors, baseSorting.getAfterDisplayGUIChestSuperiors()); - addSorting(id, allBaseAfterDisplayGUIChestInferiors, baseSorting.getAfterDisplayGUIChestInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIDispenserSuperiors, baseSorting.getBeforeDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIDispenserInferiors, baseSorting.getBeforeDisplayGUIDispenserInferiors()); - addSorting(id, allBaseOverrideDisplayGUIDispenserSuperiors, baseSorting.getOverrideDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIDispenserInferiors, baseSorting.getOverrideDisplayGUIDispenserInferiors()); - addSorting(id, allBaseAfterDisplayGUIDispenserSuperiors, baseSorting.getAfterDisplayGUIDispenserSuperiors()); - addSorting(id, allBaseAfterDisplayGUIDispenserInferiors, baseSorting.getAfterDisplayGUIDispenserInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIFurnaceSuperiors, baseSorting.getBeforeDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIFurnaceInferiors, baseSorting.getBeforeDisplayGUIFurnaceInferiors()); - addSorting(id, allBaseOverrideDisplayGUIFurnaceSuperiors, baseSorting.getOverrideDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIFurnaceInferiors, baseSorting.getOverrideDisplayGUIFurnaceInferiors()); - addSorting(id, allBaseAfterDisplayGUIFurnaceSuperiors, baseSorting.getAfterDisplayGUIFurnaceSuperiors()); - addSorting(id, allBaseAfterDisplayGUIFurnaceInferiors, baseSorting.getAfterDisplayGUIFurnaceInferiors()); - - addSorting(id, allBaseBeforeDisplayGUIWorkbenchSuperiors, baseSorting.getBeforeDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseBeforeDisplayGUIWorkbenchInferiors, baseSorting.getBeforeDisplayGUIWorkbenchInferiors()); - addSorting(id, allBaseOverrideDisplayGUIWorkbenchSuperiors, baseSorting.getOverrideDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseOverrideDisplayGUIWorkbenchInferiors, baseSorting.getOverrideDisplayGUIWorkbenchInferiors()); - addSorting(id, allBaseAfterDisplayGUIWorkbenchSuperiors, baseSorting.getAfterDisplayGUIWorkbenchSuperiors()); - addSorting(id, allBaseAfterDisplayGUIWorkbenchInferiors, baseSorting.getAfterDisplayGUIWorkbenchInferiors()); - - addSorting(id, allBaseBeforeDropOneItemSuperiors, baseSorting.getBeforeDropOneItemSuperiors()); - addSorting(id, allBaseBeforeDropOneItemInferiors, baseSorting.getBeforeDropOneItemInferiors()); - addSorting(id, allBaseOverrideDropOneItemSuperiors, baseSorting.getOverrideDropOneItemSuperiors()); - addSorting(id, allBaseOverrideDropOneItemInferiors, baseSorting.getOverrideDropOneItemInferiors()); - addSorting(id, allBaseAfterDropOneItemSuperiors, baseSorting.getAfterDropOneItemSuperiors()); - addSorting(id, allBaseAfterDropOneItemInferiors, baseSorting.getAfterDropOneItemInferiors()); - - addSorting(id, allBaseBeforeDropPlayerItemSuperiors, baseSorting.getBeforeDropPlayerItemSuperiors()); - addSorting(id, allBaseBeforeDropPlayerItemInferiors, baseSorting.getBeforeDropPlayerItemInferiors()); - addSorting(id, allBaseOverrideDropPlayerItemSuperiors, baseSorting.getOverrideDropPlayerItemSuperiors()); - addSorting(id, allBaseOverrideDropPlayerItemInferiors, baseSorting.getOverrideDropPlayerItemInferiors()); - addSorting(id, allBaseAfterDropPlayerItemSuperiors, baseSorting.getAfterDropPlayerItemSuperiors()); - addSorting(id, allBaseAfterDropPlayerItemInferiors, baseSorting.getAfterDropPlayerItemInferiors()); - - addSorting(id, allBaseBeforeFallSuperiors, baseSorting.getBeforeFallSuperiors()); - addSorting(id, allBaseBeforeFallInferiors, baseSorting.getBeforeFallInferiors()); - addSorting(id, allBaseOverrideFallSuperiors, baseSorting.getOverrideFallSuperiors()); - addSorting(id, allBaseOverrideFallInferiors, baseSorting.getOverrideFallInferiors()); - addSorting(id, allBaseAfterFallSuperiors, baseSorting.getAfterFallSuperiors()); - addSorting(id, allBaseAfterFallInferiors, baseSorting.getAfterFallInferiors()); - - addSorting(id, allBaseBeforeGetAIMoveSpeedSuperiors, baseSorting.getBeforeGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseBeforeGetAIMoveSpeedInferiors, baseSorting.getBeforeGetAIMoveSpeedInferiors()); - addSorting(id, allBaseOverrideGetAIMoveSpeedSuperiors, baseSorting.getOverrideGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseOverrideGetAIMoveSpeedInferiors, baseSorting.getOverrideGetAIMoveSpeedInferiors()); - addSorting(id, allBaseAfterGetAIMoveSpeedSuperiors, baseSorting.getAfterGetAIMoveSpeedSuperiors()); - addSorting(id, allBaseAfterGetAIMoveSpeedInferiors, baseSorting.getAfterGetAIMoveSpeedInferiors()); - - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockInferiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockInferiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockInferiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockInferiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockSuperiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockSuperiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockInferiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockInferiors()); - - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getBeforeGetCurrentPlayerStrVsBlockForgeInferiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getOverrideGetCurrentPlayerStrVsBlockForgeInferiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockForgeSuperiors()); - addSorting(id, allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors, baseSorting.getAfterGetCurrentPlayerStrVsBlockForgeInferiors()); - - addSorting(id, allBaseBeforeGetDistanceSqSuperiors, baseSorting.getBeforeGetDistanceSqSuperiors()); - addSorting(id, allBaseBeforeGetDistanceSqInferiors, baseSorting.getBeforeGetDistanceSqInferiors()); - addSorting(id, allBaseOverrideGetDistanceSqSuperiors, baseSorting.getOverrideGetDistanceSqSuperiors()); - addSorting(id, allBaseOverrideGetDistanceSqInferiors, baseSorting.getOverrideGetDistanceSqInferiors()); - addSorting(id, allBaseAfterGetDistanceSqSuperiors, baseSorting.getAfterGetDistanceSqSuperiors()); - addSorting(id, allBaseAfterGetDistanceSqInferiors, baseSorting.getAfterGetDistanceSqInferiors()); - - addSorting(id, allBaseBeforeGetBrightnessSuperiors, baseSorting.getBeforeGetBrightnessSuperiors()); - addSorting(id, allBaseBeforeGetBrightnessInferiors, baseSorting.getBeforeGetBrightnessInferiors()); - addSorting(id, allBaseOverrideGetBrightnessSuperiors, baseSorting.getOverrideGetBrightnessSuperiors()); - addSorting(id, allBaseOverrideGetBrightnessInferiors, baseSorting.getOverrideGetBrightnessInferiors()); - addSorting(id, allBaseAfterGetBrightnessSuperiors, baseSorting.getAfterGetBrightnessSuperiors()); - addSorting(id, allBaseAfterGetBrightnessInferiors, baseSorting.getAfterGetBrightnessInferiors()); - - addSorting(id, allBaseBeforeGetEyeHeightSuperiors, baseSorting.getBeforeGetEyeHeightSuperiors()); - addSorting(id, allBaseBeforeGetEyeHeightInferiors, baseSorting.getBeforeGetEyeHeightInferiors()); - addSorting(id, allBaseOverrideGetEyeHeightSuperiors, baseSorting.getOverrideGetEyeHeightSuperiors()); - addSorting(id, allBaseOverrideGetEyeHeightInferiors, baseSorting.getOverrideGetEyeHeightInferiors()); - addSorting(id, allBaseAfterGetEyeHeightSuperiors, baseSorting.getAfterGetEyeHeightSuperiors()); - addSorting(id, allBaseAfterGetEyeHeightInferiors, baseSorting.getAfterGetEyeHeightInferiors()); - - addSorting(id, allBaseBeforeHealSuperiors, baseSorting.getBeforeHealSuperiors()); - addSorting(id, allBaseBeforeHealInferiors, baseSorting.getBeforeHealInferiors()); - addSorting(id, allBaseOverrideHealSuperiors, baseSorting.getOverrideHealSuperiors()); - addSorting(id, allBaseOverrideHealInferiors, baseSorting.getOverrideHealInferiors()); - addSorting(id, allBaseAfterHealSuperiors, baseSorting.getAfterHealSuperiors()); - addSorting(id, allBaseAfterHealInferiors, baseSorting.getAfterHealInferiors()); - - addSorting(id, allBaseBeforeIsEntityInsideOpaqueBlockSuperiors, baseSorting.getBeforeIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseBeforeIsEntityInsideOpaqueBlockInferiors, baseSorting.getBeforeIsEntityInsideOpaqueBlockInferiors()); - addSorting(id, allBaseOverrideIsEntityInsideOpaqueBlockSuperiors, baseSorting.getOverrideIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseOverrideIsEntityInsideOpaqueBlockInferiors, baseSorting.getOverrideIsEntityInsideOpaqueBlockInferiors()); - addSorting(id, allBaseAfterIsEntityInsideOpaqueBlockSuperiors, baseSorting.getAfterIsEntityInsideOpaqueBlockSuperiors()); - addSorting(id, allBaseAfterIsEntityInsideOpaqueBlockInferiors, baseSorting.getAfterIsEntityInsideOpaqueBlockInferiors()); - - addSorting(id, allBaseBeforeIsInWaterSuperiors, baseSorting.getBeforeIsInWaterSuperiors()); - addSorting(id, allBaseBeforeIsInWaterInferiors, baseSorting.getBeforeIsInWaterInferiors()); - addSorting(id, allBaseOverrideIsInWaterSuperiors, baseSorting.getOverrideIsInWaterSuperiors()); - addSorting(id, allBaseOverrideIsInWaterInferiors, baseSorting.getOverrideIsInWaterInferiors()); - addSorting(id, allBaseAfterIsInWaterSuperiors, baseSorting.getAfterIsInWaterSuperiors()); - addSorting(id, allBaseAfterIsInWaterInferiors, baseSorting.getAfterIsInWaterInferiors()); - - addSorting(id, allBaseBeforeIsInsideOfMaterialSuperiors, baseSorting.getBeforeIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseBeforeIsInsideOfMaterialInferiors, baseSorting.getBeforeIsInsideOfMaterialInferiors()); - addSorting(id, allBaseOverrideIsInsideOfMaterialSuperiors, baseSorting.getOverrideIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseOverrideIsInsideOfMaterialInferiors, baseSorting.getOverrideIsInsideOfMaterialInferiors()); - addSorting(id, allBaseAfterIsInsideOfMaterialSuperiors, baseSorting.getAfterIsInsideOfMaterialSuperiors()); - addSorting(id, allBaseAfterIsInsideOfMaterialInferiors, baseSorting.getAfterIsInsideOfMaterialInferiors()); - - addSorting(id, allBaseBeforeIsOnLadderSuperiors, baseSorting.getBeforeIsOnLadderSuperiors()); - addSorting(id, allBaseBeforeIsOnLadderInferiors, baseSorting.getBeforeIsOnLadderInferiors()); - addSorting(id, allBaseOverrideIsOnLadderSuperiors, baseSorting.getOverrideIsOnLadderSuperiors()); - addSorting(id, allBaseOverrideIsOnLadderInferiors, baseSorting.getOverrideIsOnLadderInferiors()); - addSorting(id, allBaseAfterIsOnLadderSuperiors, baseSorting.getAfterIsOnLadderSuperiors()); - addSorting(id, allBaseAfterIsOnLadderInferiors, baseSorting.getAfterIsOnLadderInferiors()); - - addSorting(id, allBaseBeforeIsPlayerSleepingSuperiors, baseSorting.getBeforeIsPlayerSleepingSuperiors()); - addSorting(id, allBaseBeforeIsPlayerSleepingInferiors, baseSorting.getBeforeIsPlayerSleepingInferiors()); - addSorting(id, allBaseOverrideIsPlayerSleepingSuperiors, baseSorting.getOverrideIsPlayerSleepingSuperiors()); - addSorting(id, allBaseOverrideIsPlayerSleepingInferiors, baseSorting.getOverrideIsPlayerSleepingInferiors()); - addSorting(id, allBaseAfterIsPlayerSleepingSuperiors, baseSorting.getAfterIsPlayerSleepingSuperiors()); - addSorting(id, allBaseAfterIsPlayerSleepingInferiors, baseSorting.getAfterIsPlayerSleepingInferiors()); - - addSorting(id, allBaseBeforeIsSneakingSuperiors, baseSorting.getBeforeIsSneakingSuperiors()); - addSorting(id, allBaseBeforeIsSneakingInferiors, baseSorting.getBeforeIsSneakingInferiors()); - addSorting(id, allBaseOverrideIsSneakingSuperiors, baseSorting.getOverrideIsSneakingSuperiors()); - addSorting(id, allBaseOverrideIsSneakingInferiors, baseSorting.getOverrideIsSneakingInferiors()); - addSorting(id, allBaseAfterIsSneakingSuperiors, baseSorting.getAfterIsSneakingSuperiors()); - addSorting(id, allBaseAfterIsSneakingInferiors, baseSorting.getAfterIsSneakingInferiors()); - - addSorting(id, allBaseBeforeJumpSuperiors, baseSorting.getBeforeJumpSuperiors()); - addSorting(id, allBaseBeforeJumpInferiors, baseSorting.getBeforeJumpInferiors()); - addSorting(id, allBaseOverrideJumpSuperiors, baseSorting.getOverrideJumpSuperiors()); - addSorting(id, allBaseOverrideJumpInferiors, baseSorting.getOverrideJumpInferiors()); - addSorting(id, allBaseAfterJumpSuperiors, baseSorting.getAfterJumpSuperiors()); - addSorting(id, allBaseAfterJumpInferiors, baseSorting.getAfterJumpInferiors()); - - addSorting(id, allBaseBeforeKnockBackSuperiors, baseSorting.getBeforeKnockBackSuperiors()); - addSorting(id, allBaseBeforeKnockBackInferiors, baseSorting.getBeforeKnockBackInferiors()); - addSorting(id, allBaseOverrideKnockBackSuperiors, baseSorting.getOverrideKnockBackSuperiors()); - addSorting(id, allBaseOverrideKnockBackInferiors, baseSorting.getOverrideKnockBackInferiors()); - addSorting(id, allBaseAfterKnockBackSuperiors, baseSorting.getAfterKnockBackSuperiors()); - addSorting(id, allBaseAfterKnockBackInferiors, baseSorting.getAfterKnockBackInferiors()); - - addSorting(id, allBaseBeforeMountEntitySuperiors, baseSorting.getBeforeMountEntitySuperiors()); - addSorting(id, allBaseBeforeMountEntityInferiors, baseSorting.getBeforeMountEntityInferiors()); - addSorting(id, allBaseOverrideMountEntitySuperiors, baseSorting.getOverrideMountEntitySuperiors()); - addSorting(id, allBaseOverrideMountEntityInferiors, baseSorting.getOverrideMountEntityInferiors()); - addSorting(id, allBaseAfterMountEntitySuperiors, baseSorting.getAfterMountEntitySuperiors()); - addSorting(id, allBaseAfterMountEntityInferiors, baseSorting.getAfterMountEntityInferiors()); - - addSorting(id, allBaseBeforeMoveEntitySuperiors, baseSorting.getBeforeMoveEntitySuperiors()); - addSorting(id, allBaseBeforeMoveEntityInferiors, baseSorting.getBeforeMoveEntityInferiors()); - addSorting(id, allBaseOverrideMoveEntitySuperiors, baseSorting.getOverrideMoveEntitySuperiors()); - addSorting(id, allBaseOverrideMoveEntityInferiors, baseSorting.getOverrideMoveEntityInferiors()); - addSorting(id, allBaseAfterMoveEntitySuperiors, baseSorting.getAfterMoveEntitySuperiors()); - addSorting(id, allBaseAfterMoveEntityInferiors, baseSorting.getAfterMoveEntityInferiors()); - - addSorting(id, allBaseBeforeMoveEntityWithHeadingSuperiors, baseSorting.getBeforeMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseBeforeMoveEntityWithHeadingInferiors, baseSorting.getBeforeMoveEntityWithHeadingInferiors()); - addSorting(id, allBaseOverrideMoveEntityWithHeadingSuperiors, baseSorting.getOverrideMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseOverrideMoveEntityWithHeadingInferiors, baseSorting.getOverrideMoveEntityWithHeadingInferiors()); - addSorting(id, allBaseAfterMoveEntityWithHeadingSuperiors, baseSorting.getAfterMoveEntityWithHeadingSuperiors()); - addSorting(id, allBaseAfterMoveEntityWithHeadingInferiors, baseSorting.getAfterMoveEntityWithHeadingInferiors()); - - addSorting(id, allBaseBeforeMoveFlyingSuperiors, baseSorting.getBeforeMoveFlyingSuperiors()); - addSorting(id, allBaseBeforeMoveFlyingInferiors, baseSorting.getBeforeMoveFlyingInferiors()); - addSorting(id, allBaseOverrideMoveFlyingSuperiors, baseSorting.getOverrideMoveFlyingSuperiors()); - addSorting(id, allBaseOverrideMoveFlyingInferiors, baseSorting.getOverrideMoveFlyingInferiors()); - addSorting(id, allBaseAfterMoveFlyingSuperiors, baseSorting.getAfterMoveFlyingSuperiors()); - addSorting(id, allBaseAfterMoveFlyingInferiors, baseSorting.getAfterMoveFlyingInferiors()); - - addSorting(id, allBaseBeforeOnDeathSuperiors, baseSorting.getBeforeOnDeathSuperiors()); - addSorting(id, allBaseBeforeOnDeathInferiors, baseSorting.getBeforeOnDeathInferiors()); - addSorting(id, allBaseOverrideOnDeathSuperiors, baseSorting.getOverrideOnDeathSuperiors()); - addSorting(id, allBaseOverrideOnDeathInferiors, baseSorting.getOverrideOnDeathInferiors()); - addSorting(id, allBaseAfterOnDeathSuperiors, baseSorting.getAfterOnDeathSuperiors()); - addSorting(id, allBaseAfterOnDeathInferiors, baseSorting.getAfterOnDeathInferiors()); - - addSorting(id, allBaseBeforeOnLivingUpdateSuperiors, baseSorting.getBeforeOnLivingUpdateSuperiors()); - addSorting(id, allBaseBeforeOnLivingUpdateInferiors, baseSorting.getBeforeOnLivingUpdateInferiors()); - addSorting(id, allBaseOverrideOnLivingUpdateSuperiors, baseSorting.getOverrideOnLivingUpdateSuperiors()); - addSorting(id, allBaseOverrideOnLivingUpdateInferiors, baseSorting.getOverrideOnLivingUpdateInferiors()); - addSorting(id, allBaseAfterOnLivingUpdateSuperiors, baseSorting.getAfterOnLivingUpdateSuperiors()); - addSorting(id, allBaseAfterOnLivingUpdateInferiors, baseSorting.getAfterOnLivingUpdateInferiors()); - - addSorting(id, allBaseBeforeOnKillEntitySuperiors, baseSorting.getBeforeOnKillEntitySuperiors()); - addSorting(id, allBaseBeforeOnKillEntityInferiors, baseSorting.getBeforeOnKillEntityInferiors()); - addSorting(id, allBaseOverrideOnKillEntitySuperiors, baseSorting.getOverrideOnKillEntitySuperiors()); - addSorting(id, allBaseOverrideOnKillEntityInferiors, baseSorting.getOverrideOnKillEntityInferiors()); - addSorting(id, allBaseAfterOnKillEntitySuperiors, baseSorting.getAfterOnKillEntitySuperiors()); - addSorting(id, allBaseAfterOnKillEntityInferiors, baseSorting.getAfterOnKillEntityInferiors()); - - addSorting(id, allBaseBeforeOnStruckByLightningSuperiors, baseSorting.getBeforeOnStruckByLightningSuperiors()); - addSorting(id, allBaseBeforeOnStruckByLightningInferiors, baseSorting.getBeforeOnStruckByLightningInferiors()); - addSorting(id, allBaseOverrideOnStruckByLightningSuperiors, baseSorting.getOverrideOnStruckByLightningSuperiors()); - addSorting(id, allBaseOverrideOnStruckByLightningInferiors, baseSorting.getOverrideOnStruckByLightningInferiors()); - addSorting(id, allBaseAfterOnStruckByLightningSuperiors, baseSorting.getAfterOnStruckByLightningSuperiors()); - addSorting(id, allBaseAfterOnStruckByLightningInferiors, baseSorting.getAfterOnStruckByLightningInferiors()); - - addSorting(id, allBaseBeforeOnUpdateSuperiors, baseSorting.getBeforeOnUpdateSuperiors()); - addSorting(id, allBaseBeforeOnUpdateInferiors, baseSorting.getBeforeOnUpdateInferiors()); - addSorting(id, allBaseOverrideOnUpdateSuperiors, baseSorting.getOverrideOnUpdateSuperiors()); - addSorting(id, allBaseOverrideOnUpdateInferiors, baseSorting.getOverrideOnUpdateInferiors()); - addSorting(id, allBaseAfterOnUpdateSuperiors, baseSorting.getAfterOnUpdateSuperiors()); - addSorting(id, allBaseAfterOnUpdateInferiors, baseSorting.getAfterOnUpdateInferiors()); - - addSorting(id, allBaseBeforeOnUpdateEntitySuperiors, baseSorting.getBeforeOnUpdateEntitySuperiors()); - addSorting(id, allBaseBeforeOnUpdateEntityInferiors, baseSorting.getBeforeOnUpdateEntityInferiors()); - addSorting(id, allBaseOverrideOnUpdateEntitySuperiors, baseSorting.getOverrideOnUpdateEntitySuperiors()); - addSorting(id, allBaseOverrideOnUpdateEntityInferiors, baseSorting.getOverrideOnUpdateEntityInferiors()); - addSorting(id, allBaseAfterOnUpdateEntitySuperiors, baseSorting.getAfterOnUpdateEntitySuperiors()); - addSorting(id, allBaseAfterOnUpdateEntityInferiors, baseSorting.getAfterOnUpdateEntityInferiors()); - - addSorting(id, allBaseBeforeReadEntityFromNBTSuperiors, baseSorting.getBeforeReadEntityFromNBTSuperiors()); - addSorting(id, allBaseBeforeReadEntityFromNBTInferiors, baseSorting.getBeforeReadEntityFromNBTInferiors()); - addSorting(id, allBaseOverrideReadEntityFromNBTSuperiors, baseSorting.getOverrideReadEntityFromNBTSuperiors()); - addSorting(id, allBaseOverrideReadEntityFromNBTInferiors, baseSorting.getOverrideReadEntityFromNBTInferiors()); - addSorting(id, allBaseAfterReadEntityFromNBTSuperiors, baseSorting.getAfterReadEntityFromNBTSuperiors()); - addSorting(id, allBaseAfterReadEntityFromNBTInferiors, baseSorting.getAfterReadEntityFromNBTInferiors()); - - addSorting(id, allBaseBeforeSetDeadSuperiors, baseSorting.getBeforeSetDeadSuperiors()); - addSorting(id, allBaseBeforeSetDeadInferiors, baseSorting.getBeforeSetDeadInferiors()); - addSorting(id, allBaseOverrideSetDeadSuperiors, baseSorting.getOverrideSetDeadSuperiors()); - addSorting(id, allBaseOverrideSetDeadInferiors, baseSorting.getOverrideSetDeadInferiors()); - addSorting(id, allBaseAfterSetDeadSuperiors, baseSorting.getAfterSetDeadSuperiors()); - addSorting(id, allBaseAfterSetDeadInferiors, baseSorting.getAfterSetDeadInferiors()); - - addSorting(id, allBaseBeforeSetEntityActionStateSuperiors, baseSorting.getBeforeSetEntityActionStateSuperiors()); - addSorting(id, allBaseBeforeSetEntityActionStateInferiors, baseSorting.getBeforeSetEntityActionStateInferiors()); - addSorting(id, allBaseOverrideSetEntityActionStateSuperiors, baseSorting.getOverrideSetEntityActionStateSuperiors()); - addSorting(id, allBaseOverrideSetEntityActionStateInferiors, baseSorting.getOverrideSetEntityActionStateInferiors()); - addSorting(id, allBaseAfterSetEntityActionStateSuperiors, baseSorting.getAfterSetEntityActionStateSuperiors()); - addSorting(id, allBaseAfterSetEntityActionStateInferiors, baseSorting.getAfterSetEntityActionStateInferiors()); - - addSorting(id, allBaseBeforeSetPositionSuperiors, baseSorting.getBeforeSetPositionSuperiors()); - addSorting(id, allBaseBeforeSetPositionInferiors, baseSorting.getBeforeSetPositionInferiors()); - addSorting(id, allBaseOverrideSetPositionSuperiors, baseSorting.getOverrideSetPositionSuperiors()); - addSorting(id, allBaseOverrideSetPositionInferiors, baseSorting.getOverrideSetPositionInferiors()); - addSorting(id, allBaseAfterSetPositionSuperiors, baseSorting.getAfterSetPositionSuperiors()); - addSorting(id, allBaseAfterSetPositionInferiors, baseSorting.getAfterSetPositionInferiors()); - - addSorting(id, allBaseBeforeSetSneakingSuperiors, baseSorting.getBeforeSetSneakingSuperiors()); - addSorting(id, allBaseBeforeSetSneakingInferiors, baseSorting.getBeforeSetSneakingInferiors()); - addSorting(id, allBaseOverrideSetSneakingSuperiors, baseSorting.getOverrideSetSneakingSuperiors()); - addSorting(id, allBaseOverrideSetSneakingInferiors, baseSorting.getOverrideSetSneakingInferiors()); - addSorting(id, allBaseAfterSetSneakingSuperiors, baseSorting.getAfterSetSneakingSuperiors()); - addSorting(id, allBaseAfterSetSneakingInferiors, baseSorting.getAfterSetSneakingInferiors()); - - addSorting(id, allBaseBeforeSetSprintingSuperiors, baseSorting.getBeforeSetSprintingSuperiors()); - addSorting(id, allBaseBeforeSetSprintingInferiors, baseSorting.getBeforeSetSprintingInferiors()); - addSorting(id, allBaseOverrideSetSprintingSuperiors, baseSorting.getOverrideSetSprintingSuperiors()); - addSorting(id, allBaseOverrideSetSprintingInferiors, baseSorting.getOverrideSetSprintingInferiors()); - addSorting(id, allBaseAfterSetSprintingSuperiors, baseSorting.getAfterSetSprintingSuperiors()); - addSorting(id, allBaseAfterSetSprintingInferiors, baseSorting.getAfterSetSprintingInferiors()); - - addSorting(id, allBaseBeforeSwingItemSuperiors, baseSorting.getBeforeSwingItemSuperiors()); - addSorting(id, allBaseBeforeSwingItemInferiors, baseSorting.getBeforeSwingItemInferiors()); - addSorting(id, allBaseOverrideSwingItemSuperiors, baseSorting.getOverrideSwingItemSuperiors()); - addSorting(id, allBaseOverrideSwingItemInferiors, baseSorting.getOverrideSwingItemInferiors()); - addSorting(id, allBaseAfterSwingItemSuperiors, baseSorting.getAfterSwingItemSuperiors()); - addSorting(id, allBaseAfterSwingItemInferiors, baseSorting.getAfterSwingItemInferiors()); - - addSorting(id, allBaseBeforeUpdateEntityActionStateSuperiors, baseSorting.getBeforeUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseBeforeUpdateEntityActionStateInferiors, baseSorting.getBeforeUpdateEntityActionStateInferiors()); - addSorting(id, allBaseOverrideUpdateEntityActionStateSuperiors, baseSorting.getOverrideUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseOverrideUpdateEntityActionStateInferiors, baseSorting.getOverrideUpdateEntityActionStateInferiors()); - addSorting(id, allBaseAfterUpdateEntityActionStateSuperiors, baseSorting.getAfterUpdateEntityActionStateSuperiors()); - addSorting(id, allBaseAfterUpdateEntityActionStateInferiors, baseSorting.getAfterUpdateEntityActionStateInferiors()); - - addSorting(id, allBaseBeforeUpdatePotionEffectsSuperiors, baseSorting.getBeforeUpdatePotionEffectsSuperiors()); - addSorting(id, allBaseBeforeUpdatePotionEffectsInferiors, baseSorting.getBeforeUpdatePotionEffectsInferiors()); - addSorting(id, allBaseOverrideUpdatePotionEffectsSuperiors, baseSorting.getOverrideUpdatePotionEffectsSuperiors()); - addSorting(id, allBaseOverrideUpdatePotionEffectsInferiors, baseSorting.getOverrideUpdatePotionEffectsInferiors()); - addSorting(id, allBaseAfterUpdatePotionEffectsSuperiors, baseSorting.getAfterUpdatePotionEffectsSuperiors()); - addSorting(id, allBaseAfterUpdatePotionEffectsInferiors, baseSorting.getAfterUpdatePotionEffectsInferiors()); - - addSorting(id, allBaseBeforeUpdateRiddenSuperiors, baseSorting.getBeforeUpdateRiddenSuperiors()); - addSorting(id, allBaseBeforeUpdateRiddenInferiors, baseSorting.getBeforeUpdateRiddenInferiors()); - addSorting(id, allBaseOverrideUpdateRiddenSuperiors, baseSorting.getOverrideUpdateRiddenSuperiors()); - addSorting(id, allBaseOverrideUpdateRiddenInferiors, baseSorting.getOverrideUpdateRiddenInferiors()); - addSorting(id, allBaseAfterUpdateRiddenSuperiors, baseSorting.getAfterUpdateRiddenSuperiors()); - addSorting(id, allBaseAfterUpdateRiddenInferiors, baseSorting.getAfterUpdateRiddenInferiors()); - - addSorting(id, allBaseBeforeWakeUpPlayerSuperiors, baseSorting.getBeforeWakeUpPlayerSuperiors()); - addSorting(id, allBaseBeforeWakeUpPlayerInferiors, baseSorting.getBeforeWakeUpPlayerInferiors()); - addSorting(id, allBaseOverrideWakeUpPlayerSuperiors, baseSorting.getOverrideWakeUpPlayerSuperiors()); - addSorting(id, allBaseOverrideWakeUpPlayerInferiors, baseSorting.getOverrideWakeUpPlayerInferiors()); - addSorting(id, allBaseAfterWakeUpPlayerSuperiors, baseSorting.getAfterWakeUpPlayerSuperiors()); - addSorting(id, allBaseAfterWakeUpPlayerInferiors, baseSorting.getAfterWakeUpPlayerInferiors()); - - addSorting(id, allBaseBeforeWriteEntityToNBTSuperiors, baseSorting.getBeforeWriteEntityToNBTSuperiors()); - addSorting(id, allBaseBeforeWriteEntityToNBTInferiors, baseSorting.getBeforeWriteEntityToNBTInferiors()); - addSorting(id, allBaseOverrideWriteEntityToNBTSuperiors, baseSorting.getOverrideWriteEntityToNBTSuperiors()); - addSorting(id, allBaseOverrideWriteEntityToNBTInferiors, baseSorting.getOverrideWriteEntityToNBTInferiors()); - addSorting(id, allBaseAfterWriteEntityToNBTSuperiors, baseSorting.getAfterWriteEntityToNBTSuperiors()); - addSorting(id, allBaseAfterWriteEntityToNBTInferiors, baseSorting.getAfterWriteEntityToNBTInferiors()); - - } - - addMethod(id, baseClass, beforeLocalConstructingHookTypes, "beforeLocalConstructing", net.minecraft.server.MinecraftServer.class, net.minecraft.world.WorldServer.class, com.mojang.authlib.GameProfile.class, net.minecraft.server.management.ItemInWorldManager.class); - addMethod(id, baseClass, afterLocalConstructingHookTypes, "afterLocalConstructing", net.minecraft.server.MinecraftServer.class, net.minecraft.world.WorldServer.class, com.mojang.authlib.GameProfile.class, net.minecraft.server.management.ItemInWorldManager.class); - - - addMethod(id, baseClass, beforeAddExhaustionHookTypes, "beforeAddExhaustion", float.class); - addMethod(id, baseClass, overrideAddExhaustionHookTypes, "addExhaustion", float.class); - addMethod(id, baseClass, afterAddExhaustionHookTypes, "afterAddExhaustion", float.class); - - addMethod(id, baseClass, beforeAddExperienceHookTypes, "beforeAddExperience", int.class); - addMethod(id, baseClass, overrideAddExperienceHookTypes, "addExperience", int.class); - addMethod(id, baseClass, afterAddExperienceHookTypes, "afterAddExperience", int.class); - - addMethod(id, baseClass, beforeAddExperienceLevelHookTypes, "beforeAddExperienceLevel", int.class); - addMethod(id, baseClass, overrideAddExperienceLevelHookTypes, "addExperienceLevel", int.class); - addMethod(id, baseClass, afterAddExperienceLevelHookTypes, "afterAddExperienceLevel", int.class); - - addMethod(id, baseClass, beforeAddMovementStatHookTypes, "beforeAddMovementStat", double.class, double.class, double.class); - addMethod(id, baseClass, overrideAddMovementStatHookTypes, "addMovementStat", double.class, double.class, double.class); - addMethod(id, baseClass, afterAddMovementStatHookTypes, "afterAddMovementStat", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeAttackEntityFromHookTypes, "beforeAttackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, overrideAttackEntityFromHookTypes, "attackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, afterAttackEntityFromHookTypes, "afterAttackEntityFrom", net.minecraft.util.DamageSource.class, float.class); - - addMethod(id, baseClass, beforeAttackTargetEntityWithCurrentItemHookTypes, "beforeAttackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideAttackTargetEntityWithCurrentItemHookTypes, "attackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterAttackTargetEntityWithCurrentItemHookTypes, "afterAttackTargetEntityWithCurrentItem", net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforeCanBreatheUnderwaterHookTypes, "beforeCanBreatheUnderwater"); - addMethod(id, baseClass, overrideCanBreatheUnderwaterHookTypes, "canBreatheUnderwater"); - addMethod(id, baseClass, afterCanBreatheUnderwaterHookTypes, "afterCanBreatheUnderwater"); - - addMethod(id, baseClass, beforeCanHarvestBlockHookTypes, "beforeCanHarvestBlock", net.minecraft.block.Block.class); - addMethod(id, baseClass, overrideCanHarvestBlockHookTypes, "canHarvestBlock", net.minecraft.block.Block.class); - addMethod(id, baseClass, afterCanHarvestBlockHookTypes, "afterCanHarvestBlock", net.minecraft.block.Block.class); - - addMethod(id, baseClass, beforeCanPlayerEditHookTypes, "beforeCanPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - addMethod(id, baseClass, overrideCanPlayerEditHookTypes, "canPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - addMethod(id, baseClass, afterCanPlayerEditHookTypes, "afterCanPlayerEdit", int.class, int.class, int.class, int.class, net.minecraft.item.ItemStack.class); - - addMethod(id, baseClass, beforeCanTriggerWalkingHookTypes, "beforeCanTriggerWalking"); - addMethod(id, baseClass, overrideCanTriggerWalkingHookTypes, "canTriggerWalking"); - addMethod(id, baseClass, afterCanTriggerWalkingHookTypes, "afterCanTriggerWalking"); - - addMethod(id, baseClass, beforeClonePlayerHookTypes, "beforeClonePlayer", net.minecraft.entity.player.EntityPlayer.class, boolean.class); - addMethod(id, baseClass, overrideClonePlayerHookTypes, "clonePlayer", net.minecraft.entity.player.EntityPlayer.class, boolean.class); - addMethod(id, baseClass, afterClonePlayerHookTypes, "afterClonePlayer", net.minecraft.entity.player.EntityPlayer.class, boolean.class); - - addMethod(id, baseClass, beforeDamageEntityHookTypes, "beforeDamageEntity", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, overrideDamageEntityHookTypes, "damageEntity", net.minecraft.util.DamageSource.class, float.class); - addMethod(id, baseClass, afterDamageEntityHookTypes, "afterDamageEntity", net.minecraft.util.DamageSource.class, float.class); - - addMethod(id, baseClass, beforeDisplayGUIChestHookTypes, "beforeDisplayGUIChest", net.minecraft.inventory.IInventory.class); - addMethod(id, baseClass, overrideDisplayGUIChestHookTypes, "displayGUIChest", net.minecraft.inventory.IInventory.class); - addMethod(id, baseClass, afterDisplayGUIChestHookTypes, "afterDisplayGUIChest", net.minecraft.inventory.IInventory.class); - - addMethod(id, baseClass, beforeDisplayGUIDispenserHookTypes, "beforeDisplayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - addMethod(id, baseClass, overrideDisplayGUIDispenserHookTypes, "displayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - addMethod(id, baseClass, afterDisplayGUIDispenserHookTypes, "afterDisplayGUIDispenser", net.minecraft.tileentity.TileEntityDispenser.class); - - addMethod(id, baseClass, beforeDisplayGUIFurnaceHookTypes, "beforeDisplayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - addMethod(id, baseClass, overrideDisplayGUIFurnaceHookTypes, "displayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - addMethod(id, baseClass, afterDisplayGUIFurnaceHookTypes, "afterDisplayGUIFurnace", net.minecraft.tileentity.TileEntityFurnace.class); - - addMethod(id, baseClass, beforeDisplayGUIWorkbenchHookTypes, "beforeDisplayGUIWorkbench", int.class, int.class, int.class); - addMethod(id, baseClass, overrideDisplayGUIWorkbenchHookTypes, "displayGUIWorkbench", int.class, int.class, int.class); - addMethod(id, baseClass, afterDisplayGUIWorkbenchHookTypes, "afterDisplayGUIWorkbench", int.class, int.class, int.class); - - addMethod(id, baseClass, beforeDropOneItemHookTypes, "beforeDropOneItem", boolean.class); - addMethod(id, baseClass, overrideDropOneItemHookTypes, "dropOneItem", boolean.class); - addMethod(id, baseClass, afterDropOneItemHookTypes, "afterDropOneItem", boolean.class); - - addMethod(id, baseClass, beforeDropPlayerItemHookTypes, "beforeDropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - addMethod(id, baseClass, overrideDropPlayerItemHookTypes, "dropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - addMethod(id, baseClass, afterDropPlayerItemHookTypes, "afterDropPlayerItem", net.minecraft.item.ItemStack.class, boolean.class); - - addMethod(id, baseClass, beforeFallHookTypes, "beforeFall", float.class); - addMethod(id, baseClass, overrideFallHookTypes, "fall", float.class); - addMethod(id, baseClass, afterFallHookTypes, "afterFall", float.class); - - addMethod(id, baseClass, beforeGetAIMoveSpeedHookTypes, "beforeGetAIMoveSpeed"); - addMethod(id, baseClass, overrideGetAIMoveSpeedHookTypes, "getAIMoveSpeed"); - addMethod(id, baseClass, afterGetAIMoveSpeedHookTypes, "afterGetAIMoveSpeed"); - - addMethod(id, baseClass, beforeGetCurrentPlayerStrVsBlockHookTypes, "beforeGetCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - addMethod(id, baseClass, overrideGetCurrentPlayerStrVsBlockHookTypes, "getCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - addMethod(id, baseClass, afterGetCurrentPlayerStrVsBlockHookTypes, "afterGetCurrentPlayerStrVsBlock", net.minecraft.block.Block.class, boolean.class); - - addMethod(id, baseClass, beforeGetCurrentPlayerStrVsBlockForgeHookTypes, "beforeGetCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - addMethod(id, baseClass, overrideGetCurrentPlayerStrVsBlockForgeHookTypes, "getCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - addMethod(id, baseClass, afterGetCurrentPlayerStrVsBlockForgeHookTypes, "afterGetCurrentPlayerStrVsBlockForge", net.minecraft.block.Block.class, boolean.class, int.class); - - addMethod(id, baseClass, beforeGetDistanceSqHookTypes, "beforeGetDistanceSq", double.class, double.class, double.class); - addMethod(id, baseClass, overrideGetDistanceSqHookTypes, "getDistanceSq", double.class, double.class, double.class); - addMethod(id, baseClass, afterGetDistanceSqHookTypes, "afterGetDistanceSq", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeGetBrightnessHookTypes, "beforeGetBrightness", float.class); - addMethod(id, baseClass, overrideGetBrightnessHookTypes, "getBrightness", float.class); - addMethod(id, baseClass, afterGetBrightnessHookTypes, "afterGetBrightness", float.class); - - addMethod(id, baseClass, beforeGetEyeHeightHookTypes, "beforeGetEyeHeight"); - addMethod(id, baseClass, overrideGetEyeHeightHookTypes, "getEyeHeight"); - addMethod(id, baseClass, afterGetEyeHeightHookTypes, "afterGetEyeHeight"); - - addMethod(id, baseClass, beforeHealHookTypes, "beforeHeal", float.class); - addMethod(id, baseClass, overrideHealHookTypes, "heal", float.class); - addMethod(id, baseClass, afterHealHookTypes, "afterHeal", float.class); - - addMethod(id, baseClass, beforeIsEntityInsideOpaqueBlockHookTypes, "beforeIsEntityInsideOpaqueBlock"); - addMethod(id, baseClass, overrideIsEntityInsideOpaqueBlockHookTypes, "isEntityInsideOpaqueBlock"); - addMethod(id, baseClass, afterIsEntityInsideOpaqueBlockHookTypes, "afterIsEntityInsideOpaqueBlock"); - - addMethod(id, baseClass, beforeIsInWaterHookTypes, "beforeIsInWater"); - addMethod(id, baseClass, overrideIsInWaterHookTypes, "isInWater"); - addMethod(id, baseClass, afterIsInWaterHookTypes, "afterIsInWater"); - - addMethod(id, baseClass, beforeIsInsideOfMaterialHookTypes, "beforeIsInsideOfMaterial", net.minecraft.block.material.Material.class); - addMethod(id, baseClass, overrideIsInsideOfMaterialHookTypes, "isInsideOfMaterial", net.minecraft.block.material.Material.class); - addMethod(id, baseClass, afterIsInsideOfMaterialHookTypes, "afterIsInsideOfMaterial", net.minecraft.block.material.Material.class); - - addMethod(id, baseClass, beforeIsOnLadderHookTypes, "beforeIsOnLadder"); - addMethod(id, baseClass, overrideIsOnLadderHookTypes, "isOnLadder"); - addMethod(id, baseClass, afterIsOnLadderHookTypes, "afterIsOnLadder"); - - addMethod(id, baseClass, beforeIsPlayerSleepingHookTypes, "beforeIsPlayerSleeping"); - addMethod(id, baseClass, overrideIsPlayerSleepingHookTypes, "isPlayerSleeping"); - addMethod(id, baseClass, afterIsPlayerSleepingHookTypes, "afterIsPlayerSleeping"); - - addMethod(id, baseClass, beforeIsSneakingHookTypes, "beforeIsSneaking"); - addMethod(id, baseClass, overrideIsSneakingHookTypes, "isSneaking"); - addMethod(id, baseClass, afterIsSneakingHookTypes, "afterIsSneaking"); - - addMethod(id, baseClass, beforeJumpHookTypes, "beforeJump"); - addMethod(id, baseClass, overrideJumpHookTypes, "jump"); - addMethod(id, baseClass, afterJumpHookTypes, "afterJump"); - - addMethod(id, baseClass, beforeKnockBackHookTypes, "beforeKnockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - addMethod(id, baseClass, overrideKnockBackHookTypes, "knockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - addMethod(id, baseClass, afterKnockBackHookTypes, "afterKnockBack", net.minecraft.entity.Entity.class, float.class, double.class, double.class); - - addMethod(id, baseClass, beforeMountEntityHookTypes, "beforeMountEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, overrideMountEntityHookTypes, "mountEntity", net.minecraft.entity.Entity.class); - addMethod(id, baseClass, afterMountEntityHookTypes, "afterMountEntity", net.minecraft.entity.Entity.class); - - addMethod(id, baseClass, beforeMoveEntityHookTypes, "beforeMoveEntity", double.class, double.class, double.class); - addMethod(id, baseClass, overrideMoveEntityHookTypes, "moveEntity", double.class, double.class, double.class); - addMethod(id, baseClass, afterMoveEntityHookTypes, "afterMoveEntity", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeMoveEntityWithHeadingHookTypes, "beforeMoveEntityWithHeading", float.class, float.class); - addMethod(id, baseClass, overrideMoveEntityWithHeadingHookTypes, "moveEntityWithHeading", float.class, float.class); - addMethod(id, baseClass, afterMoveEntityWithHeadingHookTypes, "afterMoveEntityWithHeading", float.class, float.class); - - addMethod(id, baseClass, beforeMoveFlyingHookTypes, "beforeMoveFlying", float.class, float.class, float.class); - addMethod(id, baseClass, overrideMoveFlyingHookTypes, "moveFlying", float.class, float.class, float.class); - addMethod(id, baseClass, afterMoveFlyingHookTypes, "afterMoveFlying", float.class, float.class, float.class); - - addMethod(id, baseClass, beforeOnDeathHookTypes, "beforeOnDeath", net.minecraft.util.DamageSource.class); - addMethod(id, baseClass, overrideOnDeathHookTypes, "onDeath", net.minecraft.util.DamageSource.class); - addMethod(id, baseClass, afterOnDeathHookTypes, "afterOnDeath", net.minecraft.util.DamageSource.class); - - addMethod(id, baseClass, beforeOnLivingUpdateHookTypes, "beforeOnLivingUpdate"); - addMethod(id, baseClass, overrideOnLivingUpdateHookTypes, "onLivingUpdate"); - addMethod(id, baseClass, afterOnLivingUpdateHookTypes, "afterOnLivingUpdate"); - - addMethod(id, baseClass, beforeOnKillEntityHookTypes, "beforeOnKillEntity", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, overrideOnKillEntityHookTypes, "onKillEntity", net.minecraft.entity.EntityLivingBase.class); - addMethod(id, baseClass, afterOnKillEntityHookTypes, "afterOnKillEntity", net.minecraft.entity.EntityLivingBase.class); - - addMethod(id, baseClass, beforeOnStruckByLightningHookTypes, "beforeOnStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - addMethod(id, baseClass, overrideOnStruckByLightningHookTypes, "onStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - addMethod(id, baseClass, afterOnStruckByLightningHookTypes, "afterOnStruckByLightning", net.minecraft.entity.effect.EntityLightningBolt.class); - - addMethod(id, baseClass, beforeOnUpdateHookTypes, "beforeOnUpdate"); - addMethod(id, baseClass, overrideOnUpdateHookTypes, "onUpdate"); - addMethod(id, baseClass, afterOnUpdateHookTypes, "afterOnUpdate"); - - addMethod(id, baseClass, beforeOnUpdateEntityHookTypes, "beforeOnUpdateEntity"); - addMethod(id, baseClass, overrideOnUpdateEntityHookTypes, "onUpdateEntity"); - addMethod(id, baseClass, afterOnUpdateEntityHookTypes, "afterOnUpdateEntity"); - - addMethod(id, baseClass, beforeReadEntityFromNBTHookTypes, "beforeReadEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, overrideReadEntityFromNBTHookTypes, "readEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, afterReadEntityFromNBTHookTypes, "afterReadEntityFromNBT", net.minecraft.nbt.NBTTagCompound.class); - - addMethod(id, baseClass, beforeSetDeadHookTypes, "beforeSetDead"); - addMethod(id, baseClass, overrideSetDeadHookTypes, "setDead"); - addMethod(id, baseClass, afterSetDeadHookTypes, "afterSetDead"); - - addMethod(id, baseClass, beforeSetEntityActionStateHookTypes, "beforeSetEntityActionState", float.class, float.class, boolean.class, boolean.class); - addMethod(id, baseClass, overrideSetEntityActionStateHookTypes, "setEntityActionState", float.class, float.class, boolean.class, boolean.class); - addMethod(id, baseClass, afterSetEntityActionStateHookTypes, "afterSetEntityActionState", float.class, float.class, boolean.class, boolean.class); - - addMethod(id, baseClass, beforeSetPositionHookTypes, "beforeSetPosition", double.class, double.class, double.class); - addMethod(id, baseClass, overrideSetPositionHookTypes, "setPosition", double.class, double.class, double.class); - addMethod(id, baseClass, afterSetPositionHookTypes, "afterSetPosition", double.class, double.class, double.class); - - addMethod(id, baseClass, beforeSetSneakingHookTypes, "beforeSetSneaking", boolean.class); - addMethod(id, baseClass, overrideSetSneakingHookTypes, "setSneaking", boolean.class); - addMethod(id, baseClass, afterSetSneakingHookTypes, "afterSetSneaking", boolean.class); - - addMethod(id, baseClass, beforeSetSprintingHookTypes, "beforeSetSprinting", boolean.class); - addMethod(id, baseClass, overrideSetSprintingHookTypes, "setSprinting", boolean.class); - addMethod(id, baseClass, afterSetSprintingHookTypes, "afterSetSprinting", boolean.class); - - addMethod(id, baseClass, beforeSwingItemHookTypes, "beforeSwingItem"); - addMethod(id, baseClass, overrideSwingItemHookTypes, "swingItem"); - addMethod(id, baseClass, afterSwingItemHookTypes, "afterSwingItem"); - - addMethod(id, baseClass, beforeUpdateEntityActionStateHookTypes, "beforeUpdateEntityActionState"); - addMethod(id, baseClass, overrideUpdateEntityActionStateHookTypes, "updateEntityActionState"); - addMethod(id, baseClass, afterUpdateEntityActionStateHookTypes, "afterUpdateEntityActionState"); - - addMethod(id, baseClass, beforeUpdatePotionEffectsHookTypes, "beforeUpdatePotionEffects"); - addMethod(id, baseClass, overrideUpdatePotionEffectsHookTypes, "updatePotionEffects"); - addMethod(id, baseClass, afterUpdatePotionEffectsHookTypes, "afterUpdatePotionEffects"); - - addMethod(id, baseClass, beforeUpdateRiddenHookTypes, "beforeUpdateRidden"); - addMethod(id, baseClass, overrideUpdateRiddenHookTypes, "updateRidden"); - addMethod(id, baseClass, afterUpdateRiddenHookTypes, "afterUpdateRidden"); - - addMethod(id, baseClass, beforeWakeUpPlayerHookTypes, "beforeWakeUpPlayer", boolean.class, boolean.class, boolean.class); - addMethod(id, baseClass, overrideWakeUpPlayerHookTypes, "wakeUpPlayer", boolean.class, boolean.class, boolean.class); - addMethod(id, baseClass, afterWakeUpPlayerHookTypes, "afterWakeUpPlayer", boolean.class, boolean.class, boolean.class); - - addMethod(id, baseClass, beforeWriteEntityToNBTHookTypes, "beforeWriteEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, overrideWriteEntityToNBTHookTypes, "writeEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - addMethod(id, baseClass, afterWriteEntityToNBTHookTypes, "afterWriteEntityToNBT", net.minecraft.nbt.NBTTagCompound.class); - - - addDynamicMethods(id, baseClass); - - addDynamicKeys(id, baseClass, beforeDynamicHookMethods, beforeDynamicHookTypes); - addDynamicKeys(id, baseClass, overrideDynamicHookMethods, overrideDynamicHookTypes); - addDynamicKeys(id, baseClass, afterDynamicHookMethods, afterDynamicHookTypes); - - initialize(); - - for(IServerPlayerAPI instance : getAllInstancesList()) - instance.getServerPlayerAPI().attachServerPlayerBase(id); - - System.out.println("Server Player: registered " + id); - logger.fine("Server Player: registered class '" + baseClass.getName() + "' with id '" + id + "'"); - - initialized = false; - } - - public static boolean unregister(String id) - { - if(id == null) - return false; - - Constructor constructor = allBaseConstructors.remove(id); - if(constructor == null) - return false; - - for(IServerPlayerAPI instance : getAllInstancesList()) - instance.getServerPlayerAPI().detachServerPlayerBase(id); - - beforeLocalConstructingHookTypes.remove(id); - afterLocalConstructingHookTypes.remove(id); - - allBaseBeforeAddExhaustionSuperiors.remove(id); - allBaseBeforeAddExhaustionInferiors.remove(id); - allBaseOverrideAddExhaustionSuperiors.remove(id); - allBaseOverrideAddExhaustionInferiors.remove(id); - allBaseAfterAddExhaustionSuperiors.remove(id); - allBaseAfterAddExhaustionInferiors.remove(id); - - beforeAddExhaustionHookTypes.remove(id); - overrideAddExhaustionHookTypes.remove(id); - afterAddExhaustionHookTypes.remove(id); - - allBaseBeforeAddExperienceSuperiors.remove(id); - allBaseBeforeAddExperienceInferiors.remove(id); - allBaseOverrideAddExperienceSuperiors.remove(id); - allBaseOverrideAddExperienceInferiors.remove(id); - allBaseAfterAddExperienceSuperiors.remove(id); - allBaseAfterAddExperienceInferiors.remove(id); - - beforeAddExperienceHookTypes.remove(id); - overrideAddExperienceHookTypes.remove(id); - afterAddExperienceHookTypes.remove(id); - - allBaseBeforeAddExperienceLevelSuperiors.remove(id); - allBaseBeforeAddExperienceLevelInferiors.remove(id); - allBaseOverrideAddExperienceLevelSuperiors.remove(id); - allBaseOverrideAddExperienceLevelInferiors.remove(id); - allBaseAfterAddExperienceLevelSuperiors.remove(id); - allBaseAfterAddExperienceLevelInferiors.remove(id); - - beforeAddExperienceLevelHookTypes.remove(id); - overrideAddExperienceLevelHookTypes.remove(id); - afterAddExperienceLevelHookTypes.remove(id); - - allBaseBeforeAddMovementStatSuperiors.remove(id); - allBaseBeforeAddMovementStatInferiors.remove(id); - allBaseOverrideAddMovementStatSuperiors.remove(id); - allBaseOverrideAddMovementStatInferiors.remove(id); - allBaseAfterAddMovementStatSuperiors.remove(id); - allBaseAfterAddMovementStatInferiors.remove(id); - - beforeAddMovementStatHookTypes.remove(id); - overrideAddMovementStatHookTypes.remove(id); - afterAddMovementStatHookTypes.remove(id); - - allBaseBeforeAttackEntityFromSuperiors.remove(id); - allBaseBeforeAttackEntityFromInferiors.remove(id); - allBaseOverrideAttackEntityFromSuperiors.remove(id); - allBaseOverrideAttackEntityFromInferiors.remove(id); - allBaseAfterAttackEntityFromSuperiors.remove(id); - allBaseAfterAttackEntityFromInferiors.remove(id); - - beforeAttackEntityFromHookTypes.remove(id); - overrideAttackEntityFromHookTypes.remove(id); - afterAttackEntityFromHookTypes.remove(id); - - allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseBeforeAttackTargetEntityWithCurrentItemInferiors.remove(id); - allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseOverrideAttackTargetEntityWithCurrentItemInferiors.remove(id); - allBaseAfterAttackTargetEntityWithCurrentItemSuperiors.remove(id); - allBaseAfterAttackTargetEntityWithCurrentItemInferiors.remove(id); - - beforeAttackTargetEntityWithCurrentItemHookTypes.remove(id); - overrideAttackTargetEntityWithCurrentItemHookTypes.remove(id); - afterAttackTargetEntityWithCurrentItemHookTypes.remove(id); - - allBaseBeforeCanBreatheUnderwaterSuperiors.remove(id); - allBaseBeforeCanBreatheUnderwaterInferiors.remove(id); - allBaseOverrideCanBreatheUnderwaterSuperiors.remove(id); - allBaseOverrideCanBreatheUnderwaterInferiors.remove(id); - allBaseAfterCanBreatheUnderwaterSuperiors.remove(id); - allBaseAfterCanBreatheUnderwaterInferiors.remove(id); - - beforeCanBreatheUnderwaterHookTypes.remove(id); - overrideCanBreatheUnderwaterHookTypes.remove(id); - afterCanBreatheUnderwaterHookTypes.remove(id); - - allBaseBeforeCanHarvestBlockSuperiors.remove(id); - allBaseBeforeCanHarvestBlockInferiors.remove(id); - allBaseOverrideCanHarvestBlockSuperiors.remove(id); - allBaseOverrideCanHarvestBlockInferiors.remove(id); - allBaseAfterCanHarvestBlockSuperiors.remove(id); - allBaseAfterCanHarvestBlockInferiors.remove(id); - - beforeCanHarvestBlockHookTypes.remove(id); - overrideCanHarvestBlockHookTypes.remove(id); - afterCanHarvestBlockHookTypes.remove(id); - - allBaseBeforeCanPlayerEditSuperiors.remove(id); - allBaseBeforeCanPlayerEditInferiors.remove(id); - allBaseOverrideCanPlayerEditSuperiors.remove(id); - allBaseOverrideCanPlayerEditInferiors.remove(id); - allBaseAfterCanPlayerEditSuperiors.remove(id); - allBaseAfterCanPlayerEditInferiors.remove(id); - - beforeCanPlayerEditHookTypes.remove(id); - overrideCanPlayerEditHookTypes.remove(id); - afterCanPlayerEditHookTypes.remove(id); - - allBaseBeforeCanTriggerWalkingSuperiors.remove(id); - allBaseBeforeCanTriggerWalkingInferiors.remove(id); - allBaseOverrideCanTriggerWalkingSuperiors.remove(id); - allBaseOverrideCanTriggerWalkingInferiors.remove(id); - allBaseAfterCanTriggerWalkingSuperiors.remove(id); - allBaseAfterCanTriggerWalkingInferiors.remove(id); - - beforeCanTriggerWalkingHookTypes.remove(id); - overrideCanTriggerWalkingHookTypes.remove(id); - afterCanTriggerWalkingHookTypes.remove(id); - - allBaseBeforeClonePlayerSuperiors.remove(id); - allBaseBeforeClonePlayerInferiors.remove(id); - allBaseOverrideClonePlayerSuperiors.remove(id); - allBaseOverrideClonePlayerInferiors.remove(id); - allBaseAfterClonePlayerSuperiors.remove(id); - allBaseAfterClonePlayerInferiors.remove(id); - - beforeClonePlayerHookTypes.remove(id); - overrideClonePlayerHookTypes.remove(id); - afterClonePlayerHookTypes.remove(id); - - allBaseBeforeDamageEntitySuperiors.remove(id); - allBaseBeforeDamageEntityInferiors.remove(id); - allBaseOverrideDamageEntitySuperiors.remove(id); - allBaseOverrideDamageEntityInferiors.remove(id); - allBaseAfterDamageEntitySuperiors.remove(id); - allBaseAfterDamageEntityInferiors.remove(id); - - beforeDamageEntityHookTypes.remove(id); - overrideDamageEntityHookTypes.remove(id); - afterDamageEntityHookTypes.remove(id); - - allBaseBeforeDisplayGUIChestSuperiors.remove(id); - allBaseBeforeDisplayGUIChestInferiors.remove(id); - allBaseOverrideDisplayGUIChestSuperiors.remove(id); - allBaseOverrideDisplayGUIChestInferiors.remove(id); - allBaseAfterDisplayGUIChestSuperiors.remove(id); - allBaseAfterDisplayGUIChestInferiors.remove(id); - - beforeDisplayGUIChestHookTypes.remove(id); - overrideDisplayGUIChestHookTypes.remove(id); - afterDisplayGUIChestHookTypes.remove(id); - - allBaseBeforeDisplayGUIDispenserSuperiors.remove(id); - allBaseBeforeDisplayGUIDispenserInferiors.remove(id); - allBaseOverrideDisplayGUIDispenserSuperiors.remove(id); - allBaseOverrideDisplayGUIDispenserInferiors.remove(id); - allBaseAfterDisplayGUIDispenserSuperiors.remove(id); - allBaseAfterDisplayGUIDispenserInferiors.remove(id); - - beforeDisplayGUIDispenserHookTypes.remove(id); - overrideDisplayGUIDispenserHookTypes.remove(id); - afterDisplayGUIDispenserHookTypes.remove(id); - - allBaseBeforeDisplayGUIFurnaceSuperiors.remove(id); - allBaseBeforeDisplayGUIFurnaceInferiors.remove(id); - allBaseOverrideDisplayGUIFurnaceSuperiors.remove(id); - allBaseOverrideDisplayGUIFurnaceInferiors.remove(id); - allBaseAfterDisplayGUIFurnaceSuperiors.remove(id); - allBaseAfterDisplayGUIFurnaceInferiors.remove(id); - - beforeDisplayGUIFurnaceHookTypes.remove(id); - overrideDisplayGUIFurnaceHookTypes.remove(id); - afterDisplayGUIFurnaceHookTypes.remove(id); - - allBaseBeforeDisplayGUIWorkbenchSuperiors.remove(id); - allBaseBeforeDisplayGUIWorkbenchInferiors.remove(id); - allBaseOverrideDisplayGUIWorkbenchSuperiors.remove(id); - allBaseOverrideDisplayGUIWorkbenchInferiors.remove(id); - allBaseAfterDisplayGUIWorkbenchSuperiors.remove(id); - allBaseAfterDisplayGUIWorkbenchInferiors.remove(id); - - beforeDisplayGUIWorkbenchHookTypes.remove(id); - overrideDisplayGUIWorkbenchHookTypes.remove(id); - afterDisplayGUIWorkbenchHookTypes.remove(id); - - allBaseBeforeDropOneItemSuperiors.remove(id); - allBaseBeforeDropOneItemInferiors.remove(id); - allBaseOverrideDropOneItemSuperiors.remove(id); - allBaseOverrideDropOneItemInferiors.remove(id); - allBaseAfterDropOneItemSuperiors.remove(id); - allBaseAfterDropOneItemInferiors.remove(id); - - beforeDropOneItemHookTypes.remove(id); - overrideDropOneItemHookTypes.remove(id); - afterDropOneItemHookTypes.remove(id); - - allBaseBeforeDropPlayerItemSuperiors.remove(id); - allBaseBeforeDropPlayerItemInferiors.remove(id); - allBaseOverrideDropPlayerItemSuperiors.remove(id); - allBaseOverrideDropPlayerItemInferiors.remove(id); - allBaseAfterDropPlayerItemSuperiors.remove(id); - allBaseAfterDropPlayerItemInferiors.remove(id); - - beforeDropPlayerItemHookTypes.remove(id); - overrideDropPlayerItemHookTypes.remove(id); - afterDropPlayerItemHookTypes.remove(id); - - allBaseBeforeFallSuperiors.remove(id); - allBaseBeforeFallInferiors.remove(id); - allBaseOverrideFallSuperiors.remove(id); - allBaseOverrideFallInferiors.remove(id); - allBaseAfterFallSuperiors.remove(id); - allBaseAfterFallInferiors.remove(id); - - beforeFallHookTypes.remove(id); - overrideFallHookTypes.remove(id); - afterFallHookTypes.remove(id); - - allBaseBeforeGetAIMoveSpeedSuperiors.remove(id); - allBaseBeforeGetAIMoveSpeedInferiors.remove(id); - allBaseOverrideGetAIMoveSpeedSuperiors.remove(id); - allBaseOverrideGetAIMoveSpeedInferiors.remove(id); - allBaseAfterGetAIMoveSpeedSuperiors.remove(id); - allBaseAfterGetAIMoveSpeedInferiors.remove(id); - - beforeGetAIMoveSpeedHookTypes.remove(id); - overrideGetAIMoveSpeedHookTypes.remove(id); - afterGetAIMoveSpeedHookTypes.remove(id); - - allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseBeforeGetCurrentPlayerStrVsBlockInferiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockInferiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockSuperiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockInferiors.remove(id); - - beforeGetCurrentPlayerStrVsBlockHookTypes.remove(id); - overrideGetCurrentPlayerStrVsBlockHookTypes.remove(id); - afterGetCurrentPlayerStrVsBlockHookTypes.remove(id); - - allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors.remove(id); - allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors.remove(id); - - beforeGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - overrideGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - afterGetCurrentPlayerStrVsBlockForgeHookTypes.remove(id); - - allBaseBeforeGetDistanceSqSuperiors.remove(id); - allBaseBeforeGetDistanceSqInferiors.remove(id); - allBaseOverrideGetDistanceSqSuperiors.remove(id); - allBaseOverrideGetDistanceSqInferiors.remove(id); - allBaseAfterGetDistanceSqSuperiors.remove(id); - allBaseAfterGetDistanceSqInferiors.remove(id); - - beforeGetDistanceSqHookTypes.remove(id); - overrideGetDistanceSqHookTypes.remove(id); - afterGetDistanceSqHookTypes.remove(id); - - allBaseBeforeGetBrightnessSuperiors.remove(id); - allBaseBeforeGetBrightnessInferiors.remove(id); - allBaseOverrideGetBrightnessSuperiors.remove(id); - allBaseOverrideGetBrightnessInferiors.remove(id); - allBaseAfterGetBrightnessSuperiors.remove(id); - allBaseAfterGetBrightnessInferiors.remove(id); - - beforeGetBrightnessHookTypes.remove(id); - overrideGetBrightnessHookTypes.remove(id); - afterGetBrightnessHookTypes.remove(id); - - allBaseBeforeGetEyeHeightSuperiors.remove(id); - allBaseBeforeGetEyeHeightInferiors.remove(id); - allBaseOverrideGetEyeHeightSuperiors.remove(id); - allBaseOverrideGetEyeHeightInferiors.remove(id); - allBaseAfterGetEyeHeightSuperiors.remove(id); - allBaseAfterGetEyeHeightInferiors.remove(id); - - beforeGetEyeHeightHookTypes.remove(id); - overrideGetEyeHeightHookTypes.remove(id); - afterGetEyeHeightHookTypes.remove(id); - - allBaseBeforeHealSuperiors.remove(id); - allBaseBeforeHealInferiors.remove(id); - allBaseOverrideHealSuperiors.remove(id); - allBaseOverrideHealInferiors.remove(id); - allBaseAfterHealSuperiors.remove(id); - allBaseAfterHealInferiors.remove(id); - - beforeHealHookTypes.remove(id); - overrideHealHookTypes.remove(id); - afterHealHookTypes.remove(id); - - allBaseBeforeIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseBeforeIsEntityInsideOpaqueBlockInferiors.remove(id); - allBaseOverrideIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseOverrideIsEntityInsideOpaqueBlockInferiors.remove(id); - allBaseAfterIsEntityInsideOpaqueBlockSuperiors.remove(id); - allBaseAfterIsEntityInsideOpaqueBlockInferiors.remove(id); - - beforeIsEntityInsideOpaqueBlockHookTypes.remove(id); - overrideIsEntityInsideOpaqueBlockHookTypes.remove(id); - afterIsEntityInsideOpaqueBlockHookTypes.remove(id); - - allBaseBeforeIsInWaterSuperiors.remove(id); - allBaseBeforeIsInWaterInferiors.remove(id); - allBaseOverrideIsInWaterSuperiors.remove(id); - allBaseOverrideIsInWaterInferiors.remove(id); - allBaseAfterIsInWaterSuperiors.remove(id); - allBaseAfterIsInWaterInferiors.remove(id); - - beforeIsInWaterHookTypes.remove(id); - overrideIsInWaterHookTypes.remove(id); - afterIsInWaterHookTypes.remove(id); - - allBaseBeforeIsInsideOfMaterialSuperiors.remove(id); - allBaseBeforeIsInsideOfMaterialInferiors.remove(id); - allBaseOverrideIsInsideOfMaterialSuperiors.remove(id); - allBaseOverrideIsInsideOfMaterialInferiors.remove(id); - allBaseAfterIsInsideOfMaterialSuperiors.remove(id); - allBaseAfterIsInsideOfMaterialInferiors.remove(id); - - beforeIsInsideOfMaterialHookTypes.remove(id); - overrideIsInsideOfMaterialHookTypes.remove(id); - afterIsInsideOfMaterialHookTypes.remove(id); - - allBaseBeforeIsOnLadderSuperiors.remove(id); - allBaseBeforeIsOnLadderInferiors.remove(id); - allBaseOverrideIsOnLadderSuperiors.remove(id); - allBaseOverrideIsOnLadderInferiors.remove(id); - allBaseAfterIsOnLadderSuperiors.remove(id); - allBaseAfterIsOnLadderInferiors.remove(id); - - beforeIsOnLadderHookTypes.remove(id); - overrideIsOnLadderHookTypes.remove(id); - afterIsOnLadderHookTypes.remove(id); - - allBaseBeforeIsPlayerSleepingSuperiors.remove(id); - allBaseBeforeIsPlayerSleepingInferiors.remove(id); - allBaseOverrideIsPlayerSleepingSuperiors.remove(id); - allBaseOverrideIsPlayerSleepingInferiors.remove(id); - allBaseAfterIsPlayerSleepingSuperiors.remove(id); - allBaseAfterIsPlayerSleepingInferiors.remove(id); - - beforeIsPlayerSleepingHookTypes.remove(id); - overrideIsPlayerSleepingHookTypes.remove(id); - afterIsPlayerSleepingHookTypes.remove(id); - - allBaseBeforeIsSneakingSuperiors.remove(id); - allBaseBeforeIsSneakingInferiors.remove(id); - allBaseOverrideIsSneakingSuperiors.remove(id); - allBaseOverrideIsSneakingInferiors.remove(id); - allBaseAfterIsSneakingSuperiors.remove(id); - allBaseAfterIsSneakingInferiors.remove(id); - - beforeIsSneakingHookTypes.remove(id); - overrideIsSneakingHookTypes.remove(id); - afterIsSneakingHookTypes.remove(id); - - allBaseBeforeJumpSuperiors.remove(id); - allBaseBeforeJumpInferiors.remove(id); - allBaseOverrideJumpSuperiors.remove(id); - allBaseOverrideJumpInferiors.remove(id); - allBaseAfterJumpSuperiors.remove(id); - allBaseAfterJumpInferiors.remove(id); - - beforeJumpHookTypes.remove(id); - overrideJumpHookTypes.remove(id); - afterJumpHookTypes.remove(id); - - allBaseBeforeKnockBackSuperiors.remove(id); - allBaseBeforeKnockBackInferiors.remove(id); - allBaseOverrideKnockBackSuperiors.remove(id); - allBaseOverrideKnockBackInferiors.remove(id); - allBaseAfterKnockBackSuperiors.remove(id); - allBaseAfterKnockBackInferiors.remove(id); - - beforeKnockBackHookTypes.remove(id); - overrideKnockBackHookTypes.remove(id); - afterKnockBackHookTypes.remove(id); - - allBaseBeforeMountEntitySuperiors.remove(id); - allBaseBeforeMountEntityInferiors.remove(id); - allBaseOverrideMountEntitySuperiors.remove(id); - allBaseOverrideMountEntityInferiors.remove(id); - allBaseAfterMountEntitySuperiors.remove(id); - allBaseAfterMountEntityInferiors.remove(id); - - beforeMountEntityHookTypes.remove(id); - overrideMountEntityHookTypes.remove(id); - afterMountEntityHookTypes.remove(id); - - allBaseBeforeMoveEntitySuperiors.remove(id); - allBaseBeforeMoveEntityInferiors.remove(id); - allBaseOverrideMoveEntitySuperiors.remove(id); - allBaseOverrideMoveEntityInferiors.remove(id); - allBaseAfterMoveEntitySuperiors.remove(id); - allBaseAfterMoveEntityInferiors.remove(id); - - beforeMoveEntityHookTypes.remove(id); - overrideMoveEntityHookTypes.remove(id); - afterMoveEntityHookTypes.remove(id); - - allBaseBeforeMoveEntityWithHeadingSuperiors.remove(id); - allBaseBeforeMoveEntityWithHeadingInferiors.remove(id); - allBaseOverrideMoveEntityWithHeadingSuperiors.remove(id); - allBaseOverrideMoveEntityWithHeadingInferiors.remove(id); - allBaseAfterMoveEntityWithHeadingSuperiors.remove(id); - allBaseAfterMoveEntityWithHeadingInferiors.remove(id); - - beforeMoveEntityWithHeadingHookTypes.remove(id); - overrideMoveEntityWithHeadingHookTypes.remove(id); - afterMoveEntityWithHeadingHookTypes.remove(id); - - allBaseBeforeMoveFlyingSuperiors.remove(id); - allBaseBeforeMoveFlyingInferiors.remove(id); - allBaseOverrideMoveFlyingSuperiors.remove(id); - allBaseOverrideMoveFlyingInferiors.remove(id); - allBaseAfterMoveFlyingSuperiors.remove(id); - allBaseAfterMoveFlyingInferiors.remove(id); - - beforeMoveFlyingHookTypes.remove(id); - overrideMoveFlyingHookTypes.remove(id); - afterMoveFlyingHookTypes.remove(id); - - allBaseBeforeOnDeathSuperiors.remove(id); - allBaseBeforeOnDeathInferiors.remove(id); - allBaseOverrideOnDeathSuperiors.remove(id); - allBaseOverrideOnDeathInferiors.remove(id); - allBaseAfterOnDeathSuperiors.remove(id); - allBaseAfterOnDeathInferiors.remove(id); - - beforeOnDeathHookTypes.remove(id); - overrideOnDeathHookTypes.remove(id); - afterOnDeathHookTypes.remove(id); - - allBaseBeforeOnLivingUpdateSuperiors.remove(id); - allBaseBeforeOnLivingUpdateInferiors.remove(id); - allBaseOverrideOnLivingUpdateSuperiors.remove(id); - allBaseOverrideOnLivingUpdateInferiors.remove(id); - allBaseAfterOnLivingUpdateSuperiors.remove(id); - allBaseAfterOnLivingUpdateInferiors.remove(id); - - beforeOnLivingUpdateHookTypes.remove(id); - overrideOnLivingUpdateHookTypes.remove(id); - afterOnLivingUpdateHookTypes.remove(id); - - allBaseBeforeOnKillEntitySuperiors.remove(id); - allBaseBeforeOnKillEntityInferiors.remove(id); - allBaseOverrideOnKillEntitySuperiors.remove(id); - allBaseOverrideOnKillEntityInferiors.remove(id); - allBaseAfterOnKillEntitySuperiors.remove(id); - allBaseAfterOnKillEntityInferiors.remove(id); - - beforeOnKillEntityHookTypes.remove(id); - overrideOnKillEntityHookTypes.remove(id); - afterOnKillEntityHookTypes.remove(id); - - allBaseBeforeOnStruckByLightningSuperiors.remove(id); - allBaseBeforeOnStruckByLightningInferiors.remove(id); - allBaseOverrideOnStruckByLightningSuperiors.remove(id); - allBaseOverrideOnStruckByLightningInferiors.remove(id); - allBaseAfterOnStruckByLightningSuperiors.remove(id); - allBaseAfterOnStruckByLightningInferiors.remove(id); - - beforeOnStruckByLightningHookTypes.remove(id); - overrideOnStruckByLightningHookTypes.remove(id); - afterOnStruckByLightningHookTypes.remove(id); - - allBaseBeforeOnUpdateSuperiors.remove(id); - allBaseBeforeOnUpdateInferiors.remove(id); - allBaseOverrideOnUpdateSuperiors.remove(id); - allBaseOverrideOnUpdateInferiors.remove(id); - allBaseAfterOnUpdateSuperiors.remove(id); - allBaseAfterOnUpdateInferiors.remove(id); - - beforeOnUpdateHookTypes.remove(id); - overrideOnUpdateHookTypes.remove(id); - afterOnUpdateHookTypes.remove(id); - - allBaseBeforeOnUpdateEntitySuperiors.remove(id); - allBaseBeforeOnUpdateEntityInferiors.remove(id); - allBaseOverrideOnUpdateEntitySuperiors.remove(id); - allBaseOverrideOnUpdateEntityInferiors.remove(id); - allBaseAfterOnUpdateEntitySuperiors.remove(id); - allBaseAfterOnUpdateEntityInferiors.remove(id); - - beforeOnUpdateEntityHookTypes.remove(id); - overrideOnUpdateEntityHookTypes.remove(id); - afterOnUpdateEntityHookTypes.remove(id); - - allBaseBeforeReadEntityFromNBTSuperiors.remove(id); - allBaseBeforeReadEntityFromNBTInferiors.remove(id); - allBaseOverrideReadEntityFromNBTSuperiors.remove(id); - allBaseOverrideReadEntityFromNBTInferiors.remove(id); - allBaseAfterReadEntityFromNBTSuperiors.remove(id); - allBaseAfterReadEntityFromNBTInferiors.remove(id); - - beforeReadEntityFromNBTHookTypes.remove(id); - overrideReadEntityFromNBTHookTypes.remove(id); - afterReadEntityFromNBTHookTypes.remove(id); - - allBaseBeforeSetDeadSuperiors.remove(id); - allBaseBeforeSetDeadInferiors.remove(id); - allBaseOverrideSetDeadSuperiors.remove(id); - allBaseOverrideSetDeadInferiors.remove(id); - allBaseAfterSetDeadSuperiors.remove(id); - allBaseAfterSetDeadInferiors.remove(id); - - beforeSetDeadHookTypes.remove(id); - overrideSetDeadHookTypes.remove(id); - afterSetDeadHookTypes.remove(id); - - allBaseBeforeSetEntityActionStateSuperiors.remove(id); - allBaseBeforeSetEntityActionStateInferiors.remove(id); - allBaseOverrideSetEntityActionStateSuperiors.remove(id); - allBaseOverrideSetEntityActionStateInferiors.remove(id); - allBaseAfterSetEntityActionStateSuperiors.remove(id); - allBaseAfterSetEntityActionStateInferiors.remove(id); - - beforeSetEntityActionStateHookTypes.remove(id); - overrideSetEntityActionStateHookTypes.remove(id); - afterSetEntityActionStateHookTypes.remove(id); - - allBaseBeforeSetPositionSuperiors.remove(id); - allBaseBeforeSetPositionInferiors.remove(id); - allBaseOverrideSetPositionSuperiors.remove(id); - allBaseOverrideSetPositionInferiors.remove(id); - allBaseAfterSetPositionSuperiors.remove(id); - allBaseAfterSetPositionInferiors.remove(id); - - beforeSetPositionHookTypes.remove(id); - overrideSetPositionHookTypes.remove(id); - afterSetPositionHookTypes.remove(id); - - allBaseBeforeSetSneakingSuperiors.remove(id); - allBaseBeforeSetSneakingInferiors.remove(id); - allBaseOverrideSetSneakingSuperiors.remove(id); - allBaseOverrideSetSneakingInferiors.remove(id); - allBaseAfterSetSneakingSuperiors.remove(id); - allBaseAfterSetSneakingInferiors.remove(id); - - beforeSetSneakingHookTypes.remove(id); - overrideSetSneakingHookTypes.remove(id); - afterSetSneakingHookTypes.remove(id); - - allBaseBeforeSetSprintingSuperiors.remove(id); - allBaseBeforeSetSprintingInferiors.remove(id); - allBaseOverrideSetSprintingSuperiors.remove(id); - allBaseOverrideSetSprintingInferiors.remove(id); - allBaseAfterSetSprintingSuperiors.remove(id); - allBaseAfterSetSprintingInferiors.remove(id); - - beforeSetSprintingHookTypes.remove(id); - overrideSetSprintingHookTypes.remove(id); - afterSetSprintingHookTypes.remove(id); - - allBaseBeforeSwingItemSuperiors.remove(id); - allBaseBeforeSwingItemInferiors.remove(id); - allBaseOverrideSwingItemSuperiors.remove(id); - allBaseOverrideSwingItemInferiors.remove(id); - allBaseAfterSwingItemSuperiors.remove(id); - allBaseAfterSwingItemInferiors.remove(id); - - beforeSwingItemHookTypes.remove(id); - overrideSwingItemHookTypes.remove(id); - afterSwingItemHookTypes.remove(id); - - allBaseBeforeUpdateEntityActionStateSuperiors.remove(id); - allBaseBeforeUpdateEntityActionStateInferiors.remove(id); - allBaseOverrideUpdateEntityActionStateSuperiors.remove(id); - allBaseOverrideUpdateEntityActionStateInferiors.remove(id); - allBaseAfterUpdateEntityActionStateSuperiors.remove(id); - allBaseAfterUpdateEntityActionStateInferiors.remove(id); - - beforeUpdateEntityActionStateHookTypes.remove(id); - overrideUpdateEntityActionStateHookTypes.remove(id); - afterUpdateEntityActionStateHookTypes.remove(id); - - allBaseBeforeUpdatePotionEffectsSuperiors.remove(id); - allBaseBeforeUpdatePotionEffectsInferiors.remove(id); - allBaseOverrideUpdatePotionEffectsSuperiors.remove(id); - allBaseOverrideUpdatePotionEffectsInferiors.remove(id); - allBaseAfterUpdatePotionEffectsSuperiors.remove(id); - allBaseAfterUpdatePotionEffectsInferiors.remove(id); - - beforeUpdatePotionEffectsHookTypes.remove(id); - overrideUpdatePotionEffectsHookTypes.remove(id); - afterUpdatePotionEffectsHookTypes.remove(id); - - allBaseBeforeUpdateRiddenSuperiors.remove(id); - allBaseBeforeUpdateRiddenInferiors.remove(id); - allBaseOverrideUpdateRiddenSuperiors.remove(id); - allBaseOverrideUpdateRiddenInferiors.remove(id); - allBaseAfterUpdateRiddenSuperiors.remove(id); - allBaseAfterUpdateRiddenInferiors.remove(id); - - beforeUpdateRiddenHookTypes.remove(id); - overrideUpdateRiddenHookTypes.remove(id); - afterUpdateRiddenHookTypes.remove(id); - - allBaseBeforeWakeUpPlayerSuperiors.remove(id); - allBaseBeforeWakeUpPlayerInferiors.remove(id); - allBaseOverrideWakeUpPlayerSuperiors.remove(id); - allBaseOverrideWakeUpPlayerInferiors.remove(id); - allBaseAfterWakeUpPlayerSuperiors.remove(id); - allBaseAfterWakeUpPlayerInferiors.remove(id); - - beforeWakeUpPlayerHookTypes.remove(id); - overrideWakeUpPlayerHookTypes.remove(id); - afterWakeUpPlayerHookTypes.remove(id); - - allBaseBeforeWriteEntityToNBTSuperiors.remove(id); - allBaseBeforeWriteEntityToNBTInferiors.remove(id); - allBaseOverrideWriteEntityToNBTSuperiors.remove(id); - allBaseOverrideWriteEntityToNBTInferiors.remove(id); - allBaseAfterWriteEntityToNBTSuperiors.remove(id); - allBaseAfterWriteEntityToNBTInferiors.remove(id); - - beforeWriteEntityToNBTHookTypes.remove(id); - overrideWriteEntityToNBTHookTypes.remove(id); - afterWriteEntityToNBTHookTypes.remove(id); - - for(IServerPlayerAPI instance : getAllInstancesList()) - instance.getServerPlayerAPI().updateServerPlayerBases(); - - Iterator iterator = keysToVirtualIds.keySet().iterator(); - while(iterator.hasNext()) - { - String key = iterator.next(); - if(keysToVirtualIds.get(key).equals(id)) - keysToVirtualIds.remove(key); - } - - boolean otherFound = false; - Class type = constructor.getDeclaringClass(); - - iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String otherId = iterator.next(); - Class otherType = allBaseConstructors.get(otherId).getDeclaringClass(); - if(!otherId.equals(id) && otherType.equals(type)) - { - otherFound = true; - break; - } - } - - if(!otherFound) - { - dynamicTypes.remove(type); - - virtualDynamicHookMethods.remove(type); - - beforeDynamicHookMethods.remove(type); - overrideDynamicHookMethods.remove(type); - afterDynamicHookMethods.remove(type); - } - - removeDynamicHookTypes(id, beforeDynamicHookTypes); - removeDynamicHookTypes(id, overrideDynamicHookTypes); - removeDynamicHookTypes(id, afterDynamicHookTypes); - - allBaseBeforeDynamicSuperiors.remove(id); - allBaseBeforeDynamicInferiors.remove(id); - allBaseOverrideDynamicSuperiors.remove(id); - allBaseOverrideDynamicInferiors.remove(id); - allBaseAfterDynamicSuperiors.remove(id); - allBaseAfterDynamicInferiors.remove(id); - - log("ServerPlayerAPI: unregistered id '" + id + "'"); - - return true; - } - - public static void removeDynamicHookTypes(String id, Map> map) - { - Iterator keys = map.keySet().iterator(); - while(keys.hasNext()) - map.get(keys.next()).remove(id); - } - - public static Set getRegisteredIds() - { - return unmodifiableAllIds; - } - - private static void addSorting(String id, Map map, String[] values) - { - if(values != null && values.length > 0) - map.put(id, values); - } - - private static void addDynamicSorting(String id, Map> map, Map values) - { - if(values != null && values.size() > 0) - map.put(id, values); - } - - private static boolean addMethod(String id, Class baseClass, List list, String methodName, Class... _parameterTypes) - { - try - { - Method method = baseClass.getMethod(methodName, _parameterTypes); - boolean isOverridden = method.getDeclaringClass() != ServerPlayerBase.class; - if(isOverridden) - list.add(id); - return isOverridden; - } - catch(Exception e) - { - throw new RuntimeException("Can not reflect method '" + methodName + "' of class '" + baseClass.getName() + "'", e); - } - } - - private static void addDynamicMethods(String id, Class baseClass) - { - if(!dynamicTypes.add(baseClass)) - return; - - Map virtuals = null; - Map befores = null; - Map overrides = null; - Map afters = null; - - Method[] methods = baseClass.getDeclaredMethods(); - for(int i=0; i= 8 && name.substring(0, 8).equalsIgnoreCase("override")) - { - name = name.substring(8); - override = true; - } - else if(name.length() >= 6 && name.substring(0, 6).equalsIgnoreCase("before")) - { - before = true; - name = name.substring(6); - } - else if(name.length() >= 5 && name.substring(0, 5).equalsIgnoreCase("after")) - { - after = true; - name = name.substring(5); - } - } - - if(name.length() >= 1 && (before || virtual || override || after)) - name = name.substring(0,1).toLowerCase() + name.substring(1); - - while(name.charAt(0) == '_') - name = name.substring(1); - - if(name.length() == 0) - throw new RuntimeException("Can not process dynamic hook method with no key"); - - keys.add(name); - - if(virtual) - { - if(keysToVirtualIds.containsKey(name)) - throw new RuntimeException("Can not process more than one dynamic virtual method"); - - keysToVirtualIds.put(name, id); - virtuals = addDynamicMethod(name, method, virtuals); - } - else if(before) - befores = addDynamicMethod(name, method, befores); - else if(after) - afters = addDynamicMethod(name, method, afters); - else - overrides = addDynamicMethod(name, method, overrides); - } - - if(virtuals != null) - virtualDynamicHookMethods.put(baseClass, virtuals); - if(befores != null) - beforeDynamicHookMethods.put(baseClass, befores); - if(overrides != null) - overrideDynamicHookMethods.put(baseClass, overrides); - if(afters != null) - afterDynamicHookMethods.put(baseClass, afters); - } - - private static void addDynamicKeys(String id, Class baseClass, Map, Map> dynamicHookMethods, Map> dynamicHookTypes) - { - Map methods = dynamicHookMethods.get(baseClass); - if(methods == null || methods.size() == 0) - return; - - Iterator keys = methods.keySet().iterator(); - while(keys.hasNext()) - { - String key = keys.next(); - if(!dynamicHookTypes.containsKey(key)) - dynamicHookTypes.put(key, new ArrayList(1)); - dynamicHookTypes.get(key).add(id); - } - } - - private static Map addDynamicMethod(String key, Method method, Map methods) - { - if(methods == null) - methods = new HashMap(); - if(methods.containsKey(key)) - throw new RuntimeException("method with key '" + key + "' allready exists"); - methods.put(key, method); - return methods; - } - - public static ServerPlayerAPI create(IServerPlayerAPI serverPlayer) - { - if(allBaseConstructors.size() > 0 && !initialized) - initialize(); - return new ServerPlayerAPI(serverPlayer); - } - - private static void initialize() - { - sortBases(beforeLocalConstructingHookTypes, allBaseBeforeLocalConstructingSuperiors, allBaseBeforeLocalConstructingInferiors, "beforeLocalConstructing"); - sortBases(afterLocalConstructingHookTypes, allBaseAfterLocalConstructingSuperiors, allBaseAfterLocalConstructingInferiors, "afterLocalConstructing"); - - Iterator keyIterator = keys.iterator(); - while(keyIterator.hasNext()) - { - String key = keyIterator.next(); - sortDynamicBases(beforeDynamicHookTypes, allBaseBeforeDynamicSuperiors, allBaseBeforeDynamicInferiors, key); - sortDynamicBases(overrideDynamicHookTypes, allBaseOverrideDynamicSuperiors, allBaseOverrideDynamicInferiors, key); - sortDynamicBases(afterDynamicHookTypes, allBaseAfterDynamicSuperiors, allBaseAfterDynamicInferiors, key); - } - - sortBases(beforeAddExhaustionHookTypes, allBaseBeforeAddExhaustionSuperiors, allBaseBeforeAddExhaustionInferiors, "beforeAddExhaustion"); - sortBases(overrideAddExhaustionHookTypes, allBaseOverrideAddExhaustionSuperiors, allBaseOverrideAddExhaustionInferiors, "overrideAddExhaustion"); - sortBases(afterAddExhaustionHookTypes, allBaseAfterAddExhaustionSuperiors, allBaseAfterAddExhaustionInferiors, "afterAddExhaustion"); - - sortBases(beforeAddExperienceHookTypes, allBaseBeforeAddExperienceSuperiors, allBaseBeforeAddExperienceInferiors, "beforeAddExperience"); - sortBases(overrideAddExperienceHookTypes, allBaseOverrideAddExperienceSuperiors, allBaseOverrideAddExperienceInferiors, "overrideAddExperience"); - sortBases(afterAddExperienceHookTypes, allBaseAfterAddExperienceSuperiors, allBaseAfterAddExperienceInferiors, "afterAddExperience"); - - sortBases(beforeAddExperienceLevelHookTypes, allBaseBeforeAddExperienceLevelSuperiors, allBaseBeforeAddExperienceLevelInferiors, "beforeAddExperienceLevel"); - sortBases(overrideAddExperienceLevelHookTypes, allBaseOverrideAddExperienceLevelSuperiors, allBaseOverrideAddExperienceLevelInferiors, "overrideAddExperienceLevel"); - sortBases(afterAddExperienceLevelHookTypes, allBaseAfterAddExperienceLevelSuperiors, allBaseAfterAddExperienceLevelInferiors, "afterAddExperienceLevel"); - - sortBases(beforeAddMovementStatHookTypes, allBaseBeforeAddMovementStatSuperiors, allBaseBeforeAddMovementStatInferiors, "beforeAddMovementStat"); - sortBases(overrideAddMovementStatHookTypes, allBaseOverrideAddMovementStatSuperiors, allBaseOverrideAddMovementStatInferiors, "overrideAddMovementStat"); - sortBases(afterAddMovementStatHookTypes, allBaseAfterAddMovementStatSuperiors, allBaseAfterAddMovementStatInferiors, "afterAddMovementStat"); - - sortBases(beforeAttackEntityFromHookTypes, allBaseBeforeAttackEntityFromSuperiors, allBaseBeforeAttackEntityFromInferiors, "beforeAttackEntityFrom"); - sortBases(overrideAttackEntityFromHookTypes, allBaseOverrideAttackEntityFromSuperiors, allBaseOverrideAttackEntityFromInferiors, "overrideAttackEntityFrom"); - sortBases(afterAttackEntityFromHookTypes, allBaseAfterAttackEntityFromSuperiors, allBaseAfterAttackEntityFromInferiors, "afterAttackEntityFrom"); - - sortBases(beforeAttackTargetEntityWithCurrentItemHookTypes, allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors, allBaseBeforeAttackTargetEntityWithCurrentItemInferiors, "beforeAttackTargetEntityWithCurrentItem"); - sortBases(overrideAttackTargetEntityWithCurrentItemHookTypes, allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors, allBaseOverrideAttackTargetEntityWithCurrentItemInferiors, "overrideAttackTargetEntityWithCurrentItem"); - sortBases(afterAttackTargetEntityWithCurrentItemHookTypes, allBaseAfterAttackTargetEntityWithCurrentItemSuperiors, allBaseAfterAttackTargetEntityWithCurrentItemInferiors, "afterAttackTargetEntityWithCurrentItem"); - - sortBases(beforeCanBreatheUnderwaterHookTypes, allBaseBeforeCanBreatheUnderwaterSuperiors, allBaseBeforeCanBreatheUnderwaterInferiors, "beforeCanBreatheUnderwater"); - sortBases(overrideCanBreatheUnderwaterHookTypes, allBaseOverrideCanBreatheUnderwaterSuperiors, allBaseOverrideCanBreatheUnderwaterInferiors, "overrideCanBreatheUnderwater"); - sortBases(afterCanBreatheUnderwaterHookTypes, allBaseAfterCanBreatheUnderwaterSuperiors, allBaseAfterCanBreatheUnderwaterInferiors, "afterCanBreatheUnderwater"); - - sortBases(beforeCanHarvestBlockHookTypes, allBaseBeforeCanHarvestBlockSuperiors, allBaseBeforeCanHarvestBlockInferiors, "beforeCanHarvestBlock"); - sortBases(overrideCanHarvestBlockHookTypes, allBaseOverrideCanHarvestBlockSuperiors, allBaseOverrideCanHarvestBlockInferiors, "overrideCanHarvestBlock"); - sortBases(afterCanHarvestBlockHookTypes, allBaseAfterCanHarvestBlockSuperiors, allBaseAfterCanHarvestBlockInferiors, "afterCanHarvestBlock"); - - sortBases(beforeCanPlayerEditHookTypes, allBaseBeforeCanPlayerEditSuperiors, allBaseBeforeCanPlayerEditInferiors, "beforeCanPlayerEdit"); - sortBases(overrideCanPlayerEditHookTypes, allBaseOverrideCanPlayerEditSuperiors, allBaseOverrideCanPlayerEditInferiors, "overrideCanPlayerEdit"); - sortBases(afterCanPlayerEditHookTypes, allBaseAfterCanPlayerEditSuperiors, allBaseAfterCanPlayerEditInferiors, "afterCanPlayerEdit"); - - sortBases(beforeCanTriggerWalkingHookTypes, allBaseBeforeCanTriggerWalkingSuperiors, allBaseBeforeCanTriggerWalkingInferiors, "beforeCanTriggerWalking"); - sortBases(overrideCanTriggerWalkingHookTypes, allBaseOverrideCanTriggerWalkingSuperiors, allBaseOverrideCanTriggerWalkingInferiors, "overrideCanTriggerWalking"); - sortBases(afterCanTriggerWalkingHookTypes, allBaseAfterCanTriggerWalkingSuperiors, allBaseAfterCanTriggerWalkingInferiors, "afterCanTriggerWalking"); - - sortBases(beforeClonePlayerHookTypes, allBaseBeforeClonePlayerSuperiors, allBaseBeforeClonePlayerInferiors, "beforeClonePlayer"); - sortBases(overrideClonePlayerHookTypes, allBaseOverrideClonePlayerSuperiors, allBaseOverrideClonePlayerInferiors, "overrideClonePlayer"); - sortBases(afterClonePlayerHookTypes, allBaseAfterClonePlayerSuperiors, allBaseAfterClonePlayerInferiors, "afterClonePlayer"); - - sortBases(beforeDamageEntityHookTypes, allBaseBeforeDamageEntitySuperiors, allBaseBeforeDamageEntityInferiors, "beforeDamageEntity"); - sortBases(overrideDamageEntityHookTypes, allBaseOverrideDamageEntitySuperiors, allBaseOverrideDamageEntityInferiors, "overrideDamageEntity"); - sortBases(afterDamageEntityHookTypes, allBaseAfterDamageEntitySuperiors, allBaseAfterDamageEntityInferiors, "afterDamageEntity"); - - sortBases(beforeDisplayGUIChestHookTypes, allBaseBeforeDisplayGUIChestSuperiors, allBaseBeforeDisplayGUIChestInferiors, "beforeDisplayGUIChest"); - sortBases(overrideDisplayGUIChestHookTypes, allBaseOverrideDisplayGUIChestSuperiors, allBaseOverrideDisplayGUIChestInferiors, "overrideDisplayGUIChest"); - sortBases(afterDisplayGUIChestHookTypes, allBaseAfterDisplayGUIChestSuperiors, allBaseAfterDisplayGUIChestInferiors, "afterDisplayGUIChest"); - - sortBases(beforeDisplayGUIDispenserHookTypes, allBaseBeforeDisplayGUIDispenserSuperiors, allBaseBeforeDisplayGUIDispenserInferiors, "beforeDisplayGUIDispenser"); - sortBases(overrideDisplayGUIDispenserHookTypes, allBaseOverrideDisplayGUIDispenserSuperiors, allBaseOverrideDisplayGUIDispenserInferiors, "overrideDisplayGUIDispenser"); - sortBases(afterDisplayGUIDispenserHookTypes, allBaseAfterDisplayGUIDispenserSuperiors, allBaseAfterDisplayGUIDispenserInferiors, "afterDisplayGUIDispenser"); - - sortBases(beforeDisplayGUIFurnaceHookTypes, allBaseBeforeDisplayGUIFurnaceSuperiors, allBaseBeforeDisplayGUIFurnaceInferiors, "beforeDisplayGUIFurnace"); - sortBases(overrideDisplayGUIFurnaceHookTypes, allBaseOverrideDisplayGUIFurnaceSuperiors, allBaseOverrideDisplayGUIFurnaceInferiors, "overrideDisplayGUIFurnace"); - sortBases(afterDisplayGUIFurnaceHookTypes, allBaseAfterDisplayGUIFurnaceSuperiors, allBaseAfterDisplayGUIFurnaceInferiors, "afterDisplayGUIFurnace"); - - sortBases(beforeDisplayGUIWorkbenchHookTypes, allBaseBeforeDisplayGUIWorkbenchSuperiors, allBaseBeforeDisplayGUIWorkbenchInferiors, "beforeDisplayGUIWorkbench"); - sortBases(overrideDisplayGUIWorkbenchHookTypes, allBaseOverrideDisplayGUIWorkbenchSuperiors, allBaseOverrideDisplayGUIWorkbenchInferiors, "overrideDisplayGUIWorkbench"); - sortBases(afterDisplayGUIWorkbenchHookTypes, allBaseAfterDisplayGUIWorkbenchSuperiors, allBaseAfterDisplayGUIWorkbenchInferiors, "afterDisplayGUIWorkbench"); - - sortBases(beforeDropOneItemHookTypes, allBaseBeforeDropOneItemSuperiors, allBaseBeforeDropOneItemInferiors, "beforeDropOneItem"); - sortBases(overrideDropOneItemHookTypes, allBaseOverrideDropOneItemSuperiors, allBaseOverrideDropOneItemInferiors, "overrideDropOneItem"); - sortBases(afterDropOneItemHookTypes, allBaseAfterDropOneItemSuperiors, allBaseAfterDropOneItemInferiors, "afterDropOneItem"); - - sortBases(beforeDropPlayerItemHookTypes, allBaseBeforeDropPlayerItemSuperiors, allBaseBeforeDropPlayerItemInferiors, "beforeDropPlayerItem"); - sortBases(overrideDropPlayerItemHookTypes, allBaseOverrideDropPlayerItemSuperiors, allBaseOverrideDropPlayerItemInferiors, "overrideDropPlayerItem"); - sortBases(afterDropPlayerItemHookTypes, allBaseAfterDropPlayerItemSuperiors, allBaseAfterDropPlayerItemInferiors, "afterDropPlayerItem"); - - sortBases(beforeFallHookTypes, allBaseBeforeFallSuperiors, allBaseBeforeFallInferiors, "beforeFall"); - sortBases(overrideFallHookTypes, allBaseOverrideFallSuperiors, allBaseOverrideFallInferiors, "overrideFall"); - sortBases(afterFallHookTypes, allBaseAfterFallSuperiors, allBaseAfterFallInferiors, "afterFall"); - - sortBases(beforeGetAIMoveSpeedHookTypes, allBaseBeforeGetAIMoveSpeedSuperiors, allBaseBeforeGetAIMoveSpeedInferiors, "beforeGetAIMoveSpeed"); - sortBases(overrideGetAIMoveSpeedHookTypes, allBaseOverrideGetAIMoveSpeedSuperiors, allBaseOverrideGetAIMoveSpeedInferiors, "overrideGetAIMoveSpeed"); - sortBases(afterGetAIMoveSpeedHookTypes, allBaseAfterGetAIMoveSpeedSuperiors, allBaseAfterGetAIMoveSpeedInferiors, "afterGetAIMoveSpeed"); - - sortBases(beforeGetCurrentPlayerStrVsBlockHookTypes, allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors, allBaseBeforeGetCurrentPlayerStrVsBlockInferiors, "beforeGetCurrentPlayerStrVsBlock"); - sortBases(overrideGetCurrentPlayerStrVsBlockHookTypes, allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors, allBaseOverrideGetCurrentPlayerStrVsBlockInferiors, "overrideGetCurrentPlayerStrVsBlock"); - sortBases(afterGetCurrentPlayerStrVsBlockHookTypes, allBaseAfterGetCurrentPlayerStrVsBlockSuperiors, allBaseAfterGetCurrentPlayerStrVsBlockInferiors, "afterGetCurrentPlayerStrVsBlock"); - - sortBases(beforeGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors, "beforeGetCurrentPlayerStrVsBlockForge"); - sortBases(overrideGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors, "overrideGetCurrentPlayerStrVsBlockForge"); - sortBases(afterGetCurrentPlayerStrVsBlockForgeHookTypes, allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors, allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors, "afterGetCurrentPlayerStrVsBlockForge"); - - sortBases(beforeGetDistanceSqHookTypes, allBaseBeforeGetDistanceSqSuperiors, allBaseBeforeGetDistanceSqInferiors, "beforeGetDistanceSq"); - sortBases(overrideGetDistanceSqHookTypes, allBaseOverrideGetDistanceSqSuperiors, allBaseOverrideGetDistanceSqInferiors, "overrideGetDistanceSq"); - sortBases(afterGetDistanceSqHookTypes, allBaseAfterGetDistanceSqSuperiors, allBaseAfterGetDistanceSqInferiors, "afterGetDistanceSq"); - - sortBases(beforeGetBrightnessHookTypes, allBaseBeforeGetBrightnessSuperiors, allBaseBeforeGetBrightnessInferiors, "beforeGetBrightness"); - sortBases(overrideGetBrightnessHookTypes, allBaseOverrideGetBrightnessSuperiors, allBaseOverrideGetBrightnessInferiors, "overrideGetBrightness"); - sortBases(afterGetBrightnessHookTypes, allBaseAfterGetBrightnessSuperiors, allBaseAfterGetBrightnessInferiors, "afterGetBrightness"); - - sortBases(beforeGetEyeHeightHookTypes, allBaseBeforeGetEyeHeightSuperiors, allBaseBeforeGetEyeHeightInferiors, "beforeGetEyeHeight"); - sortBases(overrideGetEyeHeightHookTypes, allBaseOverrideGetEyeHeightSuperiors, allBaseOverrideGetEyeHeightInferiors, "overrideGetEyeHeight"); - sortBases(afterGetEyeHeightHookTypes, allBaseAfterGetEyeHeightSuperiors, allBaseAfterGetEyeHeightInferiors, "afterGetEyeHeight"); - - sortBases(beforeHealHookTypes, allBaseBeforeHealSuperiors, allBaseBeforeHealInferiors, "beforeHeal"); - sortBases(overrideHealHookTypes, allBaseOverrideHealSuperiors, allBaseOverrideHealInferiors, "overrideHeal"); - sortBases(afterHealHookTypes, allBaseAfterHealSuperiors, allBaseAfterHealInferiors, "afterHeal"); - - sortBases(beforeIsEntityInsideOpaqueBlockHookTypes, allBaseBeforeIsEntityInsideOpaqueBlockSuperiors, allBaseBeforeIsEntityInsideOpaqueBlockInferiors, "beforeIsEntityInsideOpaqueBlock"); - sortBases(overrideIsEntityInsideOpaqueBlockHookTypes, allBaseOverrideIsEntityInsideOpaqueBlockSuperiors, allBaseOverrideIsEntityInsideOpaqueBlockInferiors, "overrideIsEntityInsideOpaqueBlock"); - sortBases(afterIsEntityInsideOpaqueBlockHookTypes, allBaseAfterIsEntityInsideOpaqueBlockSuperiors, allBaseAfterIsEntityInsideOpaqueBlockInferiors, "afterIsEntityInsideOpaqueBlock"); - - sortBases(beforeIsInWaterHookTypes, allBaseBeforeIsInWaterSuperiors, allBaseBeforeIsInWaterInferiors, "beforeIsInWater"); - sortBases(overrideIsInWaterHookTypes, allBaseOverrideIsInWaterSuperiors, allBaseOverrideIsInWaterInferiors, "overrideIsInWater"); - sortBases(afterIsInWaterHookTypes, allBaseAfterIsInWaterSuperiors, allBaseAfterIsInWaterInferiors, "afterIsInWater"); - - sortBases(beforeIsInsideOfMaterialHookTypes, allBaseBeforeIsInsideOfMaterialSuperiors, allBaseBeforeIsInsideOfMaterialInferiors, "beforeIsInsideOfMaterial"); - sortBases(overrideIsInsideOfMaterialHookTypes, allBaseOverrideIsInsideOfMaterialSuperiors, allBaseOverrideIsInsideOfMaterialInferiors, "overrideIsInsideOfMaterial"); - sortBases(afterIsInsideOfMaterialHookTypes, allBaseAfterIsInsideOfMaterialSuperiors, allBaseAfterIsInsideOfMaterialInferiors, "afterIsInsideOfMaterial"); - - sortBases(beforeIsOnLadderHookTypes, allBaseBeforeIsOnLadderSuperiors, allBaseBeforeIsOnLadderInferiors, "beforeIsOnLadder"); - sortBases(overrideIsOnLadderHookTypes, allBaseOverrideIsOnLadderSuperiors, allBaseOverrideIsOnLadderInferiors, "overrideIsOnLadder"); - sortBases(afterIsOnLadderHookTypes, allBaseAfterIsOnLadderSuperiors, allBaseAfterIsOnLadderInferiors, "afterIsOnLadder"); - - sortBases(beforeIsPlayerSleepingHookTypes, allBaseBeforeIsPlayerSleepingSuperiors, allBaseBeforeIsPlayerSleepingInferiors, "beforeIsPlayerSleeping"); - sortBases(overrideIsPlayerSleepingHookTypes, allBaseOverrideIsPlayerSleepingSuperiors, allBaseOverrideIsPlayerSleepingInferiors, "overrideIsPlayerSleeping"); - sortBases(afterIsPlayerSleepingHookTypes, allBaseAfterIsPlayerSleepingSuperiors, allBaseAfterIsPlayerSleepingInferiors, "afterIsPlayerSleeping"); - - sortBases(beforeIsSneakingHookTypes, allBaseBeforeIsSneakingSuperiors, allBaseBeforeIsSneakingInferiors, "beforeIsSneaking"); - sortBases(overrideIsSneakingHookTypes, allBaseOverrideIsSneakingSuperiors, allBaseOverrideIsSneakingInferiors, "overrideIsSneaking"); - sortBases(afterIsSneakingHookTypes, allBaseAfterIsSneakingSuperiors, allBaseAfterIsSneakingInferiors, "afterIsSneaking"); - - sortBases(beforeJumpHookTypes, allBaseBeforeJumpSuperiors, allBaseBeforeJumpInferiors, "beforeJump"); - sortBases(overrideJumpHookTypes, allBaseOverrideJumpSuperiors, allBaseOverrideJumpInferiors, "overrideJump"); - sortBases(afterJumpHookTypes, allBaseAfterJumpSuperiors, allBaseAfterJumpInferiors, "afterJump"); - - sortBases(beforeKnockBackHookTypes, allBaseBeforeKnockBackSuperiors, allBaseBeforeKnockBackInferiors, "beforeKnockBack"); - sortBases(overrideKnockBackHookTypes, allBaseOverrideKnockBackSuperiors, allBaseOverrideKnockBackInferiors, "overrideKnockBack"); - sortBases(afterKnockBackHookTypes, allBaseAfterKnockBackSuperiors, allBaseAfterKnockBackInferiors, "afterKnockBack"); - - sortBases(beforeMountEntityHookTypes, allBaseBeforeMountEntitySuperiors, allBaseBeforeMountEntityInferiors, "beforeMountEntity"); - sortBases(overrideMountEntityHookTypes, allBaseOverrideMountEntitySuperiors, allBaseOverrideMountEntityInferiors, "overrideMountEntity"); - sortBases(afterMountEntityHookTypes, allBaseAfterMountEntitySuperiors, allBaseAfterMountEntityInferiors, "afterMountEntity"); - - sortBases(beforeMoveEntityHookTypes, allBaseBeforeMoveEntitySuperiors, allBaseBeforeMoveEntityInferiors, "beforeMoveEntity"); - sortBases(overrideMoveEntityHookTypes, allBaseOverrideMoveEntitySuperiors, allBaseOverrideMoveEntityInferiors, "overrideMoveEntity"); - sortBases(afterMoveEntityHookTypes, allBaseAfterMoveEntitySuperiors, allBaseAfterMoveEntityInferiors, "afterMoveEntity"); - - sortBases(beforeMoveEntityWithHeadingHookTypes, allBaseBeforeMoveEntityWithHeadingSuperiors, allBaseBeforeMoveEntityWithHeadingInferiors, "beforeMoveEntityWithHeading"); - sortBases(overrideMoveEntityWithHeadingHookTypes, allBaseOverrideMoveEntityWithHeadingSuperiors, allBaseOverrideMoveEntityWithHeadingInferiors, "overrideMoveEntityWithHeading"); - sortBases(afterMoveEntityWithHeadingHookTypes, allBaseAfterMoveEntityWithHeadingSuperiors, allBaseAfterMoveEntityWithHeadingInferiors, "afterMoveEntityWithHeading"); - - sortBases(beforeMoveFlyingHookTypes, allBaseBeforeMoveFlyingSuperiors, allBaseBeforeMoveFlyingInferiors, "beforeMoveFlying"); - sortBases(overrideMoveFlyingHookTypes, allBaseOverrideMoveFlyingSuperiors, allBaseOverrideMoveFlyingInferiors, "overrideMoveFlying"); - sortBases(afterMoveFlyingHookTypes, allBaseAfterMoveFlyingSuperiors, allBaseAfterMoveFlyingInferiors, "afterMoveFlying"); - - sortBases(beforeOnDeathHookTypes, allBaseBeforeOnDeathSuperiors, allBaseBeforeOnDeathInferiors, "beforeOnDeath"); - sortBases(overrideOnDeathHookTypes, allBaseOverrideOnDeathSuperiors, allBaseOverrideOnDeathInferiors, "overrideOnDeath"); - sortBases(afterOnDeathHookTypes, allBaseAfterOnDeathSuperiors, allBaseAfterOnDeathInferiors, "afterOnDeath"); - - sortBases(beforeOnLivingUpdateHookTypes, allBaseBeforeOnLivingUpdateSuperiors, allBaseBeforeOnLivingUpdateInferiors, "beforeOnLivingUpdate"); - sortBases(overrideOnLivingUpdateHookTypes, allBaseOverrideOnLivingUpdateSuperiors, allBaseOverrideOnLivingUpdateInferiors, "overrideOnLivingUpdate"); - sortBases(afterOnLivingUpdateHookTypes, allBaseAfterOnLivingUpdateSuperiors, allBaseAfterOnLivingUpdateInferiors, "afterOnLivingUpdate"); - - sortBases(beforeOnKillEntityHookTypes, allBaseBeforeOnKillEntitySuperiors, allBaseBeforeOnKillEntityInferiors, "beforeOnKillEntity"); - sortBases(overrideOnKillEntityHookTypes, allBaseOverrideOnKillEntitySuperiors, allBaseOverrideOnKillEntityInferiors, "overrideOnKillEntity"); - sortBases(afterOnKillEntityHookTypes, allBaseAfterOnKillEntitySuperiors, allBaseAfterOnKillEntityInferiors, "afterOnKillEntity"); - - sortBases(beforeOnStruckByLightningHookTypes, allBaseBeforeOnStruckByLightningSuperiors, allBaseBeforeOnStruckByLightningInferiors, "beforeOnStruckByLightning"); - sortBases(overrideOnStruckByLightningHookTypes, allBaseOverrideOnStruckByLightningSuperiors, allBaseOverrideOnStruckByLightningInferiors, "overrideOnStruckByLightning"); - sortBases(afterOnStruckByLightningHookTypes, allBaseAfterOnStruckByLightningSuperiors, allBaseAfterOnStruckByLightningInferiors, "afterOnStruckByLightning"); - - sortBases(beforeOnUpdateHookTypes, allBaseBeforeOnUpdateSuperiors, allBaseBeforeOnUpdateInferiors, "beforeOnUpdate"); - sortBases(overrideOnUpdateHookTypes, allBaseOverrideOnUpdateSuperiors, allBaseOverrideOnUpdateInferiors, "overrideOnUpdate"); - sortBases(afterOnUpdateHookTypes, allBaseAfterOnUpdateSuperiors, allBaseAfterOnUpdateInferiors, "afterOnUpdate"); - - sortBases(beforeOnUpdateEntityHookTypes, allBaseBeforeOnUpdateEntitySuperiors, allBaseBeforeOnUpdateEntityInferiors, "beforeOnUpdateEntity"); - sortBases(overrideOnUpdateEntityHookTypes, allBaseOverrideOnUpdateEntitySuperiors, allBaseOverrideOnUpdateEntityInferiors, "overrideOnUpdateEntity"); - sortBases(afterOnUpdateEntityHookTypes, allBaseAfterOnUpdateEntitySuperiors, allBaseAfterOnUpdateEntityInferiors, "afterOnUpdateEntity"); - - sortBases(beforeReadEntityFromNBTHookTypes, allBaseBeforeReadEntityFromNBTSuperiors, allBaseBeforeReadEntityFromNBTInferiors, "beforeReadEntityFromNBT"); - sortBases(overrideReadEntityFromNBTHookTypes, allBaseOverrideReadEntityFromNBTSuperiors, allBaseOverrideReadEntityFromNBTInferiors, "overrideReadEntityFromNBT"); - sortBases(afterReadEntityFromNBTHookTypes, allBaseAfterReadEntityFromNBTSuperiors, allBaseAfterReadEntityFromNBTInferiors, "afterReadEntityFromNBT"); - - sortBases(beforeSetDeadHookTypes, allBaseBeforeSetDeadSuperiors, allBaseBeforeSetDeadInferiors, "beforeSetDead"); - sortBases(overrideSetDeadHookTypes, allBaseOverrideSetDeadSuperiors, allBaseOverrideSetDeadInferiors, "overrideSetDead"); - sortBases(afterSetDeadHookTypes, allBaseAfterSetDeadSuperiors, allBaseAfterSetDeadInferiors, "afterSetDead"); - - sortBases(beforeSetEntityActionStateHookTypes, allBaseBeforeSetEntityActionStateSuperiors, allBaseBeforeSetEntityActionStateInferiors, "beforeSetEntityActionState"); - sortBases(overrideSetEntityActionStateHookTypes, allBaseOverrideSetEntityActionStateSuperiors, allBaseOverrideSetEntityActionStateInferiors, "overrideSetEntityActionState"); - sortBases(afterSetEntityActionStateHookTypes, allBaseAfterSetEntityActionStateSuperiors, allBaseAfterSetEntityActionStateInferiors, "afterSetEntityActionState"); - - sortBases(beforeSetPositionHookTypes, allBaseBeforeSetPositionSuperiors, allBaseBeforeSetPositionInferiors, "beforeSetPosition"); - sortBases(overrideSetPositionHookTypes, allBaseOverrideSetPositionSuperiors, allBaseOverrideSetPositionInferiors, "overrideSetPosition"); - sortBases(afterSetPositionHookTypes, allBaseAfterSetPositionSuperiors, allBaseAfterSetPositionInferiors, "afterSetPosition"); - - sortBases(beforeSetSneakingHookTypes, allBaseBeforeSetSneakingSuperiors, allBaseBeforeSetSneakingInferiors, "beforeSetSneaking"); - sortBases(overrideSetSneakingHookTypes, allBaseOverrideSetSneakingSuperiors, allBaseOverrideSetSneakingInferiors, "overrideSetSneaking"); - sortBases(afterSetSneakingHookTypes, allBaseAfterSetSneakingSuperiors, allBaseAfterSetSneakingInferiors, "afterSetSneaking"); - - sortBases(beforeSetSprintingHookTypes, allBaseBeforeSetSprintingSuperiors, allBaseBeforeSetSprintingInferiors, "beforeSetSprinting"); - sortBases(overrideSetSprintingHookTypes, allBaseOverrideSetSprintingSuperiors, allBaseOverrideSetSprintingInferiors, "overrideSetSprinting"); - sortBases(afterSetSprintingHookTypes, allBaseAfterSetSprintingSuperiors, allBaseAfterSetSprintingInferiors, "afterSetSprinting"); - - sortBases(beforeSwingItemHookTypes, allBaseBeforeSwingItemSuperiors, allBaseBeforeSwingItemInferiors, "beforeSwingItem"); - sortBases(overrideSwingItemHookTypes, allBaseOverrideSwingItemSuperiors, allBaseOverrideSwingItemInferiors, "overrideSwingItem"); - sortBases(afterSwingItemHookTypes, allBaseAfterSwingItemSuperiors, allBaseAfterSwingItemInferiors, "afterSwingItem"); - - sortBases(beforeUpdateEntityActionStateHookTypes, allBaseBeforeUpdateEntityActionStateSuperiors, allBaseBeforeUpdateEntityActionStateInferiors, "beforeUpdateEntityActionState"); - sortBases(overrideUpdateEntityActionStateHookTypes, allBaseOverrideUpdateEntityActionStateSuperiors, allBaseOverrideUpdateEntityActionStateInferiors, "overrideUpdateEntityActionState"); - sortBases(afterUpdateEntityActionStateHookTypes, allBaseAfterUpdateEntityActionStateSuperiors, allBaseAfterUpdateEntityActionStateInferiors, "afterUpdateEntityActionState"); - - sortBases(beforeUpdatePotionEffectsHookTypes, allBaseBeforeUpdatePotionEffectsSuperiors, allBaseBeforeUpdatePotionEffectsInferiors, "beforeUpdatePotionEffects"); - sortBases(overrideUpdatePotionEffectsHookTypes, allBaseOverrideUpdatePotionEffectsSuperiors, allBaseOverrideUpdatePotionEffectsInferiors, "overrideUpdatePotionEffects"); - sortBases(afterUpdatePotionEffectsHookTypes, allBaseAfterUpdatePotionEffectsSuperiors, allBaseAfterUpdatePotionEffectsInferiors, "afterUpdatePotionEffects"); - - sortBases(beforeUpdateRiddenHookTypes, allBaseBeforeUpdateRiddenSuperiors, allBaseBeforeUpdateRiddenInferiors, "beforeUpdateRidden"); - sortBases(overrideUpdateRiddenHookTypes, allBaseOverrideUpdateRiddenSuperiors, allBaseOverrideUpdateRiddenInferiors, "overrideUpdateRidden"); - sortBases(afterUpdateRiddenHookTypes, allBaseAfterUpdateRiddenSuperiors, allBaseAfterUpdateRiddenInferiors, "afterUpdateRidden"); - - sortBases(beforeWakeUpPlayerHookTypes, allBaseBeforeWakeUpPlayerSuperiors, allBaseBeforeWakeUpPlayerInferiors, "beforeWakeUpPlayer"); - sortBases(overrideWakeUpPlayerHookTypes, allBaseOverrideWakeUpPlayerSuperiors, allBaseOverrideWakeUpPlayerInferiors, "overrideWakeUpPlayer"); - sortBases(afterWakeUpPlayerHookTypes, allBaseAfterWakeUpPlayerSuperiors, allBaseAfterWakeUpPlayerInferiors, "afterWakeUpPlayer"); - - sortBases(beforeWriteEntityToNBTHookTypes, allBaseBeforeWriteEntityToNBTSuperiors, allBaseBeforeWriteEntityToNBTInferiors, "beforeWriteEntityToNBT"); - sortBases(overrideWriteEntityToNBTHookTypes, allBaseOverrideWriteEntityToNBTSuperiors, allBaseOverrideWriteEntityToNBTInferiors, "overrideWriteEntityToNBT"); - sortBases(afterWriteEntityToNBTHookTypes, allBaseAfterWriteEntityToNBTSuperiors, allBaseAfterWriteEntityToNBTInferiors, "afterWriteEntityToNBT"); - - initialized = true; - } - - private static List getAllInstancesList() - { - List result = new ArrayList(); - Object entityPlayerList; - try - { - Object minecraftServer = net.minecraft.server.MinecraftServer.class.getMethod("func_71276_C").invoke(null); - Object serverConfigurationManager = minecraftServer != null ? net.minecraft.server.MinecraftServer.class.getMethod("func_71203_ab").invoke(minecraftServer) : null; - entityPlayerList = serverConfigurationManager != null ? serverConfigurationManager.getClass().getField("field_72404_b").get(serverConfigurationManager) : null; - } - catch(Exception obfuscatedException) - { - try - { - Object minecraftServer = net.minecraft.server.MinecraftServer.class.getMethod("getServer").invoke(null); - Object serverConfigurationManager = minecraftServer != null ? net.minecraft.server.MinecraftServer.class.getMethod("getConfigurationManager").invoke(minecraftServer) : null; - entityPlayerList = serverConfigurationManager != null ? serverConfigurationManager.getClass().getField("playerEntityList").get(serverConfigurationManager) : null; - } - catch(Exception deobfuscatedException) - { - throw new RuntimeException("Unable to aquire list of current server players.", obfuscatedException); - } - } - if(entityPlayerList != null) - for(Object entityPlayer : (List)entityPlayerList) - result.add((IServerPlayerAPI)entityPlayer); - return result; - } - - public static net.minecraft.entity.player.EntityPlayerMP[] getAllInstances() - { - List allInstances = getAllInstancesList(); - return allInstances.toArray(new net.minecraft.entity.player.EntityPlayerMP[allInstances.size()]); - } - - public static void beforeLocalConstructing(IServerPlayerAPI serverPlayer, net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - ServerPlayerAPI serverPlayerAPI = serverPlayer.getServerPlayerAPI(); - if(serverPlayerAPI != null) - serverPlayerAPI.load(); - - if(serverPlayerAPI != null) - serverPlayerAPI.beforeLocalConstructing(paramMinecraftServer, paramWorldServer, paramGameProfile, paramItemInWorldManager); - } - - public static void afterLocalConstructing(IServerPlayerAPI serverPlayer, net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - ServerPlayerAPI serverPlayerAPI = serverPlayer.getServerPlayerAPI(); - if(serverPlayerAPI != null) - serverPlayerAPI.afterLocalConstructing(paramMinecraftServer, paramWorldServer, paramGameProfile, paramItemInWorldManager); - } - - public static ServerPlayerBase getServerPlayerBase(IServerPlayerAPI serverPlayer, String baseId) - { - ServerPlayerAPI serverPlayerAPI = serverPlayer.getServerPlayerAPI(); - if(serverPlayerAPI != null) - return serverPlayerAPI.getServerPlayerBase(baseId); - return null; - } - - public static Set getServerPlayerBaseIds(IServerPlayerAPI serverPlayer) - { - ServerPlayerAPI serverPlayerAPI = serverPlayer.getServerPlayerAPI(); - Set result = null; - if(serverPlayerAPI != null) - result = serverPlayerAPI.getServerPlayerBaseIds(); - else - result = Collections.emptySet(); - return result; - } - - public static Object dynamic(IServerPlayerAPI serverPlayer, String key, Object[] parameters) - { - ServerPlayerAPI serverPlayerAPI = serverPlayer.getServerPlayerAPI(); - if(serverPlayerAPI != null) - return serverPlayerAPI.dynamic(key, parameters); - return null; - } - - private static void sortBases(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - new ServerPlayerBaseSorter(list, allBaseSuperiors, allBaseInferiors, methodName).Sort(); - } - - private final static Map EmptySortMap = Collections.unmodifiableMap(new HashMap()); - - private static void sortDynamicBases(Map> lists, Map> allBaseSuperiors, Map> allBaseInferiors, String key) - { - List types = lists.get(key); - if(types != null && types.size() > 1) - sortBases(types, getDynamicSorters(key, types, allBaseSuperiors), getDynamicSorters(key, types, allBaseInferiors), key); - } - - private static Map getDynamicSorters(String key, List toSort, Map> allBaseValues) - { - Map superiors = null; - - Iterator ids = toSort.iterator(); - while(ids.hasNext()) - { - String id = ids.next(); - Map idSuperiors = allBaseValues.get(id); - if(idSuperiors == null) - continue; - - String[] keySuperiorIds = idSuperiors.get(key); - if(keySuperiorIds != null && keySuperiorIds.length > 0) - { - if(superiors == null) - superiors = new HashMap(1); - superiors.put(id, keySuperiorIds); - } - } - - return superiors != null ? superiors : EmptySortMap; - } - - private ServerPlayerAPI(IServerPlayerAPI player) - { - this.player = player; - } - - private void load() - { - Iterator iterator = allBaseConstructors.keySet().iterator(); - while(iterator.hasNext()) - { - String id = iterator.next(); - ServerPlayerBase toAttach = createServerPlayerBase(id); - toAttach.beforeBaseAttach(false); - allBaseObjects.put(id, toAttach); - baseObjectsToId.put(toAttach, id); - } - - beforeLocalConstructingHooks = create(beforeLocalConstructingHookTypes); - afterLocalConstructingHooks = create(afterLocalConstructingHookTypes); - - updateServerPlayerBases(); - - iterator = allBaseObjects.keySet().iterator(); - while(iterator.hasNext()) - allBaseObjects.get(iterator.next()).afterBaseAttach(false); - } - - private ServerPlayerBase createServerPlayerBase(String id) - { - Constructor contructor = allBaseConstructors.get(id); - - ServerPlayerBase base; - try - { - if(contructor.getParameterTypes().length == 1) - base = (ServerPlayerBase)contructor.newInstance(this); - else - base = (ServerPlayerBase)contructor.newInstance(this, id); - } - catch (Exception e) - { - throw new RuntimeException("Exception while creating a ServerPlayerBase of type '" + contructor.getDeclaringClass() + "'", e); - } - return base; - } - - private void updateServerPlayerBases() - { - beforeAddExhaustionHooks = create(beforeAddExhaustionHookTypes); - overrideAddExhaustionHooks = create(overrideAddExhaustionHookTypes); - afterAddExhaustionHooks = create(afterAddExhaustionHookTypes); - isAddExhaustionModded = - beforeAddExhaustionHooks != null || - overrideAddExhaustionHooks != null || - afterAddExhaustionHooks != null; - - beforeAddExperienceHooks = create(beforeAddExperienceHookTypes); - overrideAddExperienceHooks = create(overrideAddExperienceHookTypes); - afterAddExperienceHooks = create(afterAddExperienceHookTypes); - isAddExperienceModded = - beforeAddExperienceHooks != null || - overrideAddExperienceHooks != null || - afterAddExperienceHooks != null; - - beforeAddExperienceLevelHooks = create(beforeAddExperienceLevelHookTypes); - overrideAddExperienceLevelHooks = create(overrideAddExperienceLevelHookTypes); - afterAddExperienceLevelHooks = create(afterAddExperienceLevelHookTypes); - isAddExperienceLevelModded = - beforeAddExperienceLevelHooks != null || - overrideAddExperienceLevelHooks != null || - afterAddExperienceLevelHooks != null; - - beforeAddMovementStatHooks = create(beforeAddMovementStatHookTypes); - overrideAddMovementStatHooks = create(overrideAddMovementStatHookTypes); - afterAddMovementStatHooks = create(afterAddMovementStatHookTypes); - isAddMovementStatModded = - beforeAddMovementStatHooks != null || - overrideAddMovementStatHooks != null || - afterAddMovementStatHooks != null; - - beforeAttackEntityFromHooks = create(beforeAttackEntityFromHookTypes); - overrideAttackEntityFromHooks = create(overrideAttackEntityFromHookTypes); - afterAttackEntityFromHooks = create(afterAttackEntityFromHookTypes); - isAttackEntityFromModded = - beforeAttackEntityFromHooks != null || - overrideAttackEntityFromHooks != null || - afterAttackEntityFromHooks != null; - - beforeAttackTargetEntityWithCurrentItemHooks = create(beforeAttackTargetEntityWithCurrentItemHookTypes); - overrideAttackTargetEntityWithCurrentItemHooks = create(overrideAttackTargetEntityWithCurrentItemHookTypes); - afterAttackTargetEntityWithCurrentItemHooks = create(afterAttackTargetEntityWithCurrentItemHookTypes); - isAttackTargetEntityWithCurrentItemModded = - beforeAttackTargetEntityWithCurrentItemHooks != null || - overrideAttackTargetEntityWithCurrentItemHooks != null || - afterAttackTargetEntityWithCurrentItemHooks != null; - - beforeCanBreatheUnderwaterHooks = create(beforeCanBreatheUnderwaterHookTypes); - overrideCanBreatheUnderwaterHooks = create(overrideCanBreatheUnderwaterHookTypes); - afterCanBreatheUnderwaterHooks = create(afterCanBreatheUnderwaterHookTypes); - isCanBreatheUnderwaterModded = - beforeCanBreatheUnderwaterHooks != null || - overrideCanBreatheUnderwaterHooks != null || - afterCanBreatheUnderwaterHooks != null; - - beforeCanHarvestBlockHooks = create(beforeCanHarvestBlockHookTypes); - overrideCanHarvestBlockHooks = create(overrideCanHarvestBlockHookTypes); - afterCanHarvestBlockHooks = create(afterCanHarvestBlockHookTypes); - isCanHarvestBlockModded = - beforeCanHarvestBlockHooks != null || - overrideCanHarvestBlockHooks != null || - afterCanHarvestBlockHooks != null; - - beforeCanPlayerEditHooks = create(beforeCanPlayerEditHookTypes); - overrideCanPlayerEditHooks = create(overrideCanPlayerEditHookTypes); - afterCanPlayerEditHooks = create(afterCanPlayerEditHookTypes); - isCanPlayerEditModded = - beforeCanPlayerEditHooks != null || - overrideCanPlayerEditHooks != null || - afterCanPlayerEditHooks != null; - - beforeCanTriggerWalkingHooks = create(beforeCanTriggerWalkingHookTypes); - overrideCanTriggerWalkingHooks = create(overrideCanTriggerWalkingHookTypes); - afterCanTriggerWalkingHooks = create(afterCanTriggerWalkingHookTypes); - isCanTriggerWalkingModded = - beforeCanTriggerWalkingHooks != null || - overrideCanTriggerWalkingHooks != null || - afterCanTriggerWalkingHooks != null; - - beforeClonePlayerHooks = create(beforeClonePlayerHookTypes); - overrideClonePlayerHooks = create(overrideClonePlayerHookTypes); - afterClonePlayerHooks = create(afterClonePlayerHookTypes); - isClonePlayerModded = - beforeClonePlayerHooks != null || - overrideClonePlayerHooks != null || - afterClonePlayerHooks != null; - - beforeDamageEntityHooks = create(beforeDamageEntityHookTypes); - overrideDamageEntityHooks = create(overrideDamageEntityHookTypes); - afterDamageEntityHooks = create(afterDamageEntityHookTypes); - isDamageEntityModded = - beforeDamageEntityHooks != null || - overrideDamageEntityHooks != null || - afterDamageEntityHooks != null; - - beforeDisplayGUIChestHooks = create(beforeDisplayGUIChestHookTypes); - overrideDisplayGUIChestHooks = create(overrideDisplayGUIChestHookTypes); - afterDisplayGUIChestHooks = create(afterDisplayGUIChestHookTypes); - isDisplayGUIChestModded = - beforeDisplayGUIChestHooks != null || - overrideDisplayGUIChestHooks != null || - afterDisplayGUIChestHooks != null; - - beforeDisplayGUIDispenserHooks = create(beforeDisplayGUIDispenserHookTypes); - overrideDisplayGUIDispenserHooks = create(overrideDisplayGUIDispenserHookTypes); - afterDisplayGUIDispenserHooks = create(afterDisplayGUIDispenserHookTypes); - isDisplayGUIDispenserModded = - beforeDisplayGUIDispenserHooks != null || - overrideDisplayGUIDispenserHooks != null || - afterDisplayGUIDispenserHooks != null; - - beforeDisplayGUIFurnaceHooks = create(beforeDisplayGUIFurnaceHookTypes); - overrideDisplayGUIFurnaceHooks = create(overrideDisplayGUIFurnaceHookTypes); - afterDisplayGUIFurnaceHooks = create(afterDisplayGUIFurnaceHookTypes); - isDisplayGUIFurnaceModded = - beforeDisplayGUIFurnaceHooks != null || - overrideDisplayGUIFurnaceHooks != null || - afterDisplayGUIFurnaceHooks != null; - - beforeDisplayGUIWorkbenchHooks = create(beforeDisplayGUIWorkbenchHookTypes); - overrideDisplayGUIWorkbenchHooks = create(overrideDisplayGUIWorkbenchHookTypes); - afterDisplayGUIWorkbenchHooks = create(afterDisplayGUIWorkbenchHookTypes); - isDisplayGUIWorkbenchModded = - beforeDisplayGUIWorkbenchHooks != null || - overrideDisplayGUIWorkbenchHooks != null || - afterDisplayGUIWorkbenchHooks != null; - - beforeDropOneItemHooks = create(beforeDropOneItemHookTypes); - overrideDropOneItemHooks = create(overrideDropOneItemHookTypes); - afterDropOneItemHooks = create(afterDropOneItemHookTypes); - isDropOneItemModded = - beforeDropOneItemHooks != null || - overrideDropOneItemHooks != null || - afterDropOneItemHooks != null; - - beforeDropPlayerItemHooks = create(beforeDropPlayerItemHookTypes); - overrideDropPlayerItemHooks = create(overrideDropPlayerItemHookTypes); - afterDropPlayerItemHooks = create(afterDropPlayerItemHookTypes); - isDropPlayerItemModded = - beforeDropPlayerItemHooks != null || - overrideDropPlayerItemHooks != null || - afterDropPlayerItemHooks != null; - - beforeFallHooks = create(beforeFallHookTypes); - overrideFallHooks = create(overrideFallHookTypes); - afterFallHooks = create(afterFallHookTypes); - isFallModded = - beforeFallHooks != null || - overrideFallHooks != null || - afterFallHooks != null; - - beforeGetAIMoveSpeedHooks = create(beforeGetAIMoveSpeedHookTypes); - overrideGetAIMoveSpeedHooks = create(overrideGetAIMoveSpeedHookTypes); - afterGetAIMoveSpeedHooks = create(afterGetAIMoveSpeedHookTypes); - isGetAIMoveSpeedModded = - beforeGetAIMoveSpeedHooks != null || - overrideGetAIMoveSpeedHooks != null || - afterGetAIMoveSpeedHooks != null; - - beforeGetCurrentPlayerStrVsBlockHooks = create(beforeGetCurrentPlayerStrVsBlockHookTypes); - overrideGetCurrentPlayerStrVsBlockHooks = create(overrideGetCurrentPlayerStrVsBlockHookTypes); - afterGetCurrentPlayerStrVsBlockHooks = create(afterGetCurrentPlayerStrVsBlockHookTypes); - isGetCurrentPlayerStrVsBlockModded = - beforeGetCurrentPlayerStrVsBlockHooks != null || - overrideGetCurrentPlayerStrVsBlockHooks != null || - afterGetCurrentPlayerStrVsBlockHooks != null; - - beforeGetCurrentPlayerStrVsBlockForgeHooks = create(beforeGetCurrentPlayerStrVsBlockForgeHookTypes); - overrideGetCurrentPlayerStrVsBlockForgeHooks = create(overrideGetCurrentPlayerStrVsBlockForgeHookTypes); - afterGetCurrentPlayerStrVsBlockForgeHooks = create(afterGetCurrentPlayerStrVsBlockForgeHookTypes); - isGetCurrentPlayerStrVsBlockForgeModded = - beforeGetCurrentPlayerStrVsBlockForgeHooks != null || - overrideGetCurrentPlayerStrVsBlockForgeHooks != null || - afterGetCurrentPlayerStrVsBlockForgeHooks != null; - - beforeGetDistanceSqHooks = create(beforeGetDistanceSqHookTypes); - overrideGetDistanceSqHooks = create(overrideGetDistanceSqHookTypes); - afterGetDistanceSqHooks = create(afterGetDistanceSqHookTypes); - isGetDistanceSqModded = - beforeGetDistanceSqHooks != null || - overrideGetDistanceSqHooks != null || - afterGetDistanceSqHooks != null; - - beforeGetBrightnessHooks = create(beforeGetBrightnessHookTypes); - overrideGetBrightnessHooks = create(overrideGetBrightnessHookTypes); - afterGetBrightnessHooks = create(afterGetBrightnessHookTypes); - isGetBrightnessModded = - beforeGetBrightnessHooks != null || - overrideGetBrightnessHooks != null || - afterGetBrightnessHooks != null; - - beforeGetEyeHeightHooks = create(beforeGetEyeHeightHookTypes); - overrideGetEyeHeightHooks = create(overrideGetEyeHeightHookTypes); - afterGetEyeHeightHooks = create(afterGetEyeHeightHookTypes); - isGetEyeHeightModded = - beforeGetEyeHeightHooks != null || - overrideGetEyeHeightHooks != null || - afterGetEyeHeightHooks != null; - - beforeHealHooks = create(beforeHealHookTypes); - overrideHealHooks = create(overrideHealHookTypes); - afterHealHooks = create(afterHealHookTypes); - isHealModded = - beforeHealHooks != null || - overrideHealHooks != null || - afterHealHooks != null; - - beforeIsEntityInsideOpaqueBlockHooks = create(beforeIsEntityInsideOpaqueBlockHookTypes); - overrideIsEntityInsideOpaqueBlockHooks = create(overrideIsEntityInsideOpaqueBlockHookTypes); - afterIsEntityInsideOpaqueBlockHooks = create(afterIsEntityInsideOpaqueBlockHookTypes); - isIsEntityInsideOpaqueBlockModded = - beforeIsEntityInsideOpaqueBlockHooks != null || - overrideIsEntityInsideOpaqueBlockHooks != null || - afterIsEntityInsideOpaqueBlockHooks != null; - - beforeIsInWaterHooks = create(beforeIsInWaterHookTypes); - overrideIsInWaterHooks = create(overrideIsInWaterHookTypes); - afterIsInWaterHooks = create(afterIsInWaterHookTypes); - isIsInWaterModded = - beforeIsInWaterHooks != null || - overrideIsInWaterHooks != null || - afterIsInWaterHooks != null; - - beforeIsInsideOfMaterialHooks = create(beforeIsInsideOfMaterialHookTypes); - overrideIsInsideOfMaterialHooks = create(overrideIsInsideOfMaterialHookTypes); - afterIsInsideOfMaterialHooks = create(afterIsInsideOfMaterialHookTypes); - isIsInsideOfMaterialModded = - beforeIsInsideOfMaterialHooks != null || - overrideIsInsideOfMaterialHooks != null || - afterIsInsideOfMaterialHooks != null; - - beforeIsOnLadderHooks = create(beforeIsOnLadderHookTypes); - overrideIsOnLadderHooks = create(overrideIsOnLadderHookTypes); - afterIsOnLadderHooks = create(afterIsOnLadderHookTypes); - isIsOnLadderModded = - beforeIsOnLadderHooks != null || - overrideIsOnLadderHooks != null || - afterIsOnLadderHooks != null; - - beforeIsPlayerSleepingHooks = create(beforeIsPlayerSleepingHookTypes); - overrideIsPlayerSleepingHooks = create(overrideIsPlayerSleepingHookTypes); - afterIsPlayerSleepingHooks = create(afterIsPlayerSleepingHookTypes); - isIsPlayerSleepingModded = - beforeIsPlayerSleepingHooks != null || - overrideIsPlayerSleepingHooks != null || - afterIsPlayerSleepingHooks != null; - - beforeIsSneakingHooks = create(beforeIsSneakingHookTypes); - overrideIsSneakingHooks = create(overrideIsSneakingHookTypes); - afterIsSneakingHooks = create(afterIsSneakingHookTypes); - isIsSneakingModded = - beforeIsSneakingHooks != null || - overrideIsSneakingHooks != null || - afterIsSneakingHooks != null; - - beforeJumpHooks = create(beforeJumpHookTypes); - overrideJumpHooks = create(overrideJumpHookTypes); - afterJumpHooks = create(afterJumpHookTypes); - isJumpModded = - beforeJumpHooks != null || - overrideJumpHooks != null || - afterJumpHooks != null; - - beforeKnockBackHooks = create(beforeKnockBackHookTypes); - overrideKnockBackHooks = create(overrideKnockBackHookTypes); - afterKnockBackHooks = create(afterKnockBackHookTypes); - isKnockBackModded = - beforeKnockBackHooks != null || - overrideKnockBackHooks != null || - afterKnockBackHooks != null; - - beforeMountEntityHooks = create(beforeMountEntityHookTypes); - overrideMountEntityHooks = create(overrideMountEntityHookTypes); - afterMountEntityHooks = create(afterMountEntityHookTypes); - isMountEntityModded = - beforeMountEntityHooks != null || - overrideMountEntityHooks != null || - afterMountEntityHooks != null; - - beforeMoveEntityHooks = create(beforeMoveEntityHookTypes); - overrideMoveEntityHooks = create(overrideMoveEntityHookTypes); - afterMoveEntityHooks = create(afterMoveEntityHookTypes); - isMoveEntityModded = - beforeMoveEntityHooks != null || - overrideMoveEntityHooks != null || - afterMoveEntityHooks != null; - - beforeMoveEntityWithHeadingHooks = create(beforeMoveEntityWithHeadingHookTypes); - overrideMoveEntityWithHeadingHooks = create(overrideMoveEntityWithHeadingHookTypes); - afterMoveEntityWithHeadingHooks = create(afterMoveEntityWithHeadingHookTypes); - isMoveEntityWithHeadingModded = - beforeMoveEntityWithHeadingHooks != null || - overrideMoveEntityWithHeadingHooks != null || - afterMoveEntityWithHeadingHooks != null; - - beforeMoveFlyingHooks = create(beforeMoveFlyingHookTypes); - overrideMoveFlyingHooks = create(overrideMoveFlyingHookTypes); - afterMoveFlyingHooks = create(afterMoveFlyingHookTypes); - isMoveFlyingModded = - beforeMoveFlyingHooks != null || - overrideMoveFlyingHooks != null || - afterMoveFlyingHooks != null; - - beforeOnDeathHooks = create(beforeOnDeathHookTypes); - overrideOnDeathHooks = create(overrideOnDeathHookTypes); - afterOnDeathHooks = create(afterOnDeathHookTypes); - isOnDeathModded = - beforeOnDeathHooks != null || - overrideOnDeathHooks != null || - afterOnDeathHooks != null; - - beforeOnLivingUpdateHooks = create(beforeOnLivingUpdateHookTypes); - overrideOnLivingUpdateHooks = create(overrideOnLivingUpdateHookTypes); - afterOnLivingUpdateHooks = create(afterOnLivingUpdateHookTypes); - isOnLivingUpdateModded = - beforeOnLivingUpdateHooks != null || - overrideOnLivingUpdateHooks != null || - afterOnLivingUpdateHooks != null; - - beforeOnKillEntityHooks = create(beforeOnKillEntityHookTypes); - overrideOnKillEntityHooks = create(overrideOnKillEntityHookTypes); - afterOnKillEntityHooks = create(afterOnKillEntityHookTypes); - isOnKillEntityModded = - beforeOnKillEntityHooks != null || - overrideOnKillEntityHooks != null || - afterOnKillEntityHooks != null; - - beforeOnStruckByLightningHooks = create(beforeOnStruckByLightningHookTypes); - overrideOnStruckByLightningHooks = create(overrideOnStruckByLightningHookTypes); - afterOnStruckByLightningHooks = create(afterOnStruckByLightningHookTypes); - isOnStruckByLightningModded = - beforeOnStruckByLightningHooks != null || - overrideOnStruckByLightningHooks != null || - afterOnStruckByLightningHooks != null; - - beforeOnUpdateHooks = create(beforeOnUpdateHookTypes); - overrideOnUpdateHooks = create(overrideOnUpdateHookTypes); - afterOnUpdateHooks = create(afterOnUpdateHookTypes); - isOnUpdateModded = - beforeOnUpdateHooks != null || - overrideOnUpdateHooks != null || - afterOnUpdateHooks != null; - - beforeOnUpdateEntityHooks = create(beforeOnUpdateEntityHookTypes); - overrideOnUpdateEntityHooks = create(overrideOnUpdateEntityHookTypes); - afterOnUpdateEntityHooks = create(afterOnUpdateEntityHookTypes); - isOnUpdateEntityModded = - beforeOnUpdateEntityHooks != null || - overrideOnUpdateEntityHooks != null || - afterOnUpdateEntityHooks != null; - - beforeReadEntityFromNBTHooks = create(beforeReadEntityFromNBTHookTypes); - overrideReadEntityFromNBTHooks = create(overrideReadEntityFromNBTHookTypes); - afterReadEntityFromNBTHooks = create(afterReadEntityFromNBTHookTypes); - isReadEntityFromNBTModded = - beforeReadEntityFromNBTHooks != null || - overrideReadEntityFromNBTHooks != null || - afterReadEntityFromNBTHooks != null; - - beforeSetDeadHooks = create(beforeSetDeadHookTypes); - overrideSetDeadHooks = create(overrideSetDeadHookTypes); - afterSetDeadHooks = create(afterSetDeadHookTypes); - isSetDeadModded = - beforeSetDeadHooks != null || - overrideSetDeadHooks != null || - afterSetDeadHooks != null; - - beforeSetEntityActionStateHooks = create(beforeSetEntityActionStateHookTypes); - overrideSetEntityActionStateHooks = create(overrideSetEntityActionStateHookTypes); - afterSetEntityActionStateHooks = create(afterSetEntityActionStateHookTypes); - isSetEntityActionStateModded = - beforeSetEntityActionStateHooks != null || - overrideSetEntityActionStateHooks != null || - afterSetEntityActionStateHooks != null; - - beforeSetPositionHooks = create(beforeSetPositionHookTypes); - overrideSetPositionHooks = create(overrideSetPositionHookTypes); - afterSetPositionHooks = create(afterSetPositionHookTypes); - isSetPositionModded = - beforeSetPositionHooks != null || - overrideSetPositionHooks != null || - afterSetPositionHooks != null; - - beforeSetSneakingHooks = create(beforeSetSneakingHookTypes); - overrideSetSneakingHooks = create(overrideSetSneakingHookTypes); - afterSetSneakingHooks = create(afterSetSneakingHookTypes); - isSetSneakingModded = - beforeSetSneakingHooks != null || - overrideSetSneakingHooks != null || - afterSetSneakingHooks != null; - - beforeSetSprintingHooks = create(beforeSetSprintingHookTypes); - overrideSetSprintingHooks = create(overrideSetSprintingHookTypes); - afterSetSprintingHooks = create(afterSetSprintingHookTypes); - isSetSprintingModded = - beforeSetSprintingHooks != null || - overrideSetSprintingHooks != null || - afterSetSprintingHooks != null; - - beforeSwingItemHooks = create(beforeSwingItemHookTypes); - overrideSwingItemHooks = create(overrideSwingItemHookTypes); - afterSwingItemHooks = create(afterSwingItemHookTypes); - isSwingItemModded = - beforeSwingItemHooks != null || - overrideSwingItemHooks != null || - afterSwingItemHooks != null; - - beforeUpdateEntityActionStateHooks = create(beforeUpdateEntityActionStateHookTypes); - overrideUpdateEntityActionStateHooks = create(overrideUpdateEntityActionStateHookTypes); - afterUpdateEntityActionStateHooks = create(afterUpdateEntityActionStateHookTypes); - isUpdateEntityActionStateModded = - beforeUpdateEntityActionStateHooks != null || - overrideUpdateEntityActionStateHooks != null || - afterUpdateEntityActionStateHooks != null; - - beforeUpdatePotionEffectsHooks = create(beforeUpdatePotionEffectsHookTypes); - overrideUpdatePotionEffectsHooks = create(overrideUpdatePotionEffectsHookTypes); - afterUpdatePotionEffectsHooks = create(afterUpdatePotionEffectsHookTypes); - isUpdatePotionEffectsModded = - beforeUpdatePotionEffectsHooks != null || - overrideUpdatePotionEffectsHooks != null || - afterUpdatePotionEffectsHooks != null; - - beforeUpdateRiddenHooks = create(beforeUpdateRiddenHookTypes); - overrideUpdateRiddenHooks = create(overrideUpdateRiddenHookTypes); - afterUpdateRiddenHooks = create(afterUpdateRiddenHookTypes); - isUpdateRiddenModded = - beforeUpdateRiddenHooks != null || - overrideUpdateRiddenHooks != null || - afterUpdateRiddenHooks != null; - - beforeWakeUpPlayerHooks = create(beforeWakeUpPlayerHookTypes); - overrideWakeUpPlayerHooks = create(overrideWakeUpPlayerHookTypes); - afterWakeUpPlayerHooks = create(afterWakeUpPlayerHookTypes); - isWakeUpPlayerModded = - beforeWakeUpPlayerHooks != null || - overrideWakeUpPlayerHooks != null || - afterWakeUpPlayerHooks != null; - - beforeWriteEntityToNBTHooks = create(beforeWriteEntityToNBTHookTypes); - overrideWriteEntityToNBTHooks = create(overrideWriteEntityToNBTHookTypes); - afterWriteEntityToNBTHooks = create(afterWriteEntityToNBTHookTypes); - isWriteEntityToNBTModded = - beforeWriteEntityToNBTHooks != null || - overrideWriteEntityToNBTHooks != null || - afterWriteEntityToNBTHooks != null; - - } - - private void attachServerPlayerBase(String id) - { - ServerPlayerBase toAttach = createServerPlayerBase(id); - toAttach.beforeBaseAttach(true); - allBaseObjects.put(id, toAttach); - updateServerPlayerBases(); - toAttach.afterBaseAttach(true); - } - - private void detachServerPlayerBase(String id) - { - ServerPlayerBase toDetach = allBaseObjects.get(id); - toDetach.beforeBaseDetach(true); - allBaseObjects.remove(id); - toDetach.afterBaseDetach(true); - } - - private ServerPlayerBase[] create(List types) - { - if(types.isEmpty()) - return null; - - ServerPlayerBase[] result = new ServerPlayerBase[types.size()]; - for(int i = 0; i < result.length; i++) - result[i] = getServerPlayerBase(types.get(i)); - return result; - } - - private void beforeLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - if(beforeLocalConstructingHooks != null) - for(int i = beforeLocalConstructingHooks.length - 1; i >= 0 ; i--) - beforeLocalConstructingHooks[i].beforeLocalConstructing(paramMinecraftServer, paramWorldServer, paramGameProfile, paramItemInWorldManager); - beforeLocalConstructingHooks = null; - } - - private void afterLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - if(afterLocalConstructingHooks != null) - for(int i = 0; i < afterLocalConstructingHooks.length; i++) - afterLocalConstructingHooks[i].afterLocalConstructing(paramMinecraftServer, paramWorldServer, paramGameProfile, paramItemInWorldManager); - afterLocalConstructingHooks = null; - } - - public ServerPlayerBase getServerPlayerBase(String id) - { - return allBaseObjects.get(id); - } - - public Set getServerPlayerBaseIds() - { - return unmodifiableAllBaseIds; - } - - public Object dynamic(String key, Object[] parameters) - { - key = key.replace('.', '_').replace(' ', '_'); - executeAll(key, parameters, beforeDynamicHookTypes, beforeDynamicHookMethods, true); - Object result = dynamicOverwritten(key, parameters, null); - executeAll(key, parameters, afterDynamicHookTypes, afterDynamicHookMethods, false); - return result; - } - - public Object dynamicOverwritten(String key, Object[] parameters, ServerPlayerBase overwriter) - { - List overrideIds = overrideDynamicHookTypes.get(key); - - String id = null; - if(overrideIds != null) - if(overwriter != null) - { - id = baseObjectsToId.get(overwriter); - int index = overrideIds.indexOf(id); - if(index > 0) - id = overrideIds.get(index - 1); - else - id = null; - } - else if(overrideIds.size() > 0) - id = overrideIds.get(overrideIds.size() - 1); - - Map, Map> methodMap; - - if(id == null) - { - id = keysToVirtualIds.get(key); - if(id == null) - return null; - methodMap = virtualDynamicHookMethods; - } - else - methodMap = overrideDynamicHookMethods; - - Map methods = methodMap.get(allBaseConstructors.get(id).getDeclaringClass()); - if(methods == null) - return null; - - Method method = methods.get(key); - if(method == null) - return null; - - return execute(getServerPlayerBase(id), method, parameters); - } - - private void executeAll(String key, Object[] parameters, Map> dynamicHookTypes, Map, Map> dynamicHookMethods, boolean reverse) - { - List beforeIds = dynamicHookTypes.get(key); - if(beforeIds == null) - return; - - for(int i= reverse ? beforeIds.size() - 1 : 0; reverse ? i >= 0 : i < beforeIds.size(); i = i + (reverse ? -1 : 1)) - { - String id = beforeIds.get(i); - ServerPlayerBase base = getServerPlayerBase(id); - Class type = base.getClass(); - - Map methods = dynamicHookMethods.get(type); - if(methods == null) - continue; - - Method method = methods.get(key); - if(method == null) - continue; - - execute(base, method, parameters); - } - } - - private Object execute(ServerPlayerBase base, Method method, Object[] parameters) - { - try - { - return method.invoke(base, parameters); - } - catch(Exception e) - { - throw new RuntimeException("Exception while invoking dynamic method", e); - } - } - - public static void addExhaustion(IServerPlayerAPI target, float paramFloat) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAddExhaustionModded) - serverPlayerAPI.addExhaustion(paramFloat); - else - target.localAddExhaustion(paramFloat); - } - - private void addExhaustion(float paramFloat) - { - if(beforeAddExhaustionHooks != null) - for(int i = beforeAddExhaustionHooks.length - 1; i >= 0 ; i--) - beforeAddExhaustionHooks[i].beforeAddExhaustion(paramFloat); - - if(overrideAddExhaustionHooks != null) - overrideAddExhaustionHooks[overrideAddExhaustionHooks.length - 1].addExhaustion(paramFloat); - else - player.localAddExhaustion(paramFloat); - - if(afterAddExhaustionHooks != null) - for(int i = 0; i < afterAddExhaustionHooks.length; i++) - afterAddExhaustionHooks[i].afterAddExhaustion(paramFloat); - - } - - protected ServerPlayerBase GetOverwrittenAddExhaustion(ServerPlayerBase overWriter) - { - if (overrideAddExhaustionHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddExhaustionHooks.length; i++) - if(overrideAddExhaustionHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddExhaustionHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddExhaustionHookTypes = new LinkedList(); - private final static List overrideAddExhaustionHookTypes = new LinkedList(); - private final static List afterAddExhaustionHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAddExhaustionHooks; - private ServerPlayerBase[] overrideAddExhaustionHooks; - private ServerPlayerBase[] afterAddExhaustionHooks; - - public boolean isAddExhaustionModded; - - private static final Map allBaseBeforeAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddExhaustionInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddExhaustionInferiors = new Hashtable(0); - private static final Map allBaseAfterAddExhaustionSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddExhaustionInferiors = new Hashtable(0); - - public static void addExperience(IServerPlayerAPI target, int paramInt) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAddExperienceModded) - serverPlayerAPI.addExperience(paramInt); - else - target.localAddExperience(paramInt); - } - - private void addExperience(int paramInt) - { - if(beforeAddExperienceHooks != null) - for(int i = beforeAddExperienceHooks.length - 1; i >= 0 ; i--) - beforeAddExperienceHooks[i].beforeAddExperience(paramInt); - - if(overrideAddExperienceHooks != null) - overrideAddExperienceHooks[overrideAddExperienceHooks.length - 1].addExperience(paramInt); - else - player.localAddExperience(paramInt); - - if(afterAddExperienceHooks != null) - for(int i = 0; i < afterAddExperienceHooks.length; i++) - afterAddExperienceHooks[i].afterAddExperience(paramInt); - - } - - protected ServerPlayerBase GetOverwrittenAddExperience(ServerPlayerBase overWriter) - { - if (overrideAddExperienceHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddExperienceHooks.length; i++) - if(overrideAddExperienceHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddExperienceHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddExperienceHookTypes = new LinkedList(); - private final static List overrideAddExperienceHookTypes = new LinkedList(); - private final static List afterAddExperienceHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAddExperienceHooks; - private ServerPlayerBase[] overrideAddExperienceHooks; - private ServerPlayerBase[] afterAddExperienceHooks; - - public boolean isAddExperienceModded; - - private static final Map allBaseBeforeAddExperienceSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddExperienceInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddExperienceSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddExperienceInferiors = new Hashtable(0); - private static final Map allBaseAfterAddExperienceSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddExperienceInferiors = new Hashtable(0); - - public static void addExperienceLevel(IServerPlayerAPI target, int paramInt) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAddExperienceLevelModded) - serverPlayerAPI.addExperienceLevel(paramInt); - else - target.localAddExperienceLevel(paramInt); - } - - private void addExperienceLevel(int paramInt) - { - if(beforeAddExperienceLevelHooks != null) - for(int i = beforeAddExperienceLevelHooks.length - 1; i >= 0 ; i--) - beforeAddExperienceLevelHooks[i].beforeAddExperienceLevel(paramInt); - - if(overrideAddExperienceLevelHooks != null) - overrideAddExperienceLevelHooks[overrideAddExperienceLevelHooks.length - 1].addExperienceLevel(paramInt); - else - player.localAddExperienceLevel(paramInt); - - if(afterAddExperienceLevelHooks != null) - for(int i = 0; i < afterAddExperienceLevelHooks.length; i++) - afterAddExperienceLevelHooks[i].afterAddExperienceLevel(paramInt); - - } - - protected ServerPlayerBase GetOverwrittenAddExperienceLevel(ServerPlayerBase overWriter) - { - if (overrideAddExperienceLevelHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddExperienceLevelHooks.length; i++) - if(overrideAddExperienceLevelHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddExperienceLevelHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddExperienceLevelHookTypes = new LinkedList(); - private final static List overrideAddExperienceLevelHookTypes = new LinkedList(); - private final static List afterAddExperienceLevelHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAddExperienceLevelHooks; - private ServerPlayerBase[] overrideAddExperienceLevelHooks; - private ServerPlayerBase[] afterAddExperienceLevelHooks; - - public boolean isAddExperienceLevelModded; - - private static final Map allBaseBeforeAddExperienceLevelSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddExperienceLevelInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddExperienceLevelSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddExperienceLevelInferiors = new Hashtable(0); - private static final Map allBaseAfterAddExperienceLevelSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddExperienceLevelInferiors = new Hashtable(0); - - public static void addMovementStat(IServerPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAddMovementStatModded) - serverPlayerAPI.addMovementStat(paramDouble1, paramDouble2, paramDouble3); - else - target.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - } - - private void addMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeAddMovementStatHooks != null) - for(int i = beforeAddMovementStatHooks.length - 1; i >= 0 ; i--) - beforeAddMovementStatHooks[i].beforeAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - if(overrideAddMovementStatHooks != null) - overrideAddMovementStatHooks[overrideAddMovementStatHooks.length - 1].addMovementStat(paramDouble1, paramDouble2, paramDouble3); - else - player.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - if(afterAddMovementStatHooks != null) - for(int i = 0; i < afterAddMovementStatHooks.length; i++) - afterAddMovementStatHooks[i].afterAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - - } - - protected ServerPlayerBase GetOverwrittenAddMovementStat(ServerPlayerBase overWriter) - { - if (overrideAddMovementStatHooks == null) - return overWriter; - - for(int i = 0; i < overrideAddMovementStatHooks.length; i++) - if(overrideAddMovementStatHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAddMovementStatHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAddMovementStatHookTypes = new LinkedList(); - private final static List overrideAddMovementStatHookTypes = new LinkedList(); - private final static List afterAddMovementStatHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAddMovementStatHooks; - private ServerPlayerBase[] overrideAddMovementStatHooks; - private ServerPlayerBase[] afterAddMovementStatHooks; - - public boolean isAddMovementStatModded; - - private static final Map allBaseBeforeAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAddMovementStatInferiors = new Hashtable(0); - private static final Map allBaseOverrideAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAddMovementStatInferiors = new Hashtable(0); - private static final Map allBaseAfterAddMovementStatSuperiors = new Hashtable(0); - private static final Map allBaseAfterAddMovementStatInferiors = new Hashtable(0); - - public static boolean attackEntityFrom(IServerPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAttackEntityFromModded) - _result = serverPlayerAPI.attackEntityFrom(paramDamageSource, paramFloat); - else - _result = target.localAttackEntityFrom(paramDamageSource, paramFloat); - return _result; - } - - private boolean attackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - if(beforeAttackEntityFromHooks != null) - for(int i = beforeAttackEntityFromHooks.length - 1; i >= 0 ; i--) - beforeAttackEntityFromHooks[i].beforeAttackEntityFrom(paramDamageSource, paramFloat); - - boolean _result; - if(overrideAttackEntityFromHooks != null) - _result = overrideAttackEntityFromHooks[overrideAttackEntityFromHooks.length - 1].attackEntityFrom(paramDamageSource, paramFloat); - else - _result = player.localAttackEntityFrom(paramDamageSource, paramFloat); - - if(afterAttackEntityFromHooks != null) - for(int i = 0; i < afterAttackEntityFromHooks.length; i++) - afterAttackEntityFromHooks[i].afterAttackEntityFrom(paramDamageSource, paramFloat); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenAttackEntityFrom(ServerPlayerBase overWriter) - { - if (overrideAttackEntityFromHooks == null) - return overWriter; - - for(int i = 0; i < overrideAttackEntityFromHooks.length; i++) - if(overrideAttackEntityFromHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAttackEntityFromHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAttackEntityFromHookTypes = new LinkedList(); - private final static List overrideAttackEntityFromHookTypes = new LinkedList(); - private final static List afterAttackEntityFromHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAttackEntityFromHooks; - private ServerPlayerBase[] overrideAttackEntityFromHooks; - private ServerPlayerBase[] afterAttackEntityFromHooks; - - public boolean isAttackEntityFromModded; - - private static final Map allBaseBeforeAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAttackEntityFromInferiors = new Hashtable(0); - private static final Map allBaseOverrideAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAttackEntityFromInferiors = new Hashtable(0); - private static final Map allBaseAfterAttackEntityFromSuperiors = new Hashtable(0); - private static final Map allBaseAfterAttackEntityFromInferiors = new Hashtable(0); - - public static void attackTargetEntityWithCurrentItem(IServerPlayerAPI target, net.minecraft.entity.Entity paramEntity) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isAttackTargetEntityWithCurrentItemModded) - serverPlayerAPI.attackTargetEntityWithCurrentItem(paramEntity); - else - target.localAttackTargetEntityWithCurrentItem(paramEntity); - } - - private void attackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - if(beforeAttackTargetEntityWithCurrentItemHooks != null) - for(int i = beforeAttackTargetEntityWithCurrentItemHooks.length - 1; i >= 0 ; i--) - beforeAttackTargetEntityWithCurrentItemHooks[i].beforeAttackTargetEntityWithCurrentItem(paramEntity); - - if(overrideAttackTargetEntityWithCurrentItemHooks != null) - overrideAttackTargetEntityWithCurrentItemHooks[overrideAttackTargetEntityWithCurrentItemHooks.length - 1].attackTargetEntityWithCurrentItem(paramEntity); - else - player.localAttackTargetEntityWithCurrentItem(paramEntity); - - if(afterAttackTargetEntityWithCurrentItemHooks != null) - for(int i = 0; i < afterAttackTargetEntityWithCurrentItemHooks.length; i++) - afterAttackTargetEntityWithCurrentItemHooks[i].afterAttackTargetEntityWithCurrentItem(paramEntity); - - } - - protected ServerPlayerBase GetOverwrittenAttackTargetEntityWithCurrentItem(ServerPlayerBase overWriter) - { - if (overrideAttackTargetEntityWithCurrentItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideAttackTargetEntityWithCurrentItemHooks.length; i++) - if(overrideAttackTargetEntityWithCurrentItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideAttackTargetEntityWithCurrentItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - private final static List overrideAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - private final static List afterAttackTargetEntityWithCurrentItemHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeAttackTargetEntityWithCurrentItemHooks; - private ServerPlayerBase[] overrideAttackTargetEntityWithCurrentItemHooks; - private ServerPlayerBase[] afterAttackTargetEntityWithCurrentItemHooks; - - public boolean isAttackTargetEntityWithCurrentItemModded; - - private static final Map allBaseBeforeAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - private static final Map allBaseAfterAttackTargetEntityWithCurrentItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterAttackTargetEntityWithCurrentItemInferiors = new Hashtable(0); - - public static boolean canBreatheUnderwater(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isCanBreatheUnderwaterModded) - _result = serverPlayerAPI.canBreatheUnderwater(); - else - _result = target.localCanBreatheUnderwater(); - return _result; - } - - private boolean canBreatheUnderwater() - { - if(beforeCanBreatheUnderwaterHooks != null) - for(int i = beforeCanBreatheUnderwaterHooks.length - 1; i >= 0 ; i--) - beforeCanBreatheUnderwaterHooks[i].beforeCanBreatheUnderwater(); - - boolean _result; - if(overrideCanBreatheUnderwaterHooks != null) - _result = overrideCanBreatheUnderwaterHooks[overrideCanBreatheUnderwaterHooks.length - 1].canBreatheUnderwater(); - else - _result = player.localCanBreatheUnderwater(); - - if(afterCanBreatheUnderwaterHooks != null) - for(int i = 0; i < afterCanBreatheUnderwaterHooks.length; i++) - afterCanBreatheUnderwaterHooks[i].afterCanBreatheUnderwater(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenCanBreatheUnderwater(ServerPlayerBase overWriter) - { - if (overrideCanBreatheUnderwaterHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanBreatheUnderwaterHooks.length; i++) - if(overrideCanBreatheUnderwaterHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanBreatheUnderwaterHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanBreatheUnderwaterHookTypes = new LinkedList(); - private final static List overrideCanBreatheUnderwaterHookTypes = new LinkedList(); - private final static List afterCanBreatheUnderwaterHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeCanBreatheUnderwaterHooks; - private ServerPlayerBase[] overrideCanBreatheUnderwaterHooks; - private ServerPlayerBase[] afterCanBreatheUnderwaterHooks; - - public boolean isCanBreatheUnderwaterModded; - - private static final Map allBaseBeforeCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanBreatheUnderwaterInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanBreatheUnderwaterInferiors = new Hashtable(0); - private static final Map allBaseAfterCanBreatheUnderwaterSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanBreatheUnderwaterInferiors = new Hashtable(0); - - public static boolean canHarvestBlock(IServerPlayerAPI target, net.minecraft.block.Block paramBlock) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isCanHarvestBlockModded) - _result = serverPlayerAPI.canHarvestBlock(paramBlock); - else - _result = target.localCanHarvestBlock(paramBlock); - return _result; - } - - private boolean canHarvestBlock(net.minecraft.block.Block paramBlock) - { - if(beforeCanHarvestBlockHooks != null) - for(int i = beforeCanHarvestBlockHooks.length - 1; i >= 0 ; i--) - beforeCanHarvestBlockHooks[i].beforeCanHarvestBlock(paramBlock); - - boolean _result; - if(overrideCanHarvestBlockHooks != null) - _result = overrideCanHarvestBlockHooks[overrideCanHarvestBlockHooks.length - 1].canHarvestBlock(paramBlock); - else - _result = player.localCanHarvestBlock(paramBlock); - - if(afterCanHarvestBlockHooks != null) - for(int i = 0; i < afterCanHarvestBlockHooks.length; i++) - afterCanHarvestBlockHooks[i].afterCanHarvestBlock(paramBlock); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenCanHarvestBlock(ServerPlayerBase overWriter) - { - if (overrideCanHarvestBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanHarvestBlockHooks.length; i++) - if(overrideCanHarvestBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanHarvestBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanHarvestBlockHookTypes = new LinkedList(); - private final static List overrideCanHarvestBlockHookTypes = new LinkedList(); - private final static List afterCanHarvestBlockHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeCanHarvestBlockHooks; - private ServerPlayerBase[] overrideCanHarvestBlockHooks; - private ServerPlayerBase[] afterCanHarvestBlockHooks; - - public boolean isCanHarvestBlockModded; - - private static final Map allBaseBeforeCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanHarvestBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanHarvestBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterCanHarvestBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanHarvestBlockInferiors = new Hashtable(0); - - public static boolean canPlayerEdit(IServerPlayerAPI target, int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isCanPlayerEditModded) - _result = serverPlayerAPI.canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = target.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - return _result; - } - - private boolean canPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - if(beforeCanPlayerEditHooks != null) - for(int i = beforeCanPlayerEditHooks.length - 1; i >= 0 ; i--) - beforeCanPlayerEditHooks[i].beforeCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - boolean _result; - if(overrideCanPlayerEditHooks != null) - _result = overrideCanPlayerEditHooks[overrideCanPlayerEditHooks.length - 1].canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = player.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - if(afterCanPlayerEditHooks != null) - for(int i = 0; i < afterCanPlayerEditHooks.length; i++) - afterCanPlayerEditHooks[i].afterCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenCanPlayerEdit(ServerPlayerBase overWriter) - { - if (overrideCanPlayerEditHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanPlayerEditHooks.length; i++) - if(overrideCanPlayerEditHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanPlayerEditHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanPlayerEditHookTypes = new LinkedList(); - private final static List overrideCanPlayerEditHookTypes = new LinkedList(); - private final static List afterCanPlayerEditHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeCanPlayerEditHooks; - private ServerPlayerBase[] overrideCanPlayerEditHooks; - private ServerPlayerBase[] afterCanPlayerEditHooks; - - public boolean isCanPlayerEditModded; - - private static final Map allBaseBeforeCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanPlayerEditInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanPlayerEditInferiors = new Hashtable(0); - private static final Map allBaseAfterCanPlayerEditSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanPlayerEditInferiors = new Hashtable(0); - - public static boolean canTriggerWalking(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isCanTriggerWalkingModded) - _result = serverPlayerAPI.canTriggerWalking(); - else - _result = target.localCanTriggerWalking(); - return _result; - } - - private boolean canTriggerWalking() - { - if(beforeCanTriggerWalkingHooks != null) - for(int i = beforeCanTriggerWalkingHooks.length - 1; i >= 0 ; i--) - beforeCanTriggerWalkingHooks[i].beforeCanTriggerWalking(); - - boolean _result; - if(overrideCanTriggerWalkingHooks != null) - _result = overrideCanTriggerWalkingHooks[overrideCanTriggerWalkingHooks.length - 1].canTriggerWalking(); - else - _result = player.localCanTriggerWalking(); - - if(afterCanTriggerWalkingHooks != null) - for(int i = 0; i < afterCanTriggerWalkingHooks.length; i++) - afterCanTriggerWalkingHooks[i].afterCanTriggerWalking(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenCanTriggerWalking(ServerPlayerBase overWriter) - { - if (overrideCanTriggerWalkingHooks == null) - return overWriter; - - for(int i = 0; i < overrideCanTriggerWalkingHooks.length; i++) - if(overrideCanTriggerWalkingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideCanTriggerWalkingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeCanTriggerWalkingHookTypes = new LinkedList(); - private final static List overrideCanTriggerWalkingHookTypes = new LinkedList(); - private final static List afterCanTriggerWalkingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeCanTriggerWalkingHooks; - private ServerPlayerBase[] overrideCanTriggerWalkingHooks; - private ServerPlayerBase[] afterCanTriggerWalkingHooks; - - public boolean isCanTriggerWalkingModded; - - private static final Map allBaseBeforeCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeCanTriggerWalkingInferiors = new Hashtable(0); - private static final Map allBaseOverrideCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideCanTriggerWalkingInferiors = new Hashtable(0); - private static final Map allBaseAfterCanTriggerWalkingSuperiors = new Hashtable(0); - private static final Map allBaseAfterCanTriggerWalkingInferiors = new Hashtable(0); - - public static void clonePlayer(IServerPlayerAPI target, net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isClonePlayerModded) - serverPlayerAPI.clonePlayer(paramEntityPlayer, paramBoolean); - else - target.localClonePlayer(paramEntityPlayer, paramBoolean); - } - - private void clonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean) - { - if(beforeClonePlayerHooks != null) - for(int i = beforeClonePlayerHooks.length - 1; i >= 0 ; i--) - beforeClonePlayerHooks[i].beforeClonePlayer(paramEntityPlayer, paramBoolean); - - if(overrideClonePlayerHooks != null) - overrideClonePlayerHooks[overrideClonePlayerHooks.length - 1].clonePlayer(paramEntityPlayer, paramBoolean); - else - player.localClonePlayer(paramEntityPlayer, paramBoolean); - - if(afterClonePlayerHooks != null) - for(int i = 0; i < afterClonePlayerHooks.length; i++) - afterClonePlayerHooks[i].afterClonePlayer(paramEntityPlayer, paramBoolean); - - } - - protected ServerPlayerBase GetOverwrittenClonePlayer(ServerPlayerBase overWriter) - { - if (overrideClonePlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideClonePlayerHooks.length; i++) - if(overrideClonePlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideClonePlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeClonePlayerHookTypes = new LinkedList(); - private final static List overrideClonePlayerHookTypes = new LinkedList(); - private final static List afterClonePlayerHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeClonePlayerHooks; - private ServerPlayerBase[] overrideClonePlayerHooks; - private ServerPlayerBase[] afterClonePlayerHooks; - - public boolean isClonePlayerModded; - - private static final Map allBaseBeforeClonePlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeClonePlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideClonePlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideClonePlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterClonePlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterClonePlayerInferiors = new Hashtable(0); - - public static void damageEntity(IServerPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDamageEntityModded) - serverPlayerAPI.damageEntity(paramDamageSource, paramFloat); - else - target.localDamageEntity(paramDamageSource, paramFloat); - } - - private void damageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - if(beforeDamageEntityHooks != null) - for(int i = beforeDamageEntityHooks.length - 1; i >= 0 ; i--) - beforeDamageEntityHooks[i].beforeDamageEntity(paramDamageSource, paramFloat); - - if(overrideDamageEntityHooks != null) - overrideDamageEntityHooks[overrideDamageEntityHooks.length - 1].damageEntity(paramDamageSource, paramFloat); - else - player.localDamageEntity(paramDamageSource, paramFloat); - - if(afterDamageEntityHooks != null) - for(int i = 0; i < afterDamageEntityHooks.length; i++) - afterDamageEntityHooks[i].afterDamageEntity(paramDamageSource, paramFloat); - - } - - protected ServerPlayerBase GetOverwrittenDamageEntity(ServerPlayerBase overWriter) - { - if (overrideDamageEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideDamageEntityHooks.length; i++) - if(overrideDamageEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDamageEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDamageEntityHookTypes = new LinkedList(); - private final static List overrideDamageEntityHookTypes = new LinkedList(); - private final static List afterDamageEntityHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDamageEntityHooks; - private ServerPlayerBase[] overrideDamageEntityHooks; - private ServerPlayerBase[] afterDamageEntityHooks; - - public boolean isDamageEntityModded; - - private static final Map allBaseBeforeDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeDamageEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideDamageEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterDamageEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterDamageEntityInferiors = new Hashtable(0); - - public static void displayGUIChest(IServerPlayerAPI target, net.minecraft.inventory.IInventory paramIInventory) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDisplayGUIChestModded) - serverPlayerAPI.displayGUIChest(paramIInventory); - else - target.localDisplayGUIChest(paramIInventory); - } - - private void displayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - if(beforeDisplayGUIChestHooks != null) - for(int i = beforeDisplayGUIChestHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIChestHooks[i].beforeDisplayGUIChest(paramIInventory); - - if(overrideDisplayGUIChestHooks != null) - overrideDisplayGUIChestHooks[overrideDisplayGUIChestHooks.length - 1].displayGUIChest(paramIInventory); - else - player.localDisplayGUIChest(paramIInventory); - - if(afterDisplayGUIChestHooks != null) - for(int i = 0; i < afterDisplayGUIChestHooks.length; i++) - afterDisplayGUIChestHooks[i].afterDisplayGUIChest(paramIInventory); - - } - - protected ServerPlayerBase GetOverwrittenDisplayGUIChest(ServerPlayerBase overWriter) - { - if (overrideDisplayGUIChestHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIChestHooks.length; i++) - if(overrideDisplayGUIChestHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIChestHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIChestHookTypes = new LinkedList(); - private final static List overrideDisplayGUIChestHookTypes = new LinkedList(); - private final static List afterDisplayGUIChestHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDisplayGUIChestHooks; - private ServerPlayerBase[] overrideDisplayGUIChestHooks; - private ServerPlayerBase[] afterDisplayGUIChestHooks; - - public boolean isDisplayGUIChestModded; - - private static final Map allBaseBeforeDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIChestInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIChestInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIChestSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIChestInferiors = new Hashtable(0); - - public static void displayGUIDispenser(IServerPlayerAPI target, net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDisplayGUIDispenserModded) - serverPlayerAPI.displayGUIDispenser(paramTileEntityDispenser); - else - target.localDisplayGUIDispenser(paramTileEntityDispenser); - } - - private void displayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - if(beforeDisplayGUIDispenserHooks != null) - for(int i = beforeDisplayGUIDispenserHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIDispenserHooks[i].beforeDisplayGUIDispenser(paramTileEntityDispenser); - - if(overrideDisplayGUIDispenserHooks != null) - overrideDisplayGUIDispenserHooks[overrideDisplayGUIDispenserHooks.length - 1].displayGUIDispenser(paramTileEntityDispenser); - else - player.localDisplayGUIDispenser(paramTileEntityDispenser); - - if(afterDisplayGUIDispenserHooks != null) - for(int i = 0; i < afterDisplayGUIDispenserHooks.length; i++) - afterDisplayGUIDispenserHooks[i].afterDisplayGUIDispenser(paramTileEntityDispenser); - - } - - protected ServerPlayerBase GetOverwrittenDisplayGUIDispenser(ServerPlayerBase overWriter) - { - if (overrideDisplayGUIDispenserHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIDispenserHooks.length; i++) - if(overrideDisplayGUIDispenserHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIDispenserHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIDispenserHookTypes = new LinkedList(); - private final static List overrideDisplayGUIDispenserHookTypes = new LinkedList(); - private final static List afterDisplayGUIDispenserHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDisplayGUIDispenserHooks; - private ServerPlayerBase[] overrideDisplayGUIDispenserHooks; - private ServerPlayerBase[] afterDisplayGUIDispenserHooks; - - public boolean isDisplayGUIDispenserModded; - - private static final Map allBaseBeforeDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIDispenserInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIDispenserInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIDispenserSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIDispenserInferiors = new Hashtable(0); - - public static void displayGUIFurnace(IServerPlayerAPI target, net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDisplayGUIFurnaceModded) - serverPlayerAPI.displayGUIFurnace(paramTileEntityFurnace); - else - target.localDisplayGUIFurnace(paramTileEntityFurnace); - } - - private void displayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - if(beforeDisplayGUIFurnaceHooks != null) - for(int i = beforeDisplayGUIFurnaceHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIFurnaceHooks[i].beforeDisplayGUIFurnace(paramTileEntityFurnace); - - if(overrideDisplayGUIFurnaceHooks != null) - overrideDisplayGUIFurnaceHooks[overrideDisplayGUIFurnaceHooks.length - 1].displayGUIFurnace(paramTileEntityFurnace); - else - player.localDisplayGUIFurnace(paramTileEntityFurnace); - - if(afterDisplayGUIFurnaceHooks != null) - for(int i = 0; i < afterDisplayGUIFurnaceHooks.length; i++) - afterDisplayGUIFurnaceHooks[i].afterDisplayGUIFurnace(paramTileEntityFurnace); - - } - - protected ServerPlayerBase GetOverwrittenDisplayGUIFurnace(ServerPlayerBase overWriter) - { - if (overrideDisplayGUIFurnaceHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIFurnaceHooks.length; i++) - if(overrideDisplayGUIFurnaceHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIFurnaceHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIFurnaceHookTypes = new LinkedList(); - private final static List overrideDisplayGUIFurnaceHookTypes = new LinkedList(); - private final static List afterDisplayGUIFurnaceHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDisplayGUIFurnaceHooks; - private ServerPlayerBase[] overrideDisplayGUIFurnaceHooks; - private ServerPlayerBase[] afterDisplayGUIFurnaceHooks; - - public boolean isDisplayGUIFurnaceModded; - - private static final Map allBaseBeforeDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIFurnaceInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIFurnaceInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIFurnaceSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIFurnaceInferiors = new Hashtable(0); - - public static void displayGUIWorkbench(IServerPlayerAPI target, int paramInt1, int paramInt2, int paramInt3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDisplayGUIWorkbenchModded) - serverPlayerAPI.displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else - target.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - } - - private void displayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - if(beforeDisplayGUIWorkbenchHooks != null) - for(int i = beforeDisplayGUIWorkbenchHooks.length - 1; i >= 0 ; i--) - beforeDisplayGUIWorkbenchHooks[i].beforeDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - if(overrideDisplayGUIWorkbenchHooks != null) - overrideDisplayGUIWorkbenchHooks[overrideDisplayGUIWorkbenchHooks.length - 1].displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else - player.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - if(afterDisplayGUIWorkbenchHooks != null) - for(int i = 0; i < afterDisplayGUIWorkbenchHooks.length; i++) - afterDisplayGUIWorkbenchHooks[i].afterDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - } - - protected ServerPlayerBase GetOverwrittenDisplayGUIWorkbench(ServerPlayerBase overWriter) - { - if (overrideDisplayGUIWorkbenchHooks == null) - return overWriter; - - for(int i = 0; i < overrideDisplayGUIWorkbenchHooks.length; i++) - if(overrideDisplayGUIWorkbenchHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDisplayGUIWorkbenchHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDisplayGUIWorkbenchHookTypes = new LinkedList(); - private final static List overrideDisplayGUIWorkbenchHookTypes = new LinkedList(); - private final static List afterDisplayGUIWorkbenchHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDisplayGUIWorkbenchHooks; - private ServerPlayerBase[] overrideDisplayGUIWorkbenchHooks; - private ServerPlayerBase[] afterDisplayGUIWorkbenchHooks; - - public boolean isDisplayGUIWorkbenchModded; - - private static final Map allBaseBeforeDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDisplayGUIWorkbenchInferiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDisplayGUIWorkbenchInferiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIWorkbenchSuperiors = new Hashtable(0); - private static final Map allBaseAfterDisplayGUIWorkbenchInferiors = new Hashtable(0); - - public static net.minecraft.entity.item.EntityItem dropOneItem(IServerPlayerAPI target, boolean paramBoolean) - { - net.minecraft.entity.item.EntityItem _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDropOneItemModded) - _result = serverPlayerAPI.dropOneItem(paramBoolean); - else - _result = target.localDropOneItem(paramBoolean); - return _result; - } - - private net.minecraft.entity.item.EntityItem dropOneItem(boolean paramBoolean) - { - if(beforeDropOneItemHooks != null) - for(int i = beforeDropOneItemHooks.length - 1; i >= 0 ; i--) - beforeDropOneItemHooks[i].beforeDropOneItem(paramBoolean); - - net.minecraft.entity.item.EntityItem _result; - if(overrideDropOneItemHooks != null) - _result = overrideDropOneItemHooks[overrideDropOneItemHooks.length - 1].dropOneItem(paramBoolean); - else - _result = player.localDropOneItem(paramBoolean); - - if(afterDropOneItemHooks != null) - for(int i = 0; i < afterDropOneItemHooks.length; i++) - afterDropOneItemHooks[i].afterDropOneItem(paramBoolean); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenDropOneItem(ServerPlayerBase overWriter) - { - if (overrideDropOneItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideDropOneItemHooks.length; i++) - if(overrideDropOneItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDropOneItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDropOneItemHookTypes = new LinkedList(); - private final static List overrideDropOneItemHookTypes = new LinkedList(); - private final static List afterDropOneItemHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDropOneItemHooks; - private ServerPlayerBase[] overrideDropOneItemHooks; - private ServerPlayerBase[] afterDropOneItemHooks; - - public boolean isDropOneItemModded; - - private static final Map allBaseBeforeDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDropOneItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDropOneItemInferiors = new Hashtable(0); - private static final Map allBaseAfterDropOneItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterDropOneItemInferiors = new Hashtable(0); - - public static net.minecraft.entity.item.EntityItem dropPlayerItem(IServerPlayerAPI target, net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - net.minecraft.entity.item.EntityItem _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isDropPlayerItemModded) - _result = serverPlayerAPI.dropPlayerItem(paramItemStack, paramBoolean); - else - _result = target.localDropPlayerItem(paramItemStack, paramBoolean); - return _result; - } - - private net.minecraft.entity.item.EntityItem dropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - if(beforeDropPlayerItemHooks != null) - for(int i = beforeDropPlayerItemHooks.length - 1; i >= 0 ; i--) - beforeDropPlayerItemHooks[i].beforeDropPlayerItem(paramItemStack, paramBoolean); - - net.minecraft.entity.item.EntityItem _result; - if(overrideDropPlayerItemHooks != null) - _result = overrideDropPlayerItemHooks[overrideDropPlayerItemHooks.length - 1].dropPlayerItem(paramItemStack, paramBoolean); - else - _result = player.localDropPlayerItem(paramItemStack, paramBoolean); - - if(afterDropPlayerItemHooks != null) - for(int i = 0; i < afterDropPlayerItemHooks.length; i++) - afterDropPlayerItemHooks[i].afterDropPlayerItem(paramItemStack, paramBoolean); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenDropPlayerItem(ServerPlayerBase overWriter) - { - if (overrideDropPlayerItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideDropPlayerItemHooks.length; i++) - if(overrideDropPlayerItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideDropPlayerItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeDropPlayerItemHookTypes = new LinkedList(); - private final static List overrideDropPlayerItemHookTypes = new LinkedList(); - private final static List afterDropPlayerItemHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeDropPlayerItemHooks; - private ServerPlayerBase[] overrideDropPlayerItemHooks; - private ServerPlayerBase[] afterDropPlayerItemHooks; - - public boolean isDropPlayerItemModded; - - private static final Map allBaseBeforeDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeDropPlayerItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideDropPlayerItemInferiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterDropPlayerItemInferiors = new Hashtable(0); - - public static void fall(IServerPlayerAPI target, float paramFloat) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isFallModded) - serverPlayerAPI.fall(paramFloat); - else - target.localFall(paramFloat); - } - - private void fall(float paramFloat) - { - if(beforeFallHooks != null) - for(int i = beforeFallHooks.length - 1; i >= 0 ; i--) - beforeFallHooks[i].beforeFall(paramFloat); - - if(overrideFallHooks != null) - overrideFallHooks[overrideFallHooks.length - 1].fall(paramFloat); - else - player.localFall(paramFloat); - - if(afterFallHooks != null) - for(int i = 0; i < afterFallHooks.length; i++) - afterFallHooks[i].afterFall(paramFloat); - - } - - protected ServerPlayerBase GetOverwrittenFall(ServerPlayerBase overWriter) - { - if (overrideFallHooks == null) - return overWriter; - - for(int i = 0; i < overrideFallHooks.length; i++) - if(overrideFallHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideFallHooks[i - 1]; - - return overWriter; - } - - private final static List beforeFallHookTypes = new LinkedList(); - private final static List overrideFallHookTypes = new LinkedList(); - private final static List afterFallHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeFallHooks; - private ServerPlayerBase[] overrideFallHooks; - private ServerPlayerBase[] afterFallHooks; - - public boolean isFallModded; - - private static final Map allBaseBeforeFallSuperiors = new Hashtable(0); - private static final Map allBaseBeforeFallInferiors = new Hashtable(0); - private static final Map allBaseOverrideFallSuperiors = new Hashtable(0); - private static final Map allBaseOverrideFallInferiors = new Hashtable(0); - private static final Map allBaseAfterFallSuperiors = new Hashtable(0); - private static final Map allBaseAfterFallInferiors = new Hashtable(0); - - public static float getAIMoveSpeed(IServerPlayerAPI target) - { - float _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetAIMoveSpeedModded) - _result = serverPlayerAPI.getAIMoveSpeed(); - else - _result = target.localGetAIMoveSpeed(); - return _result; - } - - private float getAIMoveSpeed() - { - if(beforeGetAIMoveSpeedHooks != null) - for(int i = beforeGetAIMoveSpeedHooks.length - 1; i >= 0 ; i--) - beforeGetAIMoveSpeedHooks[i].beforeGetAIMoveSpeed(); - - float _result; - if(overrideGetAIMoveSpeedHooks != null) - _result = overrideGetAIMoveSpeedHooks[overrideGetAIMoveSpeedHooks.length - 1].getAIMoveSpeed(); - else - _result = player.localGetAIMoveSpeed(); - - if(afterGetAIMoveSpeedHooks != null) - for(int i = 0; i < afterGetAIMoveSpeedHooks.length; i++) - afterGetAIMoveSpeedHooks[i].afterGetAIMoveSpeed(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetAIMoveSpeed(ServerPlayerBase overWriter) - { - if (overrideGetAIMoveSpeedHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetAIMoveSpeedHooks.length; i++) - if(overrideGetAIMoveSpeedHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetAIMoveSpeedHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetAIMoveSpeedHookTypes = new LinkedList(); - private final static List overrideGetAIMoveSpeedHookTypes = new LinkedList(); - private final static List afterGetAIMoveSpeedHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetAIMoveSpeedHooks; - private ServerPlayerBase[] overrideGetAIMoveSpeedHooks; - private ServerPlayerBase[] afterGetAIMoveSpeedHooks; - - public boolean isGetAIMoveSpeedModded; - - private static final Map allBaseBeforeGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetAIMoveSpeedInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetAIMoveSpeedInferiors = new Hashtable(0); - private static final Map allBaseAfterGetAIMoveSpeedSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetAIMoveSpeedInferiors = new Hashtable(0); - - public static float getCurrentPlayerStrVsBlock(IServerPlayerAPI target, net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - float _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetCurrentPlayerStrVsBlockModded) - _result = serverPlayerAPI.getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = target.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - return _result; - } - - private float getCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - if(beforeGetCurrentPlayerStrVsBlockHooks != null) - for(int i = beforeGetCurrentPlayerStrVsBlockHooks.length - 1; i >= 0 ; i--) - beforeGetCurrentPlayerStrVsBlockHooks[i].beforeGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - float _result; - if(overrideGetCurrentPlayerStrVsBlockHooks != null) - _result = overrideGetCurrentPlayerStrVsBlockHooks[overrideGetCurrentPlayerStrVsBlockHooks.length - 1].getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = player.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - if(afterGetCurrentPlayerStrVsBlockHooks != null) - for(int i = 0; i < afterGetCurrentPlayerStrVsBlockHooks.length; i++) - afterGetCurrentPlayerStrVsBlockHooks[i].afterGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetCurrentPlayerStrVsBlock(ServerPlayerBase overWriter) - { - if (overrideGetCurrentPlayerStrVsBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetCurrentPlayerStrVsBlockHooks.length; i++) - if(overrideGetCurrentPlayerStrVsBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetCurrentPlayerStrVsBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - private final static List overrideGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - private final static List afterGetCurrentPlayerStrVsBlockHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetCurrentPlayerStrVsBlockHooks; - private ServerPlayerBase[] overrideGetCurrentPlayerStrVsBlockHooks; - private ServerPlayerBase[] afterGetCurrentPlayerStrVsBlockHooks; - - public boolean isGetCurrentPlayerStrVsBlockModded; - - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockInferiors = new Hashtable(0); - - public static float getCurrentPlayerStrVsBlockForge(IServerPlayerAPI target, net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - float _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetCurrentPlayerStrVsBlockForgeModded) - _result = serverPlayerAPI.getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = target.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - return _result; - } - - private float getCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - if(beforeGetCurrentPlayerStrVsBlockForgeHooks != null) - for(int i = beforeGetCurrentPlayerStrVsBlockForgeHooks.length - 1; i >= 0 ; i--) - beforeGetCurrentPlayerStrVsBlockForgeHooks[i].beforeGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - float _result; - if(overrideGetCurrentPlayerStrVsBlockForgeHooks != null) - _result = overrideGetCurrentPlayerStrVsBlockForgeHooks[overrideGetCurrentPlayerStrVsBlockForgeHooks.length - 1].getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = player.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - if(afterGetCurrentPlayerStrVsBlockForgeHooks != null) - for(int i = 0; i < afterGetCurrentPlayerStrVsBlockForgeHooks.length; i++) - afterGetCurrentPlayerStrVsBlockForgeHooks[i].afterGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetCurrentPlayerStrVsBlockForge(ServerPlayerBase overWriter) - { - if (overrideGetCurrentPlayerStrVsBlockForgeHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetCurrentPlayerStrVsBlockForgeHooks.length; i++) - if(overrideGetCurrentPlayerStrVsBlockForgeHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetCurrentPlayerStrVsBlockForgeHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - private final static List overrideGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - private final static List afterGetCurrentPlayerStrVsBlockForgeHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetCurrentPlayerStrVsBlockForgeHooks; - private ServerPlayerBase[] overrideGetCurrentPlayerStrVsBlockForgeHooks; - private ServerPlayerBase[] afterGetCurrentPlayerStrVsBlockForgeHooks; - - public boolean isGetCurrentPlayerStrVsBlockForgeModded; - - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockForgeSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetCurrentPlayerStrVsBlockForgeInferiors = new Hashtable(0); - - public static double getDistanceSq(IServerPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - double _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetDistanceSqModded) - _result = serverPlayerAPI.getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = target.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - return _result; - } - - private double getDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeGetDistanceSqHooks != null) - for(int i = beforeGetDistanceSqHooks.length - 1; i >= 0 ; i--) - beforeGetDistanceSqHooks[i].beforeGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - double _result; - if(overrideGetDistanceSqHooks != null) - _result = overrideGetDistanceSqHooks[overrideGetDistanceSqHooks.length - 1].getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = player.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - if(afterGetDistanceSqHooks != null) - for(int i = 0; i < afterGetDistanceSqHooks.length; i++) - afterGetDistanceSqHooks[i].afterGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetDistanceSq(ServerPlayerBase overWriter) - { - if (overrideGetDistanceSqHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetDistanceSqHooks.length; i++) - if(overrideGetDistanceSqHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetDistanceSqHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetDistanceSqHookTypes = new LinkedList(); - private final static List overrideGetDistanceSqHookTypes = new LinkedList(); - private final static List afterGetDistanceSqHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetDistanceSqHooks; - private ServerPlayerBase[] overrideGetDistanceSqHooks; - private ServerPlayerBase[] afterGetDistanceSqHooks; - - public boolean isGetDistanceSqModded; - - private static final Map allBaseBeforeGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetDistanceSqInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetDistanceSqInferiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetDistanceSqInferiors = new Hashtable(0); - - public static float getBrightness(IServerPlayerAPI target, float paramFloat) - { - float _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetBrightnessModded) - _result = serverPlayerAPI.getBrightness(paramFloat); - else - _result = target.localGetBrightness(paramFloat); - return _result; - } - - private float getBrightness(float paramFloat) - { - if(beforeGetBrightnessHooks != null) - for(int i = beforeGetBrightnessHooks.length - 1; i >= 0 ; i--) - beforeGetBrightnessHooks[i].beforeGetBrightness(paramFloat); - - float _result; - if(overrideGetBrightnessHooks != null) - _result = overrideGetBrightnessHooks[overrideGetBrightnessHooks.length - 1].getBrightness(paramFloat); - else - _result = player.localGetBrightness(paramFloat); - - if(afterGetBrightnessHooks != null) - for(int i = 0; i < afterGetBrightnessHooks.length; i++) - afterGetBrightnessHooks[i].afterGetBrightness(paramFloat); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetBrightness(ServerPlayerBase overWriter) - { - if (overrideGetBrightnessHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetBrightnessHooks.length; i++) - if(overrideGetBrightnessHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetBrightnessHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetBrightnessHookTypes = new LinkedList(); - private final static List overrideGetBrightnessHookTypes = new LinkedList(); - private final static List afterGetBrightnessHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetBrightnessHooks; - private ServerPlayerBase[] overrideGetBrightnessHooks; - private ServerPlayerBase[] afterGetBrightnessHooks; - - public boolean isGetBrightnessModded; - - private static final Map allBaseBeforeGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetBrightnessInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetBrightnessInferiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetBrightnessInferiors = new Hashtable(0); - - public static float getEyeHeight(IServerPlayerAPI target) - { - float _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isGetEyeHeightModded) - _result = serverPlayerAPI.getEyeHeight(); - else - _result = target.localGetEyeHeight(); - return _result; - } - - private float getEyeHeight() - { - if(beforeGetEyeHeightHooks != null) - for(int i = beforeGetEyeHeightHooks.length - 1; i >= 0 ; i--) - beforeGetEyeHeightHooks[i].beforeGetEyeHeight(); - - float _result; - if(overrideGetEyeHeightHooks != null) - _result = overrideGetEyeHeightHooks[overrideGetEyeHeightHooks.length - 1].getEyeHeight(); - else - _result = player.localGetEyeHeight(); - - if(afterGetEyeHeightHooks != null) - for(int i = 0; i < afterGetEyeHeightHooks.length; i++) - afterGetEyeHeightHooks[i].afterGetEyeHeight(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenGetEyeHeight(ServerPlayerBase overWriter) - { - if (overrideGetEyeHeightHooks == null) - return overWriter; - - for(int i = 0; i < overrideGetEyeHeightHooks.length; i++) - if(overrideGetEyeHeightHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideGetEyeHeightHooks[i - 1]; - - return overWriter; - } - - private final static List beforeGetEyeHeightHookTypes = new LinkedList(); - private final static List overrideGetEyeHeightHookTypes = new LinkedList(); - private final static List afterGetEyeHeightHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeGetEyeHeightHooks; - private ServerPlayerBase[] overrideGetEyeHeightHooks; - private ServerPlayerBase[] afterGetEyeHeightHooks; - - public boolean isGetEyeHeightModded; - - private static final Map allBaseBeforeGetEyeHeightSuperiors = new Hashtable(0); - private static final Map allBaseBeforeGetEyeHeightInferiors = new Hashtable(0); - private static final Map allBaseOverrideGetEyeHeightSuperiors = new Hashtable(0); - private static final Map allBaseOverrideGetEyeHeightInferiors = new Hashtable(0); - private static final Map allBaseAfterGetEyeHeightSuperiors = new Hashtable(0); - private static final Map allBaseAfterGetEyeHeightInferiors = new Hashtable(0); - - public static void heal(IServerPlayerAPI target, float paramFloat) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isHealModded) - serverPlayerAPI.heal(paramFloat); - else - target.localHeal(paramFloat); - } - - private void heal(float paramFloat) - { - if(beforeHealHooks != null) - for(int i = beforeHealHooks.length - 1; i >= 0 ; i--) - beforeHealHooks[i].beforeHeal(paramFloat); - - if(overrideHealHooks != null) - overrideHealHooks[overrideHealHooks.length - 1].heal(paramFloat); - else - player.localHeal(paramFloat); - - if(afterHealHooks != null) - for(int i = 0; i < afterHealHooks.length; i++) - afterHealHooks[i].afterHeal(paramFloat); - - } - - protected ServerPlayerBase GetOverwrittenHeal(ServerPlayerBase overWriter) - { - if (overrideHealHooks == null) - return overWriter; - - for(int i = 0; i < overrideHealHooks.length; i++) - if(overrideHealHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideHealHooks[i - 1]; - - return overWriter; - } - - private final static List beforeHealHookTypes = new LinkedList(); - private final static List overrideHealHookTypes = new LinkedList(); - private final static List afterHealHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeHealHooks; - private ServerPlayerBase[] overrideHealHooks; - private ServerPlayerBase[] afterHealHooks; - - public boolean isHealModded; - - private static final Map allBaseBeforeHealSuperiors = new Hashtable(0); - private static final Map allBaseBeforeHealInferiors = new Hashtable(0); - private static final Map allBaseOverrideHealSuperiors = new Hashtable(0); - private static final Map allBaseOverrideHealInferiors = new Hashtable(0); - private static final Map allBaseAfterHealSuperiors = new Hashtable(0); - private static final Map allBaseAfterHealInferiors = new Hashtable(0); - - public static boolean isEntityInsideOpaqueBlock(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsEntityInsideOpaqueBlockModded) - _result = serverPlayerAPI.isEntityInsideOpaqueBlock(); - else - _result = target.localIsEntityInsideOpaqueBlock(); - return _result; - } - - private boolean isEntityInsideOpaqueBlock() - { - if(beforeIsEntityInsideOpaqueBlockHooks != null) - for(int i = beforeIsEntityInsideOpaqueBlockHooks.length - 1; i >= 0 ; i--) - beforeIsEntityInsideOpaqueBlockHooks[i].beforeIsEntityInsideOpaqueBlock(); - - boolean _result; - if(overrideIsEntityInsideOpaqueBlockHooks != null) - _result = overrideIsEntityInsideOpaqueBlockHooks[overrideIsEntityInsideOpaqueBlockHooks.length - 1].isEntityInsideOpaqueBlock(); - else - _result = player.localIsEntityInsideOpaqueBlock(); - - if(afterIsEntityInsideOpaqueBlockHooks != null) - for(int i = 0; i < afterIsEntityInsideOpaqueBlockHooks.length; i++) - afterIsEntityInsideOpaqueBlockHooks[i].afterIsEntityInsideOpaqueBlock(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsEntityInsideOpaqueBlock(ServerPlayerBase overWriter) - { - if (overrideIsEntityInsideOpaqueBlockHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsEntityInsideOpaqueBlockHooks.length; i++) - if(overrideIsEntityInsideOpaqueBlockHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsEntityInsideOpaqueBlockHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - private final static List overrideIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - private final static List afterIsEntityInsideOpaqueBlockHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsEntityInsideOpaqueBlockHooks; - private ServerPlayerBase[] overrideIsEntityInsideOpaqueBlockHooks; - private ServerPlayerBase[] afterIsEntityInsideOpaqueBlockHooks; - - public boolean isIsEntityInsideOpaqueBlockModded; - - private static final Map allBaseBeforeIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - private static final Map allBaseAfterIsEntityInsideOpaqueBlockSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsEntityInsideOpaqueBlockInferiors = new Hashtable(0); - - public static boolean isInWater(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsInWaterModded) - _result = serverPlayerAPI.isInWater(); - else - _result = target.localIsInWater(); - return _result; - } - - private boolean isInWater() - { - if(beforeIsInWaterHooks != null) - for(int i = beforeIsInWaterHooks.length - 1; i >= 0 ; i--) - beforeIsInWaterHooks[i].beforeIsInWater(); - - boolean _result; - if(overrideIsInWaterHooks != null) - _result = overrideIsInWaterHooks[overrideIsInWaterHooks.length - 1].isInWater(); - else - _result = player.localIsInWater(); - - if(afterIsInWaterHooks != null) - for(int i = 0; i < afterIsInWaterHooks.length; i++) - afterIsInWaterHooks[i].afterIsInWater(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsInWater(ServerPlayerBase overWriter) - { - if (overrideIsInWaterHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsInWaterHooks.length; i++) - if(overrideIsInWaterHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsInWaterHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsInWaterHookTypes = new LinkedList(); - private final static List overrideIsInWaterHookTypes = new LinkedList(); - private final static List afterIsInWaterHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsInWaterHooks; - private ServerPlayerBase[] overrideIsInWaterHooks; - private ServerPlayerBase[] afterIsInWaterHooks; - - public boolean isIsInWaterModded; - - private static final Map allBaseBeforeIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsInWaterInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsInWaterInferiors = new Hashtable(0); - private static final Map allBaseAfterIsInWaterSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsInWaterInferiors = new Hashtable(0); - - public static boolean isInsideOfMaterial(IServerPlayerAPI target, net.minecraft.block.material.Material paramMaterial) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsInsideOfMaterialModded) - _result = serverPlayerAPI.isInsideOfMaterial(paramMaterial); - else - _result = target.localIsInsideOfMaterial(paramMaterial); - return _result; - } - - private boolean isInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - if(beforeIsInsideOfMaterialHooks != null) - for(int i = beforeIsInsideOfMaterialHooks.length - 1; i >= 0 ; i--) - beforeIsInsideOfMaterialHooks[i].beforeIsInsideOfMaterial(paramMaterial); - - boolean _result; - if(overrideIsInsideOfMaterialHooks != null) - _result = overrideIsInsideOfMaterialHooks[overrideIsInsideOfMaterialHooks.length - 1].isInsideOfMaterial(paramMaterial); - else - _result = player.localIsInsideOfMaterial(paramMaterial); - - if(afterIsInsideOfMaterialHooks != null) - for(int i = 0; i < afterIsInsideOfMaterialHooks.length; i++) - afterIsInsideOfMaterialHooks[i].afterIsInsideOfMaterial(paramMaterial); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsInsideOfMaterial(ServerPlayerBase overWriter) - { - if (overrideIsInsideOfMaterialHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsInsideOfMaterialHooks.length; i++) - if(overrideIsInsideOfMaterialHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsInsideOfMaterialHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsInsideOfMaterialHookTypes = new LinkedList(); - private final static List overrideIsInsideOfMaterialHookTypes = new LinkedList(); - private final static List afterIsInsideOfMaterialHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsInsideOfMaterialHooks; - private ServerPlayerBase[] overrideIsInsideOfMaterialHooks; - private ServerPlayerBase[] afterIsInsideOfMaterialHooks; - - public boolean isIsInsideOfMaterialModded; - - private static final Map allBaseBeforeIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsInsideOfMaterialInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsInsideOfMaterialInferiors = new Hashtable(0); - private static final Map allBaseAfterIsInsideOfMaterialSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsInsideOfMaterialInferiors = new Hashtable(0); - - public static boolean isOnLadder(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsOnLadderModded) - _result = serverPlayerAPI.isOnLadder(); - else - _result = target.localIsOnLadder(); - return _result; - } - - private boolean isOnLadder() - { - if(beforeIsOnLadderHooks != null) - for(int i = beforeIsOnLadderHooks.length - 1; i >= 0 ; i--) - beforeIsOnLadderHooks[i].beforeIsOnLadder(); - - boolean _result; - if(overrideIsOnLadderHooks != null) - _result = overrideIsOnLadderHooks[overrideIsOnLadderHooks.length - 1].isOnLadder(); - else - _result = player.localIsOnLadder(); - - if(afterIsOnLadderHooks != null) - for(int i = 0; i < afterIsOnLadderHooks.length; i++) - afterIsOnLadderHooks[i].afterIsOnLadder(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsOnLadder(ServerPlayerBase overWriter) - { - if (overrideIsOnLadderHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsOnLadderHooks.length; i++) - if(overrideIsOnLadderHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsOnLadderHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsOnLadderHookTypes = new LinkedList(); - private final static List overrideIsOnLadderHookTypes = new LinkedList(); - private final static List afterIsOnLadderHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsOnLadderHooks; - private ServerPlayerBase[] overrideIsOnLadderHooks; - private ServerPlayerBase[] afterIsOnLadderHooks; - - public boolean isIsOnLadderModded; - - private static final Map allBaseBeforeIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsOnLadderInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsOnLadderInferiors = new Hashtable(0); - private static final Map allBaseAfterIsOnLadderSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsOnLadderInferiors = new Hashtable(0); - - public static boolean isPlayerSleeping(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsPlayerSleepingModded) - _result = serverPlayerAPI.isPlayerSleeping(); - else - _result = target.localIsPlayerSleeping(); - return _result; - } - - private boolean isPlayerSleeping() - { - if(beforeIsPlayerSleepingHooks != null) - for(int i = beforeIsPlayerSleepingHooks.length - 1; i >= 0 ; i--) - beforeIsPlayerSleepingHooks[i].beforeIsPlayerSleeping(); - - boolean _result; - if(overrideIsPlayerSleepingHooks != null) - _result = overrideIsPlayerSleepingHooks[overrideIsPlayerSleepingHooks.length - 1].isPlayerSleeping(); - else - _result = player.localIsPlayerSleeping(); - - if(afterIsPlayerSleepingHooks != null) - for(int i = 0; i < afterIsPlayerSleepingHooks.length; i++) - afterIsPlayerSleepingHooks[i].afterIsPlayerSleeping(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsPlayerSleeping(ServerPlayerBase overWriter) - { - if (overrideIsPlayerSleepingHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsPlayerSleepingHooks.length; i++) - if(overrideIsPlayerSleepingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsPlayerSleepingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsPlayerSleepingHookTypes = new LinkedList(); - private final static List overrideIsPlayerSleepingHookTypes = new LinkedList(); - private final static List afterIsPlayerSleepingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsPlayerSleepingHooks; - private ServerPlayerBase[] overrideIsPlayerSleepingHooks; - private ServerPlayerBase[] afterIsPlayerSleepingHooks; - - public boolean isIsPlayerSleepingModded; - - private static final Map allBaseBeforeIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsPlayerSleepingInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsPlayerSleepingInferiors = new Hashtable(0); - private static final Map allBaseAfterIsPlayerSleepingSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsPlayerSleepingInferiors = new Hashtable(0); - - public static boolean isSneaking(IServerPlayerAPI target) - { - boolean _result; - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isIsSneakingModded) - _result = serverPlayerAPI.isSneaking(); - else - _result = target.localIsSneaking(); - return _result; - } - - private boolean isSneaking() - { - if(beforeIsSneakingHooks != null) - for(int i = beforeIsSneakingHooks.length - 1; i >= 0 ; i--) - beforeIsSneakingHooks[i].beforeIsSneaking(); - - boolean _result; - if(overrideIsSneakingHooks != null) - _result = overrideIsSneakingHooks[overrideIsSneakingHooks.length - 1].isSneaking(); - else - _result = player.localIsSneaking(); - - if(afterIsSneakingHooks != null) - for(int i = 0; i < afterIsSneakingHooks.length; i++) - afterIsSneakingHooks[i].afterIsSneaking(); - - return _result; - } - - protected ServerPlayerBase GetOverwrittenIsSneaking(ServerPlayerBase overWriter) - { - if (overrideIsSneakingHooks == null) - return overWriter; - - for(int i = 0; i < overrideIsSneakingHooks.length; i++) - if(overrideIsSneakingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideIsSneakingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeIsSneakingHookTypes = new LinkedList(); - private final static List overrideIsSneakingHookTypes = new LinkedList(); - private final static List afterIsSneakingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeIsSneakingHooks; - private ServerPlayerBase[] overrideIsSneakingHooks; - private ServerPlayerBase[] afterIsSneakingHooks; - - public boolean isIsSneakingModded; - - private static final Map allBaseBeforeIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeIsSneakingInferiors = new Hashtable(0); - private static final Map allBaseOverrideIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideIsSneakingInferiors = new Hashtable(0); - private static final Map allBaseAfterIsSneakingSuperiors = new Hashtable(0); - private static final Map allBaseAfterIsSneakingInferiors = new Hashtable(0); - - public static void jump(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isJumpModded) - serverPlayerAPI.jump(); - else - target.localJump(); - } - - private void jump() - { - if(beforeJumpHooks != null) - for(int i = beforeJumpHooks.length - 1; i >= 0 ; i--) - beforeJumpHooks[i].beforeJump(); - - if(overrideJumpHooks != null) - overrideJumpHooks[overrideJumpHooks.length - 1].jump(); - else - player.localJump(); - - if(afterJumpHooks != null) - for(int i = 0; i < afterJumpHooks.length; i++) - afterJumpHooks[i].afterJump(); - - } - - protected ServerPlayerBase GetOverwrittenJump(ServerPlayerBase overWriter) - { - if (overrideJumpHooks == null) - return overWriter; - - for(int i = 0; i < overrideJumpHooks.length; i++) - if(overrideJumpHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideJumpHooks[i - 1]; - - return overWriter; - } - - private final static List beforeJumpHookTypes = new LinkedList(); - private final static List overrideJumpHookTypes = new LinkedList(); - private final static List afterJumpHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeJumpHooks; - private ServerPlayerBase[] overrideJumpHooks; - private ServerPlayerBase[] afterJumpHooks; - - public boolean isJumpModded; - - private static final Map allBaseBeforeJumpSuperiors = new Hashtable(0); - private static final Map allBaseBeforeJumpInferiors = new Hashtable(0); - private static final Map allBaseOverrideJumpSuperiors = new Hashtable(0); - private static final Map allBaseOverrideJumpInferiors = new Hashtable(0); - private static final Map allBaseAfterJumpSuperiors = new Hashtable(0); - private static final Map allBaseAfterJumpInferiors = new Hashtable(0); - - public static void knockBack(IServerPlayerAPI target, net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isKnockBackModded) - serverPlayerAPI.knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else - target.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - } - - private void knockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - if(beforeKnockBackHooks != null) - for(int i = beforeKnockBackHooks.length - 1; i >= 0 ; i--) - beforeKnockBackHooks[i].beforeKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - if(overrideKnockBackHooks != null) - overrideKnockBackHooks[overrideKnockBackHooks.length - 1].knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else - player.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - if(afterKnockBackHooks != null) - for(int i = 0; i < afterKnockBackHooks.length; i++) - afterKnockBackHooks[i].afterKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - } - - protected ServerPlayerBase GetOverwrittenKnockBack(ServerPlayerBase overWriter) - { - if (overrideKnockBackHooks == null) - return overWriter; - - for(int i = 0; i < overrideKnockBackHooks.length; i++) - if(overrideKnockBackHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideKnockBackHooks[i - 1]; - - return overWriter; - } - - private final static List beforeKnockBackHookTypes = new LinkedList(); - private final static List overrideKnockBackHookTypes = new LinkedList(); - private final static List afterKnockBackHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeKnockBackHooks; - private ServerPlayerBase[] overrideKnockBackHooks; - private ServerPlayerBase[] afterKnockBackHooks; - - public boolean isKnockBackModded; - - private static final Map allBaseBeforeKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseBeforeKnockBackInferiors = new Hashtable(0); - private static final Map allBaseOverrideKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseOverrideKnockBackInferiors = new Hashtable(0); - private static final Map allBaseAfterKnockBackSuperiors = new Hashtable(0); - private static final Map allBaseAfterKnockBackInferiors = new Hashtable(0); - - public static void mountEntity(IServerPlayerAPI target, net.minecraft.entity.Entity paramEntity) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isMountEntityModded) - serverPlayerAPI.mountEntity(paramEntity); - else - target.localMountEntity(paramEntity); - } - - private void mountEntity(net.minecraft.entity.Entity paramEntity) - { - if(beforeMountEntityHooks != null) - for(int i = beforeMountEntityHooks.length - 1; i >= 0 ; i--) - beforeMountEntityHooks[i].beforeMountEntity(paramEntity); - - if(overrideMountEntityHooks != null) - overrideMountEntityHooks[overrideMountEntityHooks.length - 1].mountEntity(paramEntity); - else - player.localMountEntity(paramEntity); - - if(afterMountEntityHooks != null) - for(int i = 0; i < afterMountEntityHooks.length; i++) - afterMountEntityHooks[i].afterMountEntity(paramEntity); - - } - - protected ServerPlayerBase GetOverwrittenMountEntity(ServerPlayerBase overWriter) - { - if (overrideMountEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideMountEntityHooks.length; i++) - if(overrideMountEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMountEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMountEntityHookTypes = new LinkedList(); - private final static List overrideMountEntityHookTypes = new LinkedList(); - private final static List afterMountEntityHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeMountEntityHooks; - private ServerPlayerBase[] overrideMountEntityHooks; - private ServerPlayerBase[] afterMountEntityHooks; - - public boolean isMountEntityModded; - - private static final Map allBaseBeforeMountEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeMountEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideMountEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideMountEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterMountEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterMountEntityInferiors = new Hashtable(0); - - public static void moveEntity(IServerPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isMoveEntityModded) - serverPlayerAPI.moveEntity(paramDouble1, paramDouble2, paramDouble3); - else - target.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - } - - private void moveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeMoveEntityHooks != null) - for(int i = beforeMoveEntityHooks.length - 1; i >= 0 ; i--) - beforeMoveEntityHooks[i].beforeMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - if(overrideMoveEntityHooks != null) - overrideMoveEntityHooks[overrideMoveEntityHooks.length - 1].moveEntity(paramDouble1, paramDouble2, paramDouble3); - else - player.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - if(afterMoveEntityHooks != null) - for(int i = 0; i < afterMoveEntityHooks.length; i++) - afterMoveEntityHooks[i].afterMoveEntity(paramDouble1, paramDouble2, paramDouble3); - - } - - protected ServerPlayerBase GetOverwrittenMoveEntity(ServerPlayerBase overWriter) - { - if (overrideMoveEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveEntityHooks.length; i++) - if(overrideMoveEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveEntityHookTypes = new LinkedList(); - private final static List overrideMoveEntityHookTypes = new LinkedList(); - private final static List afterMoveEntityHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeMoveEntityHooks; - private ServerPlayerBase[] overrideMoveEntityHooks; - private ServerPlayerBase[] afterMoveEntityHooks; - - public boolean isMoveEntityModded; - - private static final Map allBaseBeforeMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityInferiors = new Hashtable(0); - - public static void moveEntityWithHeading(IServerPlayerAPI target, float paramFloat1, float paramFloat2) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isMoveEntityWithHeadingModded) - serverPlayerAPI.moveEntityWithHeading(paramFloat1, paramFloat2); - else - target.localMoveEntityWithHeading(paramFloat1, paramFloat2); - } - - private void moveEntityWithHeading(float paramFloat1, float paramFloat2) - { - if(beforeMoveEntityWithHeadingHooks != null) - for(int i = beforeMoveEntityWithHeadingHooks.length - 1; i >= 0 ; i--) - beforeMoveEntityWithHeadingHooks[i].beforeMoveEntityWithHeading(paramFloat1, paramFloat2); - - if(overrideMoveEntityWithHeadingHooks != null) - overrideMoveEntityWithHeadingHooks[overrideMoveEntityWithHeadingHooks.length - 1].moveEntityWithHeading(paramFloat1, paramFloat2); - else - player.localMoveEntityWithHeading(paramFloat1, paramFloat2); - - if(afterMoveEntityWithHeadingHooks != null) - for(int i = 0; i < afterMoveEntityWithHeadingHooks.length; i++) - afterMoveEntityWithHeadingHooks[i].afterMoveEntityWithHeading(paramFloat1, paramFloat2); - - } - - protected ServerPlayerBase GetOverwrittenMoveEntityWithHeading(ServerPlayerBase overWriter) - { - if (overrideMoveEntityWithHeadingHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveEntityWithHeadingHooks.length; i++) - if(overrideMoveEntityWithHeadingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveEntityWithHeadingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveEntityWithHeadingHookTypes = new LinkedList(); - private final static List overrideMoveEntityWithHeadingHookTypes = new LinkedList(); - private final static List afterMoveEntityWithHeadingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeMoveEntityWithHeadingHooks; - private ServerPlayerBase[] overrideMoveEntityWithHeadingHooks; - private ServerPlayerBase[] afterMoveEntityWithHeadingHooks; - - public boolean isMoveEntityWithHeadingModded; - - private static final Map allBaseBeforeMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveEntityWithHeadingInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveEntityWithHeadingInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityWithHeadingSuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveEntityWithHeadingInferiors = new Hashtable(0); - - public static void moveFlying(IServerPlayerAPI target, float paramFloat1, float paramFloat2, float paramFloat3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isMoveFlyingModded) - serverPlayerAPI.moveFlying(paramFloat1, paramFloat2, paramFloat3); - else - target.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - } - - private void moveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - if(beforeMoveFlyingHooks != null) - for(int i = beforeMoveFlyingHooks.length - 1; i >= 0 ; i--) - beforeMoveFlyingHooks[i].beforeMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - if(overrideMoveFlyingHooks != null) - overrideMoveFlyingHooks[overrideMoveFlyingHooks.length - 1].moveFlying(paramFloat1, paramFloat2, paramFloat3); - else - player.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - if(afterMoveFlyingHooks != null) - for(int i = 0; i < afterMoveFlyingHooks.length; i++) - afterMoveFlyingHooks[i].afterMoveFlying(paramFloat1, paramFloat2, paramFloat3); - - } - - protected ServerPlayerBase GetOverwrittenMoveFlying(ServerPlayerBase overWriter) - { - if (overrideMoveFlyingHooks == null) - return overWriter; - - for(int i = 0; i < overrideMoveFlyingHooks.length; i++) - if(overrideMoveFlyingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideMoveFlyingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeMoveFlyingHookTypes = new LinkedList(); - private final static List overrideMoveFlyingHookTypes = new LinkedList(); - private final static List afterMoveFlyingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeMoveFlyingHooks; - private ServerPlayerBase[] overrideMoveFlyingHooks; - private ServerPlayerBase[] afterMoveFlyingHooks; - - public boolean isMoveFlyingModded; - - private static final Map allBaseBeforeMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeMoveFlyingInferiors = new Hashtable(0); - private static final Map allBaseOverrideMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideMoveFlyingInferiors = new Hashtable(0); - private static final Map allBaseAfterMoveFlyingSuperiors = new Hashtable(0); - private static final Map allBaseAfterMoveFlyingInferiors = new Hashtable(0); - - public static void onDeath(IServerPlayerAPI target, net.minecraft.util.DamageSource paramDamageSource) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnDeathModded) - serverPlayerAPI.onDeath(paramDamageSource); - else - target.localOnDeath(paramDamageSource); - } - - private void onDeath(net.minecraft.util.DamageSource paramDamageSource) - { - if(beforeOnDeathHooks != null) - for(int i = beforeOnDeathHooks.length - 1; i >= 0 ; i--) - beforeOnDeathHooks[i].beforeOnDeath(paramDamageSource); - - if(overrideOnDeathHooks != null) - overrideOnDeathHooks[overrideOnDeathHooks.length - 1].onDeath(paramDamageSource); - else - player.localOnDeath(paramDamageSource); - - if(afterOnDeathHooks != null) - for(int i = 0; i < afterOnDeathHooks.length; i++) - afterOnDeathHooks[i].afterOnDeath(paramDamageSource); - - } - - protected ServerPlayerBase GetOverwrittenOnDeath(ServerPlayerBase overWriter) - { - if (overrideOnDeathHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnDeathHooks.length; i++) - if(overrideOnDeathHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnDeathHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnDeathHookTypes = new LinkedList(); - private final static List overrideOnDeathHookTypes = new LinkedList(); - private final static List afterOnDeathHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnDeathHooks; - private ServerPlayerBase[] overrideOnDeathHooks; - private ServerPlayerBase[] afterOnDeathHooks; - - public boolean isOnDeathModded; - - private static final Map allBaseBeforeOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnDeathInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnDeathInferiors = new Hashtable(0); - private static final Map allBaseAfterOnDeathSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnDeathInferiors = new Hashtable(0); - - public static void onLivingUpdate(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnLivingUpdateModded) - serverPlayerAPI.onLivingUpdate(); - else - target.localOnLivingUpdate(); - } - - private void onLivingUpdate() - { - if(beforeOnLivingUpdateHooks != null) - for(int i = beforeOnLivingUpdateHooks.length - 1; i >= 0 ; i--) - beforeOnLivingUpdateHooks[i].beforeOnLivingUpdate(); - - if(overrideOnLivingUpdateHooks != null) - overrideOnLivingUpdateHooks[overrideOnLivingUpdateHooks.length - 1].onLivingUpdate(); - else - player.localOnLivingUpdate(); - - if(afterOnLivingUpdateHooks != null) - for(int i = 0; i < afterOnLivingUpdateHooks.length; i++) - afterOnLivingUpdateHooks[i].afterOnLivingUpdate(); - - } - - protected ServerPlayerBase GetOverwrittenOnLivingUpdate(ServerPlayerBase overWriter) - { - if (overrideOnLivingUpdateHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnLivingUpdateHooks.length; i++) - if(overrideOnLivingUpdateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnLivingUpdateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnLivingUpdateHookTypes = new LinkedList(); - private final static List overrideOnLivingUpdateHookTypes = new LinkedList(); - private final static List afterOnLivingUpdateHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnLivingUpdateHooks; - private ServerPlayerBase[] overrideOnLivingUpdateHooks; - private ServerPlayerBase[] afterOnLivingUpdateHooks; - - public boolean isOnLivingUpdateModded; - - private static final Map allBaseBeforeOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnLivingUpdateInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnLivingUpdateInferiors = new Hashtable(0); - private static final Map allBaseAfterOnLivingUpdateSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnLivingUpdateInferiors = new Hashtable(0); - - public static void onKillEntity(IServerPlayerAPI target, net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnKillEntityModded) - serverPlayerAPI.onKillEntity(paramEntityLivingBase); - else - target.localOnKillEntity(paramEntityLivingBase); - } - - private void onKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - if(beforeOnKillEntityHooks != null) - for(int i = beforeOnKillEntityHooks.length - 1; i >= 0 ; i--) - beforeOnKillEntityHooks[i].beforeOnKillEntity(paramEntityLivingBase); - - if(overrideOnKillEntityHooks != null) - overrideOnKillEntityHooks[overrideOnKillEntityHooks.length - 1].onKillEntity(paramEntityLivingBase); - else - player.localOnKillEntity(paramEntityLivingBase); - - if(afterOnKillEntityHooks != null) - for(int i = 0; i < afterOnKillEntityHooks.length; i++) - afterOnKillEntityHooks[i].afterOnKillEntity(paramEntityLivingBase); - - } - - protected ServerPlayerBase GetOverwrittenOnKillEntity(ServerPlayerBase overWriter) - { - if (overrideOnKillEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnKillEntityHooks.length; i++) - if(overrideOnKillEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnKillEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnKillEntityHookTypes = new LinkedList(); - private final static List overrideOnKillEntityHookTypes = new LinkedList(); - private final static List afterOnKillEntityHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnKillEntityHooks; - private ServerPlayerBase[] overrideOnKillEntityHooks; - private ServerPlayerBase[] afterOnKillEntityHooks; - - public boolean isOnKillEntityModded; - - private static final Map allBaseBeforeOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnKillEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnKillEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterOnKillEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterOnKillEntityInferiors = new Hashtable(0); - - public static void onStruckByLightning(IServerPlayerAPI target, net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnStruckByLightningModded) - serverPlayerAPI.onStruckByLightning(paramEntityLightningBolt); - else - target.localOnStruckByLightning(paramEntityLightningBolt); - } - - private void onStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - if(beforeOnStruckByLightningHooks != null) - for(int i = beforeOnStruckByLightningHooks.length - 1; i >= 0 ; i--) - beforeOnStruckByLightningHooks[i].beforeOnStruckByLightning(paramEntityLightningBolt); - - if(overrideOnStruckByLightningHooks != null) - overrideOnStruckByLightningHooks[overrideOnStruckByLightningHooks.length - 1].onStruckByLightning(paramEntityLightningBolt); - else - player.localOnStruckByLightning(paramEntityLightningBolt); - - if(afterOnStruckByLightningHooks != null) - for(int i = 0; i < afterOnStruckByLightningHooks.length; i++) - afterOnStruckByLightningHooks[i].afterOnStruckByLightning(paramEntityLightningBolt); - - } - - protected ServerPlayerBase GetOverwrittenOnStruckByLightning(ServerPlayerBase overWriter) - { - if (overrideOnStruckByLightningHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnStruckByLightningHooks.length; i++) - if(overrideOnStruckByLightningHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnStruckByLightningHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnStruckByLightningHookTypes = new LinkedList(); - private final static List overrideOnStruckByLightningHookTypes = new LinkedList(); - private final static List afterOnStruckByLightningHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnStruckByLightningHooks; - private ServerPlayerBase[] overrideOnStruckByLightningHooks; - private ServerPlayerBase[] afterOnStruckByLightningHooks; - - public boolean isOnStruckByLightningModded; - - private static final Map allBaseBeforeOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnStruckByLightningInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnStruckByLightningInferiors = new Hashtable(0); - private static final Map allBaseAfterOnStruckByLightningSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnStruckByLightningInferiors = new Hashtable(0); - - public static void onUpdate(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnUpdateModded) - serverPlayerAPI.onUpdate(); - else - target.localOnUpdate(); - } - - private void onUpdate() - { - if(beforeOnUpdateHooks != null) - for(int i = beforeOnUpdateHooks.length - 1; i >= 0 ; i--) - beforeOnUpdateHooks[i].beforeOnUpdate(); - - if(overrideOnUpdateHooks != null) - overrideOnUpdateHooks[overrideOnUpdateHooks.length - 1].onUpdate(); - else - player.localOnUpdate(); - - if(afterOnUpdateHooks != null) - for(int i = 0; i < afterOnUpdateHooks.length; i++) - afterOnUpdateHooks[i].afterOnUpdate(); - - } - - protected ServerPlayerBase GetOverwrittenOnUpdate(ServerPlayerBase overWriter) - { - if (overrideOnUpdateHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnUpdateHooks.length; i++) - if(overrideOnUpdateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnUpdateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnUpdateHookTypes = new LinkedList(); - private final static List overrideOnUpdateHookTypes = new LinkedList(); - private final static List afterOnUpdateHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnUpdateHooks; - private ServerPlayerBase[] overrideOnUpdateHooks; - private ServerPlayerBase[] afterOnUpdateHooks; - - public boolean isOnUpdateModded; - - private static final Map allBaseBeforeOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnUpdateInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateInferiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateSuperiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateInferiors = new Hashtable(0); - - public static void onUpdateEntity(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isOnUpdateEntityModded) - serverPlayerAPI.onUpdateEntity(); - else - target.localOnUpdateEntity(); - } - - private void onUpdateEntity() - { - if(beforeOnUpdateEntityHooks != null) - for(int i = beforeOnUpdateEntityHooks.length - 1; i >= 0 ; i--) - beforeOnUpdateEntityHooks[i].beforeOnUpdateEntity(); - - if(overrideOnUpdateEntityHooks != null) - overrideOnUpdateEntityHooks[overrideOnUpdateEntityHooks.length - 1].onUpdateEntity(); - else - player.localOnUpdateEntity(); - - if(afterOnUpdateEntityHooks != null) - for(int i = 0; i < afterOnUpdateEntityHooks.length; i++) - afterOnUpdateEntityHooks[i].afterOnUpdateEntity(); - - } - - protected ServerPlayerBase GetOverwrittenOnUpdateEntity(ServerPlayerBase overWriter) - { - if (overrideOnUpdateEntityHooks == null) - return overWriter; - - for(int i = 0; i < overrideOnUpdateEntityHooks.length; i++) - if(overrideOnUpdateEntityHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideOnUpdateEntityHooks[i - 1]; - - return overWriter; - } - - private final static List beforeOnUpdateEntityHookTypes = new LinkedList(); - private final static List overrideOnUpdateEntityHookTypes = new LinkedList(); - private final static List afterOnUpdateEntityHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeOnUpdateEntityHooks; - private ServerPlayerBase[] overrideOnUpdateEntityHooks; - private ServerPlayerBase[] afterOnUpdateEntityHooks; - - public boolean isOnUpdateEntityModded; - - private static final Map allBaseBeforeOnUpdateEntitySuperiors = new Hashtable(0); - private static final Map allBaseBeforeOnUpdateEntityInferiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateEntitySuperiors = new Hashtable(0); - private static final Map allBaseOverrideOnUpdateEntityInferiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateEntitySuperiors = new Hashtable(0); - private static final Map allBaseAfterOnUpdateEntityInferiors = new Hashtable(0); - - public static void readEntityFromNBT(IServerPlayerAPI target, net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isReadEntityFromNBTModded) - serverPlayerAPI.readEntityFromNBT(paramNBTTagCompound); - else - target.localReadEntityFromNBT(paramNBTTagCompound); - } - - private void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - if(beforeReadEntityFromNBTHooks != null) - for(int i = beforeReadEntityFromNBTHooks.length - 1; i >= 0 ; i--) - beforeReadEntityFromNBTHooks[i].beforeReadEntityFromNBT(paramNBTTagCompound); - - if(overrideReadEntityFromNBTHooks != null) - overrideReadEntityFromNBTHooks[overrideReadEntityFromNBTHooks.length - 1].readEntityFromNBT(paramNBTTagCompound); - else - player.localReadEntityFromNBT(paramNBTTagCompound); - - if(afterReadEntityFromNBTHooks != null) - for(int i = 0; i < afterReadEntityFromNBTHooks.length; i++) - afterReadEntityFromNBTHooks[i].afterReadEntityFromNBT(paramNBTTagCompound); - - } - - protected ServerPlayerBase GetOverwrittenReadEntityFromNBT(ServerPlayerBase overWriter) - { - if (overrideReadEntityFromNBTHooks == null) - return overWriter; - - for(int i = 0; i < overrideReadEntityFromNBTHooks.length; i++) - if(overrideReadEntityFromNBTHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideReadEntityFromNBTHooks[i - 1]; - - return overWriter; - } - - private final static List beforeReadEntityFromNBTHookTypes = new LinkedList(); - private final static List overrideReadEntityFromNBTHookTypes = new LinkedList(); - private final static List afterReadEntityFromNBTHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeReadEntityFromNBTHooks; - private ServerPlayerBase[] overrideReadEntityFromNBTHooks; - private ServerPlayerBase[] afterReadEntityFromNBTHooks; - - public boolean isReadEntityFromNBTModded; - - private static final Map allBaseBeforeReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseBeforeReadEntityFromNBTInferiors = new Hashtable(0); - private static final Map allBaseOverrideReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseOverrideReadEntityFromNBTInferiors = new Hashtable(0); - private static final Map allBaseAfterReadEntityFromNBTSuperiors = new Hashtable(0); - private static final Map allBaseAfterReadEntityFromNBTInferiors = new Hashtable(0); - - public static void setDead(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSetDeadModded) - serverPlayerAPI.setDead(); - else - target.localSetDead(); - } - - private void setDead() - { - if(beforeSetDeadHooks != null) - for(int i = beforeSetDeadHooks.length - 1; i >= 0 ; i--) - beforeSetDeadHooks[i].beforeSetDead(); - - if(overrideSetDeadHooks != null) - overrideSetDeadHooks[overrideSetDeadHooks.length - 1].setDead(); - else - player.localSetDead(); - - if(afterSetDeadHooks != null) - for(int i = 0; i < afterSetDeadHooks.length; i++) - afterSetDeadHooks[i].afterSetDead(); - - } - - protected ServerPlayerBase GetOverwrittenSetDead(ServerPlayerBase overWriter) - { - if (overrideSetDeadHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetDeadHooks.length; i++) - if(overrideSetDeadHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetDeadHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetDeadHookTypes = new LinkedList(); - private final static List overrideSetDeadHookTypes = new LinkedList(); - private final static List afterSetDeadHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSetDeadHooks; - private ServerPlayerBase[] overrideSetDeadHooks; - private ServerPlayerBase[] afterSetDeadHooks; - - public boolean isSetDeadModded; - - private static final Map allBaseBeforeSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetDeadInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetDeadInferiors = new Hashtable(0); - private static final Map allBaseAfterSetDeadSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetDeadInferiors = new Hashtable(0); - - public static void setEntityActionState(IServerPlayerAPI target, float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSetEntityActionStateModded) - serverPlayerAPI.setEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - else - target.localSetEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - } - - private void setEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2) - { - if(beforeSetEntityActionStateHooks != null) - for(int i = beforeSetEntityActionStateHooks.length - 1; i >= 0 ; i--) - beforeSetEntityActionStateHooks[i].beforeSetEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - - if(overrideSetEntityActionStateHooks != null) - overrideSetEntityActionStateHooks[overrideSetEntityActionStateHooks.length - 1].setEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - else - player.localSetEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - - if(afterSetEntityActionStateHooks != null) - for(int i = 0; i < afterSetEntityActionStateHooks.length; i++) - afterSetEntityActionStateHooks[i].afterSetEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - - } - - protected ServerPlayerBase GetOverwrittenSetEntityActionState(ServerPlayerBase overWriter) - { - if (overrideSetEntityActionStateHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetEntityActionStateHooks.length; i++) - if(overrideSetEntityActionStateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetEntityActionStateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetEntityActionStateHookTypes = new LinkedList(); - private final static List overrideSetEntityActionStateHookTypes = new LinkedList(); - private final static List afterSetEntityActionStateHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSetEntityActionStateHooks; - private ServerPlayerBase[] overrideSetEntityActionStateHooks; - private ServerPlayerBase[] afterSetEntityActionStateHooks; - - public boolean isSetEntityActionStateModded; - - private static final Map allBaseBeforeSetEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseAfterSetEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetEntityActionStateInferiors = new Hashtable(0); - - public static void setPosition(IServerPlayerAPI target, double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSetPositionModded) - serverPlayerAPI.setPosition(paramDouble1, paramDouble2, paramDouble3); - else - target.localSetPosition(paramDouble1, paramDouble2, paramDouble3); - } - - private void setPosition(double paramDouble1, double paramDouble2, double paramDouble3) - { - if(beforeSetPositionHooks != null) - for(int i = beforeSetPositionHooks.length - 1; i >= 0 ; i--) - beforeSetPositionHooks[i].beforeSetPosition(paramDouble1, paramDouble2, paramDouble3); - - if(overrideSetPositionHooks != null) - overrideSetPositionHooks[overrideSetPositionHooks.length - 1].setPosition(paramDouble1, paramDouble2, paramDouble3); - else - player.localSetPosition(paramDouble1, paramDouble2, paramDouble3); - - if(afterSetPositionHooks != null) - for(int i = 0; i < afterSetPositionHooks.length; i++) - afterSetPositionHooks[i].afterSetPosition(paramDouble1, paramDouble2, paramDouble3); - - } - - protected ServerPlayerBase GetOverwrittenSetPosition(ServerPlayerBase overWriter) - { - if (overrideSetPositionHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetPositionHooks.length; i++) - if(overrideSetPositionHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetPositionHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetPositionHookTypes = new LinkedList(); - private final static List overrideSetPositionHookTypes = new LinkedList(); - private final static List afterSetPositionHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSetPositionHooks; - private ServerPlayerBase[] overrideSetPositionHooks; - private ServerPlayerBase[] afterSetPositionHooks; - - public boolean isSetPositionModded; - - private static final Map allBaseBeforeSetPositionSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetPositionInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetPositionSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetPositionInferiors = new Hashtable(0); - private static final Map allBaseAfterSetPositionSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetPositionInferiors = new Hashtable(0); - - public static void setSneaking(IServerPlayerAPI target, boolean paramBoolean) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSetSneakingModded) - serverPlayerAPI.setSneaking(paramBoolean); - else - target.localSetSneaking(paramBoolean); - } - - private void setSneaking(boolean paramBoolean) - { - if(beforeSetSneakingHooks != null) - for(int i = beforeSetSneakingHooks.length - 1; i >= 0 ; i--) - beforeSetSneakingHooks[i].beforeSetSneaking(paramBoolean); - - if(overrideSetSneakingHooks != null) - overrideSetSneakingHooks[overrideSetSneakingHooks.length - 1].setSneaking(paramBoolean); - else - player.localSetSneaking(paramBoolean); - - if(afterSetSneakingHooks != null) - for(int i = 0; i < afterSetSneakingHooks.length; i++) - afterSetSneakingHooks[i].afterSetSneaking(paramBoolean); - - } - - protected ServerPlayerBase GetOverwrittenSetSneaking(ServerPlayerBase overWriter) - { - if (overrideSetSneakingHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetSneakingHooks.length; i++) - if(overrideSetSneakingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetSneakingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetSneakingHookTypes = new LinkedList(); - private final static List overrideSetSneakingHookTypes = new LinkedList(); - private final static List afterSetSneakingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSetSneakingHooks; - private ServerPlayerBase[] overrideSetSneakingHooks; - private ServerPlayerBase[] afterSetSneakingHooks; - - public boolean isSetSneakingModded; - - private static final Map allBaseBeforeSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetSneakingInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetSneakingInferiors = new Hashtable(0); - private static final Map allBaseAfterSetSneakingSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetSneakingInferiors = new Hashtable(0); - - public static void setSprinting(IServerPlayerAPI target, boolean paramBoolean) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSetSprintingModded) - serverPlayerAPI.setSprinting(paramBoolean); - else - target.localSetSprinting(paramBoolean); - } - - private void setSprinting(boolean paramBoolean) - { - if(beforeSetSprintingHooks != null) - for(int i = beforeSetSprintingHooks.length - 1; i >= 0 ; i--) - beforeSetSprintingHooks[i].beforeSetSprinting(paramBoolean); - - if(overrideSetSprintingHooks != null) - overrideSetSprintingHooks[overrideSetSprintingHooks.length - 1].setSprinting(paramBoolean); - else - player.localSetSprinting(paramBoolean); - - if(afterSetSprintingHooks != null) - for(int i = 0; i < afterSetSprintingHooks.length; i++) - afterSetSprintingHooks[i].afterSetSprinting(paramBoolean); - - } - - protected ServerPlayerBase GetOverwrittenSetSprinting(ServerPlayerBase overWriter) - { - if (overrideSetSprintingHooks == null) - return overWriter; - - for(int i = 0; i < overrideSetSprintingHooks.length; i++) - if(overrideSetSprintingHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSetSprintingHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSetSprintingHookTypes = new LinkedList(); - private final static List overrideSetSprintingHookTypes = new LinkedList(); - private final static List afterSetSprintingHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSetSprintingHooks; - private ServerPlayerBase[] overrideSetSprintingHooks; - private ServerPlayerBase[] afterSetSprintingHooks; - - public boolean isSetSprintingModded; - - private static final Map allBaseBeforeSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSetSprintingInferiors = new Hashtable(0); - private static final Map allBaseOverrideSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSetSprintingInferiors = new Hashtable(0); - private static final Map allBaseAfterSetSprintingSuperiors = new Hashtable(0); - private static final Map allBaseAfterSetSprintingInferiors = new Hashtable(0); - - public static void swingItem(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isSwingItemModded) - serverPlayerAPI.swingItem(); - else - target.localSwingItem(); - } - - private void swingItem() - { - if(beforeSwingItemHooks != null) - for(int i = beforeSwingItemHooks.length - 1; i >= 0 ; i--) - beforeSwingItemHooks[i].beforeSwingItem(); - - if(overrideSwingItemHooks != null) - overrideSwingItemHooks[overrideSwingItemHooks.length - 1].swingItem(); - else - player.localSwingItem(); - - if(afterSwingItemHooks != null) - for(int i = 0; i < afterSwingItemHooks.length; i++) - afterSwingItemHooks[i].afterSwingItem(); - - } - - protected ServerPlayerBase GetOverwrittenSwingItem(ServerPlayerBase overWriter) - { - if (overrideSwingItemHooks == null) - return overWriter; - - for(int i = 0; i < overrideSwingItemHooks.length; i++) - if(overrideSwingItemHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideSwingItemHooks[i - 1]; - - return overWriter; - } - - private final static List beforeSwingItemHookTypes = new LinkedList(); - private final static List overrideSwingItemHookTypes = new LinkedList(); - private final static List afterSwingItemHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeSwingItemHooks; - private ServerPlayerBase[] overrideSwingItemHooks; - private ServerPlayerBase[] afterSwingItemHooks; - - public boolean isSwingItemModded; - - private static final Map allBaseBeforeSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseBeforeSwingItemInferiors = new Hashtable(0); - private static final Map allBaseOverrideSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseOverrideSwingItemInferiors = new Hashtable(0); - private static final Map allBaseAfterSwingItemSuperiors = new Hashtable(0); - private static final Map allBaseAfterSwingItemInferiors = new Hashtable(0); - - public static void updateEntityActionState(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isUpdateEntityActionStateModded) - serverPlayerAPI.updateEntityActionState(); - else - target.localUpdateEntityActionState(); - } - - private void updateEntityActionState() - { - if(beforeUpdateEntityActionStateHooks != null) - for(int i = beforeUpdateEntityActionStateHooks.length - 1; i >= 0 ; i--) - beforeUpdateEntityActionStateHooks[i].beforeUpdateEntityActionState(); - - if(overrideUpdateEntityActionStateHooks != null) - overrideUpdateEntityActionStateHooks[overrideUpdateEntityActionStateHooks.length - 1].updateEntityActionState(); - else - player.localUpdateEntityActionState(); - - if(afterUpdateEntityActionStateHooks != null) - for(int i = 0; i < afterUpdateEntityActionStateHooks.length; i++) - afterUpdateEntityActionStateHooks[i].afterUpdateEntityActionState(); - - } - - protected ServerPlayerBase GetOverwrittenUpdateEntityActionState(ServerPlayerBase overWriter) - { - if (overrideUpdateEntityActionStateHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdateEntityActionStateHooks.length; i++) - if(overrideUpdateEntityActionStateHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdateEntityActionStateHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdateEntityActionStateHookTypes = new LinkedList(); - private final static List overrideUpdateEntityActionStateHookTypes = new LinkedList(); - private final static List afterUpdateEntityActionStateHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeUpdateEntityActionStateHooks; - private ServerPlayerBase[] overrideUpdateEntityActionStateHooks; - private ServerPlayerBase[] afterUpdateEntityActionStateHooks; - - public boolean isUpdateEntityActionStateModded; - - private static final Map allBaseBeforeUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdateEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateEntityActionStateInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdateEntityActionStateSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdateEntityActionStateInferiors = new Hashtable(0); - - public static void updatePotionEffects(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isUpdatePotionEffectsModded) - serverPlayerAPI.updatePotionEffects(); - else - target.localUpdatePotionEffects(); - } - - private void updatePotionEffects() - { - if(beforeUpdatePotionEffectsHooks != null) - for(int i = beforeUpdatePotionEffectsHooks.length - 1; i >= 0 ; i--) - beforeUpdatePotionEffectsHooks[i].beforeUpdatePotionEffects(); - - if(overrideUpdatePotionEffectsHooks != null) - overrideUpdatePotionEffectsHooks[overrideUpdatePotionEffectsHooks.length - 1].updatePotionEffects(); - else - player.localUpdatePotionEffects(); - - if(afterUpdatePotionEffectsHooks != null) - for(int i = 0; i < afterUpdatePotionEffectsHooks.length; i++) - afterUpdatePotionEffectsHooks[i].afterUpdatePotionEffects(); - - } - - protected ServerPlayerBase GetOverwrittenUpdatePotionEffects(ServerPlayerBase overWriter) - { - if (overrideUpdatePotionEffectsHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdatePotionEffectsHooks.length; i++) - if(overrideUpdatePotionEffectsHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdatePotionEffectsHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdatePotionEffectsHookTypes = new LinkedList(); - private final static List overrideUpdatePotionEffectsHookTypes = new LinkedList(); - private final static List afterUpdatePotionEffectsHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeUpdatePotionEffectsHooks; - private ServerPlayerBase[] overrideUpdatePotionEffectsHooks; - private ServerPlayerBase[] afterUpdatePotionEffectsHooks; - - public boolean isUpdatePotionEffectsModded; - - private static final Map allBaseBeforeUpdatePotionEffectsSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdatePotionEffectsInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdatePotionEffectsSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdatePotionEffectsInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdatePotionEffectsSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdatePotionEffectsInferiors = new Hashtable(0); - - public static void updateRidden(IServerPlayerAPI target) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isUpdateRiddenModded) - serverPlayerAPI.updateRidden(); - else - target.localUpdateRidden(); - } - - private void updateRidden() - { - if(beforeUpdateRiddenHooks != null) - for(int i = beforeUpdateRiddenHooks.length - 1; i >= 0 ; i--) - beforeUpdateRiddenHooks[i].beforeUpdateRidden(); - - if(overrideUpdateRiddenHooks != null) - overrideUpdateRiddenHooks[overrideUpdateRiddenHooks.length - 1].updateRidden(); - else - player.localUpdateRidden(); - - if(afterUpdateRiddenHooks != null) - for(int i = 0; i < afterUpdateRiddenHooks.length; i++) - afterUpdateRiddenHooks[i].afterUpdateRidden(); - - } - - protected ServerPlayerBase GetOverwrittenUpdateRidden(ServerPlayerBase overWriter) - { - if (overrideUpdateRiddenHooks == null) - return overWriter; - - for(int i = 0; i < overrideUpdateRiddenHooks.length; i++) - if(overrideUpdateRiddenHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideUpdateRiddenHooks[i - 1]; - - return overWriter; - } - - private final static List beforeUpdateRiddenHookTypes = new LinkedList(); - private final static List overrideUpdateRiddenHookTypes = new LinkedList(); - private final static List afterUpdateRiddenHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeUpdateRiddenHooks; - private ServerPlayerBase[] overrideUpdateRiddenHooks; - private ServerPlayerBase[] afterUpdateRiddenHooks; - - public boolean isUpdateRiddenModded; - - private static final Map allBaseBeforeUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseBeforeUpdateRiddenInferiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseOverrideUpdateRiddenInferiors = new Hashtable(0); - private static final Map allBaseAfterUpdateRiddenSuperiors = new Hashtable(0); - private static final Map allBaseAfterUpdateRiddenInferiors = new Hashtable(0); - - public static void wakeUpPlayer(IServerPlayerAPI target, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isWakeUpPlayerModded) - serverPlayerAPI.wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else - target.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - } - - private void wakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - if(beforeWakeUpPlayerHooks != null) - for(int i = beforeWakeUpPlayerHooks.length - 1; i >= 0 ; i--) - beforeWakeUpPlayerHooks[i].beforeWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - if(overrideWakeUpPlayerHooks != null) - overrideWakeUpPlayerHooks[overrideWakeUpPlayerHooks.length - 1].wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else - player.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - if(afterWakeUpPlayerHooks != null) - for(int i = 0; i < afterWakeUpPlayerHooks.length; i++) - afterWakeUpPlayerHooks[i].afterWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - } - - protected ServerPlayerBase GetOverwrittenWakeUpPlayer(ServerPlayerBase overWriter) - { - if (overrideWakeUpPlayerHooks == null) - return overWriter; - - for(int i = 0; i < overrideWakeUpPlayerHooks.length; i++) - if(overrideWakeUpPlayerHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideWakeUpPlayerHooks[i - 1]; - - return overWriter; - } - - private final static List beforeWakeUpPlayerHookTypes = new LinkedList(); - private final static List overrideWakeUpPlayerHookTypes = new LinkedList(); - private final static List afterWakeUpPlayerHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeWakeUpPlayerHooks; - private ServerPlayerBase[] overrideWakeUpPlayerHooks; - private ServerPlayerBase[] afterWakeUpPlayerHooks; - - public boolean isWakeUpPlayerModded; - - private static final Map allBaseBeforeWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseBeforeWakeUpPlayerInferiors = new Hashtable(0); - private static final Map allBaseOverrideWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseOverrideWakeUpPlayerInferiors = new Hashtable(0); - private static final Map allBaseAfterWakeUpPlayerSuperiors = new Hashtable(0); - private static final Map allBaseAfterWakeUpPlayerInferiors = new Hashtable(0); - - public static void writeEntityToNBT(IServerPlayerAPI target, net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ServerPlayerAPI serverPlayerAPI = target.getServerPlayerAPI(); - if(serverPlayerAPI != null && serverPlayerAPI.isWriteEntityToNBTModded) - serverPlayerAPI.writeEntityToNBT(paramNBTTagCompound); - else - target.localWriteEntityToNBT(paramNBTTagCompound); - } - - private void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - if(beforeWriteEntityToNBTHooks != null) - for(int i = beforeWriteEntityToNBTHooks.length - 1; i >= 0 ; i--) - beforeWriteEntityToNBTHooks[i].beforeWriteEntityToNBT(paramNBTTagCompound); - - if(overrideWriteEntityToNBTHooks != null) - overrideWriteEntityToNBTHooks[overrideWriteEntityToNBTHooks.length - 1].writeEntityToNBT(paramNBTTagCompound); - else - player.localWriteEntityToNBT(paramNBTTagCompound); - - if(afterWriteEntityToNBTHooks != null) - for(int i = 0; i < afterWriteEntityToNBTHooks.length; i++) - afterWriteEntityToNBTHooks[i].afterWriteEntityToNBT(paramNBTTagCompound); - - } - - protected ServerPlayerBase GetOverwrittenWriteEntityToNBT(ServerPlayerBase overWriter) - { - if (overrideWriteEntityToNBTHooks == null) - return overWriter; - - for(int i = 0; i < overrideWriteEntityToNBTHooks.length; i++) - if(overrideWriteEntityToNBTHooks[i] == overWriter) - if(i == 0) - return null; - else - return overrideWriteEntityToNBTHooks[i - 1]; - - return overWriter; - } - - private final static List beforeWriteEntityToNBTHookTypes = new LinkedList(); - private final static List overrideWriteEntityToNBTHookTypes = new LinkedList(); - private final static List afterWriteEntityToNBTHookTypes = new LinkedList(); - - private ServerPlayerBase[] beforeWriteEntityToNBTHooks; - private ServerPlayerBase[] overrideWriteEntityToNBTHooks; - private ServerPlayerBase[] afterWriteEntityToNBTHooks; - - public boolean isWriteEntityToNBTModded; - - private static final Map allBaseBeforeWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseBeforeWriteEntityToNBTInferiors = new Hashtable(0); - private static final Map allBaseOverrideWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseOverrideWriteEntityToNBTInferiors = new Hashtable(0); - private static final Map allBaseAfterWriteEntityToNBTSuperiors = new Hashtable(0); - private static final Map allBaseAfterWriteEntityToNBTInferiors = new Hashtable(0); - - - protected final IServerPlayerAPI player; - - private final static Set keys = new HashSet(); - private final static Map keysToVirtualIds = new HashMap(); - private final static Set> dynamicTypes = new HashSet>(); - - private final static Map, Map> virtualDynamicHookMethods = new HashMap, Map>(); - - private final static Map, Map> beforeDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> overrideDynamicHookMethods = new HashMap, Map>(); - private final static Map, Map> afterDynamicHookMethods = new HashMap, Map>(); - - private final static List beforeLocalConstructingHookTypes = new LinkedList(); - private final static List afterLocalConstructingHookTypes = new LinkedList(); - - private static final Map> beforeDynamicHookTypes = new Hashtable>(0); - private static final Map> overrideDynamicHookTypes = new Hashtable>(0); - private static final Map> afterDynamicHookTypes = new Hashtable>(0); - - private ServerPlayerBase[] beforeLocalConstructingHooks; - private ServerPlayerBase[] afterLocalConstructingHooks; - - private final Map baseObjectsToId = new Hashtable(); - private final Map allBaseObjects = new Hashtable(); - private final Set unmodifiableAllBaseIds = Collections.unmodifiableSet(allBaseObjects.keySet()); - - private static final Map> allBaseConstructors = new Hashtable>(); - private static final Set unmodifiableAllIds = Collections.unmodifiableSet(allBaseConstructors.keySet()); - - private static final Map allBaseBeforeLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseBeforeLocalConstructingInferiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingSuperiors = new Hashtable(0); - private static final Map allBaseAfterLocalConstructingInferiors = new Hashtable(0); - - private static final Map> allBaseBeforeDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseBeforeDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseOverrideDynamicInferiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicSuperiors = new Hashtable>(0); - private static final Map> allBaseAfterDynamicInferiors = new Hashtable>(0); - - private static boolean initialized = false; -} diff --git a/src/main/java/api/player/server/ServerPlayerBase.java b/src/main/java/api/player/server/ServerPlayerBase.java deleted file mode 100644 index cb54fadd..00000000 --- a/src/main/java/api/player/server/ServerPlayerBase.java +++ /dev/null @@ -1,1207 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -public abstract class ServerPlayerBase -{ - public ServerPlayerBase(ServerPlayerAPI playerAPI) - { - this.internalServerPlayerAPI = playerAPI; - this.playerAPI = playerAPI.player; - this.player = playerAPI.player.getEntityPlayerMP(); - } - - public void beforeBaseAttach(boolean onTheFly) - { - } - - public void afterBaseAttach(boolean onTheFly) - { - } - - public void beforeLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - } - - public void afterLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager) - { - } - - public void beforeBaseDetach(boolean onTheFly) - { - } - - public void afterBaseDetach(boolean onTheFly) - { - } - - public Object dynamic(String key, Object[] parameters) - { - return internalServerPlayerAPI.dynamicOverwritten(key, parameters, this); - } - - public final int hashCode() - { - return super.hashCode(); - } - - public void beforeAddExhaustion(float paramFloat) - { - } - - public void addExhaustion(float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddExhaustion(this); - - if(overwritten == null) - playerAPI.localAddExhaustion(paramFloat); - else if(overwritten != this) - overwritten.addExhaustion(paramFloat); - - } - - public void afterAddExhaustion(float paramFloat) - { - } - - public void beforeAddExperience(int paramInt) - { - } - - public void addExperience(int paramInt) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddExperience(this); - - if(overwritten == null) - playerAPI.localAddExperience(paramInt); - else if(overwritten != this) - overwritten.addExperience(paramInt); - - } - - public void afterAddExperience(int paramInt) - { - } - - public void beforeAddExperienceLevel(int paramInt) - { - } - - public void addExperienceLevel(int paramInt) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddExperienceLevel(this); - - if(overwritten == null) - playerAPI.localAddExperienceLevel(paramInt); - else if(overwritten != this) - overwritten.addExperienceLevel(paramInt); - - } - - public void afterAddExperienceLevel(int paramInt) - { - } - - public void beforeAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void addMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddMovementStat(this); - - if(overwritten == null) - playerAPI.localAddMovementStat(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.addMovementStat(paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterAddMovementStat(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public boolean attackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAttackEntityFrom(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localAttackEntityFrom(paramDamageSource, paramFloat); - else if(overwritten != this) - _result = overwritten.attackEntityFrom(paramDamageSource, paramFloat); - else - _result = false; - - return _result; - } - - public void afterAttackEntityFrom(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void beforeAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - } - - public void attackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAttackTargetEntityWithCurrentItem(this); - - if(overwritten == null) - playerAPI.localAttackTargetEntityWithCurrentItem(paramEntity); - else if(overwritten != this) - overwritten.attackTargetEntityWithCurrentItem(paramEntity); - - } - - public void afterAttackTargetEntityWithCurrentItem(net.minecraft.entity.Entity paramEntity) - { - } - - public void beforeCanBreatheUnderwater() - { - } - - public boolean canBreatheUnderwater() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenCanBreatheUnderwater(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanBreatheUnderwater(); - else if(overwritten != this) - _result = overwritten.canBreatheUnderwater(); - else - _result = false; - - return _result; - } - - public void afterCanBreatheUnderwater() - { - } - - public void beforeCanHarvestBlock(net.minecraft.block.Block paramBlock) - { - } - - public boolean canHarvestBlock(net.minecraft.block.Block paramBlock) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenCanHarvestBlock(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanHarvestBlock(paramBlock); - else if(overwritten != this) - _result = overwritten.canHarvestBlock(paramBlock); - else - _result = false; - - return _result; - } - - public void afterCanHarvestBlock(net.minecraft.block.Block paramBlock) - { - } - - public void beforeCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - } - - public boolean canPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenCanPlayerEdit(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else if(overwritten != this) - _result = overwritten.canPlayerEdit(paramInt1, paramInt2, paramInt3, paramInt4, paramItemStack); - else - _result = false; - - return _result; - } - - public void afterCanPlayerEdit(int paramInt1, int paramInt2, int paramInt3, int paramInt4, net.minecraft.item.ItemStack paramItemStack) - { - } - - public void beforeCanTriggerWalking() - { - } - - public boolean canTriggerWalking() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenCanTriggerWalking(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localCanTriggerWalking(); - else if(overwritten != this) - _result = overwritten.canTriggerWalking(); - else - _result = false; - - return _result; - } - - public void afterCanTriggerWalking() - { - } - - public void beforeClonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean) - { - } - - public void clonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenClonePlayer(this); - - if(overwritten == null) - playerAPI.localClonePlayer(paramEntityPlayer, paramBoolean); - else if(overwritten != this) - overwritten.clonePlayer(paramEntityPlayer, paramBoolean); - - } - - public void afterClonePlayer(net.minecraft.entity.player.EntityPlayer paramEntityPlayer, boolean paramBoolean) - { - } - - public void beforeDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void damageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDamageEntity(this); - - if(overwritten == null) - playerAPI.localDamageEntity(paramDamageSource, paramFloat); - else if(overwritten != this) - overwritten.damageEntity(paramDamageSource, paramFloat); - - } - - public void afterDamageEntity(net.minecraft.util.DamageSource paramDamageSource, float paramFloat) - { - } - - public void beforeDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - } - - public void displayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDisplayGUIChest(this); - - if(overwritten == null) - playerAPI.localDisplayGUIChest(paramIInventory); - else if(overwritten != this) - overwritten.displayGUIChest(paramIInventory); - - } - - public void afterDisplayGUIChest(net.minecraft.inventory.IInventory paramIInventory) - { - } - - public void beforeDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - } - - public void displayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDisplayGUIDispenser(this); - - if(overwritten == null) - playerAPI.localDisplayGUIDispenser(paramTileEntityDispenser); - else if(overwritten != this) - overwritten.displayGUIDispenser(paramTileEntityDispenser); - - } - - public void afterDisplayGUIDispenser(net.minecraft.tileentity.TileEntityDispenser paramTileEntityDispenser) - { - } - - public void beforeDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - } - - public void displayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDisplayGUIFurnace(this); - - if(overwritten == null) - playerAPI.localDisplayGUIFurnace(paramTileEntityFurnace); - else if(overwritten != this) - overwritten.displayGUIFurnace(paramTileEntityFurnace); - - } - - public void afterDisplayGUIFurnace(net.minecraft.tileentity.TileEntityFurnace paramTileEntityFurnace) - { - } - - public void beforeDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - } - - public void displayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDisplayGUIWorkbench(this); - - if(overwritten == null) - playerAPI.localDisplayGUIWorkbench(paramInt1, paramInt2, paramInt3); - else if(overwritten != this) - overwritten.displayGUIWorkbench(paramInt1, paramInt2, paramInt3); - - } - - public void afterDisplayGUIWorkbench(int paramInt1, int paramInt2, int paramInt3) - { - } - - public void beforeDropOneItem(boolean paramBoolean) - { - } - - public net.minecraft.entity.item.EntityItem dropOneItem(boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDropOneItem(this); - - net.minecraft.entity.item.EntityItem _result; - if(overwritten == null) - _result = playerAPI.localDropOneItem(paramBoolean); - else if(overwritten != this) - _result = overwritten.dropOneItem(paramBoolean); - else - _result = null; - - return _result; - } - - public void afterDropOneItem(boolean paramBoolean) - { - } - - public void beforeDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - } - - public net.minecraft.entity.item.EntityItem dropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenDropPlayerItem(this); - - net.minecraft.entity.item.EntityItem _result; - if(overwritten == null) - _result = playerAPI.localDropPlayerItem(paramItemStack, paramBoolean); - else if(overwritten != this) - _result = overwritten.dropPlayerItem(paramItemStack, paramBoolean); - else - _result = null; - - return _result; - } - - public void afterDropPlayerItem(net.minecraft.item.ItemStack paramItemStack, boolean paramBoolean) - { - } - - public void beforeFall(float paramFloat) - { - } - - public void fall(float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenFall(this); - - if(overwritten == null) - playerAPI.localFall(paramFloat); - else if(overwritten != this) - overwritten.fall(paramFloat); - - } - - public void afterFall(float paramFloat) - { - } - - public void beforeGetAIMoveSpeed() - { - } - - public float getAIMoveSpeed() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetAIMoveSpeed(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetAIMoveSpeed(); - else if(overwritten != this) - _result = overwritten.getAIMoveSpeed(); - else - _result = 0; - - return _result; - } - - public void afterGetAIMoveSpeed() - { - } - - public void beforeGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - } - - public float getCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetCurrentPlayerStrVsBlock(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else if(overwritten != this) - _result = overwritten.getCurrentPlayerStrVsBlock(paramBlock, paramBoolean); - else - _result = 0; - - return _result; - } - - public void afterGetCurrentPlayerStrVsBlock(net.minecraft.block.Block paramBlock, boolean paramBoolean) - { - } - - public void beforeGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - } - - public float getCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetCurrentPlayerStrVsBlockForge(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else if(overwritten != this) - _result = overwritten.getCurrentPlayerStrVsBlockForge(paramBlock, paramBoolean, paramInt); - else - _result = 0; - - return _result; - } - - public void afterGetCurrentPlayerStrVsBlockForge(net.minecraft.block.Block paramBlock, boolean paramBoolean, int paramInt) - { - } - - public void beforeGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public double getDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetDistanceSq(this); - - double _result; - if(overwritten == null) - _result = playerAPI.localGetDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - _result = overwritten.getDistanceSq(paramDouble1, paramDouble2, paramDouble3); - else - _result = 0; - - return _result; - } - - public void afterGetDistanceSq(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeGetBrightness(float paramFloat) - { - } - - public float getBrightness(float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetBrightness(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetBrightness(paramFloat); - else if(overwritten != this) - _result = overwritten.getBrightness(paramFloat); - else - _result = 0; - - return _result; - } - - public void afterGetBrightness(float paramFloat) - { - } - - public void beforeGetEyeHeight() - { - } - - public float getEyeHeight() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenGetEyeHeight(this); - - float _result; - if(overwritten == null) - _result = playerAPI.localGetEyeHeight(); - else if(overwritten != this) - _result = overwritten.getEyeHeight(); - else - _result = 0; - - return _result; - } - - public void afterGetEyeHeight() - { - } - - public void beforeHeal(float paramFloat) - { - } - - public void heal(float paramFloat) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenHeal(this); - - if(overwritten == null) - playerAPI.localHeal(paramFloat); - else if(overwritten != this) - overwritten.heal(paramFloat); - - } - - public void afterHeal(float paramFloat) - { - } - - public void beforeIsEntityInsideOpaqueBlock() - { - } - - public boolean isEntityInsideOpaqueBlock() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsEntityInsideOpaqueBlock(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsEntityInsideOpaqueBlock(); - else if(overwritten != this) - _result = overwritten.isEntityInsideOpaqueBlock(); - else - _result = false; - - return _result; - } - - public void afterIsEntityInsideOpaqueBlock() - { - } - - public void beforeIsInWater() - { - } - - public boolean isInWater() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsInWater(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsInWater(); - else if(overwritten != this) - _result = overwritten.isInWater(); - else - _result = false; - - return _result; - } - - public void afterIsInWater() - { - } - - public void beforeIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - } - - public boolean isInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsInsideOfMaterial(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsInsideOfMaterial(paramMaterial); - else if(overwritten != this) - _result = overwritten.isInsideOfMaterial(paramMaterial); - else - _result = false; - - return _result; - } - - public void afterIsInsideOfMaterial(net.minecraft.block.material.Material paramMaterial) - { - } - - public void beforeIsOnLadder() - { - } - - public boolean isOnLadder() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsOnLadder(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsOnLadder(); - else if(overwritten != this) - _result = overwritten.isOnLadder(); - else - _result = false; - - return _result; - } - - public void afterIsOnLadder() - { - } - - public void beforeIsPlayerSleeping() - { - } - - public boolean isPlayerSleeping() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsPlayerSleeping(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsPlayerSleeping(); - else if(overwritten != this) - _result = overwritten.isPlayerSleeping(); - else - _result = false; - - return _result; - } - - public void afterIsPlayerSleeping() - { - } - - public void beforeIsSneaking() - { - } - - public boolean isSneaking() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenIsSneaking(this); - - boolean _result; - if(overwritten == null) - _result = playerAPI.localIsSneaking(); - else if(overwritten != this) - _result = overwritten.isSneaking(); - else - _result = false; - - return _result; - } - - public void afterIsSneaking() - { - } - - public void beforeJump() - { - } - - public void jump() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenJump(this); - - if(overwritten == null) - playerAPI.localJump(); - else if(overwritten != this) - overwritten.jump(); - - } - - public void afterJump() - { - } - - public void beforeKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - } - - public void knockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenKnockBack(this); - - if(overwritten == null) - playerAPI.localKnockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - else if(overwritten != this) - overwritten.knockBack(paramEntity, paramFloat, paramDouble1, paramDouble2); - - } - - public void afterKnockBack(net.minecraft.entity.Entity paramEntity, float paramFloat, double paramDouble1, double paramDouble2) - { - } - - public void beforeMountEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public void mountEntity(net.minecraft.entity.Entity paramEntity) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenMountEntity(this); - - if(overwritten == null) - playerAPI.localMountEntity(paramEntity); - else if(overwritten != this) - overwritten.mountEntity(paramEntity); - - } - - public void afterMountEntity(net.minecraft.entity.Entity paramEntity) - { - } - - public void beforeMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void moveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenMoveEntity(this); - - if(overwritten == null) - playerAPI.localMoveEntity(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.moveEntity(paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterMoveEntity(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeMoveEntityWithHeading(float paramFloat1, float paramFloat2) - { - } - - public void moveEntityWithHeading(float paramFloat1, float paramFloat2) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenMoveEntityWithHeading(this); - - if(overwritten == null) - playerAPI.localMoveEntityWithHeading(paramFloat1, paramFloat2); - else if(overwritten != this) - overwritten.moveEntityWithHeading(paramFloat1, paramFloat2); - - } - - public void afterMoveEntityWithHeading(float paramFloat1, float paramFloat2) - { - } - - public void beforeMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void moveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenMoveFlying(this); - - if(overwritten == null) - playerAPI.localMoveFlying(paramFloat1, paramFloat2, paramFloat3); - else if(overwritten != this) - overwritten.moveFlying(paramFloat1, paramFloat2, paramFloat3); - - } - - public void afterMoveFlying(float paramFloat1, float paramFloat2, float paramFloat3) - { - } - - public void beforeOnDeath(net.minecraft.util.DamageSource paramDamageSource) - { - } - - public void onDeath(net.minecraft.util.DamageSource paramDamageSource) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnDeath(this); - - if(overwritten == null) - playerAPI.localOnDeath(paramDamageSource); - else if(overwritten != this) - overwritten.onDeath(paramDamageSource); - - } - - public void afterOnDeath(net.minecraft.util.DamageSource paramDamageSource) - { - } - - public void beforeOnLivingUpdate() - { - } - - public void onLivingUpdate() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnLivingUpdate(this); - - if(overwritten == null) - playerAPI.localOnLivingUpdate(); - else if(overwritten != this) - overwritten.onLivingUpdate(); - - } - - public void afterOnLivingUpdate() - { - } - - public void beforeOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void onKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnKillEntity(this); - - if(overwritten == null) - playerAPI.localOnKillEntity(paramEntityLivingBase); - else if(overwritten != this) - overwritten.onKillEntity(paramEntityLivingBase); - - } - - public void afterOnKillEntity(net.minecraft.entity.EntityLivingBase paramEntityLivingBase) - { - } - - public void beforeOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - } - - public void onStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnStruckByLightning(this); - - if(overwritten == null) - playerAPI.localOnStruckByLightning(paramEntityLightningBolt); - else if(overwritten != this) - overwritten.onStruckByLightning(paramEntityLightningBolt); - - } - - public void afterOnStruckByLightning(net.minecraft.entity.effect.EntityLightningBolt paramEntityLightningBolt) - { - } - - public void beforeOnUpdate() - { - } - - public void onUpdate() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnUpdate(this); - - if(overwritten == null) - playerAPI.localOnUpdate(); - else if(overwritten != this) - overwritten.onUpdate(); - - } - - public void afterOnUpdate() - { - } - - public void beforeOnUpdateEntity() - { - } - - public void onUpdateEntity() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenOnUpdateEntity(this); - - if(overwritten == null) - playerAPI.localOnUpdateEntity(); - else if(overwritten != this) - overwritten.onUpdateEntity(); - - } - - public void afterOnUpdateEntity() - { - } - - public void beforeReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenReadEntityFromNBT(this); - - if(overwritten == null) - playerAPI.localReadEntityFromNBT(paramNBTTagCompound); - else if(overwritten != this) - overwritten.readEntityFromNBT(paramNBTTagCompound); - - } - - public void afterReadEntityFromNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void beforeSetDead() - { - } - - public void setDead() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSetDead(this); - - if(overwritten == null) - playerAPI.localSetDead(); - else if(overwritten != this) - overwritten.setDead(); - - } - - public void afterSetDead() - { - } - - public void beforeSetEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2) - { - } - - public void setEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSetEntityActionState(this); - - if(overwritten == null) - playerAPI.localSetEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - else if(overwritten != this) - overwritten.setEntityActionState(paramFloat1, paramFloat2, paramBoolean1, paramBoolean2); - - } - - public void afterSetEntityActionState(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2) - { - } - - public void beforeSetPosition(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void setPosition(double paramDouble1, double paramDouble2, double paramDouble3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSetPosition(this); - - if(overwritten == null) - playerAPI.localSetPosition(paramDouble1, paramDouble2, paramDouble3); - else if(overwritten != this) - overwritten.setPosition(paramDouble1, paramDouble2, paramDouble3); - - } - - public void afterSetPosition(double paramDouble1, double paramDouble2, double paramDouble3) - { - } - - public void beforeSetSneaking(boolean paramBoolean) - { - } - - public void setSneaking(boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSetSneaking(this); - - if(overwritten == null) - playerAPI.localSetSneaking(paramBoolean); - else if(overwritten != this) - overwritten.setSneaking(paramBoolean); - - } - - public void afterSetSneaking(boolean paramBoolean) - { - } - - public void beforeSetSprinting(boolean paramBoolean) - { - } - - public void setSprinting(boolean paramBoolean) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSetSprinting(this); - - if(overwritten == null) - playerAPI.localSetSprinting(paramBoolean); - else if(overwritten != this) - overwritten.setSprinting(paramBoolean); - - } - - public void afterSetSprinting(boolean paramBoolean) - { - } - - public void beforeSwingItem() - { - } - - public void swingItem() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenSwingItem(this); - - if(overwritten == null) - playerAPI.localSwingItem(); - else if(overwritten != this) - overwritten.swingItem(); - - } - - public void afterSwingItem() - { - } - - public void beforeUpdateEntityActionState() - { - } - - public void updateEntityActionState() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenUpdateEntityActionState(this); - - if(overwritten == null) - playerAPI.localUpdateEntityActionState(); - else if(overwritten != this) - overwritten.updateEntityActionState(); - - } - - public void afterUpdateEntityActionState() - { - } - - public void beforeUpdatePotionEffects() - { - } - - public void updatePotionEffects() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenUpdatePotionEffects(this); - - if(overwritten == null) - playerAPI.localUpdatePotionEffects(); - else if(overwritten != this) - overwritten.updatePotionEffects(); - - } - - public void afterUpdatePotionEffects() - { - } - - public void beforeUpdateRidden() - { - } - - public void updateRidden() - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenUpdateRidden(this); - - if(overwritten == null) - playerAPI.localUpdateRidden(); - else if(overwritten != this) - overwritten.updateRidden(); - - } - - public void afterUpdateRidden() - { - } - - public void beforeWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - } - - public void wakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenWakeUpPlayer(this); - - if(overwritten == null) - playerAPI.localWakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - else if(overwritten != this) - overwritten.wakeUpPlayer(paramBoolean1, paramBoolean2, paramBoolean3); - - } - - public void afterWakeUpPlayer(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3) - { - } - - public void beforeWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - public void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenWriteEntityToNBT(this); - - if(overwritten == null) - playerAPI.localWriteEntityToNBT(paramNBTTagCompound); - else if(overwritten != this) - overwritten.writeEntityToNBT(paramNBTTagCompound); - - } - - public void afterWriteEntityToNBT(net.minecraft.nbt.NBTTagCompound paramNBTTagCompound) - { - } - - protected final net.minecraft.entity.player.EntityPlayerMP player; - protected final IServerPlayer playerAPI; - private final ServerPlayerAPI internalServerPlayerAPI; -} diff --git a/src/main/java/api/player/server/ServerPlayerBaseSorter.java b/src/main/java/api/player/server/ServerPlayerBaseSorter.java deleted file mode 100644 index 551d7605..00000000 --- a/src/main/java/api/player/server/ServerPlayerBaseSorter.java +++ /dev/null @@ -1,259 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -import java.util.*; - -public final class ServerPlayerBaseSorter -{ - public ServerPlayerBaseSorter(List list, Map allBaseSuperiors, Map allBaseInferiors, String methodName) - { - this.list = list; - this.allBaseSuperiors = allBaseSuperiors; - this.allBaseInferiors = allBaseInferiors; - this.methodName = methodName; - } - - public void Sort() - { - if(list.size() <= 1) - return; - - if(explicitInferiors != null) - explicitInferiors.clear(); - - if(explicitSuperiors != null) - explicitSuperiors.clear(); - - if(directInferiorsMap != null) - directInferiorsMap.clear(); - - if(allInferiors != null) - allInferiors.clear(); - - for(int i = 0; i < list.size(); i++) - { - String baseId = list.get(i); - - String[] inferiorNames = allBaseInferiors.get(baseId); - boolean hasInferiors = inferiorNames != null && inferiorNames.length > 0; - - String[] superiorNames = allBaseSuperiors.get(baseId); - boolean hasSuperiors = superiorNames != null && superiorNames.length > 0; - - if((hasInferiors || hasSuperiors) && directInferiorsMap == null) - directInferiorsMap = new Hashtable>(); - - if(hasInferiors) - explicitInferiors = build(baseId, explicitInferiors, directInferiorsMap, null, inferiorNames); - - if(hasSuperiors) - explicitSuperiors = build(baseId, explicitSuperiors, null, directInferiorsMap, superiorNames); - } - if(directInferiorsMap != null) - { - for(int i = 0; i < list.size() - 1; i++) - for(int n = i + 1; n < list.size(); n++) - { - String left = list.get(i); - String right = list.get(n); - - Set leftInferiors = null, rightInferiors = null; - if(explicitInferiors != null) - { - leftInferiors = explicitInferiors.get(left); - rightInferiors = explicitInferiors.get(right); - } - - Set leftSuperiors = null, rightSuperiors = null; - if(explicitSuperiors != null) - { - leftSuperiors = explicitSuperiors.get(left); - rightSuperiors = explicitSuperiors.get(right); - } - - boolean leftWantsToBeInferiorToRight = leftSuperiors != null && leftSuperiors.contains(right); - boolean leftWantsToBeSuperiorToRight = leftInferiors != null && leftInferiors.contains(right); - - boolean rightWantsToBeInferiorToLeft = rightSuperiors != null && rightSuperiors.contains(left); - boolean rightWantsToBeSuperiorToLeft = rightInferiors != null && rightInferiors.contains(left); - - if(leftWantsToBeInferiorToRight && rightWantsToBeInferiorToLeft) - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be inferior to '" + right + "' and '" + right + "' wants to be inferior to '" + left + "'"); - if(leftWantsToBeSuperiorToRight && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior to '" + right + "' and '" + right + "' wants to be superior to '" + left + "'"); - - if(leftWantsToBeInferiorToRight && leftWantsToBeSuperiorToRight) - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. '" + left + "' wants to be superior and inferior to '" + right + "'"); - if(rightWantsToBeInferiorToLeft && rightWantsToBeSuperiorToLeft) - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. '" + right + "' wants to be superior and inferior to '" + left + "'"); - } - - if(allInferiors == null) - allInferiors = new Hashtable>(); - - for(int i = 0; i < list.size(); i++) - build(list.get(i), null); - } - - if (withoutSuperiors == null) - withoutSuperiors = new LinkedList(); - - int offset = 0; - int size = list.size(); - - while(size > 1) - { - withoutSuperiors.clear(); - for(int i = offset; i < offset + size; i++) - withoutSuperiors.add(list.get(i)); - - if(allInferiors != null) - for(int i = offset; i < offset + size; i++) - { - Set inferiors = allInferiors.get(list.get(i)); - if (inferiors != null) - withoutSuperiors.removeAll(inferiors); - } - - boolean initial = true; - for(int i = offset; i < offset + size; i++) - { - String key = list.get(i); - if(withoutSuperiors.contains(key)) - { - if(initial) - { - Set inferiors = null; - if(allInferiors != null) - inferiors = allInferiors.get(key); - if(inferiors == null || inferiors.isEmpty()) - { - withoutSuperiors.remove(key); - size--; - offset++; - continue; - } - } - list.remove(i--); - size--; - } - initial = false; - } - list.addAll(offset + size, withoutSuperiors); - } - } - - private Set build(String type, String startType) - { - Set inferiors = allInferiors.get(type); - if(inferiors == null) - { - inferiors = build(type, null, startType != null ? startType : type); - if(inferiors == null) - inferiors = Empty; - allInferiors.put(type, inferiors); - } - return inferiors; - } - - private Set build(String type, Set inferiors, String startType) - { - Set directInferiors = directInferiorsMap.get(type); - if(directInferiors == null) - return inferiors; - - if(inferiors == null) - inferiors = new HashSet(); - - Iterator iter = directInferiors.iterator(); - while(iter.hasNext()) - { - String inferiorType = iter.next(); - if(inferiorType == startType) - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + startType + "'"); - if(list.contains(inferiorType)) - inferiors.add(inferiorType); - - Set inferiorSet; - try - { - inferiorSet = build(inferiorType, startType); - } - catch(UnsupportedOperationException uoe) - { - throw new UnsupportedOperationException("Can not sort ServerPlayerBase classes for method '" + methodName + "'. Circular superiosity found including '" + inferiorType + "'", uoe); - } - - if(inferiorSet != Empty) - inferiors.addAll(inferiorSet); - } - return inferiors; - } - - private static Map> build(String baseId, Map> map, Map> directMap, Map> otherDirectMap, String[] names) - { - if(map == null) - map = new Hashtable>(); - - Set types = new HashSet(); - for(int n = 0; n < names.length; n++) - { - if(names[n] != null) - types.add(names[n]); - } - - if(directMap != null) - getOrCreateSet(directMap, baseId).addAll(types); - - if(otherDirectMap != null) - { - Iterator iter = types.iterator(); - while(iter.hasNext()) - getOrCreateSet(otherDirectMap, iter.next()).add(baseId); - } - - map.put(baseId, types); - return map; - } - - private static Set getOrCreateSet(Map> map, String key) - { - Set value = map.get(key); - if(value != null) - return value; - - value = new HashSet(); - map.put(key, value); - return value; - } - - private Map> explicitInferiors; - private Map> explicitSuperiors; - private Map> directInferiorsMap; - private Map> allInferiors; - private List withoutSuperiors; - - private final List list; - private final Map allBaseSuperiors; - private final Map allBaseInferiors; - private final String methodName; - - private static final Set Empty = new HashSet(); -} diff --git a/src/main/java/api/player/server/ServerPlayerBaseSorting.java b/src/main/java/api/player/server/ServerPlayerBaseSorting.java deleted file mode 100644 index 44ceec35..00000000 --- a/src/main/java/api/player/server/ServerPlayerBaseSorting.java +++ /dev/null @@ -1,3909 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -import java.util.*; - -public final class ServerPlayerBaseSorting -{ - private String[] beforeLocalConstructingSuperiors = null; - private String[] beforeLocalConstructingInferiors = null; - private String[] afterLocalConstructingSuperiors = null; - private String[] afterLocalConstructingInferiors = null; - - private Map dynamicBeforeSuperiors = null; - private Map dynamicBeforeInferiors = null; - private Map dynamicOverrideSuperiors = null; - private Map dynamicOverrideInferiors = null; - private Map dynamicAfterSuperiors = null; - private Map dynamicAfterInferiors = null; - - private String[] beforeAddExhaustionSuperiors = null; - private String[] beforeAddExhaustionInferiors = null; - private String[] overrideAddExhaustionSuperiors = null; - private String[] overrideAddExhaustionInferiors = null; - private String[] afterAddExhaustionSuperiors = null; - private String[] afterAddExhaustionInferiors = null; - - private String[] beforeAddExperienceSuperiors = null; - private String[] beforeAddExperienceInferiors = null; - private String[] overrideAddExperienceSuperiors = null; - private String[] overrideAddExperienceInferiors = null; - private String[] afterAddExperienceSuperiors = null; - private String[] afterAddExperienceInferiors = null; - - private String[] beforeAddExperienceLevelSuperiors = null; - private String[] beforeAddExperienceLevelInferiors = null; - private String[] overrideAddExperienceLevelSuperiors = null; - private String[] overrideAddExperienceLevelInferiors = null; - private String[] afterAddExperienceLevelSuperiors = null; - private String[] afterAddExperienceLevelInferiors = null; - - private String[] beforeAddMovementStatSuperiors = null; - private String[] beforeAddMovementStatInferiors = null; - private String[] overrideAddMovementStatSuperiors = null; - private String[] overrideAddMovementStatInferiors = null; - private String[] afterAddMovementStatSuperiors = null; - private String[] afterAddMovementStatInferiors = null; - - private String[] beforeAttackEntityFromSuperiors = null; - private String[] beforeAttackEntityFromInferiors = null; - private String[] overrideAttackEntityFromSuperiors = null; - private String[] overrideAttackEntityFromInferiors = null; - private String[] afterAttackEntityFromSuperiors = null; - private String[] afterAttackEntityFromInferiors = null; - - private String[] beforeAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] beforeAttackTargetEntityWithCurrentItemInferiors = null; - private String[] overrideAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] overrideAttackTargetEntityWithCurrentItemInferiors = null; - private String[] afterAttackTargetEntityWithCurrentItemSuperiors = null; - private String[] afterAttackTargetEntityWithCurrentItemInferiors = null; - - private String[] beforeCanBreatheUnderwaterSuperiors = null; - private String[] beforeCanBreatheUnderwaterInferiors = null; - private String[] overrideCanBreatheUnderwaterSuperiors = null; - private String[] overrideCanBreatheUnderwaterInferiors = null; - private String[] afterCanBreatheUnderwaterSuperiors = null; - private String[] afterCanBreatheUnderwaterInferiors = null; - - private String[] beforeCanHarvestBlockSuperiors = null; - private String[] beforeCanHarvestBlockInferiors = null; - private String[] overrideCanHarvestBlockSuperiors = null; - private String[] overrideCanHarvestBlockInferiors = null; - private String[] afterCanHarvestBlockSuperiors = null; - private String[] afterCanHarvestBlockInferiors = null; - - private String[] beforeCanPlayerEditSuperiors = null; - private String[] beforeCanPlayerEditInferiors = null; - private String[] overrideCanPlayerEditSuperiors = null; - private String[] overrideCanPlayerEditInferiors = null; - private String[] afterCanPlayerEditSuperiors = null; - private String[] afterCanPlayerEditInferiors = null; - - private String[] beforeCanTriggerWalkingSuperiors = null; - private String[] beforeCanTriggerWalkingInferiors = null; - private String[] overrideCanTriggerWalkingSuperiors = null; - private String[] overrideCanTriggerWalkingInferiors = null; - private String[] afterCanTriggerWalkingSuperiors = null; - private String[] afterCanTriggerWalkingInferiors = null; - - private String[] beforeClonePlayerSuperiors = null; - private String[] beforeClonePlayerInferiors = null; - private String[] overrideClonePlayerSuperiors = null; - private String[] overrideClonePlayerInferiors = null; - private String[] afterClonePlayerSuperiors = null; - private String[] afterClonePlayerInferiors = null; - - private String[] beforeDamageEntitySuperiors = null; - private String[] beforeDamageEntityInferiors = null; - private String[] overrideDamageEntitySuperiors = null; - private String[] overrideDamageEntityInferiors = null; - private String[] afterDamageEntitySuperiors = null; - private String[] afterDamageEntityInferiors = null; - - private String[] beforeDisplayGUIChestSuperiors = null; - private String[] beforeDisplayGUIChestInferiors = null; - private String[] overrideDisplayGUIChestSuperiors = null; - private String[] overrideDisplayGUIChestInferiors = null; - private String[] afterDisplayGUIChestSuperiors = null; - private String[] afterDisplayGUIChestInferiors = null; - - private String[] beforeDisplayGUIDispenserSuperiors = null; - private String[] beforeDisplayGUIDispenserInferiors = null; - private String[] overrideDisplayGUIDispenserSuperiors = null; - private String[] overrideDisplayGUIDispenserInferiors = null; - private String[] afterDisplayGUIDispenserSuperiors = null; - private String[] afterDisplayGUIDispenserInferiors = null; - - private String[] beforeDisplayGUIFurnaceSuperiors = null; - private String[] beforeDisplayGUIFurnaceInferiors = null; - private String[] overrideDisplayGUIFurnaceSuperiors = null; - private String[] overrideDisplayGUIFurnaceInferiors = null; - private String[] afterDisplayGUIFurnaceSuperiors = null; - private String[] afterDisplayGUIFurnaceInferiors = null; - - private String[] beforeDisplayGUIWorkbenchSuperiors = null; - private String[] beforeDisplayGUIWorkbenchInferiors = null; - private String[] overrideDisplayGUIWorkbenchSuperiors = null; - private String[] overrideDisplayGUIWorkbenchInferiors = null; - private String[] afterDisplayGUIWorkbenchSuperiors = null; - private String[] afterDisplayGUIWorkbenchInferiors = null; - - private String[] beforeDropOneItemSuperiors = null; - private String[] beforeDropOneItemInferiors = null; - private String[] overrideDropOneItemSuperiors = null; - private String[] overrideDropOneItemInferiors = null; - private String[] afterDropOneItemSuperiors = null; - private String[] afterDropOneItemInferiors = null; - - private String[] beforeDropPlayerItemSuperiors = null; - private String[] beforeDropPlayerItemInferiors = null; - private String[] overrideDropPlayerItemSuperiors = null; - private String[] overrideDropPlayerItemInferiors = null; - private String[] afterDropPlayerItemSuperiors = null; - private String[] afterDropPlayerItemInferiors = null; - - private String[] beforeFallSuperiors = null; - private String[] beforeFallInferiors = null; - private String[] overrideFallSuperiors = null; - private String[] overrideFallInferiors = null; - private String[] afterFallSuperiors = null; - private String[] afterFallInferiors = null; - - private String[] beforeGetAIMoveSpeedSuperiors = null; - private String[] beforeGetAIMoveSpeedInferiors = null; - private String[] overrideGetAIMoveSpeedSuperiors = null; - private String[] overrideGetAIMoveSpeedInferiors = null; - private String[] afterGetAIMoveSpeedSuperiors = null; - private String[] afterGetAIMoveSpeedInferiors = null; - - private String[] beforeGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] beforeGetCurrentPlayerStrVsBlockInferiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockInferiors = null; - private String[] afterGetCurrentPlayerStrVsBlockSuperiors = null; - private String[] afterGetCurrentPlayerStrVsBlockInferiors = null; - - private String[] beforeGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] beforeGetCurrentPlayerStrVsBlockForgeInferiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] overrideGetCurrentPlayerStrVsBlockForgeInferiors = null; - private String[] afterGetCurrentPlayerStrVsBlockForgeSuperiors = null; - private String[] afterGetCurrentPlayerStrVsBlockForgeInferiors = null; - - private String[] beforeGetDistanceSqSuperiors = null; - private String[] beforeGetDistanceSqInferiors = null; - private String[] overrideGetDistanceSqSuperiors = null; - private String[] overrideGetDistanceSqInferiors = null; - private String[] afterGetDistanceSqSuperiors = null; - private String[] afterGetDistanceSqInferiors = null; - - private String[] beforeGetBrightnessSuperiors = null; - private String[] beforeGetBrightnessInferiors = null; - private String[] overrideGetBrightnessSuperiors = null; - private String[] overrideGetBrightnessInferiors = null; - private String[] afterGetBrightnessSuperiors = null; - private String[] afterGetBrightnessInferiors = null; - - private String[] beforeGetEyeHeightSuperiors = null; - private String[] beforeGetEyeHeightInferiors = null; - private String[] overrideGetEyeHeightSuperiors = null; - private String[] overrideGetEyeHeightInferiors = null; - private String[] afterGetEyeHeightSuperiors = null; - private String[] afterGetEyeHeightInferiors = null; - - private String[] beforeHealSuperiors = null; - private String[] beforeHealInferiors = null; - private String[] overrideHealSuperiors = null; - private String[] overrideHealInferiors = null; - private String[] afterHealSuperiors = null; - private String[] afterHealInferiors = null; - - private String[] beforeIsEntityInsideOpaqueBlockSuperiors = null; - private String[] beforeIsEntityInsideOpaqueBlockInferiors = null; - private String[] overrideIsEntityInsideOpaqueBlockSuperiors = null; - private String[] overrideIsEntityInsideOpaqueBlockInferiors = null; - private String[] afterIsEntityInsideOpaqueBlockSuperiors = null; - private String[] afterIsEntityInsideOpaqueBlockInferiors = null; - - private String[] beforeIsInWaterSuperiors = null; - private String[] beforeIsInWaterInferiors = null; - private String[] overrideIsInWaterSuperiors = null; - private String[] overrideIsInWaterInferiors = null; - private String[] afterIsInWaterSuperiors = null; - private String[] afterIsInWaterInferiors = null; - - private String[] beforeIsInsideOfMaterialSuperiors = null; - private String[] beforeIsInsideOfMaterialInferiors = null; - private String[] overrideIsInsideOfMaterialSuperiors = null; - private String[] overrideIsInsideOfMaterialInferiors = null; - private String[] afterIsInsideOfMaterialSuperiors = null; - private String[] afterIsInsideOfMaterialInferiors = null; - - private String[] beforeIsOnLadderSuperiors = null; - private String[] beforeIsOnLadderInferiors = null; - private String[] overrideIsOnLadderSuperiors = null; - private String[] overrideIsOnLadderInferiors = null; - private String[] afterIsOnLadderSuperiors = null; - private String[] afterIsOnLadderInferiors = null; - - private String[] beforeIsPlayerSleepingSuperiors = null; - private String[] beforeIsPlayerSleepingInferiors = null; - private String[] overrideIsPlayerSleepingSuperiors = null; - private String[] overrideIsPlayerSleepingInferiors = null; - private String[] afterIsPlayerSleepingSuperiors = null; - private String[] afterIsPlayerSleepingInferiors = null; - - private String[] beforeIsSneakingSuperiors = null; - private String[] beforeIsSneakingInferiors = null; - private String[] overrideIsSneakingSuperiors = null; - private String[] overrideIsSneakingInferiors = null; - private String[] afterIsSneakingSuperiors = null; - private String[] afterIsSneakingInferiors = null; - - private String[] beforeJumpSuperiors = null; - private String[] beforeJumpInferiors = null; - private String[] overrideJumpSuperiors = null; - private String[] overrideJumpInferiors = null; - private String[] afterJumpSuperiors = null; - private String[] afterJumpInferiors = null; - - private String[] beforeKnockBackSuperiors = null; - private String[] beforeKnockBackInferiors = null; - private String[] overrideKnockBackSuperiors = null; - private String[] overrideKnockBackInferiors = null; - private String[] afterKnockBackSuperiors = null; - private String[] afterKnockBackInferiors = null; - - private String[] beforeMountEntitySuperiors = null; - private String[] beforeMountEntityInferiors = null; - private String[] overrideMountEntitySuperiors = null; - private String[] overrideMountEntityInferiors = null; - private String[] afterMountEntitySuperiors = null; - private String[] afterMountEntityInferiors = null; - - private String[] beforeMoveEntitySuperiors = null; - private String[] beforeMoveEntityInferiors = null; - private String[] overrideMoveEntitySuperiors = null; - private String[] overrideMoveEntityInferiors = null; - private String[] afterMoveEntitySuperiors = null; - private String[] afterMoveEntityInferiors = null; - - private String[] beforeMoveEntityWithHeadingSuperiors = null; - private String[] beforeMoveEntityWithHeadingInferiors = null; - private String[] overrideMoveEntityWithHeadingSuperiors = null; - private String[] overrideMoveEntityWithHeadingInferiors = null; - private String[] afterMoveEntityWithHeadingSuperiors = null; - private String[] afterMoveEntityWithHeadingInferiors = null; - - private String[] beforeMoveFlyingSuperiors = null; - private String[] beforeMoveFlyingInferiors = null; - private String[] overrideMoveFlyingSuperiors = null; - private String[] overrideMoveFlyingInferiors = null; - private String[] afterMoveFlyingSuperiors = null; - private String[] afterMoveFlyingInferiors = null; - - private String[] beforeOnDeathSuperiors = null; - private String[] beforeOnDeathInferiors = null; - private String[] overrideOnDeathSuperiors = null; - private String[] overrideOnDeathInferiors = null; - private String[] afterOnDeathSuperiors = null; - private String[] afterOnDeathInferiors = null; - - private String[] beforeOnLivingUpdateSuperiors = null; - private String[] beforeOnLivingUpdateInferiors = null; - private String[] overrideOnLivingUpdateSuperiors = null; - private String[] overrideOnLivingUpdateInferiors = null; - private String[] afterOnLivingUpdateSuperiors = null; - private String[] afterOnLivingUpdateInferiors = null; - - private String[] beforeOnKillEntitySuperiors = null; - private String[] beforeOnKillEntityInferiors = null; - private String[] overrideOnKillEntitySuperiors = null; - private String[] overrideOnKillEntityInferiors = null; - private String[] afterOnKillEntitySuperiors = null; - private String[] afterOnKillEntityInferiors = null; - - private String[] beforeOnStruckByLightningSuperiors = null; - private String[] beforeOnStruckByLightningInferiors = null; - private String[] overrideOnStruckByLightningSuperiors = null; - private String[] overrideOnStruckByLightningInferiors = null; - private String[] afterOnStruckByLightningSuperiors = null; - private String[] afterOnStruckByLightningInferiors = null; - - private String[] beforeOnUpdateSuperiors = null; - private String[] beforeOnUpdateInferiors = null; - private String[] overrideOnUpdateSuperiors = null; - private String[] overrideOnUpdateInferiors = null; - private String[] afterOnUpdateSuperiors = null; - private String[] afterOnUpdateInferiors = null; - - private String[] beforeOnUpdateEntitySuperiors = null; - private String[] beforeOnUpdateEntityInferiors = null; - private String[] overrideOnUpdateEntitySuperiors = null; - private String[] overrideOnUpdateEntityInferiors = null; - private String[] afterOnUpdateEntitySuperiors = null; - private String[] afterOnUpdateEntityInferiors = null; - - private String[] beforeReadEntityFromNBTSuperiors = null; - private String[] beforeReadEntityFromNBTInferiors = null; - private String[] overrideReadEntityFromNBTSuperiors = null; - private String[] overrideReadEntityFromNBTInferiors = null; - private String[] afterReadEntityFromNBTSuperiors = null; - private String[] afterReadEntityFromNBTInferiors = null; - - private String[] beforeSetDeadSuperiors = null; - private String[] beforeSetDeadInferiors = null; - private String[] overrideSetDeadSuperiors = null; - private String[] overrideSetDeadInferiors = null; - private String[] afterSetDeadSuperiors = null; - private String[] afterSetDeadInferiors = null; - - private String[] beforeSetEntityActionStateSuperiors = null; - private String[] beforeSetEntityActionStateInferiors = null; - private String[] overrideSetEntityActionStateSuperiors = null; - private String[] overrideSetEntityActionStateInferiors = null; - private String[] afterSetEntityActionStateSuperiors = null; - private String[] afterSetEntityActionStateInferiors = null; - - private String[] beforeSetPositionSuperiors = null; - private String[] beforeSetPositionInferiors = null; - private String[] overrideSetPositionSuperiors = null; - private String[] overrideSetPositionInferiors = null; - private String[] afterSetPositionSuperiors = null; - private String[] afterSetPositionInferiors = null; - - private String[] beforeSetSneakingSuperiors = null; - private String[] beforeSetSneakingInferiors = null; - private String[] overrideSetSneakingSuperiors = null; - private String[] overrideSetSneakingInferiors = null; - private String[] afterSetSneakingSuperiors = null; - private String[] afterSetSneakingInferiors = null; - - private String[] beforeSetSprintingSuperiors = null; - private String[] beforeSetSprintingInferiors = null; - private String[] overrideSetSprintingSuperiors = null; - private String[] overrideSetSprintingInferiors = null; - private String[] afterSetSprintingSuperiors = null; - private String[] afterSetSprintingInferiors = null; - - private String[] beforeSwingItemSuperiors = null; - private String[] beforeSwingItemInferiors = null; - private String[] overrideSwingItemSuperiors = null; - private String[] overrideSwingItemInferiors = null; - private String[] afterSwingItemSuperiors = null; - private String[] afterSwingItemInferiors = null; - - private String[] beforeUpdateEntityActionStateSuperiors = null; - private String[] beforeUpdateEntityActionStateInferiors = null; - private String[] overrideUpdateEntityActionStateSuperiors = null; - private String[] overrideUpdateEntityActionStateInferiors = null; - private String[] afterUpdateEntityActionStateSuperiors = null; - private String[] afterUpdateEntityActionStateInferiors = null; - - private String[] beforeUpdatePotionEffectsSuperiors = null; - private String[] beforeUpdatePotionEffectsInferiors = null; - private String[] overrideUpdatePotionEffectsSuperiors = null; - private String[] overrideUpdatePotionEffectsInferiors = null; - private String[] afterUpdatePotionEffectsSuperiors = null; - private String[] afterUpdatePotionEffectsInferiors = null; - - private String[] beforeUpdateRiddenSuperiors = null; - private String[] beforeUpdateRiddenInferiors = null; - private String[] overrideUpdateRiddenSuperiors = null; - private String[] overrideUpdateRiddenInferiors = null; - private String[] afterUpdateRiddenSuperiors = null; - private String[] afterUpdateRiddenInferiors = null; - - private String[] beforeWakeUpPlayerSuperiors = null; - private String[] beforeWakeUpPlayerInferiors = null; - private String[] overrideWakeUpPlayerSuperiors = null; - private String[] overrideWakeUpPlayerInferiors = null; - private String[] afterWakeUpPlayerSuperiors = null; - private String[] afterWakeUpPlayerInferiors = null; - - private String[] beforeWriteEntityToNBTSuperiors = null; - private String[] beforeWriteEntityToNBTInferiors = null; - private String[] overrideWriteEntityToNBTSuperiors = null; - private String[] overrideWriteEntityToNBTInferiors = null; - private String[] afterWriteEntityToNBTSuperiors = null; - private String[] afterWriteEntityToNBTInferiors = null; - - - public String[] getBeforeLocalConstructingSuperiors() - { - return beforeLocalConstructingSuperiors; - } - - public String[] getBeforeLocalConstructingInferiors() - { - return beforeLocalConstructingInferiors; - } - - public String[] getAfterLocalConstructingSuperiors() - { - return afterLocalConstructingSuperiors; - } - - public String[] getAfterLocalConstructingInferiors() - { - return afterLocalConstructingInferiors; - } - - public void setBeforeLocalConstructingSuperiors(String[] value) - { - beforeLocalConstructingSuperiors = value; - } - - public void setBeforeLocalConstructingInferiors(String[] value) - { - beforeLocalConstructingInferiors = value; - } - - public void setAfterLocalConstructingSuperiors(String[] value) - { - afterLocalConstructingSuperiors = value; - } - - public void setAfterLocalConstructingInferiors(String[] value) - { - afterLocalConstructingInferiors = value; - } - - public Map getDynamicBeforeSuperiors() - { - return dynamicBeforeSuperiors; - } - - public Map getDynamicBeforeInferiors() - { - return dynamicBeforeInferiors; - } - - public Map getDynamicOverrideSuperiors() - { - return dynamicOverrideSuperiors; - } - - public Map getDynamicOverrideInferiors() - { - return dynamicOverrideInferiors; - } - - public Map getDynamicAfterSuperiors() - { - return dynamicAfterSuperiors; - } - - public Map getDynamicAfterInferiors() - { - return dynamicAfterInferiors; - } - - public void setDynamicBeforeSuperiors(String name, String[] superiors) - { - dynamicBeforeSuperiors = setDynamic(name, superiors, dynamicBeforeSuperiors); - } - - public void setDynamicBeforeInferiors(String name, String[] inferiors) - { - dynamicBeforeInferiors = setDynamic(name, inferiors, dynamicBeforeInferiors); - } - - public void setDynamicOverrideSuperiors(String name, String[] superiors) - { - dynamicOverrideSuperiors = setDynamic(name, superiors, dynamicOverrideSuperiors); - } - - public void setDynamicOverrideInferiors(String name, String[] inferiors) - { - dynamicOverrideInferiors = setDynamic(name, inferiors, dynamicOverrideInferiors); - } - - public void setDynamicAfterSuperiors(String name, String[] superiors) - { - dynamicAfterSuperiors = setDynamic(name, superiors, dynamicAfterSuperiors); - } - - public void setDynamicAfterInferiors(String name, String[] inferiors) - { - dynamicAfterInferiors = setDynamic(name, inferiors, dynamicAfterInferiors); - } - - private Map setDynamic(String name, String[] names, Map map) - { - if(name == null) - throw new IllegalArgumentException("Parameter 'name' may not be null"); - - if(names == null) - { - if(map != null) - map.remove(name); - return map; - } - - if(map == null) - map = new HashMap(); - map.put(name, names); - - return map; - } - - public String[] getBeforeAddExhaustionSuperiors() - { - return beforeAddExhaustionSuperiors; - } - - public String[] getBeforeAddExhaustionInferiors() - { - return beforeAddExhaustionInferiors; - } - - public String[] getOverrideAddExhaustionSuperiors() - { - return overrideAddExhaustionSuperiors; - } - - public String[] getOverrideAddExhaustionInferiors() - { - return overrideAddExhaustionInferiors; - } - - public String[] getAfterAddExhaustionSuperiors() - { - return afterAddExhaustionSuperiors; - } - - public String[] getAfterAddExhaustionInferiors() - { - return afterAddExhaustionInferiors; - } - - public void setBeforeAddExhaustionSuperiors(String[] value) - { - beforeAddExhaustionSuperiors = value; - } - - public void setBeforeAddExhaustionInferiors(String[] value) - { - beforeAddExhaustionInferiors = value; - } - - public void setOverrideAddExhaustionSuperiors(String[] value) - { - overrideAddExhaustionSuperiors = value; - } - - public void setOverrideAddExhaustionInferiors(String[] value) - { - overrideAddExhaustionInferiors = value; - } - - public void setAfterAddExhaustionSuperiors(String[] value) - { - afterAddExhaustionSuperiors = value; - } - - public void setAfterAddExhaustionInferiors(String[] value) - { - afterAddExhaustionInferiors = value; - } - - public String[] getBeforeAddExperienceSuperiors() - { - return beforeAddExperienceSuperiors; - } - - public String[] getBeforeAddExperienceInferiors() - { - return beforeAddExperienceInferiors; - } - - public String[] getOverrideAddExperienceSuperiors() - { - return overrideAddExperienceSuperiors; - } - - public String[] getOverrideAddExperienceInferiors() - { - return overrideAddExperienceInferiors; - } - - public String[] getAfterAddExperienceSuperiors() - { - return afterAddExperienceSuperiors; - } - - public String[] getAfterAddExperienceInferiors() - { - return afterAddExperienceInferiors; - } - - public void setBeforeAddExperienceSuperiors(String[] value) - { - beforeAddExperienceSuperiors = value; - } - - public void setBeforeAddExperienceInferiors(String[] value) - { - beforeAddExperienceInferiors = value; - } - - public void setOverrideAddExperienceSuperiors(String[] value) - { - overrideAddExperienceSuperiors = value; - } - - public void setOverrideAddExperienceInferiors(String[] value) - { - overrideAddExperienceInferiors = value; - } - - public void setAfterAddExperienceSuperiors(String[] value) - { - afterAddExperienceSuperiors = value; - } - - public void setAfterAddExperienceInferiors(String[] value) - { - afterAddExperienceInferiors = value; - } - - public String[] getBeforeAddExperienceLevelSuperiors() - { - return beforeAddExperienceLevelSuperiors; - } - - public String[] getBeforeAddExperienceLevelInferiors() - { - return beforeAddExperienceLevelInferiors; - } - - public String[] getOverrideAddExperienceLevelSuperiors() - { - return overrideAddExperienceLevelSuperiors; - } - - public String[] getOverrideAddExperienceLevelInferiors() - { - return overrideAddExperienceLevelInferiors; - } - - public String[] getAfterAddExperienceLevelSuperiors() - { - return afterAddExperienceLevelSuperiors; - } - - public String[] getAfterAddExperienceLevelInferiors() - { - return afterAddExperienceLevelInferiors; - } - - public void setBeforeAddExperienceLevelSuperiors(String[] value) - { - beforeAddExperienceLevelSuperiors = value; - } - - public void setBeforeAddExperienceLevelInferiors(String[] value) - { - beforeAddExperienceLevelInferiors = value; - } - - public void setOverrideAddExperienceLevelSuperiors(String[] value) - { - overrideAddExperienceLevelSuperiors = value; - } - - public void setOverrideAddExperienceLevelInferiors(String[] value) - { - overrideAddExperienceLevelInferiors = value; - } - - public void setAfterAddExperienceLevelSuperiors(String[] value) - { - afterAddExperienceLevelSuperiors = value; - } - - public void setAfterAddExperienceLevelInferiors(String[] value) - { - afterAddExperienceLevelInferiors = value; - } - - public String[] getBeforeAddMovementStatSuperiors() - { - return beforeAddMovementStatSuperiors; - } - - public String[] getBeforeAddMovementStatInferiors() - { - return beforeAddMovementStatInferiors; - } - - public String[] getOverrideAddMovementStatSuperiors() - { - return overrideAddMovementStatSuperiors; - } - - public String[] getOverrideAddMovementStatInferiors() - { - return overrideAddMovementStatInferiors; - } - - public String[] getAfterAddMovementStatSuperiors() - { - return afterAddMovementStatSuperiors; - } - - public String[] getAfterAddMovementStatInferiors() - { - return afterAddMovementStatInferiors; - } - - public void setBeforeAddMovementStatSuperiors(String[] value) - { - beforeAddMovementStatSuperiors = value; - } - - public void setBeforeAddMovementStatInferiors(String[] value) - { - beforeAddMovementStatInferiors = value; - } - - public void setOverrideAddMovementStatSuperiors(String[] value) - { - overrideAddMovementStatSuperiors = value; - } - - public void setOverrideAddMovementStatInferiors(String[] value) - { - overrideAddMovementStatInferiors = value; - } - - public void setAfterAddMovementStatSuperiors(String[] value) - { - afterAddMovementStatSuperiors = value; - } - - public void setAfterAddMovementStatInferiors(String[] value) - { - afterAddMovementStatInferiors = value; - } - - public String[] getBeforeAttackEntityFromSuperiors() - { - return beforeAttackEntityFromSuperiors; - } - - public String[] getBeforeAttackEntityFromInferiors() - { - return beforeAttackEntityFromInferiors; - } - - public String[] getOverrideAttackEntityFromSuperiors() - { - return overrideAttackEntityFromSuperiors; - } - - public String[] getOverrideAttackEntityFromInferiors() - { - return overrideAttackEntityFromInferiors; - } - - public String[] getAfterAttackEntityFromSuperiors() - { - return afterAttackEntityFromSuperiors; - } - - public String[] getAfterAttackEntityFromInferiors() - { - return afterAttackEntityFromInferiors; - } - - public void setBeforeAttackEntityFromSuperiors(String[] value) - { - beforeAttackEntityFromSuperiors = value; - } - - public void setBeforeAttackEntityFromInferiors(String[] value) - { - beforeAttackEntityFromInferiors = value; - } - - public void setOverrideAttackEntityFromSuperiors(String[] value) - { - overrideAttackEntityFromSuperiors = value; - } - - public void setOverrideAttackEntityFromInferiors(String[] value) - { - overrideAttackEntityFromInferiors = value; - } - - public void setAfterAttackEntityFromSuperiors(String[] value) - { - afterAttackEntityFromSuperiors = value; - } - - public void setAfterAttackEntityFromInferiors(String[] value) - { - afterAttackEntityFromInferiors = value; - } - - public String[] getBeforeAttackTargetEntityWithCurrentItemSuperiors() - { - return beforeAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getBeforeAttackTargetEntityWithCurrentItemInferiors() - { - return beforeAttackTargetEntityWithCurrentItemInferiors; - } - - public String[] getOverrideAttackTargetEntityWithCurrentItemSuperiors() - { - return overrideAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getOverrideAttackTargetEntityWithCurrentItemInferiors() - { - return overrideAttackTargetEntityWithCurrentItemInferiors; - } - - public String[] getAfterAttackTargetEntityWithCurrentItemSuperiors() - { - return afterAttackTargetEntityWithCurrentItemSuperiors; - } - - public String[] getAfterAttackTargetEntityWithCurrentItemInferiors() - { - return afterAttackTargetEntityWithCurrentItemInferiors; - } - - public void setBeforeAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - beforeAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setBeforeAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - beforeAttackTargetEntityWithCurrentItemInferiors = value; - } - - public void setOverrideAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - overrideAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setOverrideAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - overrideAttackTargetEntityWithCurrentItemInferiors = value; - } - - public void setAfterAttackTargetEntityWithCurrentItemSuperiors(String[] value) - { - afterAttackTargetEntityWithCurrentItemSuperiors = value; - } - - public void setAfterAttackTargetEntityWithCurrentItemInferiors(String[] value) - { - afterAttackTargetEntityWithCurrentItemInferiors = value; - } - - public String[] getBeforeCanBreatheUnderwaterSuperiors() - { - return beforeCanBreatheUnderwaterSuperiors; - } - - public String[] getBeforeCanBreatheUnderwaterInferiors() - { - return beforeCanBreatheUnderwaterInferiors; - } - - public String[] getOverrideCanBreatheUnderwaterSuperiors() - { - return overrideCanBreatheUnderwaterSuperiors; - } - - public String[] getOverrideCanBreatheUnderwaterInferiors() - { - return overrideCanBreatheUnderwaterInferiors; - } - - public String[] getAfterCanBreatheUnderwaterSuperiors() - { - return afterCanBreatheUnderwaterSuperiors; - } - - public String[] getAfterCanBreatheUnderwaterInferiors() - { - return afterCanBreatheUnderwaterInferiors; - } - - public void setBeforeCanBreatheUnderwaterSuperiors(String[] value) - { - beforeCanBreatheUnderwaterSuperiors = value; - } - - public void setBeforeCanBreatheUnderwaterInferiors(String[] value) - { - beforeCanBreatheUnderwaterInferiors = value; - } - - public void setOverrideCanBreatheUnderwaterSuperiors(String[] value) - { - overrideCanBreatheUnderwaterSuperiors = value; - } - - public void setOverrideCanBreatheUnderwaterInferiors(String[] value) - { - overrideCanBreatheUnderwaterInferiors = value; - } - - public void setAfterCanBreatheUnderwaterSuperiors(String[] value) - { - afterCanBreatheUnderwaterSuperiors = value; - } - - public void setAfterCanBreatheUnderwaterInferiors(String[] value) - { - afterCanBreatheUnderwaterInferiors = value; - } - - public String[] getBeforeCanHarvestBlockSuperiors() - { - return beforeCanHarvestBlockSuperiors; - } - - public String[] getBeforeCanHarvestBlockInferiors() - { - return beforeCanHarvestBlockInferiors; - } - - public String[] getOverrideCanHarvestBlockSuperiors() - { - return overrideCanHarvestBlockSuperiors; - } - - public String[] getOverrideCanHarvestBlockInferiors() - { - return overrideCanHarvestBlockInferiors; - } - - public String[] getAfterCanHarvestBlockSuperiors() - { - return afterCanHarvestBlockSuperiors; - } - - public String[] getAfterCanHarvestBlockInferiors() - { - return afterCanHarvestBlockInferiors; - } - - public void setBeforeCanHarvestBlockSuperiors(String[] value) - { - beforeCanHarvestBlockSuperiors = value; - } - - public void setBeforeCanHarvestBlockInferiors(String[] value) - { - beforeCanHarvestBlockInferiors = value; - } - - public void setOverrideCanHarvestBlockSuperiors(String[] value) - { - overrideCanHarvestBlockSuperiors = value; - } - - public void setOverrideCanHarvestBlockInferiors(String[] value) - { - overrideCanHarvestBlockInferiors = value; - } - - public void setAfterCanHarvestBlockSuperiors(String[] value) - { - afterCanHarvestBlockSuperiors = value; - } - - public void setAfterCanHarvestBlockInferiors(String[] value) - { - afterCanHarvestBlockInferiors = value; - } - - public String[] getBeforeCanPlayerEditSuperiors() - { - return beforeCanPlayerEditSuperiors; - } - - public String[] getBeforeCanPlayerEditInferiors() - { - return beforeCanPlayerEditInferiors; - } - - public String[] getOverrideCanPlayerEditSuperiors() - { - return overrideCanPlayerEditSuperiors; - } - - public String[] getOverrideCanPlayerEditInferiors() - { - return overrideCanPlayerEditInferiors; - } - - public String[] getAfterCanPlayerEditSuperiors() - { - return afterCanPlayerEditSuperiors; - } - - public String[] getAfterCanPlayerEditInferiors() - { - return afterCanPlayerEditInferiors; - } - - public void setBeforeCanPlayerEditSuperiors(String[] value) - { - beforeCanPlayerEditSuperiors = value; - } - - public void setBeforeCanPlayerEditInferiors(String[] value) - { - beforeCanPlayerEditInferiors = value; - } - - public void setOverrideCanPlayerEditSuperiors(String[] value) - { - overrideCanPlayerEditSuperiors = value; - } - - public void setOverrideCanPlayerEditInferiors(String[] value) - { - overrideCanPlayerEditInferiors = value; - } - - public void setAfterCanPlayerEditSuperiors(String[] value) - { - afterCanPlayerEditSuperiors = value; - } - - public void setAfterCanPlayerEditInferiors(String[] value) - { - afterCanPlayerEditInferiors = value; - } - - public String[] getBeforeCanTriggerWalkingSuperiors() - { - return beforeCanTriggerWalkingSuperiors; - } - - public String[] getBeforeCanTriggerWalkingInferiors() - { - return beforeCanTriggerWalkingInferiors; - } - - public String[] getOverrideCanTriggerWalkingSuperiors() - { - return overrideCanTriggerWalkingSuperiors; - } - - public String[] getOverrideCanTriggerWalkingInferiors() - { - return overrideCanTriggerWalkingInferiors; - } - - public String[] getAfterCanTriggerWalkingSuperiors() - { - return afterCanTriggerWalkingSuperiors; - } - - public String[] getAfterCanTriggerWalkingInferiors() - { - return afterCanTriggerWalkingInferiors; - } - - public void setBeforeCanTriggerWalkingSuperiors(String[] value) - { - beforeCanTriggerWalkingSuperiors = value; - } - - public void setBeforeCanTriggerWalkingInferiors(String[] value) - { - beforeCanTriggerWalkingInferiors = value; - } - - public void setOverrideCanTriggerWalkingSuperiors(String[] value) - { - overrideCanTriggerWalkingSuperiors = value; - } - - public void setOverrideCanTriggerWalkingInferiors(String[] value) - { - overrideCanTriggerWalkingInferiors = value; - } - - public void setAfterCanTriggerWalkingSuperiors(String[] value) - { - afterCanTriggerWalkingSuperiors = value; - } - - public void setAfterCanTriggerWalkingInferiors(String[] value) - { - afterCanTriggerWalkingInferiors = value; - } - - public String[] getBeforeClonePlayerSuperiors() - { - return beforeClonePlayerSuperiors; - } - - public String[] getBeforeClonePlayerInferiors() - { - return beforeClonePlayerInferiors; - } - - public String[] getOverrideClonePlayerSuperiors() - { - return overrideClonePlayerSuperiors; - } - - public String[] getOverrideClonePlayerInferiors() - { - return overrideClonePlayerInferiors; - } - - public String[] getAfterClonePlayerSuperiors() - { - return afterClonePlayerSuperiors; - } - - public String[] getAfterClonePlayerInferiors() - { - return afterClonePlayerInferiors; - } - - public void setBeforeClonePlayerSuperiors(String[] value) - { - beforeClonePlayerSuperiors = value; - } - - public void setBeforeClonePlayerInferiors(String[] value) - { - beforeClonePlayerInferiors = value; - } - - public void setOverrideClonePlayerSuperiors(String[] value) - { - overrideClonePlayerSuperiors = value; - } - - public void setOverrideClonePlayerInferiors(String[] value) - { - overrideClonePlayerInferiors = value; - } - - public void setAfterClonePlayerSuperiors(String[] value) - { - afterClonePlayerSuperiors = value; - } - - public void setAfterClonePlayerInferiors(String[] value) - { - afterClonePlayerInferiors = value; - } - - public String[] getBeforeDamageEntitySuperiors() - { - return beforeDamageEntitySuperiors; - } - - public String[] getBeforeDamageEntityInferiors() - { - return beforeDamageEntityInferiors; - } - - public String[] getOverrideDamageEntitySuperiors() - { - return overrideDamageEntitySuperiors; - } - - public String[] getOverrideDamageEntityInferiors() - { - return overrideDamageEntityInferiors; - } - - public String[] getAfterDamageEntitySuperiors() - { - return afterDamageEntitySuperiors; - } - - public String[] getAfterDamageEntityInferiors() - { - return afterDamageEntityInferiors; - } - - public void setBeforeDamageEntitySuperiors(String[] value) - { - beforeDamageEntitySuperiors = value; - } - - public void setBeforeDamageEntityInferiors(String[] value) - { - beforeDamageEntityInferiors = value; - } - - public void setOverrideDamageEntitySuperiors(String[] value) - { - overrideDamageEntitySuperiors = value; - } - - public void setOverrideDamageEntityInferiors(String[] value) - { - overrideDamageEntityInferiors = value; - } - - public void setAfterDamageEntitySuperiors(String[] value) - { - afterDamageEntitySuperiors = value; - } - - public void setAfterDamageEntityInferiors(String[] value) - { - afterDamageEntityInferiors = value; - } - - public String[] getBeforeDisplayGUIChestSuperiors() - { - return beforeDisplayGUIChestSuperiors; - } - - public String[] getBeforeDisplayGUIChestInferiors() - { - return beforeDisplayGUIChestInferiors; - } - - public String[] getOverrideDisplayGUIChestSuperiors() - { - return overrideDisplayGUIChestSuperiors; - } - - public String[] getOverrideDisplayGUIChestInferiors() - { - return overrideDisplayGUIChestInferiors; - } - - public String[] getAfterDisplayGUIChestSuperiors() - { - return afterDisplayGUIChestSuperiors; - } - - public String[] getAfterDisplayGUIChestInferiors() - { - return afterDisplayGUIChestInferiors; - } - - public void setBeforeDisplayGUIChestSuperiors(String[] value) - { - beforeDisplayGUIChestSuperiors = value; - } - - public void setBeforeDisplayGUIChestInferiors(String[] value) - { - beforeDisplayGUIChestInferiors = value; - } - - public void setOverrideDisplayGUIChestSuperiors(String[] value) - { - overrideDisplayGUIChestSuperiors = value; - } - - public void setOverrideDisplayGUIChestInferiors(String[] value) - { - overrideDisplayGUIChestInferiors = value; - } - - public void setAfterDisplayGUIChestSuperiors(String[] value) - { - afterDisplayGUIChestSuperiors = value; - } - - public void setAfterDisplayGUIChestInferiors(String[] value) - { - afterDisplayGUIChestInferiors = value; - } - - public String[] getBeforeDisplayGUIDispenserSuperiors() - { - return beforeDisplayGUIDispenserSuperiors; - } - - public String[] getBeforeDisplayGUIDispenserInferiors() - { - return beforeDisplayGUIDispenserInferiors; - } - - public String[] getOverrideDisplayGUIDispenserSuperiors() - { - return overrideDisplayGUIDispenserSuperiors; - } - - public String[] getOverrideDisplayGUIDispenserInferiors() - { - return overrideDisplayGUIDispenserInferiors; - } - - public String[] getAfterDisplayGUIDispenserSuperiors() - { - return afterDisplayGUIDispenserSuperiors; - } - - public String[] getAfterDisplayGUIDispenserInferiors() - { - return afterDisplayGUIDispenserInferiors; - } - - public void setBeforeDisplayGUIDispenserSuperiors(String[] value) - { - beforeDisplayGUIDispenserSuperiors = value; - } - - public void setBeforeDisplayGUIDispenserInferiors(String[] value) - { - beforeDisplayGUIDispenserInferiors = value; - } - - public void setOverrideDisplayGUIDispenserSuperiors(String[] value) - { - overrideDisplayGUIDispenserSuperiors = value; - } - - public void setOverrideDisplayGUIDispenserInferiors(String[] value) - { - overrideDisplayGUIDispenserInferiors = value; - } - - public void setAfterDisplayGUIDispenserSuperiors(String[] value) - { - afterDisplayGUIDispenserSuperiors = value; - } - - public void setAfterDisplayGUIDispenserInferiors(String[] value) - { - afterDisplayGUIDispenserInferiors = value; - } - - public String[] getBeforeDisplayGUIFurnaceSuperiors() - { - return beforeDisplayGUIFurnaceSuperiors; - } - - public String[] getBeforeDisplayGUIFurnaceInferiors() - { - return beforeDisplayGUIFurnaceInferiors; - } - - public String[] getOverrideDisplayGUIFurnaceSuperiors() - { - return overrideDisplayGUIFurnaceSuperiors; - } - - public String[] getOverrideDisplayGUIFurnaceInferiors() - { - return overrideDisplayGUIFurnaceInferiors; - } - - public String[] getAfterDisplayGUIFurnaceSuperiors() - { - return afterDisplayGUIFurnaceSuperiors; - } - - public String[] getAfterDisplayGUIFurnaceInferiors() - { - return afterDisplayGUIFurnaceInferiors; - } - - public void setBeforeDisplayGUIFurnaceSuperiors(String[] value) - { - beforeDisplayGUIFurnaceSuperiors = value; - } - - public void setBeforeDisplayGUIFurnaceInferiors(String[] value) - { - beforeDisplayGUIFurnaceInferiors = value; - } - - public void setOverrideDisplayGUIFurnaceSuperiors(String[] value) - { - overrideDisplayGUIFurnaceSuperiors = value; - } - - public void setOverrideDisplayGUIFurnaceInferiors(String[] value) - { - overrideDisplayGUIFurnaceInferiors = value; - } - - public void setAfterDisplayGUIFurnaceSuperiors(String[] value) - { - afterDisplayGUIFurnaceSuperiors = value; - } - - public void setAfterDisplayGUIFurnaceInferiors(String[] value) - { - afterDisplayGUIFurnaceInferiors = value; - } - - public String[] getBeforeDisplayGUIWorkbenchSuperiors() - { - return beforeDisplayGUIWorkbenchSuperiors; - } - - public String[] getBeforeDisplayGUIWorkbenchInferiors() - { - return beforeDisplayGUIWorkbenchInferiors; - } - - public String[] getOverrideDisplayGUIWorkbenchSuperiors() - { - return overrideDisplayGUIWorkbenchSuperiors; - } - - public String[] getOverrideDisplayGUIWorkbenchInferiors() - { - return overrideDisplayGUIWorkbenchInferiors; - } - - public String[] getAfterDisplayGUIWorkbenchSuperiors() - { - return afterDisplayGUIWorkbenchSuperiors; - } - - public String[] getAfterDisplayGUIWorkbenchInferiors() - { - return afterDisplayGUIWorkbenchInferiors; - } - - public void setBeforeDisplayGUIWorkbenchSuperiors(String[] value) - { - beforeDisplayGUIWorkbenchSuperiors = value; - } - - public void setBeforeDisplayGUIWorkbenchInferiors(String[] value) - { - beforeDisplayGUIWorkbenchInferiors = value; - } - - public void setOverrideDisplayGUIWorkbenchSuperiors(String[] value) - { - overrideDisplayGUIWorkbenchSuperiors = value; - } - - public void setOverrideDisplayGUIWorkbenchInferiors(String[] value) - { - overrideDisplayGUIWorkbenchInferiors = value; - } - - public void setAfterDisplayGUIWorkbenchSuperiors(String[] value) - { - afterDisplayGUIWorkbenchSuperiors = value; - } - - public void setAfterDisplayGUIWorkbenchInferiors(String[] value) - { - afterDisplayGUIWorkbenchInferiors = value; - } - - public String[] getBeforeDropOneItemSuperiors() - { - return beforeDropOneItemSuperiors; - } - - public String[] getBeforeDropOneItemInferiors() - { - return beforeDropOneItemInferiors; - } - - public String[] getOverrideDropOneItemSuperiors() - { - return overrideDropOneItemSuperiors; - } - - public String[] getOverrideDropOneItemInferiors() - { - return overrideDropOneItemInferiors; - } - - public String[] getAfterDropOneItemSuperiors() - { - return afterDropOneItemSuperiors; - } - - public String[] getAfterDropOneItemInferiors() - { - return afterDropOneItemInferiors; - } - - public void setBeforeDropOneItemSuperiors(String[] value) - { - beforeDropOneItemSuperiors = value; - } - - public void setBeforeDropOneItemInferiors(String[] value) - { - beforeDropOneItemInferiors = value; - } - - public void setOverrideDropOneItemSuperiors(String[] value) - { - overrideDropOneItemSuperiors = value; - } - - public void setOverrideDropOneItemInferiors(String[] value) - { - overrideDropOneItemInferiors = value; - } - - public void setAfterDropOneItemSuperiors(String[] value) - { - afterDropOneItemSuperiors = value; - } - - public void setAfterDropOneItemInferiors(String[] value) - { - afterDropOneItemInferiors = value; - } - - public String[] getBeforeDropPlayerItemSuperiors() - { - return beforeDropPlayerItemSuperiors; - } - - public String[] getBeforeDropPlayerItemInferiors() - { - return beforeDropPlayerItemInferiors; - } - - public String[] getOverrideDropPlayerItemSuperiors() - { - return overrideDropPlayerItemSuperiors; - } - - public String[] getOverrideDropPlayerItemInferiors() - { - return overrideDropPlayerItemInferiors; - } - - public String[] getAfterDropPlayerItemSuperiors() - { - return afterDropPlayerItemSuperiors; - } - - public String[] getAfterDropPlayerItemInferiors() - { - return afterDropPlayerItemInferiors; - } - - public void setBeforeDropPlayerItemSuperiors(String[] value) - { - beforeDropPlayerItemSuperiors = value; - } - - public void setBeforeDropPlayerItemInferiors(String[] value) - { - beforeDropPlayerItemInferiors = value; - } - - public void setOverrideDropPlayerItemSuperiors(String[] value) - { - overrideDropPlayerItemSuperiors = value; - } - - public void setOverrideDropPlayerItemInferiors(String[] value) - { - overrideDropPlayerItemInferiors = value; - } - - public void setAfterDropPlayerItemSuperiors(String[] value) - { - afterDropPlayerItemSuperiors = value; - } - - public void setAfterDropPlayerItemInferiors(String[] value) - { - afterDropPlayerItemInferiors = value; - } - - public String[] getBeforeFallSuperiors() - { - return beforeFallSuperiors; - } - - public String[] getBeforeFallInferiors() - { - return beforeFallInferiors; - } - - public String[] getOverrideFallSuperiors() - { - return overrideFallSuperiors; - } - - public String[] getOverrideFallInferiors() - { - return overrideFallInferiors; - } - - public String[] getAfterFallSuperiors() - { - return afterFallSuperiors; - } - - public String[] getAfterFallInferiors() - { - return afterFallInferiors; - } - - public void setBeforeFallSuperiors(String[] value) - { - beforeFallSuperiors = value; - } - - public void setBeforeFallInferiors(String[] value) - { - beforeFallInferiors = value; - } - - public void setOverrideFallSuperiors(String[] value) - { - overrideFallSuperiors = value; - } - - public void setOverrideFallInferiors(String[] value) - { - overrideFallInferiors = value; - } - - public void setAfterFallSuperiors(String[] value) - { - afterFallSuperiors = value; - } - - public void setAfterFallInferiors(String[] value) - { - afterFallInferiors = value; - } - - public String[] getBeforeGetAIMoveSpeedSuperiors() - { - return beforeGetAIMoveSpeedSuperiors; - } - - public String[] getBeforeGetAIMoveSpeedInferiors() - { - return beforeGetAIMoveSpeedInferiors; - } - - public String[] getOverrideGetAIMoveSpeedSuperiors() - { - return overrideGetAIMoveSpeedSuperiors; - } - - public String[] getOverrideGetAIMoveSpeedInferiors() - { - return overrideGetAIMoveSpeedInferiors; - } - - public String[] getAfterGetAIMoveSpeedSuperiors() - { - return afterGetAIMoveSpeedSuperiors; - } - - public String[] getAfterGetAIMoveSpeedInferiors() - { - return afterGetAIMoveSpeedInferiors; - } - - public void setBeforeGetAIMoveSpeedSuperiors(String[] value) - { - beforeGetAIMoveSpeedSuperiors = value; - } - - public void setBeforeGetAIMoveSpeedInferiors(String[] value) - { - beforeGetAIMoveSpeedInferiors = value; - } - - public void setOverrideGetAIMoveSpeedSuperiors(String[] value) - { - overrideGetAIMoveSpeedSuperiors = value; - } - - public void setOverrideGetAIMoveSpeedInferiors(String[] value) - { - overrideGetAIMoveSpeedInferiors = value; - } - - public void setAfterGetAIMoveSpeedSuperiors(String[] value) - { - afterGetAIMoveSpeedSuperiors = value; - } - - public void setAfterGetAIMoveSpeedInferiors(String[] value) - { - afterGetAIMoveSpeedInferiors = value; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockSuperiors() - { - return beforeGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockInferiors() - { - return beforeGetCurrentPlayerStrVsBlockInferiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockSuperiors() - { - return overrideGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockInferiors() - { - return overrideGetCurrentPlayerStrVsBlockInferiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockSuperiors() - { - return afterGetCurrentPlayerStrVsBlockSuperiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockInferiors() - { - return afterGetCurrentPlayerStrVsBlockInferiors; - } - - public void setBeforeGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setBeforeGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockInferiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockInferiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockSuperiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockSuperiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockInferiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockInferiors = value; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return beforeGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getBeforeGetCurrentPlayerStrVsBlockForgeInferiors() - { - return beforeGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return overrideGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getOverrideGetCurrentPlayerStrVsBlockForgeInferiors() - { - return overrideGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockForgeSuperiors() - { - return afterGetCurrentPlayerStrVsBlockForgeSuperiors; - } - - public String[] getAfterGetCurrentPlayerStrVsBlockForgeInferiors() - { - return afterGetCurrentPlayerStrVsBlockForgeInferiors; - } - - public void setBeforeGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setBeforeGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - beforeGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setOverrideGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - overrideGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockForgeSuperiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockForgeSuperiors = value; - } - - public void setAfterGetCurrentPlayerStrVsBlockForgeInferiors(String[] value) - { - afterGetCurrentPlayerStrVsBlockForgeInferiors = value; - } - - public String[] getBeforeGetDistanceSqSuperiors() - { - return beforeGetDistanceSqSuperiors; - } - - public String[] getBeforeGetDistanceSqInferiors() - { - return beforeGetDistanceSqInferiors; - } - - public String[] getOverrideGetDistanceSqSuperiors() - { - return overrideGetDistanceSqSuperiors; - } - - public String[] getOverrideGetDistanceSqInferiors() - { - return overrideGetDistanceSqInferiors; - } - - public String[] getAfterGetDistanceSqSuperiors() - { - return afterGetDistanceSqSuperiors; - } - - public String[] getAfterGetDistanceSqInferiors() - { - return afterGetDistanceSqInferiors; - } - - public void setBeforeGetDistanceSqSuperiors(String[] value) - { - beforeGetDistanceSqSuperiors = value; - } - - public void setBeforeGetDistanceSqInferiors(String[] value) - { - beforeGetDistanceSqInferiors = value; - } - - public void setOverrideGetDistanceSqSuperiors(String[] value) - { - overrideGetDistanceSqSuperiors = value; - } - - public void setOverrideGetDistanceSqInferiors(String[] value) - { - overrideGetDistanceSqInferiors = value; - } - - public void setAfterGetDistanceSqSuperiors(String[] value) - { - afterGetDistanceSqSuperiors = value; - } - - public void setAfterGetDistanceSqInferiors(String[] value) - { - afterGetDistanceSqInferiors = value; - } - - public String[] getBeforeGetBrightnessSuperiors() - { - return beforeGetBrightnessSuperiors; - } - - public String[] getBeforeGetBrightnessInferiors() - { - return beforeGetBrightnessInferiors; - } - - public String[] getOverrideGetBrightnessSuperiors() - { - return overrideGetBrightnessSuperiors; - } - - public String[] getOverrideGetBrightnessInferiors() - { - return overrideGetBrightnessInferiors; - } - - public String[] getAfterGetBrightnessSuperiors() - { - return afterGetBrightnessSuperiors; - } - - public String[] getAfterGetBrightnessInferiors() - { - return afterGetBrightnessInferiors; - } - - public void setBeforeGetBrightnessSuperiors(String[] value) - { - beforeGetBrightnessSuperiors = value; - } - - public void setBeforeGetBrightnessInferiors(String[] value) - { - beforeGetBrightnessInferiors = value; - } - - public void setOverrideGetBrightnessSuperiors(String[] value) - { - overrideGetBrightnessSuperiors = value; - } - - public void setOverrideGetBrightnessInferiors(String[] value) - { - overrideGetBrightnessInferiors = value; - } - - public void setAfterGetBrightnessSuperiors(String[] value) - { - afterGetBrightnessSuperiors = value; - } - - public void setAfterGetBrightnessInferiors(String[] value) - { - afterGetBrightnessInferiors = value; - } - - public String[] getBeforeGetEyeHeightSuperiors() - { - return beforeGetEyeHeightSuperiors; - } - - public String[] getBeforeGetEyeHeightInferiors() - { - return beforeGetEyeHeightInferiors; - } - - public String[] getOverrideGetEyeHeightSuperiors() - { - return overrideGetEyeHeightSuperiors; - } - - public String[] getOverrideGetEyeHeightInferiors() - { - return overrideGetEyeHeightInferiors; - } - - public String[] getAfterGetEyeHeightSuperiors() - { - return afterGetEyeHeightSuperiors; - } - - public String[] getAfterGetEyeHeightInferiors() - { - return afterGetEyeHeightInferiors; - } - - public void setBeforeGetEyeHeightSuperiors(String[] value) - { - beforeGetEyeHeightSuperiors = value; - } - - public void setBeforeGetEyeHeightInferiors(String[] value) - { - beforeGetEyeHeightInferiors = value; - } - - public void setOverrideGetEyeHeightSuperiors(String[] value) - { - overrideGetEyeHeightSuperiors = value; - } - - public void setOverrideGetEyeHeightInferiors(String[] value) - { - overrideGetEyeHeightInferiors = value; - } - - public void setAfterGetEyeHeightSuperiors(String[] value) - { - afterGetEyeHeightSuperiors = value; - } - - public void setAfterGetEyeHeightInferiors(String[] value) - { - afterGetEyeHeightInferiors = value; - } - - public String[] getBeforeHealSuperiors() - { - return beforeHealSuperiors; - } - - public String[] getBeforeHealInferiors() - { - return beforeHealInferiors; - } - - public String[] getOverrideHealSuperiors() - { - return overrideHealSuperiors; - } - - public String[] getOverrideHealInferiors() - { - return overrideHealInferiors; - } - - public String[] getAfterHealSuperiors() - { - return afterHealSuperiors; - } - - public String[] getAfterHealInferiors() - { - return afterHealInferiors; - } - - public void setBeforeHealSuperiors(String[] value) - { - beforeHealSuperiors = value; - } - - public void setBeforeHealInferiors(String[] value) - { - beforeHealInferiors = value; - } - - public void setOverrideHealSuperiors(String[] value) - { - overrideHealSuperiors = value; - } - - public void setOverrideHealInferiors(String[] value) - { - overrideHealInferiors = value; - } - - public void setAfterHealSuperiors(String[] value) - { - afterHealSuperiors = value; - } - - public void setAfterHealInferiors(String[] value) - { - afterHealInferiors = value; - } - - public String[] getBeforeIsEntityInsideOpaqueBlockSuperiors() - { - return beforeIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getBeforeIsEntityInsideOpaqueBlockInferiors() - { - return beforeIsEntityInsideOpaqueBlockInferiors; - } - - public String[] getOverrideIsEntityInsideOpaqueBlockSuperiors() - { - return overrideIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getOverrideIsEntityInsideOpaqueBlockInferiors() - { - return overrideIsEntityInsideOpaqueBlockInferiors; - } - - public String[] getAfterIsEntityInsideOpaqueBlockSuperiors() - { - return afterIsEntityInsideOpaqueBlockSuperiors; - } - - public String[] getAfterIsEntityInsideOpaqueBlockInferiors() - { - return afterIsEntityInsideOpaqueBlockInferiors; - } - - public void setBeforeIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - beforeIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setBeforeIsEntityInsideOpaqueBlockInferiors(String[] value) - { - beforeIsEntityInsideOpaqueBlockInferiors = value; - } - - public void setOverrideIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - overrideIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setOverrideIsEntityInsideOpaqueBlockInferiors(String[] value) - { - overrideIsEntityInsideOpaqueBlockInferiors = value; - } - - public void setAfterIsEntityInsideOpaqueBlockSuperiors(String[] value) - { - afterIsEntityInsideOpaqueBlockSuperiors = value; - } - - public void setAfterIsEntityInsideOpaqueBlockInferiors(String[] value) - { - afterIsEntityInsideOpaqueBlockInferiors = value; - } - - public String[] getBeforeIsInWaterSuperiors() - { - return beforeIsInWaterSuperiors; - } - - public String[] getBeforeIsInWaterInferiors() - { - return beforeIsInWaterInferiors; - } - - public String[] getOverrideIsInWaterSuperiors() - { - return overrideIsInWaterSuperiors; - } - - public String[] getOverrideIsInWaterInferiors() - { - return overrideIsInWaterInferiors; - } - - public String[] getAfterIsInWaterSuperiors() - { - return afterIsInWaterSuperiors; - } - - public String[] getAfterIsInWaterInferiors() - { - return afterIsInWaterInferiors; - } - - public void setBeforeIsInWaterSuperiors(String[] value) - { - beforeIsInWaterSuperiors = value; - } - - public void setBeforeIsInWaterInferiors(String[] value) - { - beforeIsInWaterInferiors = value; - } - - public void setOverrideIsInWaterSuperiors(String[] value) - { - overrideIsInWaterSuperiors = value; - } - - public void setOverrideIsInWaterInferiors(String[] value) - { - overrideIsInWaterInferiors = value; - } - - public void setAfterIsInWaterSuperiors(String[] value) - { - afterIsInWaterSuperiors = value; - } - - public void setAfterIsInWaterInferiors(String[] value) - { - afterIsInWaterInferiors = value; - } - - public String[] getBeforeIsInsideOfMaterialSuperiors() - { - return beforeIsInsideOfMaterialSuperiors; - } - - public String[] getBeforeIsInsideOfMaterialInferiors() - { - return beforeIsInsideOfMaterialInferiors; - } - - public String[] getOverrideIsInsideOfMaterialSuperiors() - { - return overrideIsInsideOfMaterialSuperiors; - } - - public String[] getOverrideIsInsideOfMaterialInferiors() - { - return overrideIsInsideOfMaterialInferiors; - } - - public String[] getAfterIsInsideOfMaterialSuperiors() - { - return afterIsInsideOfMaterialSuperiors; - } - - public String[] getAfterIsInsideOfMaterialInferiors() - { - return afterIsInsideOfMaterialInferiors; - } - - public void setBeforeIsInsideOfMaterialSuperiors(String[] value) - { - beforeIsInsideOfMaterialSuperiors = value; - } - - public void setBeforeIsInsideOfMaterialInferiors(String[] value) - { - beforeIsInsideOfMaterialInferiors = value; - } - - public void setOverrideIsInsideOfMaterialSuperiors(String[] value) - { - overrideIsInsideOfMaterialSuperiors = value; - } - - public void setOverrideIsInsideOfMaterialInferiors(String[] value) - { - overrideIsInsideOfMaterialInferiors = value; - } - - public void setAfterIsInsideOfMaterialSuperiors(String[] value) - { - afterIsInsideOfMaterialSuperiors = value; - } - - public void setAfterIsInsideOfMaterialInferiors(String[] value) - { - afterIsInsideOfMaterialInferiors = value; - } - - public String[] getBeforeIsOnLadderSuperiors() - { - return beforeIsOnLadderSuperiors; - } - - public String[] getBeforeIsOnLadderInferiors() - { - return beforeIsOnLadderInferiors; - } - - public String[] getOverrideIsOnLadderSuperiors() - { - return overrideIsOnLadderSuperiors; - } - - public String[] getOverrideIsOnLadderInferiors() - { - return overrideIsOnLadderInferiors; - } - - public String[] getAfterIsOnLadderSuperiors() - { - return afterIsOnLadderSuperiors; - } - - public String[] getAfterIsOnLadderInferiors() - { - return afterIsOnLadderInferiors; - } - - public void setBeforeIsOnLadderSuperiors(String[] value) - { - beforeIsOnLadderSuperiors = value; - } - - public void setBeforeIsOnLadderInferiors(String[] value) - { - beforeIsOnLadderInferiors = value; - } - - public void setOverrideIsOnLadderSuperiors(String[] value) - { - overrideIsOnLadderSuperiors = value; - } - - public void setOverrideIsOnLadderInferiors(String[] value) - { - overrideIsOnLadderInferiors = value; - } - - public void setAfterIsOnLadderSuperiors(String[] value) - { - afterIsOnLadderSuperiors = value; - } - - public void setAfterIsOnLadderInferiors(String[] value) - { - afterIsOnLadderInferiors = value; - } - - public String[] getBeforeIsPlayerSleepingSuperiors() - { - return beforeIsPlayerSleepingSuperiors; - } - - public String[] getBeforeIsPlayerSleepingInferiors() - { - return beforeIsPlayerSleepingInferiors; - } - - public String[] getOverrideIsPlayerSleepingSuperiors() - { - return overrideIsPlayerSleepingSuperiors; - } - - public String[] getOverrideIsPlayerSleepingInferiors() - { - return overrideIsPlayerSleepingInferiors; - } - - public String[] getAfterIsPlayerSleepingSuperiors() - { - return afterIsPlayerSleepingSuperiors; - } - - public String[] getAfterIsPlayerSleepingInferiors() - { - return afterIsPlayerSleepingInferiors; - } - - public void setBeforeIsPlayerSleepingSuperiors(String[] value) - { - beforeIsPlayerSleepingSuperiors = value; - } - - public void setBeforeIsPlayerSleepingInferiors(String[] value) - { - beforeIsPlayerSleepingInferiors = value; - } - - public void setOverrideIsPlayerSleepingSuperiors(String[] value) - { - overrideIsPlayerSleepingSuperiors = value; - } - - public void setOverrideIsPlayerSleepingInferiors(String[] value) - { - overrideIsPlayerSleepingInferiors = value; - } - - public void setAfterIsPlayerSleepingSuperiors(String[] value) - { - afterIsPlayerSleepingSuperiors = value; - } - - public void setAfterIsPlayerSleepingInferiors(String[] value) - { - afterIsPlayerSleepingInferiors = value; - } - - public String[] getBeforeIsSneakingSuperiors() - { - return beforeIsSneakingSuperiors; - } - - public String[] getBeforeIsSneakingInferiors() - { - return beforeIsSneakingInferiors; - } - - public String[] getOverrideIsSneakingSuperiors() - { - return overrideIsSneakingSuperiors; - } - - public String[] getOverrideIsSneakingInferiors() - { - return overrideIsSneakingInferiors; - } - - public String[] getAfterIsSneakingSuperiors() - { - return afterIsSneakingSuperiors; - } - - public String[] getAfterIsSneakingInferiors() - { - return afterIsSneakingInferiors; - } - - public void setBeforeIsSneakingSuperiors(String[] value) - { - beforeIsSneakingSuperiors = value; - } - - public void setBeforeIsSneakingInferiors(String[] value) - { - beforeIsSneakingInferiors = value; - } - - public void setOverrideIsSneakingSuperiors(String[] value) - { - overrideIsSneakingSuperiors = value; - } - - public void setOverrideIsSneakingInferiors(String[] value) - { - overrideIsSneakingInferiors = value; - } - - public void setAfterIsSneakingSuperiors(String[] value) - { - afterIsSneakingSuperiors = value; - } - - public void setAfterIsSneakingInferiors(String[] value) - { - afterIsSneakingInferiors = value; - } - - public String[] getBeforeJumpSuperiors() - { - return beforeJumpSuperiors; - } - - public String[] getBeforeJumpInferiors() - { - return beforeJumpInferiors; - } - - public String[] getOverrideJumpSuperiors() - { - return overrideJumpSuperiors; - } - - public String[] getOverrideJumpInferiors() - { - return overrideJumpInferiors; - } - - public String[] getAfterJumpSuperiors() - { - return afterJumpSuperiors; - } - - public String[] getAfterJumpInferiors() - { - return afterJumpInferiors; - } - - public void setBeforeJumpSuperiors(String[] value) - { - beforeJumpSuperiors = value; - } - - public void setBeforeJumpInferiors(String[] value) - { - beforeJumpInferiors = value; - } - - public void setOverrideJumpSuperiors(String[] value) - { - overrideJumpSuperiors = value; - } - - public void setOverrideJumpInferiors(String[] value) - { - overrideJumpInferiors = value; - } - - public void setAfterJumpSuperiors(String[] value) - { - afterJumpSuperiors = value; - } - - public void setAfterJumpInferiors(String[] value) - { - afterJumpInferiors = value; - } - - public String[] getBeforeKnockBackSuperiors() - { - return beforeKnockBackSuperiors; - } - - public String[] getBeforeKnockBackInferiors() - { - return beforeKnockBackInferiors; - } - - public String[] getOverrideKnockBackSuperiors() - { - return overrideKnockBackSuperiors; - } - - public String[] getOverrideKnockBackInferiors() - { - return overrideKnockBackInferiors; - } - - public String[] getAfterKnockBackSuperiors() - { - return afterKnockBackSuperiors; - } - - public String[] getAfterKnockBackInferiors() - { - return afterKnockBackInferiors; - } - - public void setBeforeKnockBackSuperiors(String[] value) - { - beforeKnockBackSuperiors = value; - } - - public void setBeforeKnockBackInferiors(String[] value) - { - beforeKnockBackInferiors = value; - } - - public void setOverrideKnockBackSuperiors(String[] value) - { - overrideKnockBackSuperiors = value; - } - - public void setOverrideKnockBackInferiors(String[] value) - { - overrideKnockBackInferiors = value; - } - - public void setAfterKnockBackSuperiors(String[] value) - { - afterKnockBackSuperiors = value; - } - - public void setAfterKnockBackInferiors(String[] value) - { - afterKnockBackInferiors = value; - } - - public String[] getBeforeMountEntitySuperiors() - { - return beforeMountEntitySuperiors; - } - - public String[] getBeforeMountEntityInferiors() - { - return beforeMountEntityInferiors; - } - - public String[] getOverrideMountEntitySuperiors() - { - return overrideMountEntitySuperiors; - } - - public String[] getOverrideMountEntityInferiors() - { - return overrideMountEntityInferiors; - } - - public String[] getAfterMountEntitySuperiors() - { - return afterMountEntitySuperiors; - } - - public String[] getAfterMountEntityInferiors() - { - return afterMountEntityInferiors; - } - - public void setBeforeMountEntitySuperiors(String[] value) - { - beforeMountEntitySuperiors = value; - } - - public void setBeforeMountEntityInferiors(String[] value) - { - beforeMountEntityInferiors = value; - } - - public void setOverrideMountEntitySuperiors(String[] value) - { - overrideMountEntitySuperiors = value; - } - - public void setOverrideMountEntityInferiors(String[] value) - { - overrideMountEntityInferiors = value; - } - - public void setAfterMountEntitySuperiors(String[] value) - { - afterMountEntitySuperiors = value; - } - - public void setAfterMountEntityInferiors(String[] value) - { - afterMountEntityInferiors = value; - } - - public String[] getBeforeMoveEntitySuperiors() - { - return beforeMoveEntitySuperiors; - } - - public String[] getBeforeMoveEntityInferiors() - { - return beforeMoveEntityInferiors; - } - - public String[] getOverrideMoveEntitySuperiors() - { - return overrideMoveEntitySuperiors; - } - - public String[] getOverrideMoveEntityInferiors() - { - return overrideMoveEntityInferiors; - } - - public String[] getAfterMoveEntitySuperiors() - { - return afterMoveEntitySuperiors; - } - - public String[] getAfterMoveEntityInferiors() - { - return afterMoveEntityInferiors; - } - - public void setBeforeMoveEntitySuperiors(String[] value) - { - beforeMoveEntitySuperiors = value; - } - - public void setBeforeMoveEntityInferiors(String[] value) - { - beforeMoveEntityInferiors = value; - } - - public void setOverrideMoveEntitySuperiors(String[] value) - { - overrideMoveEntitySuperiors = value; - } - - public void setOverrideMoveEntityInferiors(String[] value) - { - overrideMoveEntityInferiors = value; - } - - public void setAfterMoveEntitySuperiors(String[] value) - { - afterMoveEntitySuperiors = value; - } - - public void setAfterMoveEntityInferiors(String[] value) - { - afterMoveEntityInferiors = value; - } - - public String[] getBeforeMoveEntityWithHeadingSuperiors() - { - return beforeMoveEntityWithHeadingSuperiors; - } - - public String[] getBeforeMoveEntityWithHeadingInferiors() - { - return beforeMoveEntityWithHeadingInferiors; - } - - public String[] getOverrideMoveEntityWithHeadingSuperiors() - { - return overrideMoveEntityWithHeadingSuperiors; - } - - public String[] getOverrideMoveEntityWithHeadingInferiors() - { - return overrideMoveEntityWithHeadingInferiors; - } - - public String[] getAfterMoveEntityWithHeadingSuperiors() - { - return afterMoveEntityWithHeadingSuperiors; - } - - public String[] getAfterMoveEntityWithHeadingInferiors() - { - return afterMoveEntityWithHeadingInferiors; - } - - public void setBeforeMoveEntityWithHeadingSuperiors(String[] value) - { - beforeMoveEntityWithHeadingSuperiors = value; - } - - public void setBeforeMoveEntityWithHeadingInferiors(String[] value) - { - beforeMoveEntityWithHeadingInferiors = value; - } - - public void setOverrideMoveEntityWithHeadingSuperiors(String[] value) - { - overrideMoveEntityWithHeadingSuperiors = value; - } - - public void setOverrideMoveEntityWithHeadingInferiors(String[] value) - { - overrideMoveEntityWithHeadingInferiors = value; - } - - public void setAfterMoveEntityWithHeadingSuperiors(String[] value) - { - afterMoveEntityWithHeadingSuperiors = value; - } - - public void setAfterMoveEntityWithHeadingInferiors(String[] value) - { - afterMoveEntityWithHeadingInferiors = value; - } - - public String[] getBeforeMoveFlyingSuperiors() - { - return beforeMoveFlyingSuperiors; - } - - public String[] getBeforeMoveFlyingInferiors() - { - return beforeMoveFlyingInferiors; - } - - public String[] getOverrideMoveFlyingSuperiors() - { - return overrideMoveFlyingSuperiors; - } - - public String[] getOverrideMoveFlyingInferiors() - { - return overrideMoveFlyingInferiors; - } - - public String[] getAfterMoveFlyingSuperiors() - { - return afterMoveFlyingSuperiors; - } - - public String[] getAfterMoveFlyingInferiors() - { - return afterMoveFlyingInferiors; - } - - public void setBeforeMoveFlyingSuperiors(String[] value) - { - beforeMoveFlyingSuperiors = value; - } - - public void setBeforeMoveFlyingInferiors(String[] value) - { - beforeMoveFlyingInferiors = value; - } - - public void setOverrideMoveFlyingSuperiors(String[] value) - { - overrideMoveFlyingSuperiors = value; - } - - public void setOverrideMoveFlyingInferiors(String[] value) - { - overrideMoveFlyingInferiors = value; - } - - public void setAfterMoveFlyingSuperiors(String[] value) - { - afterMoveFlyingSuperiors = value; - } - - public void setAfterMoveFlyingInferiors(String[] value) - { - afterMoveFlyingInferiors = value; - } - - public String[] getBeforeOnDeathSuperiors() - { - return beforeOnDeathSuperiors; - } - - public String[] getBeforeOnDeathInferiors() - { - return beforeOnDeathInferiors; - } - - public String[] getOverrideOnDeathSuperiors() - { - return overrideOnDeathSuperiors; - } - - public String[] getOverrideOnDeathInferiors() - { - return overrideOnDeathInferiors; - } - - public String[] getAfterOnDeathSuperiors() - { - return afterOnDeathSuperiors; - } - - public String[] getAfterOnDeathInferiors() - { - return afterOnDeathInferiors; - } - - public void setBeforeOnDeathSuperiors(String[] value) - { - beforeOnDeathSuperiors = value; - } - - public void setBeforeOnDeathInferiors(String[] value) - { - beforeOnDeathInferiors = value; - } - - public void setOverrideOnDeathSuperiors(String[] value) - { - overrideOnDeathSuperiors = value; - } - - public void setOverrideOnDeathInferiors(String[] value) - { - overrideOnDeathInferiors = value; - } - - public void setAfterOnDeathSuperiors(String[] value) - { - afterOnDeathSuperiors = value; - } - - public void setAfterOnDeathInferiors(String[] value) - { - afterOnDeathInferiors = value; - } - - public String[] getBeforeOnLivingUpdateSuperiors() - { - return beforeOnLivingUpdateSuperiors; - } - - public String[] getBeforeOnLivingUpdateInferiors() - { - return beforeOnLivingUpdateInferiors; - } - - public String[] getOverrideOnLivingUpdateSuperiors() - { - return overrideOnLivingUpdateSuperiors; - } - - public String[] getOverrideOnLivingUpdateInferiors() - { - return overrideOnLivingUpdateInferiors; - } - - public String[] getAfterOnLivingUpdateSuperiors() - { - return afterOnLivingUpdateSuperiors; - } - - public String[] getAfterOnLivingUpdateInferiors() - { - return afterOnLivingUpdateInferiors; - } - - public void setBeforeOnLivingUpdateSuperiors(String[] value) - { - beforeOnLivingUpdateSuperiors = value; - } - - public void setBeforeOnLivingUpdateInferiors(String[] value) - { - beforeOnLivingUpdateInferiors = value; - } - - public void setOverrideOnLivingUpdateSuperiors(String[] value) - { - overrideOnLivingUpdateSuperiors = value; - } - - public void setOverrideOnLivingUpdateInferiors(String[] value) - { - overrideOnLivingUpdateInferiors = value; - } - - public void setAfterOnLivingUpdateSuperiors(String[] value) - { - afterOnLivingUpdateSuperiors = value; - } - - public void setAfterOnLivingUpdateInferiors(String[] value) - { - afterOnLivingUpdateInferiors = value; - } - - public String[] getBeforeOnKillEntitySuperiors() - { - return beforeOnKillEntitySuperiors; - } - - public String[] getBeforeOnKillEntityInferiors() - { - return beforeOnKillEntityInferiors; - } - - public String[] getOverrideOnKillEntitySuperiors() - { - return overrideOnKillEntitySuperiors; - } - - public String[] getOverrideOnKillEntityInferiors() - { - return overrideOnKillEntityInferiors; - } - - public String[] getAfterOnKillEntitySuperiors() - { - return afterOnKillEntitySuperiors; - } - - public String[] getAfterOnKillEntityInferiors() - { - return afterOnKillEntityInferiors; - } - - public void setBeforeOnKillEntitySuperiors(String[] value) - { - beforeOnKillEntitySuperiors = value; - } - - public void setBeforeOnKillEntityInferiors(String[] value) - { - beforeOnKillEntityInferiors = value; - } - - public void setOverrideOnKillEntitySuperiors(String[] value) - { - overrideOnKillEntitySuperiors = value; - } - - public void setOverrideOnKillEntityInferiors(String[] value) - { - overrideOnKillEntityInferiors = value; - } - - public void setAfterOnKillEntitySuperiors(String[] value) - { - afterOnKillEntitySuperiors = value; - } - - public void setAfterOnKillEntityInferiors(String[] value) - { - afterOnKillEntityInferiors = value; - } - - public String[] getBeforeOnStruckByLightningSuperiors() - { - return beforeOnStruckByLightningSuperiors; - } - - public String[] getBeforeOnStruckByLightningInferiors() - { - return beforeOnStruckByLightningInferiors; - } - - public String[] getOverrideOnStruckByLightningSuperiors() - { - return overrideOnStruckByLightningSuperiors; - } - - public String[] getOverrideOnStruckByLightningInferiors() - { - return overrideOnStruckByLightningInferiors; - } - - public String[] getAfterOnStruckByLightningSuperiors() - { - return afterOnStruckByLightningSuperiors; - } - - public String[] getAfterOnStruckByLightningInferiors() - { - return afterOnStruckByLightningInferiors; - } - - public void setBeforeOnStruckByLightningSuperiors(String[] value) - { - beforeOnStruckByLightningSuperiors = value; - } - - public void setBeforeOnStruckByLightningInferiors(String[] value) - { - beforeOnStruckByLightningInferiors = value; - } - - public void setOverrideOnStruckByLightningSuperiors(String[] value) - { - overrideOnStruckByLightningSuperiors = value; - } - - public void setOverrideOnStruckByLightningInferiors(String[] value) - { - overrideOnStruckByLightningInferiors = value; - } - - public void setAfterOnStruckByLightningSuperiors(String[] value) - { - afterOnStruckByLightningSuperiors = value; - } - - public void setAfterOnStruckByLightningInferiors(String[] value) - { - afterOnStruckByLightningInferiors = value; - } - - public String[] getBeforeOnUpdateSuperiors() - { - return beforeOnUpdateSuperiors; - } - - public String[] getBeforeOnUpdateInferiors() - { - return beforeOnUpdateInferiors; - } - - public String[] getOverrideOnUpdateSuperiors() - { - return overrideOnUpdateSuperiors; - } - - public String[] getOverrideOnUpdateInferiors() - { - return overrideOnUpdateInferiors; - } - - public String[] getAfterOnUpdateSuperiors() - { - return afterOnUpdateSuperiors; - } - - public String[] getAfterOnUpdateInferiors() - { - return afterOnUpdateInferiors; - } - - public void setBeforeOnUpdateSuperiors(String[] value) - { - beforeOnUpdateSuperiors = value; - } - - public void setBeforeOnUpdateInferiors(String[] value) - { - beforeOnUpdateInferiors = value; - } - - public void setOverrideOnUpdateSuperiors(String[] value) - { - overrideOnUpdateSuperiors = value; - } - - public void setOverrideOnUpdateInferiors(String[] value) - { - overrideOnUpdateInferiors = value; - } - - public void setAfterOnUpdateSuperiors(String[] value) - { - afterOnUpdateSuperiors = value; - } - - public void setAfterOnUpdateInferiors(String[] value) - { - afterOnUpdateInferiors = value; - } - - public String[] getBeforeOnUpdateEntitySuperiors() - { - return beforeOnUpdateEntitySuperiors; - } - - public String[] getBeforeOnUpdateEntityInferiors() - { - return beforeOnUpdateEntityInferiors; - } - - public String[] getOverrideOnUpdateEntitySuperiors() - { - return overrideOnUpdateEntitySuperiors; - } - - public String[] getOverrideOnUpdateEntityInferiors() - { - return overrideOnUpdateEntityInferiors; - } - - public String[] getAfterOnUpdateEntitySuperiors() - { - return afterOnUpdateEntitySuperiors; - } - - public String[] getAfterOnUpdateEntityInferiors() - { - return afterOnUpdateEntityInferiors; - } - - public void setBeforeOnUpdateEntitySuperiors(String[] value) - { - beforeOnUpdateEntitySuperiors = value; - } - - public void setBeforeOnUpdateEntityInferiors(String[] value) - { - beforeOnUpdateEntityInferiors = value; - } - - public void setOverrideOnUpdateEntitySuperiors(String[] value) - { - overrideOnUpdateEntitySuperiors = value; - } - - public void setOverrideOnUpdateEntityInferiors(String[] value) - { - overrideOnUpdateEntityInferiors = value; - } - - public void setAfterOnUpdateEntitySuperiors(String[] value) - { - afterOnUpdateEntitySuperiors = value; - } - - public void setAfterOnUpdateEntityInferiors(String[] value) - { - afterOnUpdateEntityInferiors = value; - } - - public String[] getBeforeReadEntityFromNBTSuperiors() - { - return beforeReadEntityFromNBTSuperiors; - } - - public String[] getBeforeReadEntityFromNBTInferiors() - { - return beforeReadEntityFromNBTInferiors; - } - - public String[] getOverrideReadEntityFromNBTSuperiors() - { - return overrideReadEntityFromNBTSuperiors; - } - - public String[] getOverrideReadEntityFromNBTInferiors() - { - return overrideReadEntityFromNBTInferiors; - } - - public String[] getAfterReadEntityFromNBTSuperiors() - { - return afterReadEntityFromNBTSuperiors; - } - - public String[] getAfterReadEntityFromNBTInferiors() - { - return afterReadEntityFromNBTInferiors; - } - - public void setBeforeReadEntityFromNBTSuperiors(String[] value) - { - beforeReadEntityFromNBTSuperiors = value; - } - - public void setBeforeReadEntityFromNBTInferiors(String[] value) - { - beforeReadEntityFromNBTInferiors = value; - } - - public void setOverrideReadEntityFromNBTSuperiors(String[] value) - { - overrideReadEntityFromNBTSuperiors = value; - } - - public void setOverrideReadEntityFromNBTInferiors(String[] value) - { - overrideReadEntityFromNBTInferiors = value; - } - - public void setAfterReadEntityFromNBTSuperiors(String[] value) - { - afterReadEntityFromNBTSuperiors = value; - } - - public void setAfterReadEntityFromNBTInferiors(String[] value) - { - afterReadEntityFromNBTInferiors = value; - } - - public String[] getBeforeSetDeadSuperiors() - { - return beforeSetDeadSuperiors; - } - - public String[] getBeforeSetDeadInferiors() - { - return beforeSetDeadInferiors; - } - - public String[] getOverrideSetDeadSuperiors() - { - return overrideSetDeadSuperiors; - } - - public String[] getOverrideSetDeadInferiors() - { - return overrideSetDeadInferiors; - } - - public String[] getAfterSetDeadSuperiors() - { - return afterSetDeadSuperiors; - } - - public String[] getAfterSetDeadInferiors() - { - return afterSetDeadInferiors; - } - - public void setBeforeSetDeadSuperiors(String[] value) - { - beforeSetDeadSuperiors = value; - } - - public void setBeforeSetDeadInferiors(String[] value) - { - beforeSetDeadInferiors = value; - } - - public void setOverrideSetDeadSuperiors(String[] value) - { - overrideSetDeadSuperiors = value; - } - - public void setOverrideSetDeadInferiors(String[] value) - { - overrideSetDeadInferiors = value; - } - - public void setAfterSetDeadSuperiors(String[] value) - { - afterSetDeadSuperiors = value; - } - - public void setAfterSetDeadInferiors(String[] value) - { - afterSetDeadInferiors = value; - } - - public String[] getBeforeSetEntityActionStateSuperiors() - { - return beforeSetEntityActionStateSuperiors; - } - - public String[] getBeforeSetEntityActionStateInferiors() - { - return beforeSetEntityActionStateInferiors; - } - - public String[] getOverrideSetEntityActionStateSuperiors() - { - return overrideSetEntityActionStateSuperiors; - } - - public String[] getOverrideSetEntityActionStateInferiors() - { - return overrideSetEntityActionStateInferiors; - } - - public String[] getAfterSetEntityActionStateSuperiors() - { - return afterSetEntityActionStateSuperiors; - } - - public String[] getAfterSetEntityActionStateInferiors() - { - return afterSetEntityActionStateInferiors; - } - - public void setBeforeSetEntityActionStateSuperiors(String[] value) - { - beforeSetEntityActionStateSuperiors = value; - } - - public void setBeforeSetEntityActionStateInferiors(String[] value) - { - beforeSetEntityActionStateInferiors = value; - } - - public void setOverrideSetEntityActionStateSuperiors(String[] value) - { - overrideSetEntityActionStateSuperiors = value; - } - - public void setOverrideSetEntityActionStateInferiors(String[] value) - { - overrideSetEntityActionStateInferiors = value; - } - - public void setAfterSetEntityActionStateSuperiors(String[] value) - { - afterSetEntityActionStateSuperiors = value; - } - - public void setAfterSetEntityActionStateInferiors(String[] value) - { - afterSetEntityActionStateInferiors = value; - } - - public String[] getBeforeSetPositionSuperiors() - { - return beforeSetPositionSuperiors; - } - - public String[] getBeforeSetPositionInferiors() - { - return beforeSetPositionInferiors; - } - - public String[] getOverrideSetPositionSuperiors() - { - return overrideSetPositionSuperiors; - } - - public String[] getOverrideSetPositionInferiors() - { - return overrideSetPositionInferiors; - } - - public String[] getAfterSetPositionSuperiors() - { - return afterSetPositionSuperiors; - } - - public String[] getAfterSetPositionInferiors() - { - return afterSetPositionInferiors; - } - - public void setBeforeSetPositionSuperiors(String[] value) - { - beforeSetPositionSuperiors = value; - } - - public void setBeforeSetPositionInferiors(String[] value) - { - beforeSetPositionInferiors = value; - } - - public void setOverrideSetPositionSuperiors(String[] value) - { - overrideSetPositionSuperiors = value; - } - - public void setOverrideSetPositionInferiors(String[] value) - { - overrideSetPositionInferiors = value; - } - - public void setAfterSetPositionSuperiors(String[] value) - { - afterSetPositionSuperiors = value; - } - - public void setAfterSetPositionInferiors(String[] value) - { - afterSetPositionInferiors = value; - } - - public String[] getBeforeSetSneakingSuperiors() - { - return beforeSetSneakingSuperiors; - } - - public String[] getBeforeSetSneakingInferiors() - { - return beforeSetSneakingInferiors; - } - - public String[] getOverrideSetSneakingSuperiors() - { - return overrideSetSneakingSuperiors; - } - - public String[] getOverrideSetSneakingInferiors() - { - return overrideSetSneakingInferiors; - } - - public String[] getAfterSetSneakingSuperiors() - { - return afterSetSneakingSuperiors; - } - - public String[] getAfterSetSneakingInferiors() - { - return afterSetSneakingInferiors; - } - - public void setBeforeSetSneakingSuperiors(String[] value) - { - beforeSetSneakingSuperiors = value; - } - - public void setBeforeSetSneakingInferiors(String[] value) - { - beforeSetSneakingInferiors = value; - } - - public void setOverrideSetSneakingSuperiors(String[] value) - { - overrideSetSneakingSuperiors = value; - } - - public void setOverrideSetSneakingInferiors(String[] value) - { - overrideSetSneakingInferiors = value; - } - - public void setAfterSetSneakingSuperiors(String[] value) - { - afterSetSneakingSuperiors = value; - } - - public void setAfterSetSneakingInferiors(String[] value) - { - afterSetSneakingInferiors = value; - } - - public String[] getBeforeSetSprintingSuperiors() - { - return beforeSetSprintingSuperiors; - } - - public String[] getBeforeSetSprintingInferiors() - { - return beforeSetSprintingInferiors; - } - - public String[] getOverrideSetSprintingSuperiors() - { - return overrideSetSprintingSuperiors; - } - - public String[] getOverrideSetSprintingInferiors() - { - return overrideSetSprintingInferiors; - } - - public String[] getAfterSetSprintingSuperiors() - { - return afterSetSprintingSuperiors; - } - - public String[] getAfterSetSprintingInferiors() - { - return afterSetSprintingInferiors; - } - - public void setBeforeSetSprintingSuperiors(String[] value) - { - beforeSetSprintingSuperiors = value; - } - - public void setBeforeSetSprintingInferiors(String[] value) - { - beforeSetSprintingInferiors = value; - } - - public void setOverrideSetSprintingSuperiors(String[] value) - { - overrideSetSprintingSuperiors = value; - } - - public void setOverrideSetSprintingInferiors(String[] value) - { - overrideSetSprintingInferiors = value; - } - - public void setAfterSetSprintingSuperiors(String[] value) - { - afterSetSprintingSuperiors = value; - } - - public void setAfterSetSprintingInferiors(String[] value) - { - afterSetSprintingInferiors = value; - } - - public String[] getBeforeSwingItemSuperiors() - { - return beforeSwingItemSuperiors; - } - - public String[] getBeforeSwingItemInferiors() - { - return beforeSwingItemInferiors; - } - - public String[] getOverrideSwingItemSuperiors() - { - return overrideSwingItemSuperiors; - } - - public String[] getOverrideSwingItemInferiors() - { - return overrideSwingItemInferiors; - } - - public String[] getAfterSwingItemSuperiors() - { - return afterSwingItemSuperiors; - } - - public String[] getAfterSwingItemInferiors() - { - return afterSwingItemInferiors; - } - - public void setBeforeSwingItemSuperiors(String[] value) - { - beforeSwingItemSuperiors = value; - } - - public void setBeforeSwingItemInferiors(String[] value) - { - beforeSwingItemInferiors = value; - } - - public void setOverrideSwingItemSuperiors(String[] value) - { - overrideSwingItemSuperiors = value; - } - - public void setOverrideSwingItemInferiors(String[] value) - { - overrideSwingItemInferiors = value; - } - - public void setAfterSwingItemSuperiors(String[] value) - { - afterSwingItemSuperiors = value; - } - - public void setAfterSwingItemInferiors(String[] value) - { - afterSwingItemInferiors = value; - } - - public String[] getBeforeUpdateEntityActionStateSuperiors() - { - return beforeUpdateEntityActionStateSuperiors; - } - - public String[] getBeforeUpdateEntityActionStateInferiors() - { - return beforeUpdateEntityActionStateInferiors; - } - - public String[] getOverrideUpdateEntityActionStateSuperiors() - { - return overrideUpdateEntityActionStateSuperiors; - } - - public String[] getOverrideUpdateEntityActionStateInferiors() - { - return overrideUpdateEntityActionStateInferiors; - } - - public String[] getAfterUpdateEntityActionStateSuperiors() - { - return afterUpdateEntityActionStateSuperiors; - } - - public String[] getAfterUpdateEntityActionStateInferiors() - { - return afterUpdateEntityActionStateInferiors; - } - - public void setBeforeUpdateEntityActionStateSuperiors(String[] value) - { - beforeUpdateEntityActionStateSuperiors = value; - } - - public void setBeforeUpdateEntityActionStateInferiors(String[] value) - { - beforeUpdateEntityActionStateInferiors = value; - } - - public void setOverrideUpdateEntityActionStateSuperiors(String[] value) - { - overrideUpdateEntityActionStateSuperiors = value; - } - - public void setOverrideUpdateEntityActionStateInferiors(String[] value) - { - overrideUpdateEntityActionStateInferiors = value; - } - - public void setAfterUpdateEntityActionStateSuperiors(String[] value) - { - afterUpdateEntityActionStateSuperiors = value; - } - - public void setAfterUpdateEntityActionStateInferiors(String[] value) - { - afterUpdateEntityActionStateInferiors = value; - } - - public String[] getBeforeUpdatePotionEffectsSuperiors() - { - return beforeUpdatePotionEffectsSuperiors; - } - - public String[] getBeforeUpdatePotionEffectsInferiors() - { - return beforeUpdatePotionEffectsInferiors; - } - - public String[] getOverrideUpdatePotionEffectsSuperiors() - { - return overrideUpdatePotionEffectsSuperiors; - } - - public String[] getOverrideUpdatePotionEffectsInferiors() - { - return overrideUpdatePotionEffectsInferiors; - } - - public String[] getAfterUpdatePotionEffectsSuperiors() - { - return afterUpdatePotionEffectsSuperiors; - } - - public String[] getAfterUpdatePotionEffectsInferiors() - { - return afterUpdatePotionEffectsInferiors; - } - - public void setBeforeUpdatePotionEffectsSuperiors(String[] value) - { - beforeUpdatePotionEffectsSuperiors = value; - } - - public void setBeforeUpdatePotionEffectsInferiors(String[] value) - { - beforeUpdatePotionEffectsInferiors = value; - } - - public void setOverrideUpdatePotionEffectsSuperiors(String[] value) - { - overrideUpdatePotionEffectsSuperiors = value; - } - - public void setOverrideUpdatePotionEffectsInferiors(String[] value) - { - overrideUpdatePotionEffectsInferiors = value; - } - - public void setAfterUpdatePotionEffectsSuperiors(String[] value) - { - afterUpdatePotionEffectsSuperiors = value; - } - - public void setAfterUpdatePotionEffectsInferiors(String[] value) - { - afterUpdatePotionEffectsInferiors = value; - } - - public String[] getBeforeUpdateRiddenSuperiors() - { - return beforeUpdateRiddenSuperiors; - } - - public String[] getBeforeUpdateRiddenInferiors() - { - return beforeUpdateRiddenInferiors; - } - - public String[] getOverrideUpdateRiddenSuperiors() - { - return overrideUpdateRiddenSuperiors; - } - - public String[] getOverrideUpdateRiddenInferiors() - { - return overrideUpdateRiddenInferiors; - } - - public String[] getAfterUpdateRiddenSuperiors() - { - return afterUpdateRiddenSuperiors; - } - - public String[] getAfterUpdateRiddenInferiors() - { - return afterUpdateRiddenInferiors; - } - - public void setBeforeUpdateRiddenSuperiors(String[] value) - { - beforeUpdateRiddenSuperiors = value; - } - - public void setBeforeUpdateRiddenInferiors(String[] value) - { - beforeUpdateRiddenInferiors = value; - } - - public void setOverrideUpdateRiddenSuperiors(String[] value) - { - overrideUpdateRiddenSuperiors = value; - } - - public void setOverrideUpdateRiddenInferiors(String[] value) - { - overrideUpdateRiddenInferiors = value; - } - - public void setAfterUpdateRiddenSuperiors(String[] value) - { - afterUpdateRiddenSuperiors = value; - } - - public void setAfterUpdateRiddenInferiors(String[] value) - { - afterUpdateRiddenInferiors = value; - } - - public String[] getBeforeWakeUpPlayerSuperiors() - { - return beforeWakeUpPlayerSuperiors; - } - - public String[] getBeforeWakeUpPlayerInferiors() - { - return beforeWakeUpPlayerInferiors; - } - - public String[] getOverrideWakeUpPlayerSuperiors() - { - return overrideWakeUpPlayerSuperiors; - } - - public String[] getOverrideWakeUpPlayerInferiors() - { - return overrideWakeUpPlayerInferiors; - } - - public String[] getAfterWakeUpPlayerSuperiors() - { - return afterWakeUpPlayerSuperiors; - } - - public String[] getAfterWakeUpPlayerInferiors() - { - return afterWakeUpPlayerInferiors; - } - - public void setBeforeWakeUpPlayerSuperiors(String[] value) - { - beforeWakeUpPlayerSuperiors = value; - } - - public void setBeforeWakeUpPlayerInferiors(String[] value) - { - beforeWakeUpPlayerInferiors = value; - } - - public void setOverrideWakeUpPlayerSuperiors(String[] value) - { - overrideWakeUpPlayerSuperiors = value; - } - - public void setOverrideWakeUpPlayerInferiors(String[] value) - { - overrideWakeUpPlayerInferiors = value; - } - - public void setAfterWakeUpPlayerSuperiors(String[] value) - { - afterWakeUpPlayerSuperiors = value; - } - - public void setAfterWakeUpPlayerInferiors(String[] value) - { - afterWakeUpPlayerInferiors = value; - } - - public String[] getBeforeWriteEntityToNBTSuperiors() - { - return beforeWriteEntityToNBTSuperiors; - } - - public String[] getBeforeWriteEntityToNBTInferiors() - { - return beforeWriteEntityToNBTInferiors; - } - - public String[] getOverrideWriteEntityToNBTSuperiors() - { - return overrideWriteEntityToNBTSuperiors; - } - - public String[] getOverrideWriteEntityToNBTInferiors() - { - return overrideWriteEntityToNBTInferiors; - } - - public String[] getAfterWriteEntityToNBTSuperiors() - { - return afterWriteEntityToNBTSuperiors; - } - - public String[] getAfterWriteEntityToNBTInferiors() - { - return afterWriteEntityToNBTInferiors; - } - - public void setBeforeWriteEntityToNBTSuperiors(String[] value) - { - beforeWriteEntityToNBTSuperiors = value; - } - - public void setBeforeWriteEntityToNBTInferiors(String[] value) - { - beforeWriteEntityToNBTInferiors = value; - } - - public void setOverrideWriteEntityToNBTSuperiors(String[] value) - { - overrideWriteEntityToNBTSuperiors = value; - } - - public void setOverrideWriteEntityToNBTInferiors(String[] value) - { - overrideWriteEntityToNBTInferiors = value; - } - - public void setAfterWriteEntityToNBTSuperiors(String[] value) - { - afterWriteEntityToNBTSuperiors = value; - } - - public void setAfterWriteEntityToNBTInferiors(String[] value) - { - afterWriteEntityToNBTInferiors = value; - } - -} diff --git a/src/main/java/api/player/server/ServerPlayerClassVisitor.java b/src/main/java/api/player/server/ServerPlayerClassVisitor.java deleted file mode 100644 index 30581106..00000000 --- a/src/main/java/api/player/server/ServerPlayerClassVisitor.java +++ /dev/null @@ -1,4856 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -import java.io.*; - -import org.objectweb.asm.*; - -public final class ServerPlayerClassVisitor extends ClassVisitor -{ - public static final String targetClassName = "net.minecraft.entity.player.EntityPlayerMP"; - - private boolean hadLocalAddExhaustion; - private boolean hadLocalAddExperience; - private boolean hadLocalAddExperienceLevel; - private boolean hadLocalAddMovementStat; - private boolean hadLocalAttackEntityFrom; - private boolean hadLocalAttackTargetEntityWithCurrentItem; - private boolean hadLocalCanBreatheUnderwater; - private boolean hadLocalCanHarvestBlock; - private boolean hadLocalCanPlayerEdit; - private boolean hadLocalCanTriggerWalking; - private boolean hadLocalClonePlayer; - private boolean hadLocalDamageEntity; - private boolean hadLocalDisplayGUIChest; - private boolean hadLocalDisplayGUIDispenser; - private boolean hadLocalDisplayGUIFurnace; - private boolean hadLocalDisplayGUIWorkbench; - private boolean hadLocalDropOneItem; - private boolean hadLocalDropPlayerItem; - private boolean hadLocalFall; - private boolean hadLocalGetAIMoveSpeed; - private boolean hadLocalGetCurrentPlayerStrVsBlock; - private boolean hadLocalGetCurrentPlayerStrVsBlockForge; - private boolean hadLocalGetDistanceSq; - private boolean hadLocalGetBrightness; - private boolean hadLocalGetEyeHeight; - private boolean hadLocalHeal; - private boolean hadLocalIsEntityInsideOpaqueBlock; - private boolean hadLocalIsInWater; - private boolean hadLocalIsInsideOfMaterial; - private boolean hadLocalIsOnLadder; - private boolean hadLocalIsPlayerSleeping; - private boolean hadLocalIsSneaking; - private boolean hadLocalJump; - private boolean hadLocalKnockBack; - private boolean hadLocalMountEntity; - private boolean hadLocalMoveEntity; - private boolean hadLocalMoveEntityWithHeading; - private boolean hadLocalMoveFlying; - private boolean hadLocalOnDeath; - private boolean hadLocalOnLivingUpdate; - private boolean hadLocalOnKillEntity; - private boolean hadLocalOnStruckByLightning; - private boolean hadLocalOnUpdate; - private boolean hadLocalOnUpdateEntity; - private boolean hadLocalReadEntityFromNBT; - private boolean hadLocalSetDead; - private boolean hadLocalSetEntityActionState; - private boolean hadLocalSetPosition; - private boolean hadLocalSetSneaking; - private boolean hadLocalSetSprinting; - private boolean hadLocalSwingItem; - private boolean hadLocalUpdateEntityActionState; - private boolean hadLocalUpdatePotionEffects; - private boolean hadLocalUpdateRidden; - private boolean hadLocalWakeUpPlayer; - private boolean hadLocalWriteEntityToNBT; - - public static byte[] transform(byte[] bytes, boolean isObfuscated) - { - try - { - ByteArrayInputStream in = new ByteArrayInputStream(bytes); - ClassReader cr = new ClassReader(in); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - ServerPlayerClassVisitor p = new ServerPlayerClassVisitor(cw, isObfuscated); - - cr.accept(p, 0); - - byte[] result = cw.toByteArray(); - in.close(); - return result; - } - catch(IOException ioe) - { - throw new RuntimeException(ioe); - } - } - - private final boolean isObfuscated; - - public ServerPlayerClassVisitor(ClassVisitor classVisitor, boolean isObfuscated) - { - super(262144, classVisitor); - this.isObfuscated = isObfuscated; - } - - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - { - String[] newInterfaces = new String[interfaces.length + 1]; - for(int i=0; i")) - return new ServerPlayerConstructorVisitor(super.visitMethod(access, name, desc, signature, exceptions), isObfuscated); - - if(name.equals(isObfuscated ? "a" : "addExhaustion") && desc.equals("(F)V")) - { - hadLocalAddExhaustion = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExhaustion", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "v" : "addExperience") && desc.equals("(I)V")) - { - hadLocalAddExperience = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExperience", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "addExperienceLevel") && desc.equals("(I)V")) - { - hadLocalAddExperienceLevel = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExperienceLevel", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "k" : "addMovementStat") && desc.equals("(DDD)V")) - { - hadLocalAddMovementStat = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddMovementStat", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "attackEntityFrom") && desc.equals(isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z")) - { - hadLocalAttackEntityFrom = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackEntityFrom", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "r" : "attackEntityPlayerMPEntityWithCurrentItem") && desc.equals(isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V")) - { - hadLocalAttackTargetEntityWithCurrentItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackTargetEntityWithCurrentItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aE" : "canBreatheUnderwater") && desc.equals("()Z")) - { - hadLocalCanBreatheUnderwater = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanBreatheUnderwater", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "canHarvestBlock") && desc.equals(isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z")) - { - hadLocalCanHarvestBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanHarvestBlock", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "canPlayerEdit") && desc.equals(isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z")) - { - hadLocalCanPlayerEdit = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanPlayerEdit", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "g_" : "canTriggerWalking") && desc.equals("()Z")) - { - hadLocalCanTriggerWalking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanTriggerWalking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "clonePlayer") && desc.equals(isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V")) - { - hadLocalClonePlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localClonePlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "damageEntity") && desc.equals(isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V")) - { - hadLocalDamageEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDamageEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "displayGUIChest") && desc.equals(isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V")) - { - hadLocalDisplayGUIChest = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIChest", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146102_a") && desc.equals(isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V")) - { - hadLocalDisplayGUIDispenser = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIDispenser", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "func_146101_a") && desc.equals(isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V")) - { - hadLocalDisplayGUIFurnace = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIFurnace", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "displayGUIWorkbench") && desc.equals("(III)V")) - { - hadLocalDisplayGUIWorkbench = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIWorkbench", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "dropOneItem") && desc.equals(isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;")) - { - hadLocalDropOneItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropOneItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "dropPlayerItemWithRandomChoice") && desc.equals(isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;")) - { - hadLocalDropPlayerItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "fall") && desc.equals("(F)V")) - { - hadLocalFall = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localFall", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bl" : "getAIMoveSpeed") && desc.equals("()F")) - { - hadLocalGetAIMoveSpeed = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetAIMoveSpeed", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "getCurrentPlayerStrVsBlock") && desc.equals(isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F")) - { - hadLocalGetCurrentPlayerStrVsBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlock", desc, signature, exceptions); - } - - if(name.equals("getBreakSpeed") && desc.equals(isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F")) - { - hadLocalGetCurrentPlayerStrVsBlockForge = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlockForge", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "getDistanceSq") && desc.equals("(DDD)D")) - { - hadLocalGetDistanceSq = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSq", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "getBrightness") && desc.equals("(F)F")) - { - hadLocalGetBrightness = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightness", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "g" : "getEyeHeight") && desc.equals("()F")) - { - hadLocalGetEyeHeight = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetEyeHeight", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "f" : "heal") && desc.equals("(F)V")) - { - hadLocalHeal = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHeal", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aa" : "isEntityInsideOpaqueBlock") && desc.equals("()Z")) - { - hadLocalIsEntityInsideOpaqueBlock = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsEntityInsideOpaqueBlock", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "M" : "isInWater") && desc.equals("()Z")) - { - hadLocalIsInWater = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInWater", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "isInsideOfMaterial") && desc.equals(isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z")) - { - hadLocalIsInsideOfMaterial = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInsideOfMaterial", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "h_" : "isOnLadder") && desc.equals("()Z")) - { - hadLocalIsOnLadder = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsOnLadder", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bm" : "isPlayerSleeping") && desc.equals("()Z")) - { - hadLocalIsPlayerSleeping = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsPlayerSleeping", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "an" : "isSneaking") && desc.equals("()Z")) - { - hadLocalIsSneaking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSneaking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bj" : "jump") && desc.equals("()V")) - { - hadLocalJump = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localJump", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "knockBack") && desc.equals(isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V")) - { - hadLocalKnockBack = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localKnockBack", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "mountEntity") && desc.equals(isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V")) - { - hadLocalMountEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMountEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "d" : "moveEntity") && desc.equals("(DDD)V")) - { - hadLocalMoveEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "moveEntityWithHeading") && desc.equals("(FF)V")) - { - hadLocalMoveEntityWithHeading = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntityWithHeading", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "moveFlying") && desc.equals("(FFF)V")) - { - hadLocalMoveFlying = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveFlying", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onDeath") && desc.equals(isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V")) - { - hadLocalOnDeath = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnDeath", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "e" : "onLivingUpdate") && desc.equals("()V")) - { - hadLocalOnLivingUpdate = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnLivingUpdate", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onKillEntity") && desc.equals(isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V")) - { - hadLocalOnKillEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnKillEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "onStruckByLightning") && desc.equals(isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V")) - { - hadLocalOnStruckByLightning = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnStruckByLightning", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "h" : "onUpdate") && desc.equals("()V")) - { - hadLocalOnUpdate = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdate", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "i" : "onUpdateEntity") && desc.equals("()V")) - { - hadLocalOnUpdateEntity = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdateEntity", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "readEntityFromNBT") && desc.equals(isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V")) - { - hadLocalReadEntityFromNBT = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localReadEntityFromNBT", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "B" : "setDead") && desc.equals("()V")) - { - hadLocalSetDead = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetDead", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "setEntityActionState") && desc.equals("(FFZZ)V")) - { - hadLocalSetEntityActionState = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetEntityActionState", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "setPosition") && desc.equals("(DDD)V")) - { - hadLocalSetPosition = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPosition", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "setSneaking") && desc.equals("(Z)V")) - { - hadLocalSetSneaking = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSneaking", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "c" : "setSprinting") && desc.equals("(Z)V")) - { - hadLocalSetSprinting = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSprinting", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "ba" : "swingItem") && desc.equals("()V")) - { - hadLocalSwingItem = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSwingItem", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "bq" : "updateEntityActionState") && desc.equals("()V")) - { - hadLocalUpdateEntityActionState = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateEntityActionState", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "aO" : "updatePotionEffects") && desc.equals("()V")) - { - hadLocalUpdatePotionEffects = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdatePotionEffects", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "ab" : "updateRidden") && desc.equals("()V")) - { - hadLocalUpdateRidden = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateRidden", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "a" : "wakeUpPlayer") && desc.equals("(ZZZ)V")) - { - hadLocalWakeUpPlayer = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWakeUpPlayer", desc, signature, exceptions); - } - - if(name.equals(isObfuscated ? "b" : "writeEntityToNBT") && desc.equals(isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V")) - { - hadLocalWriteEntityToNBT = true; - return super.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWriteEntityToNBT", desc, signature, exceptions); - } - - return super.visitMethod(access, name, desc, signature, exceptions); - } - - public void visitEnd() - { - MethodVisitor mv; - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "addExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "addExhaustion", "(Lapi/player/server/IServerPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddExhaustion) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExhaustion", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "addExhaustion", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "v" : "addExperience", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "addExperience", "(Lapi/player/server/IServerPlayerAPI;I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddExperience", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "v" : "addExperience", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddExperience", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "v" : "addExperience", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddExperience) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExperience", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "v" : "addExperience", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "addExperienceLevel", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "addExperienceLevel", "(Lapi/player/server/IServerPlayerAPI;I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddExperienceLevel", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "addExperienceLevel", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddExperienceLevel", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "addExperienceLevel", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddExperienceLevel) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddExperienceLevel", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "addExperienceLevel", "(I)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "k" : "addMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "addMovementStat", "(Lapi/player/server/IServerPlayerAPI;DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAddMovementStat) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAddMovementStat", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "k" : "addMovementStat", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "attackEntityFrom", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lro;F" : "Lnet/minecraft/util/DamageSource;F") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAttackEntityFrom) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "attackEntityFrom", "" + (isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "r" : "attackEntityPlayerMPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "attackTargetEntityWithCurrentItem", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "r" : "attackEntityPlayerMPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "r" : "attackEntityPlayerMPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalAttackTargetEntityWithCurrentItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localAttackTargetEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "r" : "attackEntityPlayerMPEntityWithCurrentItem", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aE" : "canBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "canBreatheUnderwater", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanBreatheUnderwater) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanBreatheUnderwater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aE" : "canBreatheUnderwater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "canHarvestBlock", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Laji;" : "Lnet/minecraft/block/Block;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanHarvestBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "canHarvestBlock", "" + (isObfuscated ? "(Laji;)Z" : "(Lnet/minecraft/block/Block;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "canPlayerEdit", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "IIIILadd;" : "IIIILnet/minecraft/item/ItemStack;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanPlayerEdit) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitVarInsn(Opcodes.ALOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "canPlayerEdit", "" + (isObfuscated ? "(IIIILadd;)Z" : "(IIIILnet/minecraft/item/ItemStack;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "g_" : "canTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "canTriggerWalking", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalCanTriggerWalking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localCanTriggerWalking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "g_" : "canTriggerWalking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "clonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "clonePlayer", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lyz;Z" : "Lnet/minecraft/entity/player/EntityPlayer;Z") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realClonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "clonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superClonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "clonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalClonePlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localClonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "clonePlayer", "" + (isObfuscated ? "(Lyz;Z)V" : "(Lnet/minecraft/entity/player/EntityPlayer;Z)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "damageEntity", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lro;F" : "Lnet/minecraft/util/DamageSource;F") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDamageEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDamageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "damageEntity", "" + (isObfuscated ? "(Lro;F)V" : "(Lnet/minecraft/util/DamageSource;F)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "displayGUIChest", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lrb;" : "Lnet/minecraft/inventory/IInventory;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIChest) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "displayGUIChest", "" + (isObfuscated ? "(Lrb;)V" : "(Lnet/minecraft/inventory/IInventory;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "displayGUIDispenser", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lapb;" : "Lnet/minecraft/tileentity/TileEntityDispenser;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIDispenser) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIDispenser", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "func_146102_a", "" + (isObfuscated ? "(Lapb;)V" : "(Lnet/minecraft/tileentity/TileEntityDispenser;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "displayGUIFurnace", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lapg;" : "Lnet/minecraft/tileentity/TileEntityFurnace;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIFurnace) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIFurnace", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "func_146101_a", "" + (isObfuscated ? "(Lapg;)V" : "(Lnet/minecraft/tileentity/TileEntityFurnace;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "displayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "displayGUIWorkbench", "(Lapi/player/server/IServerPlayerAPI;III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDisplayGUIWorkbench) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDisplayGUIWorkbench", "(III)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "displayGUIWorkbench", "(III)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "dropOneItem", "(Lapi/player/server/IServerPlayerAPI;Z)" + (isObfuscated ? "Lxk;" : "Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDropOneItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "dropOneItem", "" + (isObfuscated ? "(Z)Lxk;" : "(Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "dropPlayerItem", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Ladd;Z" : "Lnet/minecraft/item/ItemStack;Z") + ")" + (isObfuscated ? "Lxk;" : "Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalDropPlayerItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localDropPlayerItem", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "dropPlayerItemWithRandomChoice", "" + (isObfuscated ? "(Ladd;Z)Lxk;" : "(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;") + ""); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "fall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "fall", "(Lapi/player/server/IServerPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalFall) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localFall", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "fall", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bl" : "getAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getAIMoveSpeed", "(Lapi/player/server/IServerPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetAIMoveSpeed) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetAIMoveSpeed", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bl" : "getAIMoveSpeed", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getCurrentPlayerStrVsBlock", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Laji;Z" : "Lnet/minecraft/block/Block;Z") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetCurrentPlayerStrVsBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "getCurrentPlayerStrVsBlock", "" + (isObfuscated ? "(Laji;Z)F" : "(Lnet/minecraft/block/Block;Z)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getCurrentPlayerStrVsBlockForge", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Laji;ZI" : "Lnet/minecraft/block/Block;ZI") + ")F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetCurrentPlayerStrVsBlockForge) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetCurrentPlayerStrVsBlockForge", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", "getBreakSpeed", "" + (isObfuscated ? "(Laji;ZI)F" : "(Lnet/minecraft/block/Block;ZI)F") + ""); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "getDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getDistanceSq", "(Lapi/player/server/IServerPlayerAPI;DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetDistanceSq) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetDistanceSq", "(DDD)D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "getDistanceSq", "(DDD)D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "getBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getBrightness", "(Lapi/player/server/IServerPlayerAPI;F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetBrightness) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetBrightness", "(F)F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "getBrightness", "(F)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "g" : "getEyeHeight", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getEyeHeight", "(Lapi/player/server/IServerPlayerAPI;)F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realGetEyeHeight", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "g" : "getEyeHeight", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superGetEyeHeight", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "g" : "getEyeHeight", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalGetEyeHeight) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localGetEyeHeight", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "g" : "getEyeHeight", "()F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "f" : "heal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "heal", "(Lapi/player/server/IServerPlayerAPI;F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalHeal) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localHeal", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "f" : "heal", "(F)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isEntityInsideOpaqueBlock", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsEntityInsideOpaqueBlock) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsEntityInsideOpaqueBlock", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aa" : "isEntityInsideOpaqueBlock", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "M" : "isInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isInWater", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsInWater) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInWater", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "M" : "isInWater", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isInsideOfMaterial", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lawt;" : "Lnet/minecraft/block/material/Material;") + ")Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsInsideOfMaterial) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "isInsideOfMaterial", "" + (isObfuscated ? "(Lawt;)Z" : "(Lnet/minecraft/block/material/Material;)Z") + ""); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "h_" : "isOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isOnLadder", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsOnLadder) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsOnLadder", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "h_" : "isOnLadder", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bm" : "isPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isPlayerSleeping", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsPlayerSleeping) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsPlayerSleeping", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bm" : "isPlayerSleeping", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "an" : "isSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "isSneaking", "(Lapi/player/server/IServerPlayerAPI;)Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalIsSneaking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localIsSneaking", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "an" : "isSneaking", "()Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bj" : "jump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "jump", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalJump) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localJump", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bj" : "jump", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "knockBack", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lsa;FDD" : "Lnet/minecraft/entity/Entity;FDD") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalKnockBack) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localKnockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "knockBack", "" + (isObfuscated ? "(Lsa;FDD)V" : "(Lnet/minecraft/entity/Entity;FDD)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "mountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "mountEntity", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "mountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "mountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMountEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "mountEntity", "" + (isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "d" : "moveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "moveEntity", "(Lapi/player/server/IServerPlayerAPI;DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntity", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "d" : "moveEntity", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "moveEntityWithHeading", "(Lapi/player/server/IServerPlayerAPI;FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveEntityWithHeading) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveEntityWithHeading", "(FF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "moveEntityWithHeading", "(FF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "moveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "moveFlying", "(Lapi/player/server/IServerPlayerAPI;FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalMoveFlying) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localMoveFlying", "(FFF)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.FLOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "moveFlying", "(FFF)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onDeath", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lro;" : "Lnet/minecraft/util/DamageSource;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnDeath) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onDeath", "" + (isObfuscated ? "(Lro;)V" : "(Lnet/minecraft/util/DamageSource;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "e" : "onLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onLivingUpdate", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnLivingUpdate) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnLivingUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "e" : "onLivingUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onKillEntity", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lsv;" : "Lnet/minecraft/entity/EntityLivingBase;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnKillEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onKillEntity", "" + (isObfuscated ? "(Lsv;)V" : "(Lnet/minecraft/entity/EntityLivingBase;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onStruckByLightning", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Lxh;" : "Lnet/minecraft/entity/effect/EntityLightningBolt;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnStruckByLightning) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "onStruckByLightning", "" + (isObfuscated ? "(Lxh;)V" : "(Lnet/minecraft/entity/effect/EntityLightningBolt;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "h" : "onUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onUpdate", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnUpdate) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdate", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "h" : "onUpdate", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "i" : "onUpdateEntity", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "onUpdateEntity", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realOnUpdateEntity", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "i" : "onUpdateEntity", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superOnUpdateEntity", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "i" : "onUpdateEntity", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalOnUpdateEntity) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localOnUpdateEntity", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "i" : "onUpdateEntity", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "readEntityFromNBT", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Ldh;" : "Lnet/minecraft/nbt/NBTTagCompound;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalReadEntityFromNBT) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localReadEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "readEntityFromNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "B" : "setDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "setDead", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetDead) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetDead", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "B" : "setDead", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "setEntityActionState", "(FFZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "setEntityActionState", "(Lapi/player/server/IServerPlayerAPI;FFZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetEntityActionState", "(FFZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "setEntityActionState", "(FFZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetEntityActionState", "(FFZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "setEntityActionState", "(FFZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetEntityActionState) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetEntityActionState", "(FFZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitVarInsn(Opcodes.FLOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitVarInsn(Opcodes.ILOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "setEntityActionState", "(FFZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "setPosition", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "setPosition", "(Lapi/player/server/IServerPlayerAPI;DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetPosition", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "setPosition", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetPosition", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "setPosition", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetPosition) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetPosition", "(DDD)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitVarInsn(Opcodes.DLOAD, 3); - mv.visitVarInsn(Opcodes.DLOAD, 5); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "setPosition", "(DDD)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "setSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "setSneaking", "(Lapi/player/server/IServerPlayerAPI;Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetSneaking) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSneaking", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "setSneaking", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "c" : "setSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "setSprinting", "(Lapi/player/server/IServerPlayerAPI;Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSetSprinting) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSetSprinting", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "c" : "setSprinting", "(Z)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "ba" : "swingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "swingItem", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalSwingItem) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localSwingItem", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "ba" : "swingItem", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "bq" : "updateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "updateEntityActionState", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdateEntityActionState) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateEntityActionState", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "bq" : "updateEntityActionState", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "aO" : "updatePotionEffects", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "updatePotionEffects", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdatePotionEffects", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aO" : "updatePotionEffects", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdatePotionEffects", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aO" : "updatePotionEffects", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdatePotionEffects) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdatePotionEffects", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "aO" : "updatePotionEffects", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "ab" : "updateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "updateRidden", "(Lapi/player/server/IServerPlayerAPI;)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalUpdateRidden) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localUpdateRidden", "()V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "ab" : "updateRidden", "()V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "wakeUpPlayer", "(Lapi/player/server/IServerPlayerAPI;ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalWakeUpPlayer) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWakeUpPlayer", "(ZZZ)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitVarInsn(Opcodes.ILOAD, 2); - mv.visitVarInsn(Opcodes.ILOAD, 3); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "a" : "wakeUpPlayer", "(ZZZ)V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC, isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "writeEntityToNBT", "(Lapi/player/server/IServerPlayerAPI;" + (isObfuscated ? "Ldh;" : "Lnet/minecraft/nbt/NBTTagCompound;") + ")V"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "realWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "superWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - if(!hadLocalWriteEntityToNBT) - { - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "localWriteEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + "", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESPECIAL, isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer", isObfuscated ? "b" : "writeEntityToNBT", "" + (isObfuscated ? "(Ldh;)V" : "(Lnet/minecraft/nbt/NBTTagCompound;)V") + ""); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAddedToChunkField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ag" : "addedToChunk", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAddedToChunkField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ag" : "addedToChunk", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getArrowHitTimerField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "av" : "arrowHitTimer", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setArrowHitTimerField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "av" : "arrowHitTimer", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aB" : "attackTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aB" : "attackTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackedAtYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "az" : "attackedAtYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackedAtYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "az" : "attackedAtYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getAttackingPlayerField", isObfuscated ? "()Lyz;" : "()Lnet/minecraft/entity/player/EntityPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aR" : "attackingPlayer", isObfuscated ? "Lyz;" : "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setAttackingPlayerField", isObfuscated ? "(Lyz;)V" : "(Lnet/minecraft/entity/player/EntityPlayer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aR" : "attackingPlayer", isObfuscated ? "Lyz;" : "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getBoundingBoxField", isObfuscated ? "()Lazt;" : "()Lnet/minecraft/util/AxisAlignedBB;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "C" : "boundingBox", isObfuscated ? "Lazt;" : "Lnet/minecraft/util/AxisAlignedBB;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCameraPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aJ" : "cameraPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCameraPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aJ" : "cameraPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCameraYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bs" : "cameraYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCameraYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bs" : "cameraYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCapabilitiesField", isObfuscated ? "()Lyw;" : "()Lnet/minecraft/entity/player/PlayerCapabilities;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bE" : "capabilities", isObfuscated ? "Lyw;" : "Lnet/minecraft/entity/player/PlayerCapabilities;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCapabilitiesField", isObfuscated ? "(Lyw;)V" : "(Lnet/minecraft/entity/player/PlayerCapabilities;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bE" : "capabilities", isObfuscated ? "Lyw;" : "Lnet/minecraft/entity/player/PlayerCapabilities;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChatColoursField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bW" : "chatColours", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChatColoursField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bW" : "chatColours", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChatVisibilityField", isObfuscated ? "()Lzb;" : "()Lnet/minecraft/entity/player/EntityPlayer$EnumChatVisibility;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bV" : "chatVisibility", isObfuscated ? "Lzb;" : "Lnet/minecraft/entity/player/EntityPlayer$EnumChatVisibility;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChatVisibilityField", isObfuscated ? "(Lzb;)V" : "(Lnet/minecraft/entity/player/EntityPlayer$EnumChatVisibility;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bV" : "chatVisibility", isObfuscated ? "Lzb;" : "Lnet/minecraft/entity/player/EntityPlayer$EnumChatVisibility;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordXField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ah" : "chunkCoordX", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordXField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ah" : "chunkCoordX", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordYField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ai" : "chunkCoordY", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordYField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ai" : "chunkCoordY", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getChunkCoordZField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aj" : "chunkCoordZ", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setChunkCoordZField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aj" : "chunkCoordZ", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getCurrentWindowIdField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bY" : "currentWindowId", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setCurrentWindowIdField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bY" : "currentWindowId", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDataWatcherField", isObfuscated ? "()Lte;" : "()Lnet/minecraft/entity/DataWatcher;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "af" : "dataWatcher", isObfuscated ? "Lte;" : "Lnet/minecraft/entity/DataWatcher;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDataWatcherField", isObfuscated ? "(Lte;)V" : "(Lnet/minecraft/entity/DataWatcher;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "af" : "dataWatcher", isObfuscated ? "Lte;" : "Lnet/minecraft/entity/DataWatcher;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDeadField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aT" : "dead", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDeadField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aT" : "dead", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDeathTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aA" : "deathTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDeathTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aA" : "deathTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDestroyedItemsNetCacheField", "()Ljava/util/List;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bN" : "destroyedItemsNetCache", "Ljava/util/List;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDimensionField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ap" : "dimension", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDimensionField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ap" : "dimension", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDistanceWalkedModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "P" : "distanceWalkedModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDistanceWalkedModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "P" : "distanceWalkedModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getDistanceWalkedOnStepModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Q" : "distanceWalkedOnStepModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setDistanceWalkedOnStepModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Q" : "distanceWalkedOnStepModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityAgeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aU" : "entityAge", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityAgeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aU" : "entityAge", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityCollisionReductionField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Y" : "entityCollisionReduction", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityCollisionReductionField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Y" : "entityCollisionReduction", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityUniqueIDField", "()Ljava/util/UUID;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ar" : "entityUniqueID", "Ljava/util/UUID;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setEntityUniqueIDField", "(Ljava/util/UUID;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ar" : "entityUniqueID", "Ljava/util/UUID;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bH" : "experience", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bH" : "experience", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceLevelField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bF" : "experienceLevel", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceLevelField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bF" : "experienceLevel", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getExperienceTotalField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bG" : "experienceTotal", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setExperienceTotalField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bG" : "experienceTotal", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFallDistanceField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "R" : "fallDistance", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFallDistanceField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "R" : "fallDistance", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_110154_aXField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aW" : "field_110154_aX", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_110154_aXField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aW" : "field_110154_aX", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_130068_bOField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bP" : "field_130068_bO", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_130068_bOField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bP" : "field_130068_bO", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_143005_bXField", "()J", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bX" : "field_143005_bX", "J"); - mv.visitInsn(Opcodes.LRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_143005_bXField", "(J)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.LLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bX" : "field_143005_bX", "J"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_147101_bUField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bU" : "field_147101_bU", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_147101_bUField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bU" : "field_147101_bU", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_147103_bOField", isObfuscated ? "()Lpg;" : "()Lnet/minecraft/stats/StatisticsFile;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bO" : "field_147103_bO", isObfuscated ? "Lpg;" : "Lnet/minecraft/stats/StatisticsFile;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70135_KField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "J" : "field_70135_K", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70135_KField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "J" : "field_70135_K", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70741_aBField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aZ" : "field_70741_aB", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70741_aBField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aZ" : "field_70741_aB", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70763_axField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aY" : "field_70763_ax", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70763_axField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aY" : "field_70763_ax", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70764_awField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aX" : "field_70764_aw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70764_awField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aX" : "field_70764_aw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70768_auField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aV" : "field_70768_au", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70768_auField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aV" : "field_70768_au", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70769_aoField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aK" : "field_70769_ao", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70769_aoField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aK" : "field_70769_ao", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_70770_apField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aL" : "field_70770_ap", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_70770_apField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aL" : "field_70770_ap", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71079_bUField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bC" : "field_71079_bU", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71079_bUField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bC" : "field_71079_bU", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71082_cxField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "cc" : "field_71082_cx", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71082_cxField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "cc" : "field_71082_cx", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71085_bRField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bz" : "field_71085_bR", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71085_bRField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bz" : "field_71085_bR", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71089_bVField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bD" : "field_71089_bV", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71089_bVField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bD" : "field_71089_bV", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71091_bMField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bu" : "field_71091_bM", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71091_bMField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bu" : "field_71091_bM", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71094_bPField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bx" : "field_71094_bP", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71094_bPField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bx" : "field_71094_bP", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71095_bQField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "by" : "field_71095_bQ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71095_bQField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "by" : "field_71095_bQ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71096_bNField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bv" : "field_71096_bN", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71096_bNField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bv" : "field_71096_bN", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getField_71097_bOField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bw" : "field_71097_bO", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setField_71097_bOField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bw" : "field_71097_bO", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFireResistanceField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ab" : "fireResistance", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFireResistanceField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ab" : "fireResistance", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFishEntityField", isObfuscated ? "()Lxe;" : "()Lnet/minecraft/entity/projectile/EntityFishHook;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bK" : "fishEntity", isObfuscated ? "Lxe;" : "Lnet/minecraft/entity/projectile/EntityFishHook;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFishEntityField", isObfuscated ? "(Lxe;)V" : "(Lnet/minecraft/entity/projectile/EntityFishHook;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bK" : "fishEntity", isObfuscated ? "Lxe;" : "Lnet/minecraft/entity/projectile/EntityFishHook;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFlyToggleTimerField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bq" : "flyToggleTimer", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFlyToggleTimerField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bq" : "flyToggleTimer", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getFoodStatsField", isObfuscated ? "()Lzr;" : "()Lnet/minecraft/util/FoodStats;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bp" : "foodStats", isObfuscated ? "Lzr;" : "Lnet/minecraft/util/FoodStats;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setFoodStatsField", isObfuscated ? "(Lzr;)V" : "(Lnet/minecraft/util/FoodStats;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bp" : "foodStats", isObfuscated ? "Lzr;" : "Lnet/minecraft/util/FoodStats;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getForceSpawnField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "n" : "forceSpawn", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setForceSpawnField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "n" : "forceSpawn", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHeightField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "N" : "height", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHeightField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "N" : "height", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHurtResistantTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ad" : "hurtResistantTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHurtResistantTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ad" : "hurtResistantTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getHurtTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ax" : "hurtTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setHurtTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ax" : "hurtTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIgnoreFrustumCheckField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ak" : "ignoreFrustumCheck", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIgnoreFrustumCheckField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ak" : "ignoreFrustumCheck", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInPortalField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "an" : "inPortal", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInPortalField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "an" : "inPortal", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInWaterField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ac" : "inWater", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInWaterField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ac" : "inWater", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInventoryField", isObfuscated ? "()Lyx;" : "()Lnet/minecraft/entity/player/InventoryPlayer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bm" : "inventory", isObfuscated ? "Lyx;" : "Lnet/minecraft/entity/player/InventoryPlayer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInventoryField", isObfuscated ? "(Lyx;)V" : "(Lnet/minecraft/entity/player/InventoryPlayer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bm" : "inventory", isObfuscated ? "Lyx;" : "Lnet/minecraft/entity/player/InventoryPlayer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getInventoryContainerField", isObfuscated ? "()Lzs;" : "()Lnet/minecraft/inventory/Container;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bn" : "inventoryContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setInventoryContainerField", isObfuscated ? "(Lzs;)V" : "(Lnet/minecraft/inventory/Container;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bn" : "inventoryContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsAirBorneField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "al" : "isAirBorne", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsAirBorneField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "al" : "isAirBorne", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsChangingQuantityOnlyField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "g" : "isChangingQuantityOnly", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsChangingQuantityOnlyField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "g" : "isChangingQuantityOnly", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "G" : "isCollided", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "G" : "isCollided", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedHorizontallyField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "E" : "isCollidedHorizontally", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedHorizontallyField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "E" : "isCollidedHorizontally", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsCollidedVerticallyField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "F" : "isCollidedVertically", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsCollidedVerticallyField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "F" : "isCollidedVertically", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsDeadField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "K" : "isDead", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsDeadField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "K" : "isDead", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsImmuneToFireField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ae" : "isImmuneToFire", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsImmuneToFireField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ae" : "isImmuneToFire", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsInWebField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "I" : "isInWeb", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsInWebField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "I" : "isInWeb", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsJumpingField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bc" : "isJumping", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsJumpingField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bc" : "isJumping", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getIsSwingInProgressField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "at" : "isSwingInProgress", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setIsSwingInProgressField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "at" : "isSwingInProgress", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getJumpMovementFactorField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aQ" : "jumpMovementFactor", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setJumpMovementFactorField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aQ" : "jumpMovementFactor", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastDamageField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bb" : "lastDamage", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastDamageField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bb" : "lastDamage", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastExperienceField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bT" : "lastExperience", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastExperienceField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bT" : "lastExperience", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastFoodLevelField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bR" : "lastFoodLevel", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastFoodLevelField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bR" : "lastFoodLevel", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastHealthField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bQ" : "lastHealth", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastHealthField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bQ" : "lastHealth", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "S" : "lastTickPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "S" : "lastTickPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "T" : "lastTickPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "T" : "lastTickPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLastTickPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "U" : "lastTickPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLastTickPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "U" : "lastTickPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLimbSwingField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aG" : "limbSwing", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLimbSwingField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aG" : "limbSwing", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLimbSwingAmountField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aF" : "limbSwingAmount", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setLimbSwingAmountField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aF" : "limbSwingAmount", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLoadedChunksField", "()Ljava/util/List;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "f" : "loadedChunks", "Ljava/util/List;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getLoggerField", "()Lorg/apache/logging/log4j/Logger;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bL" : "logger", "Lorg/apache/logging/log4j/Logger;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getManagedPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "d" : "managedPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setManagedPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "d" : "managedPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getManagedPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "e" : "managedPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setManagedPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "e" : "managedPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMaxHurtResistantTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aH" : "maxHurtResistantTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMaxHurtResistantTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aH" : "maxHurtResistantTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMaxHurtTimeField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ay" : "maxHurtTime", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMaxHurtTimeField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ay" : "maxHurtTime", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMcServerField", "()Lnet/minecraft/server/MinecraftServer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "b" : "mcServer", "Lnet/minecraft/server/MinecraftServer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "v" : "motionX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "v" : "motionX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "w" : "motionY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "w" : "motionY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMotionZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "x" : "motionZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMotionZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "x" : "motionZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMoveForwardField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "be" : "moveForward", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMoveForwardField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "be" : "moveForward", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMoveStrafingField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bd" : "moveStrafing", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMoveStrafingField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bd" : "moveStrafing", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getMyEntitySizeField", isObfuscated ? "()Lse;" : "()Lnet/minecraft/entity/Entity$EnumEntitySize;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "as" : "myEntitySize", isObfuscated ? "Lse;" : "Lnet/minecraft/entity/Entity$EnumEntitySize;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setMyEntitySizeField", isObfuscated ? "(Lse;)V" : "(Lnet/minecraft/entity/Entity$EnumEntitySize;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "as" : "myEntitySize", isObfuscated ? "Lse;" : "Lnet/minecraft/entity/Entity$EnumEntitySize;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosRotationIncrementsField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bg" : "newPosRotationIncrements", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosRotationIncrementsField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bg" : "newPosRotationIncrements", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bh" : "newPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bh" : "newPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bi" : "newPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bi" : "newPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bj" : "newPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bj" : "newPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewRotationPitchField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bl" : "newRotationPitch", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewRotationPitchField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bl" : "newRotationPitch", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNewRotationYawField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bk" : "newRotationYaw", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNewRotationYawField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bk" : "newRotationYaw", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getNoClipField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "X" : "noClip", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setNoClipField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "X" : "noClip", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getOnGroundField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "D" : "onGround", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setOnGroundField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "D" : "onGround", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getOpenContainerField", isObfuscated ? "()Lzs;" : "()Lnet/minecraft/inventory/Container;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bo" : "openContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setOpenContainerField", isObfuscated ? "(Lzs;)V" : "(Lnet/minecraft/inventory/Container;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bo" : "openContainer", isObfuscated ? "Lzs;" : "Lnet/minecraft/inventory/Container;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPingField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "h" : "ping", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPingField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "h" : "ping", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPlayerConqueredTheEndField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "i" : "playerConqueredTheEnd", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPlayerConqueredTheEndField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "i" : "playerConqueredTheEnd", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPlayerLocationField", isObfuscated ? "()Lr;" : "()Lnet/minecraft/util/ChunkCoordinates;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bB" : "playerLocation", isObfuscated ? "Lr;" : "Lnet/minecraft/util/ChunkCoordinates;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPlayerLocationField", isObfuscated ? "(Lr;)V" : "(Lnet/minecraft/util/ChunkCoordinates;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bB" : "playerLocation", isObfuscated ? "Lr;" : "Lnet/minecraft/util/ChunkCoordinates;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPlayerNetServerHandlerField", isObfuscated ? "()Lnh;" : "()Lnet/minecraft/network/NetHandlerPlayServer;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "playerNetServerHandler", isObfuscated ? "Lnh;" : "Lnet/minecraft/network/NetHandlerPlayServer;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPlayerNetServerHandlerField", isObfuscated ? "(Lnh;)V" : "(Lnet/minecraft/network/NetHandlerPlayServer;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "a" : "playerNetServerHandler", isObfuscated ? "Lnh;" : "Lnet/minecraft/network/NetHandlerPlayServer;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPortalCounterField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ao" : "portalCounter", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPortalCounterField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ao" : "portalCounter", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "s" : "posX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "s" : "posX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "t" : "posY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "t" : "posY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "u" : "posZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "u" : "posZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevCameraPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aI" : "prevCameraPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevCameraPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aI" : "prevCameraPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevCameraYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "br" : "prevCameraYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevCameraYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "br" : "prevCameraYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevDistanceWalkedModifiedField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "O" : "prevDistanceWalkedModified", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevDistanceWalkedModifiedField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "O" : "prevDistanceWalkedModified", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevHealthField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aw" : "prevHealth", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevHealthField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aw" : "prevHealth", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevLimbSwingAmountField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aE" : "prevLimbSwingAmount", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevLimbSwingAmountField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aE" : "prevLimbSwingAmount", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosXField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "p" : "prevPosX", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosXField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "p" : "prevPosX", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosYField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "q" : "prevPosY", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosYField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "q" : "prevPosY", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevPosZField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "r" : "prevPosZ", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevPosZField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "r" : "prevPosZ", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRenderYawOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aN" : "prevRenderYawOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRenderYawOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aN" : "prevRenderYawOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "B" : "prevRotationPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "B" : "prevRotationPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "A" : "prevRotationYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "A" : "prevRotationYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevRotationYawHeadField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aP" : "prevRotationYawHead", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevRotationYawHeadField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aP" : "prevRotationYawHead", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPrevSwingProgressField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aC" : "prevSwingProgress", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPrevSwingProgressField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aC" : "prevSwingProgress", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getPreventEntitySpawningField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "k" : "preventEntitySpawning", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setPreventEntitySpawningField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "k" : "preventEntitySpawning", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRandField", "()Ljava/util/Random;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Z" : "rand", "Ljava/util/Random;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRandField", "(Ljava/util/Random;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "Z" : "rand", "Ljava/util/Random;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRandomYawVelocityField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bf" : "randomYawVelocity", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRandomYawVelocityField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bf" : "randomYawVelocity", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRecentlyHitField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aS" : "recentlyHit", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRecentlyHitField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aS" : "recentlyHit", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderDistanceWeightField", "()D", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "j" : "renderDistanceWeight", "D"); - mv.visitInsn(Opcodes.DRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderDistanceWeightField", "(D)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.DLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "j" : "renderDistanceWeight", "D"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRenderYawOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aM" : "renderYawOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRenderYawOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aM" : "renderYawOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRiddenByEntityField", isObfuscated ? "()Lsa;" : "()Lnet/minecraft/entity/Entity;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "l" : "riddenByEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRiddenByEntityField", isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "l" : "riddenByEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRidingEntityField", isObfuscated ? "()Lsa;" : "()Lnet/minecraft/entity/Entity;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "m" : "ridingEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRidingEntityField", isObfuscated ? "(Lsa;)V" : "(Lnet/minecraft/entity/Entity;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "m" : "ridingEntity", isObfuscated ? "Lsa;" : "Lnet/minecraft/entity/Entity;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationPitchField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "z" : "rotationPitch", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationPitchField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "z" : "rotationPitch", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationYawField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "y" : "rotationYaw", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationYawField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "y" : "rotationYaw", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getRotationYawHeadField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aO" : "rotationYawHead", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setRotationYawHeadField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aO" : "rotationYawHead", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getScoreValueField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ba" : "scoreValue", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setScoreValueField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ba" : "scoreValue", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosXField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bZ" : "serverPosX", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosXField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bZ" : "serverPosX", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosYField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ca" : "serverPosY", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosYField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "ca" : "serverPosY", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPosZField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "cb" : "serverPosZ", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setServerPosZField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "cb" : "serverPosZ", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSleepingField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bA" : "sleeping", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSleepingField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bA" : "sleeping", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSpeedInAirField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bJ" : "speedInAir", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSpeedInAirField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bJ" : "speedInAir", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSpeedOnGroundField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bI" : "speedOnGround", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSpeedOnGroundField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bI" : "speedOnGround", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getStepHeightField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "W" : "stepHeight", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setStepHeightField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "W" : "stepHeight", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSwingProgressField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aD" : "swingProgress", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSwingProgressField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aD" : "swingProgress", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getSwingProgressIntField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "au" : "swingProgressInt", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setSwingProgressIntField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "au" : "swingProgressInt", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTeleportDirectionField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aq" : "teleportDirection", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTeleportDirectionField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aq" : "teleportDirection", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTheItemInWorldManagerField", isObfuscated ? "()Lmx;" : "()Lnet/minecraft/server/management/ItemInWorldManager;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "c" : "theItemInWorldManager", isObfuscated ? "Lmx;" : "Lnet/minecraft/server/management/ItemInWorldManager;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTicksExistedField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aa" : "ticksExisted", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTicksExistedField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "aa" : "ticksExisted", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTimeUntilPortalField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "am" : "timeUntilPortal", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTimeUntilPortalField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "am" : "timeUntilPortal", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getTranslatorField", "()Ljava/lang/String;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bM" : "translator", "Ljava/lang/String;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setTranslatorField", "(Ljava/lang/String;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bM" : "translator", "Ljava/lang/String;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getVelocityChangedField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "H" : "velocityChanged", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setVelocityChangedField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "H" : "velocityChanged", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getWasHungryField", "()Z", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bS" : "wasHungry", "Z"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setWasHungryField", "(Z)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bS" : "wasHungry", "Z"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getWidthField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "M" : "width", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setWidthField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "M" : "width", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getWorldObjField", isObfuscated ? "()Lahb;" : "()Lnet/minecraft/world/World;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "o" : "worldObj", isObfuscated ? "Lahb;" : "Lnet/minecraft/world/World;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setWorldObjField", isObfuscated ? "(Lahb;)V" : "(Lnet/minecraft/world/World;)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "o" : "worldObj", isObfuscated ? "Lahb;" : "Lnet/minecraft/world/World;"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getXpCooldownField", "()I", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bt" : "xpCooldown", "I"); - mv.visitInsn(Opcodes.IRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setXpCooldownField", "(I)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ILOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "bt" : "xpCooldown", "I"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getYOffsetField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "L" : "yOffset", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setYOffsetField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "L" : "yOffset", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getYSizeField", "()F", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "V" : "ySize", "F"); - mv.visitInsn(Opcodes.FRETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "setYSizeField", "(F)V", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.FLOAD, 1); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", isObfuscated ? "V" : "ySize", "F"); - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPlayerBase", "(Ljava/lang/String;)Lapi/player/server/ServerPlayerBase;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getServerPlayerBase", "(Lapi/player/server/IServerPlayerAPI;Ljava/lang/String;)Lapi/player/server/ServerPlayerBase;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPlayerBaseIds", "()Ljava/util/Set;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "getServerPlayerBaseIds", "(Lapi/player/server/IServerPlayerAPI;)Ljava/util/Set;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "dynamic", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 1); - mv.visitVarInsn(Opcodes.ALOAD, 2); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "dynamic", "(Lapi/player/server/IServerPlayerAPI;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getServerPlayerAPI", "()Lapi/player/server/ServerPlayerAPI;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitFieldInsn(Opcodes.GETFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", "serverPlayerAPI", "Lapi/player/server/ServerPlayerAPI;"); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - mv = cv.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "getEntityPlayerMP", isObfuscated ? "()Lmw;" : "()Lnet/minecraft/entity/player/EntityPlayerMP;", null, null); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitInsn(Opcodes.ARETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - - cv.visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_FINAL, "serverPlayerAPI", "Lapi/player/server/ServerPlayerAPI;", null, null); - } -} diff --git a/src/main/java/api/player/server/ServerPlayerConstructorVisitor.java b/src/main/java/api/player/server/ServerPlayerConstructorVisitor.java deleted file mode 100644 index 7b5085c9..00000000 --- a/src/main/java/api/player/server/ServerPlayerConstructorVisitor.java +++ /dev/null @@ -1,65 +0,0 @@ -// ================================================================== -// This file is part of Player API. -// -// Player API is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Player API 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 Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License and the GNU General Public License along with Player API. -// If not, see . -// ================================================================== - -package api.player.server; - -import org.objectweb.asm.*; - -public final class ServerPlayerConstructorVisitor extends MethodVisitor -{ - private final boolean isObfuscated; - - public ServerPlayerConstructorVisitor(MethodVisitor paramMethodVisitor, boolean isObfuscated) - { - super(262144, paramMethodVisitor); - this.isObfuscated = isObfuscated; - } - - public void visitMethodInsn(int opcode, String owner, String name, String desc) - { - super.visitMethodInsn(opcode, owner, name, desc); - if(name.equals("") && owner.equals(isObfuscated ? "yz" : "net/minecraft/entity/player/EntityPlayer")) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "create", "(Lapi/player/server/IServerPlayerAPI;)Lapi/player/server/ServerPlayerAPI;"); - mv.visitFieldInsn(Opcodes.PUTFIELD, isObfuscated ? "mw" : "net/minecraft/entity/player/EntityPlayerMP", "serverPlayerAPI", "Lapi/player/server/ServerPlayerAPI;"); - - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.ALOAD, 1); - mv.visitIntInsn(Opcodes.ALOAD, 2); - mv.visitIntInsn(Opcodes.ALOAD, 3); - mv.visitIntInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "beforeLocalConstructing", "(Lapi/player/server/IServerPlayerAPI;Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/world/WorldServer;Lcom/mojang/authlib/GameProfile;Lnet/minecraft/server/management/ItemInWorldManager;)V"); - } - } - - public void visitInsn(int opcode) - { - if(opcode == Opcodes.RETURN) - { - mv.visitVarInsn(Opcodes.ALOAD, 0); - mv.visitIntInsn(Opcodes.ALOAD, 1); - mv.visitIntInsn(Opcodes.ALOAD, 2); - mv.visitIntInsn(Opcodes.ALOAD, 3); - mv.visitIntInsn(Opcodes.ALOAD, 4); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, "api/player/server/ServerPlayerAPI", "afterLocalConstructing", "(Lapi/player/server/IServerPlayerAPI;Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/world/WorldServer;Lcom/mojang/authlib/GameProfile;Lnet/minecraft/server/management/ItemInWorldManager;)V"); - } - super.visitInsn(opcode); - } -} diff --git a/src/main/java/net/smart/core/SmartCoreClassVisitor.java b/src/main/java/net/smart/core/SmartCoreClassVisitor.java deleted file mode 100644 index 26d64b06..00000000 --- a/src/main/java/net/smart/core/SmartCoreClassVisitor.java +++ /dev/null @@ -1,67 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -import java.io.*; -import java.util.*; - -import org.objectweb.asm.*; - -public final class SmartCoreClassVisitor extends ClassVisitor -{ - public static byte[] transform(byte[] bytes, List transformations) - { - try - { - ByteArrayInputStream in = new ByteArrayInputStream(bytes); - ClassReader cr = new ClassReader(in); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - SmartCoreClassVisitor p = new SmartCoreClassVisitor(cw, transformations); - - cr.accept(p, 0); - - byte[] result = cw.toByteArray(); - in.close(); - return result; - } - catch(IOException ioe) - { - throw new RuntimeException(ioe); - } - } - - private final List transformations; - - public SmartCoreClassVisitor(ClassVisitor classVisitor, List transformations) - { - super(262144, classVisitor); - this.transformations = transformations; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) - { - MethodVisitor base = super.visitMethod(access, name, desc, signature, exceptions); - - for(SmartCoreTransformation transformation : transformations) - if(name.equals(transformation.methodName) && desc.equals(transformation.getMethodDesc())) - return new SmartCoreMethodVisitor(base, transformation); - - return base; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/core/SmartCoreContainer.java b/src/main/java/net/smart/core/SmartCoreContainer.java deleted file mode 100644 index d78266b2..00000000 --- a/src/main/java/net/smart/core/SmartCoreContainer.java +++ /dev/null @@ -1,50 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -import java.util.*; -import com.google.common.eventbus.*; -import cpw.mods.fml.common.*; - -public class SmartCoreContainer extends DummyModContainer -{ - public SmartCoreContainer() - { - super(createMetadata()); - } - - @Override - public boolean registerBus(EventBus bus, LoadController controller) - { - return true; - } - - private static ModMetadata createMetadata() - { - ModMetadata meta = new ModMetadata(); - - meta.modId = "SmartCore"; - meta.name = SmartCoreInfo.ModName; - meta.version = SmartCoreInfo.ModVersion; - meta.description = "Adds some core hooks required by Smart Moving"; - meta.url = "http://www.minecraftforum.net/topic/738498-"; - meta.authorList = Arrays.asList(new String[] { "Divisor" }); - - return meta; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/core/SmartCoreEventHandler.java b/src/main/java/net/smart/core/SmartCoreEventHandler.java deleted file mode 100644 index 9454ad9a..00000000 --- a/src/main/java/net/smart/core/SmartCoreEventHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -import java.util.*; - -import net.minecraft.client.multiplayer.*; -import net.minecraft.entity.player.*; -import net.minecraft.item.ItemStack; -import net.minecraft.network.*; -import net.minecraft.server.management.*; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraft.network.play.client.*; - -public class SmartCoreEventHandler -{ - private final static Set handlers = new HashSet(); - - public static void Add(SmartCoreEventHandler handler) - { - handlers.add(handler); - } - - public static void Remove(SmartCoreEventHandler handler) - { - handlers.remove(handler); - } - - @SuppressWarnings("unused") - public static void NetHandlerPlayServer_beforeProcessPlayer(NetHandlerPlayServer netServerHandler, C03PacketPlayer packetPlayer) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.beforeProcessPlayer(netServerHandler); - } - - @SuppressWarnings("unused") - public static void NetHandlerPlayServer_afterProcessPlayer(NetHandlerPlayServer netServerHandler, C03PacketPlayer packetPlayer) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.afterProcessPlayer(netServerHandler); - } - - public static void NetHandlerPlayServer_beforeProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.beforeProcessPlayerBlockPlacement(netServerHandler, packet15place); - } - - public static void NetHandlerPlayServer_afterProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.afterProcessPlayerBlockPlacement(netServerHandler, packet15place); - } - - @SuppressWarnings("unused") - public static void PlayerControllerMP_beforeOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP, World world, ItemStack itemStack, int integer1, int integer2, int integer3, int integer4, Vec3 vec3) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.beforeOnPlayerRightClick(playerControllerMP, entityPlayerSP); - } - - @SuppressWarnings("unused") - public static void PlayerControllerMP_afterOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP, World world, ItemStack itemStack, int integer1, int integer2, int integer3, int integer4, Vec3 vec3) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.afterOnPlayerRightClick(playerControllerMP, entityPlayerSP); - } - - @SuppressWarnings("unused") - public static void ItemInWorldManager_beforeActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer, World world, ItemStack itemStack, int integer1, int integer2, int integer3, int integer4, float float1, float float2, float float3) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.beforeActivateBlockOrUseItem(itemInWorldManager, entityPlayer); - } - - @SuppressWarnings("unused") - public static void ItemInWorldManager_afterActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer, World world, ItemStack itemStack, int integer1, int integer2, int integer3, int integer4, float float1, float float2, float float3) - { - for(SmartCoreEventHandler eventHandler : handlers) - eventHandler.afterActivateBlockOrUseItem(itemInWorldManager, entityPlayer); - } - - @SuppressWarnings("unused") - public void beforeProcessPlayer(NetHandlerPlayServer netServerHandler) - { - } - - @SuppressWarnings("unused") - public void afterProcessPlayer(NetHandlerPlayServer netServerHandler) - { - } - - @SuppressWarnings("unused") - public void beforeProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - } - - @SuppressWarnings("unused") - public void afterProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - } - - @SuppressWarnings("unused") - public void beforeOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP) - { - } - - @SuppressWarnings("unused") - public void afterOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP) - { - } - - @SuppressWarnings("unused") - public void beforeActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer) - { - } - - @SuppressWarnings("unused") - public void afterActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer) - { - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/core/SmartCoreInfo.java b/src/main/java/net/smart/core/SmartCoreInfo.java deleted file mode 100644 index 4d98dc10..00000000 --- a/src/main/java/net/smart/core/SmartCoreInfo.java +++ /dev/null @@ -1,24 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -public class SmartCoreInfo -{ - public static final String ModName = "Smart Core"; - public static final String ModVersion = SmartCorePlugin.Version; -} \ No newline at end of file diff --git a/src/main/java/net/smart/core/SmartCoreMethodVisitor.java b/src/main/java/net/smart/core/SmartCoreMethodVisitor.java deleted file mode 100644 index 06394768..00000000 --- a/src/main/java/net/smart/core/SmartCoreMethodVisitor.java +++ /dev/null @@ -1,78 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -import org.objectweb.asm.*; - -public class SmartCoreMethodVisitor extends MethodVisitor -{ - private final SmartCoreTransformation transformation; - - public SmartCoreMethodVisitor(MethodVisitor paramMethodVisitor, SmartCoreTransformation transformation) - { - super(262144, paramMethodVisitor); - - this.transformation = transformation; - - invokeHook(transformation.beforeHookMethodName); - } - - @Override - public void visitInsn(int opcode) - { - if(opcode == Opcodes.RETURN || opcode == Opcodes.IRETURN || opcode == Opcodes.LRETURN ||opcode == Opcodes.FRETURN || opcode == Opcodes.DRETURN || opcode == Opcodes.ARETURN) - invokeHook(transformation.afterHookMethodName); - super.visitInsn(opcode); - } - - private void invokeHook(String hookName) - { - if (hookName == null) - return; - - mv.visitVarInsn(Opcodes.ALOAD, 0); - int offset = 1; - for(int i=0; i. -// ================================================================== - -package net.smart.core; - -import java.util.*; - -import cpw.mods.fml.relauncher.*; - -@IFMLLoadingPlugin.MCVersion("1.7.10") -public class SmartCorePlugin implements IFMLLoadingPlugin -{ - public static String Version = "1.0.3"; - - public static boolean isObfuscated; - - @Override - public String[] getASMTransformerClass() - { - return new String[] { "net.smart.core.SmartCoreTransformer" }; - } - - @Override - public String getAccessTransformerClass() - { - return null; - } - - @Override - public String getModContainerClass() - { - return "net.smart.core.SmartCoreContainer"; - } - - @Override - public String getSetupClass() - { - return null; - } - - @Override - public void injectData(Map data) - { - isObfuscated = (Boolean)data.get("runtimeDeobfuscationEnabled"); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/core/SmartCoreTransformation.java b/src/main/java/net/smart/core/SmartCoreTransformation.java deleted file mode 100644 index 87a53a7f..00000000 --- a/src/main/java/net/smart/core/SmartCoreTransformation.java +++ /dev/null @@ -1,100 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.core; - -import java.util.*; - -public class SmartCoreTransformation -{ - public final String className; - public final String methodName; - public final String[] parameterTypeNames; - public final String returnType; - public final String hookClassName; - public final String beforeHookMethodName; - public final String afterHookMethodName; - - public SmartCoreTransformation(String className, String methodName, String[] parameterTypeNames, String returnType, String hookClassName, String beforeHookMethodName, String afterHookMethodName) - { - this.className = className; - this.methodName = methodName; - this.parameterTypeNames = parameterTypeNames; - this.returnType = returnType; - this.hookClassName = hookClassName; - this.beforeHookMethodName = beforeHookMethodName; - this.afterHookMethodName = afterHookMethodName; - } - - private static String getDescription(String type) - { - if(type == null || type == "void") - return "V"; - if(type.endsWith("[]")) - return "[" + getDescription(type.substring(0, type.length() - 2)); - if(type.equals("boolean")) - return "Z"; - if(type.equals("byte")) - return "B"; - if(type.equals("short")) - return "S"; - if(type.equals("int")) - return "I"; - if(type.equals("float")) - return "F"; - if(type.equals("long")) - return "J"; - if(type.equals("double")) - return "D"; - return "L" + type.replace(".", "/") + ";"; - } - - private static String getDescriptions(String[] parameterTypes) - { - String result = ""; - for(int i=0; i. -// ================================================================== - -package net.smart.core; - -import java.util.*; - -import net.minecraft.launchwrapper.*; - -public class SmartCoreTransformer implements IClassTransformer -{ - @Override - public byte[] transform(String name, String transformedName, byte[] bytes) - { - List list = null; - for(SmartCoreTransformation transformation : _transformations) - if(transformedName.equals(transformation.className)) - (list == null ? (list = new ArrayList()) : list).add(transformation); - - if(list != null) - return SmartCoreClassVisitor.transform(bytes, list); - return bytes; - } - - private static final SmartCoreTransformation[] _transformations = new SmartCoreTransformation[] - { - new SmartCoreTransformation - ( - "net.minecraft.network.NetHandlerPlayServer", - Name("processPlayer", "a"), - new String[] - { - Name("net.minecraft.network.play.client.C03PacketPlayer", "jd") - }, - null, - "net.smart.core.SmartCoreEventHandler", - "NetHandlerPlayServer_beforeProcessPlayer", - "NetHandlerPlayServer_afterProcessPlayer" - ), - new SmartCoreTransformation - ( - "net.minecraft.network.NetHandlerPlayServer", - Name("processPlayerBlockPlacement", "a"), - new String[] - { - Name("net.minecraft.network.play.client.C08PacketPlayerBlockPlacement", "jo") - }, - null, - "net.smart.core.SmartCoreEventHandler", - "NetHandlerPlayServer_beforeProcessPlayerBlockPlacement", - "NetHandlerPlayServer_afterProcessPlayerBlockPlacement" - ), - new SmartCoreTransformation - ( - Name("net.minecraft.client.multiplayer.PlayerControllerMP", "bje"), - Name("onPlayerRightClick", "a"), - new String[] - { - Name("net.minecraft.entity.player.EntityPlayer", "yz"), - Name("net.minecraft.world.World", "ahb"), - Name("net.minecraft.item.ItemStack", "add"), - "int", - "int", - "int", - "int", - Name("net.minecraft.util.Vec3", "azw") - }, - "boolean", - "net.smart.core.SmartCoreEventHandler", - "PlayerControllerMP_beforeOnPlayerRightClick", - "PlayerControllerMP_afterOnPlayerRightClick" - ), - new SmartCoreTransformation - ( - Name("net.minecraft.server.management.ItemInWorldManager", "qx"), - Name("activateBlockOrUseItem", "a"), - new String[] - { - Name("net.minecraft.entity.player.EntityPlayer", "yz"), - Name("net.minecraft.world.World", "ahb"), - Name("net.minecraft.item.ItemStack", "add"), - "int", - "int", - "int", - "int", - "float", - "float", - "float" - }, - "boolean", - "net.smart.core.SmartCoreEventHandler", - "ItemInWorldManager_beforeActivateBlockOrUseItem", - "ItemInWorldManager_afterActivateBlockOrUseItem" - ) - }; - - private static String Name(String deobfuscated, String obfuscated) - { - return SmartCorePlugin.isObfuscated ? obfuscated : deobfuscated; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/Button.java b/src/main/java/net/smart/moving/Button.java deleted file mode 100644 index b1cc605b..00000000 --- a/src/main/java/net/smart/moving/Button.java +++ /dev/null @@ -1,73 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; - -import net.minecraft.client.*; -import net.minecraft.client.gui.*; -import net.minecraft.client.settings.*; - -public class Button extends SmartMovingContext -{ - public boolean Pressed; - public boolean WasPressed; - - public boolean StartPressed; - public boolean StopPressed; - - public void update(KeyBinding binding) - { - update(Minecraft.getMinecraft().inGameHasFocus && isKeyDown(binding)); - } - - public void update(int keyCode) - { - update(Minecraft.getMinecraft().inGameHasFocus && isKeyDown(keyCode)); - } - - public void update(boolean pressed) - { - WasPressed = Pressed; - Pressed = pressed; - - StartPressed = !WasPressed && Pressed; - StopPressed = WasPressed && !Pressed; - } - - private static boolean isKeyDown(KeyBinding keyBinding) - { - return isKeyDown(keyBinding, keyBinding.isPressed()); - } - - private static boolean isKeyDown(KeyBinding keyBinding, boolean wasDown) - { - GuiScreen currentScreen = Minecraft.getMinecraft().currentScreen; - if(currentScreen == null || currentScreen.allowUserInput) - return isKeyDown(keyBinding.getKeyCode()); - return wasDown; - } - - private static boolean isKeyDown(int keyCode) - { - if(keyCode >= 0) - return Keyboard.isKeyDown(keyCode); - return Mouse.isButtonDown(keyCode + 100); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/ClimbGap.java b/src/main/java/net/smart/moving/ClimbGap.java deleted file mode 100644 index aeaaf8c7..00000000 --- a/src/main/java/net/smart/moving/ClimbGap.java +++ /dev/null @@ -1,45 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.block.*; - -public class ClimbGap -{ - public Block Block; - public int Meta; - public boolean CanStand; - public boolean MustCrawl; - public Orientation Direction; - public boolean SkipGaps; - - public ClimbGap() - { - reset(); - } - - public void reset() - { - Block = null; - Meta = -1; - CanStand = false; - MustCrawl = false; - Direction = null; - SkipGaps = false; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/FeetClimbing.java b/src/main/java/net/smart/moving/FeetClimbing.java deleted file mode 100644 index 5fa9a683..00000000 --- a/src/main/java/net/smart/moving/FeetClimbing.java +++ /dev/null @@ -1,115 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.io.*; - -public class FeetClimbing -{ - public static final int DownStep = 1; - public static final int NoStep = 0; - - public static FeetClimbing None = new FeetClimbing(-3); - public static FeetClimbing BaseHold = new FeetClimbing(-2); - public static FeetClimbing BaseWithHands = new FeetClimbing(-1); - public static FeetClimbing TopWithHands = new FeetClimbing(0); - public static FeetClimbing SlowUpWithHoldWithoutHands = new FeetClimbing(1); - public static FeetClimbing SlowUpWithSinkWithoutHands = new FeetClimbing(2); - public static FeetClimbing FastUp = new FeetClimbing(3); - - private int _value; - - private FeetClimbing(int value) - { - _value = value; - } - - public boolean IsRelevant() - { - return _value > None._value; - } - - public boolean IsIndependentlyRelevant() - { - return _value > BaseWithHands._value; - } - - public boolean IsUp() - { - return this == SlowUpWithHoldWithoutHands || this == SlowUpWithSinkWithoutHands || this == FastUp; - } - - public FeetClimbing max(FeetClimbing other, ClimbGap inout_thisClimbGap, ClimbGap otherClimbGap) - { - if(!otherClimbGap.SkipGaps) - { - inout_thisClimbGap.CanStand |= otherClimbGap.CanStand; - inout_thisClimbGap.MustCrawl |= otherClimbGap.MustCrawl; - } - if(_value < other._value) - { - inout_thisClimbGap.Block = otherClimbGap.Block; - inout_thisClimbGap.Meta = otherClimbGap.Meta; - inout_thisClimbGap.Direction = otherClimbGap.Direction; - } - return get(Math.max(_value, other._value)); - } - - @Override - public String toString() - { - if(_value <= None._value) - return "None"; - if(_value == BaseHold._value) - return "BaseHold"; - if(_value == BaseWithHands._value) - return "BaseWithHands"; - if(_value == TopWithHands._value) - return "TopWithHands"; - if(_value == SlowUpWithHoldWithoutHands._value) - return "SlowUpWithHoldWithoutHands"; - if(_value == SlowUpWithSinkWithoutHands._value) - return "SlowUpWithSinkWithoutHands"; - return "FastUp"; - } - - public void print(String name) - { - PrintStream stream = System.err; - if(name != null) - stream.print(name + " = "); - stream.println(this); - } - - private static FeetClimbing get(int value) - { - if(value <= None._value) - return None; - if(value == BaseHold._value) - return BaseHold; - if(value == BaseWithHands._value) - return BaseWithHands; - if(value == TopWithHands._value) - return TopWithHands; - if(value == SlowUpWithHoldWithoutHands._value) - return SlowUpWithHoldWithoutHands; - if(value == SlowUpWithSinkWithoutHands._value) - return SlowUpWithSinkWithoutHands; - return FastUp; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/HandsClimbing.java b/src/main/java/net/smart/moving/HandsClimbing.java deleted file mode 100644 index ca74a733..00000000 --- a/src/main/java/net/smart/moving/HandsClimbing.java +++ /dev/null @@ -1,120 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.io.*; - -public class HandsClimbing -{ - public static final int MiddleGrab = 2; - public static final int UpGrab = 1; - public static final int NoGrab = 0; - - public static HandsClimbing None = new HandsClimbing(-3); - public static HandsClimbing Sink = new HandsClimbing(-2); - public static HandsClimbing TopHold = new HandsClimbing(-1); - public static HandsClimbing BottomHold = new HandsClimbing(0); - public static HandsClimbing Up = new HandsClimbing(1); - public static HandsClimbing FastUp = new HandsClimbing(2); - - private int _value; - - private HandsClimbing(int value) - { - _value = value; - } - - public boolean IsRelevant() - { - return _value > None._value; - } - - public boolean IsUp() - { - return this == Up || this == FastUp; - } - - public HandsClimbing ToUp() - { - if(this == BottomHold) - return Up; - return this; - } - - public HandsClimbing ToDown() - { - if(this == TopHold) - return Sink; - return this; - } - - public HandsClimbing max(HandsClimbing other, ClimbGap inout_thisClimbGap, ClimbGap otherClimbGap) - { - if(!otherClimbGap.SkipGaps) - { - inout_thisClimbGap.CanStand |= otherClimbGap.CanStand; - inout_thisClimbGap.MustCrawl |= otherClimbGap.MustCrawl; - } - if(_value < other._value) - { - inout_thisClimbGap.Block = otherClimbGap.Block; - inout_thisClimbGap.Meta = otherClimbGap.Meta; - inout_thisClimbGap.Direction = otherClimbGap.Direction; - } - return get(Math.max(_value, other._value)); - } - - @Override - public String toString() - { - if(_value <= None._value) - return "None"; - if(_value == Sink._value) - return "Sink"; - if(_value == BottomHold._value) - return "BottomHold"; - if(_value == TopHold._value) - return "TopHold"; - if(_value == Up._value) - return "Up"; - return "FastUp"; - } - - public void print(String name) - { - PrintStream stream = System.err; - if(name != null) - stream.print(name + " = "); - stream.println(this); - } - - private static HandsClimbing get(int value) - { - if(value <= None._value) - return None; - if(value == Sink._value) - return Sink; - if(value == BottomHold._value) - return BottomHold; - if(value == TopHold._value) - return TopHold; - if(value == Up._value) - return Up; - return FastUp; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/IEntityPlayerMP.java b/src/main/java/net/smart/moving/IEntityPlayerMP.java deleted file mode 100644 index f27716ed..00000000 --- a/src/main/java/net/smart/moving/IEntityPlayerMP.java +++ /dev/null @@ -1,70 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.util.*; - -import cpw.mods.fml.common.network.internal.FMLProxyPacket; - -import net.minecraft.entity.*; -import net.minecraft.util.*; - -public interface IEntityPlayerMP extends IPacketSender -{ - void sendPacketToTrackedPlayers(FMLProxyPacket packet); - - String getUsername(); - - void resetFallDistance(); - - void resetTicksForFloatKick(); - - void setHeight(float height); - - double getMinY(); - - float getHeight(); - - void setMaxY(double maxY); - - boolean localIsEntityInsideOpaqueBlock(); - - SmartMovingServer getMoving(); - - IEntityPlayerMP[] getAllPlayers(); - - float doGetHealth(); - - AxisAlignedBB getBox(); - - AxisAlignedBB expandBox(AxisAlignedBB box, double x, double y, double z); - - List getEntitiesExcludingPlayer(AxisAlignedBB box); - - boolean isDeadEntity(Entity entity); - - void onCollideWithPlayer(Entity entity); - - void localAddExhaustion(float exhaustion); - - void localAddMovementStat(double x, double y, double z); - - void localPlaySound(String soundId, float volume, float pitch); - - boolean localIsSneaking(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/IEntityPlayerSP.java b/src/main/java/net/smart/moving/IEntityPlayerSP.java deleted file mode 100644 index 2555b9a4..00000000 --- a/src/main/java/net/smart/moving/IEntityPlayerSP.java +++ /dev/null @@ -1,62 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.block.material.*; -import net.minecraft.client.*; -import net.minecraft.entity.player.EntityPlayer.*; -import net.minecraft.nbt.*; - -public interface IEntityPlayerSP -{ - SmartMoving getMoving(); - - boolean getSleepingField(); - - boolean getIsJumpingField(); - - boolean getIsInWebField(); - - void setIsInWebField(boolean b); - - Minecraft getMcField(); - - void setMoveForwardField(float f); - - void setMoveStrafingField(float f); - - void setIsJumpingField(boolean flag); - - void localMoveEntity(double d, double d1, double d2); - - EnumStatus localSleepInBedAt(int i, int j, int k); - - float localGetBrightness(float f); - - int localGetBrightnessForRender(float f); - - void localUpdateEntityActionState(); - - boolean localIsInsideOfMaterial(Material material); - - void localWriteEntityToNBT(NBTTagCompound nBTTagCompound); - - boolean localIsSneaking(); - - float localGetFOVMultiplier(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/ILocalUserNameProvider.java b/src/main/java/net/smart/moving/ILocalUserNameProvider.java deleted file mode 100644 index 0801bae2..00000000 --- a/src/main/java/net/smart/moving/ILocalUserNameProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -public interface ILocalUserNameProvider -{ - String getLocalConfigUserName(); - - String getLocalSpeedUserName(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/IPacketReceiver.java b/src/main/java/net/smart/moving/IPacketReceiver.java deleted file mode 100644 index 31672e0e..00000000 --- a/src/main/java/net/smart/moving/IPacketReceiver.java +++ /dev/null @@ -1,37 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import cpw.mods.fml.common.network.internal.*; - -public interface IPacketReceiver -{ - boolean processStatePacket(FMLProxyPacket packet, IEntityPlayerMP player, int entityId, long state); - - boolean processConfigInfoPacket(FMLProxyPacket packet, IEntityPlayerMP player, String info); - - boolean processConfigContentPacket(FMLProxyPacket packet, IEntityPlayerMP player, String[] content, String username); - - boolean processConfigChangePacket(FMLProxyPacket packet, IEntityPlayerMP player); - - boolean processSpeedChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, int difference, String username); - - boolean processHungerChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, float hunger); - - boolean processSoundPacket(FMLProxyPacket packet, IEntityPlayerMP player, String soundId, float distance, float pitch); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/IPacketSender.java b/src/main/java/net/smart/moving/IPacketSender.java deleted file mode 100644 index 53fc6307..00000000 --- a/src/main/java/net/smart/moving/IPacketSender.java +++ /dev/null @@ -1,23 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -public interface IPacketSender -{ - void sendPacket(byte[] byteArray); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/ISmartMovingClient.java b/src/main/java/net/smart/moving/ISmartMovingClient.java deleted file mode 100644 index aec48ad9..00000000 --- a/src/main/java/net/smart/moving/ISmartMovingClient.java +++ /dev/null @@ -1,37 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -public interface ISmartMovingClient -{ - float getMaximumExhaustion(); - - float getMaximumUpJumpCharge(); - - float getMaximumHeadJumpCharge(); - - void setMaximumExhaustionValue(String key, float value); - - float getMaximumExhaustionValue(String key); - - boolean removeMaximumExhaustionValue(String key); - - void setNativeUserInterfaceDrawing(boolean value); - - boolean getNativeUserInterfaceDrawing(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/ISmartMovingSelf.java b/src/main/java/net/smart/moving/ISmartMovingSelf.java deleted file mode 100644 index 7d08c805..00000000 --- a/src/main/java/net/smart/moving/ISmartMovingSelf.java +++ /dev/null @@ -1,33 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -public interface ISmartMovingSelf -{ - float getExhaustion(); - - float getUpJumpCharge(); - - float getHeadJumpCharge(); - - void addExhaustion(float factor); - - void setMaxExhaustionForAction(float maxExhaustionForAction); - - void setMaxExhaustionToStartAction(float maxExhaustionToStartAction); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/LocalUserNameProvider.java b/src/main/java/net/smart/moving/LocalUserNameProvider.java deleted file mode 100644 index 80c37c64..00000000 --- a/src/main/java/net/smart/moving/LocalUserNameProvider.java +++ /dev/null @@ -1,35 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.client.*; - -public class LocalUserNameProvider extends SmartMovingContext implements ILocalUserNameProvider -{ - @Override - public String getLocalConfigUserName() - { - return Options._localUserHasChangeConfigRight.value ? Minecraft.getMinecraft().thePlayer.getGameProfile().getName() : null; - } - - @Override - public String getLocalSpeedUserName() - { - return Options._localUserHasChangeSpeedRight.value ? Minecraft.getMinecraft().thePlayer.getGameProfile().getName() : null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/Orientation.java b/src/main/java/net/smart/moving/Orientation.java deleted file mode 100644 index a922faf4..00000000 --- a/src/main/java/net/smart/moving/Orientation.java +++ /dev/null @@ -1,2481 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.lang.reflect.*; -import java.util.*; - -import net.minecraft.block.*; -import net.minecraft.block.material.*; -import net.minecraft.client.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; -import net.minecraft.tileentity.*; -import net.minecraft.util.*; -import net.minecraft.world.*; -import net.smart.moving.config.*; -import net.smart.utilities.*; - -public class Orientation extends SmartMovingContext -{ - public static final Orientation ZZ = new Orientation(0, 0); - - public static final Orientation PZ = new Orientation(1, 0); - public static final Orientation ZP = new Orientation(0, 1); - public static final Orientation NZ = new Orientation(-1, 0); - public static final Orientation ZN = new Orientation(0, -1); - - public static final Orientation PP = new Orientation(1, 1); - public static final Orientation NN = new Orientation(-1, -1); - public static final Orientation PN = new Orientation(1, -1); - public static final Orientation NP = new Orientation(-1, 1); - - public static final int DefaultMeta = -1; - public static final int VineFrontMeta = 0; - public static final int VineSideMeta = 1; - - private static final int top = 2; - private static final int middle = 1; - private static final int base = 0; - private static final int sub = -1; - private static final int subSub = -2; - - private static final int NoGrab = 0; - private static final int HalfGrab = 1; - private static final int AroundGrab = 2; - - public static final HashSet Orthogonals = new HashSet(); - - static - { - Orthogonals.add(PZ); - Orthogonals.add(ZP); - Orthogonals.add(NZ); - Orthogonals.add(ZN); - } - - protected int _i, _k; - private boolean _isDiagonal; - private float _directionAngle; - private float _mimimumClimbingAngle; - private float _maximumClimbingAngle; - - private Orientation(int i, int k) - { - _i = i; - _k = k; - _isDiagonal = _i != 0 && _k != 0; - - setClimbingAngles(); - } - - @SuppressWarnings("incomplete-switch") - public Orientation rotate(int angle) - { - if (this == ZZ) - throw new RuntimeException("unrotatable orientation"); - - switch(angle) - { - case 0: - return this; - case 45: - if(this == PZ) - return PP; - if(this == PP) - return ZP; - if(this == ZP) - return NP; - if(this == NP) - return NZ; - if(this == NZ) - return NN; - if(this == NN) - return ZN; - if(this == ZN) - return PN; - if(this == PN) - return PZ; - throw new RuntimeException("unknown orientation \"" + this + "\""); - case -45: - if(this == PZ) - return PN; - if(this == PN) - return ZN; - if(this == ZN) - return NN; - if(this == NN) - return NZ; - if(this == NZ) - return NP; - if(this == NP) - return ZP; - if(this == ZP) - return PP; - if(this == PP) - return PZ; - throw new RuntimeException("unknown orientation \"" + this + "\""); - case 90: - return rotate(45).rotate(45); - case -90: - return rotate(-45).rotate(-45); - case 135: - return rotate(180).rotate(-45); - case -135: - return rotate(-180).rotate(45); - case 180: - case -180: - if(this == PZ) - return NZ; - if(this == PN) - return NP; - if(this == ZN) - return ZP; - if(this == NN) - return PP; - if(this == NZ) - return PZ; - if(this == NP) - return PN; - if(this == ZP) - return ZN; - if(this == PP) - return NN; - throw new RuntimeException("unknown orientation"); - } - throw new RuntimeException("angle \"" + angle + "\" not supported"); - } - - public static Orientation getOrientation(EntityPlayer p, float tolerance, boolean orthogonals, boolean diagonals) - { - float rotation = p.rotationYaw % 360F; - if(rotation < 0) - rotation += 360F; - - float minimumRotation = rotation - tolerance; - if(minimumRotation < 0) - minimumRotation += 360F; - - float maximumRotation = rotation + tolerance; - if(maximumRotation >= 360F) - maximumRotation -= 360F; - - if(orthogonals) - { - if(NZ.isWithinAngle(minimumRotation, maximumRotation)) - return NZ; - if(PZ.isWithinAngle(minimumRotation, maximumRotation)) - return PZ; - if(ZN.isWithinAngle(minimumRotation, maximumRotation)) - return ZN; - if(ZP.isWithinAngle(minimumRotation, maximumRotation)) - return ZP; - } - if(diagonals) - { - if(NP.isWithinAngle(minimumRotation, maximumRotation)) - return NP; - if(PN.isWithinAngle(minimumRotation, maximumRotation)) - return PN; - if(NN.isWithinAngle(minimumRotation, maximumRotation)) - return NN; - if(PP.isWithinAngle(minimumRotation, maximumRotation)) - return PP; - } - return null; - } - - public double getHorizontalBorderGap(Entity entity) - { - return getHorizontalBorderGap(entity.posX, entity.posZ); - } - - private double getHorizontalBorderGap() - { - return getHorizontalBorderGap(base_id, base_kd); - } - - private double getHorizontalBorderGap(double i, double k) - { - if(this == NZ) - return i % 1; - if(this == PZ) - return 1 - (i % 1); - if(this == ZN) - return k % 1; - if(this == ZP) - return 1 - (k % 1); - return 0D; - } - - public boolean isTunnelAhead(World world, int i, int j, int k) - { - Block remoteId = world.getBlock(i + _i, j + 1, k + _k); - if(isFullEmpty(remoteId)) - { - Material aboveMaterial = world.getBlock(i + _i, j + 2, k + _k).getMaterial(); - if(aboveMaterial != null && isSolid(aboveMaterial)) - return true; - } - return false; - } - - public static HashSet getClimbingOrientations(EntityPlayer p, boolean orthogonals, boolean diagonals) - { - float rotation = p.rotationYaw % 360F; - if(rotation < 0) - rotation += 360F; - - if(_getClimbingOrientationsHashSet == null) - _getClimbingOrientationsHashSet = new HashSet(); - else - _getClimbingOrientationsHashSet.clear(); - - if(orthogonals) - { - NZ.addTo(rotation); - PZ.addTo(rotation); - ZN.addTo(rotation); - ZP.addTo(rotation); - } - if(diagonals) - { - NP.addTo(rotation); - PN.addTo(rotation); - NN.addTo(rotation); - PP.addTo(rotation); - } - return _getClimbingOrientationsHashSet; - } - - private static HashSet _getClimbingOrientationsHashSet = null; - - private void addTo(float rotation) - { - if(isRotationForClimbing(rotation)) - _getClimbingOrientationsHashSet.add(this); - } - - public boolean isFeetLadderSubstitute(World world, int bi, int j, int bk) - { - int i = bi + _i; - int k = bk + _k; - - return isLadderSubstitute(world, i, j, k, middle) > 0 || isLadderSubstitute(world, i, j, k, base) > 0; - } - - public boolean isHandsLadderSubstitute(World world, int bi, int j, int bk) - { - int i= bi + _i; - int k = bk + _k; - - return isLadderSubstitute(world, i, j, k, middle) > 0 || isLadderSubstitute(world, i, j, k, base) > 0 || isLadderSubstitute(world, i, j, k, sub) > 0; - } - - private int isLadderSubstitute(World worldObj, int i, int j, int k, int halfOffset) - { - world = worldObj; - remote_i = i; - all_j = j; - remote_k = k; - all_offset = 0; - return isLadderSubstitute(halfOffset, null); - } - - public void seekClimbGap(float rotation, World world, int i, double id, double jhd, int k, double kd, boolean isClimbCrawling, boolean isCrawlClimbing, boolean isCrawling, HandsClimbing[] inout_handsClimbing, FeetClimbing[] inout_feetClimbing, ClimbGap out_handsClimbGap, ClimbGap out_feetClimbGap) - { - if(isRotationForClimbing(rotation)) - { - initialize(world, i, id, jhd, k, kd); - - inout_handsClimbing[0] = inout_handsClimbing[0].max(handsClimbing(isClimbCrawling, isCrawlClimbing, isCrawling, _climbGapOuterTemp), out_handsClimbGap, _climbGapOuterTemp); - inout_feetClimbing[0] = inout_feetClimbing[0].max(feetClimbing(isClimbCrawling, isCrawlClimbing, isCrawling, _climbGapOuterTemp), out_feetClimbGap, _climbGapOuterTemp); - } - } - - private HandsClimbing handsClimbing(boolean isClimbCrawling, boolean isCrawlClimbing, boolean isCrawling, ClimbGap out_climbGap) - { - out_climbGap.reset(); - _climbGapTemp.reset(); - - initializeOffset(3D, isClimbCrawling, isCrawlClimbing, isCrawling); - - HandsClimbing result = HandsClimbing.None; - int gap; - - if((gap = isLadderSubstitute(middle, _climbGapTemp)) > 0) - if(jh_offset > 1D - _handClimbingHoldGap) - result = result.max(HandsClimbing.Up, out_climbGap, _climbGapTemp); - else - result = result.max(HandsClimbing.None, out_climbGap, _climbGapTemp); // No climbing (hands not long enough - up) - - if((gap = isLadderSubstitute(base, _climbGapTemp)) > 0) - if(jh_offset < _handClimbingHoldGap) - result = result.max(HandsClimbing.BottomHold, out_climbGap, _climbGapTemp); // Climbing speed 1 (pulling weight up) or hold when climbing down - else - result = result.max(HandsClimbing.Up, out_climbGap, _climbGapTemp); // Climbing speed 1 (pulling weight up) - - _climbGapTemp.SkipGaps = isClimbCrawling || isCrawlClimbing; - - if((gap = isLadderSubstitute(sub, _climbGapTemp)) > 0 && !(isCrawling && gap > 1)) - if(!isClimbCrawling && gap > 2) - result = result.max(HandsClimbing.FastUp, out_climbGap, _climbGapTemp); // Climbing speed 1 (pulling upper body into gap) - else if(isClimbCrawling && gap > 1) - result = result.max(HandsClimbing.FastUp, out_climbGap, _climbGapTemp); // Climbing speed 1 (crawling into upper gap) - else // (no gap for balancing upper body) - if(jh_offset < _handClimbingHoldGap) - if(grabType == AroundGrab) - result = result.max(HandsClimbing.Up, out_climbGap, _climbGapTemp); // Lower climbing up ladder - else - result = result.max(HandsClimbing.TopHold, out_climbGap, _climbGapTemp); // Lower holding - else - if(grabType == AroundGrab) - result = result.max(HandsClimbing.TopHold, out_climbGap, _climbGapTemp); // Sinking to lower holding level - else - result = result.max(HandsClimbing.Sink, out_climbGap, _climbGapTemp); // Sinking to lower holding level - - if((gap = isLadderSubstitute(subSub, _climbGapTemp)) > 0 && !isCrawling) - if((gap > 2 && !isCrawlClimbing) || grabType == AroundGrab || (gap > 1 && isClimbCrawling)) // (hands not long enough - down) - if(jh_offset < _handClimbingHoldGap && !isClimbCrawling) - result = result.max(HandsClimbing.TopHold, out_climbGap, _climbGapTemp); // Upper holding - else if(isClimbCrawling) - result = result.max(HandsClimbing.FastUp, out_climbGap, _climbGapTemp); // Sinking to upper holding level - else - result = result.max(HandsClimbing.Sink, out_climbGap, _climbGapTemp); // Sinking to upper holding level - - return result; - } - - private FeetClimbing feetClimbing(boolean isClimbCrawling, boolean isCrawlClimbing, boolean isCrawling, ClimbGap out_climbGap) - { - out_climbGap.reset(); - _climbGapTemp.reset(); - - initializeOffset(0D, isClimbCrawling, isCrawlClimbing, isCrawling); - FeetClimbing result = FeetClimbing.None; - int gap; - - if((gap = isLadderSubstitute(top, _climbGapTemp)) > 0) // No climbing (feet not long enough - up) - result = result.max(FeetClimbing.None, out_climbGap, _climbGapTemp); - - _climbGapTemp.SkipGaps = isClimbCrawling || isCrawlClimbing; - - if((gap = isLadderSubstitute(middle, _climbGapTemp)) > 0 && !isCrawling) - if(gap > 3 && !isClimbCrawling) - if(!isCrawlClimbing) - result = result.max(FeetClimbing.FastUp, out_climbGap, _climbGapTemp); // Climbing speed 2 (pushing upper body up into big gap) - else - result = result.max(FeetClimbing.None, out_climbGap, _climbGapTemp); - else if((isClimbCrawling || isCrawlClimbing) && gap > 1) - if(isCrawlClimbing) - result = result.max(FeetClimbing.BaseWithHands, out_climbGap, _climbGapTemp); - else - result = result.max(FeetClimbing.FastUp, out_climbGap, _climbGapTemp); - else if(gap > 2) - if(!isClimbCrawling) - result = result.max(FeetClimbing.SlowUpWithHoldWithoutHands, out_climbGap, _climbGapTemp); // Climbing speed 1 (no gap for balancing upper body) - else - result = result.max(FeetClimbing.None, out_climbGap, _climbGapTemp); - else - result = result.max(FeetClimbing.TopWithHands,out_climbGap, _climbGapTemp); // Climbing with hands only - - if((gap = isLadderSubstitute(base, _climbGapTemp)) > 0) - if(gap > 3 && !isCrawling && !isCrawlClimbing) - result = result.max(FeetClimbing.FastUp, out_climbGap, _climbGapTemp); // Climbing speed 2 (pushing whole body up into big gap) - else if(gap > 2 && !isCrawling) - if(!isClimbCrawling) - if(jh_offset < _handClimbingHoldGap) - result = result.max(FeetClimbing.SlowUpWithHoldWithoutHands, out_climbGap, _climbGapTemp); - else - result = result.max(FeetClimbing.SlowUpWithSinkWithoutHands, out_climbGap, _climbGapTemp); // Climbing speed 1 (no gap for balancing whole body) - else - result = result.max(FeetClimbing.None, out_climbGap, _climbGapTemp); - else - if(jh_offset < 1D - _handClimbingHoldGap) - result = result.max(FeetClimbing.BaseWithHands, out_climbGap, _climbGapTemp); // Climbing with hands only - else - result = result.max(FeetClimbing.BaseHold, out_climbGap, _climbGapTemp); - - if((isLadderSubstitute(sub, _climbGapTemp)) > 0) - result = result.max(FeetClimbing.None, out_climbGap, _climbGapTemp); // No climbing (feet not long enough - down) - - if(isCrawlClimbing || isCrawling) - result = result.max(FeetClimbing.BaseWithHands, out_climbGap, _climbGapTemp); - - return result; - } - - private int isLadderSubstitute(int local_Offset, ClimbGap out_climbGap) - { - initializeLocal(local_Offset); - - int gap; - if(local_half == 1) - if(hasHalfHold()) - { - if(!grabRemote) - { - boolean overLadder = isOnLadderOrVine(0) || isOnOpenTrapDoor(0) || isRope(0) || isOnWallRope(0); - boolean overOverLadder = isOnLadderOrVine(1) || isOnOpenTrapDoor(1) || isRope(1) || isOnWallRope(1); - boolean overAccessible = isBaseAccessible(1, false, true); - boolean overOverAccessible = isBaseAccessible(2, false, true); - boolean overFullAccessible = overAccessible && isFullAccessible(1, grabRemote); - boolean overOverFullAccessible = overAccessible && isFullExtentAccessible(2, grabRemote); - - if(overLadder) - if(overOverLadder) - gap = 1; - else if(overOverAccessible) - gap = 1; - else - gap = 1; - else if(overAccessible) - if(overFullAccessible) - if(overOverFullAccessible) - gap = 5; - else - gap = crawl ? 3 : 5; - else if(overOverLadder) - gap = 5; - else - gap = 1; - else - gap = 1; - } - else if(isBaseAccessible(0)) - if(isUpperHalfFrontEmpty(remote_i, 0, remote_k)) - if(isFullAccessible(1, grabRemote)) - if(isFullExtentAccessible(2, grabRemote)) - gap = 5; - else if(isJustLowerHalfExtentAccessible(2)) - gap = 4; - else - gap = 3; - else - gap = 1; - else - gap = 1; - else - gap = 0; - } - else - gap = 0; - else - if(hasBottomHold()) - { - if(!grabRemote) - { - boolean overLadder = isOnLadderOrVine(0) || isOnOpenTrapDoor(0) || isRope(0) || isOnWallRope(0); - boolean overOverLadder = isOnLadderOrVine(1) || isOnOpenTrapDoor(1) || isRope(1) || isOnWallRope(0); - boolean overAccessible = isBaseAccessible(0, false, true); - boolean overOverAccessible = isBaseAccessible(1, false, true); - boolean overFullAccessible = overAccessible && isFullAccessible(0, grabRemote); - boolean overOverFullAccessible = overAccessible && isFullExtentAccessible(1, grabRemote); - - if(overLadder) - if(overOverLadder) - gap = 1; - else if(overOverAccessible) - gap = 1; - else - gap = 1; - else if(overAccessible) - if(overFullAccessible) - if(overOverAccessible) - if(overOverFullAccessible) - gap = 4; - else - gap = crawl ? 2 : 4; - else - gap = 2; - else if(overOverLadder) - gap = 2; - else - gap = 1; - else - gap = 1; - } - else if(isBaseAccessible(0)) - if(isFullAccessible(0, grabRemote)) - if(isFullExtentAccessible(1, grabRemote)) - gap = 4; - else - gap = 2; - else - gap = 1; - else - gap = 0; - } - else - gap = 0; - - if(out_climbGap != null && gap > 0) - { - out_climbGap.Block = grabBlock; - out_climbGap.Meta = grabMeta; - out_climbGap.CanStand = gap > 3; - out_climbGap.MustCrawl = gap > 1 && gap < 4; - out_climbGap.Direction = this; - } - return gap; - } - - private boolean hasHalfHold() - { - if(Config.isFreeBaseClimb()) - { - if(isOnLadder(0) && isOnLadderFront(0)) - return setHalfGrabType(AroundGrab, getBaseBlockId(0), false); - - if(remoteLadderClimbing(0)) - return setHalfGrabType(AroundGrab, getRemoteBlockId(0), true); - } - - if(SmartMovingOptions.hasBetterThanWolves || SmartMovingOptions.hasRopesPlus) - { - Block id; - if((id = getRopeId(0)) != null && isHeadedToRope()) - return setHalfGrabType(AroundGrab, id, false); - if((id = getAnchorId(0)) != null && isOnAnchorFront(0)) - return setHalfGrabType(HalfGrab, id, false); - } - - Block remoteId = getRemoteBlockId(0); - if(isEmpty(base_i, 0, base_k)) - { - if(remoteId == Block.getBlockFromName("iron_bars") && headedToFrontWall(remote_i, 0, remote_k, remoteId)) - return setHalfGrabType(HalfGrab, remoteId); - } - - Block wallId = getWallBlockId(base_i, 0, base_k); - if(wallId == Block.getBlockFromName("iron_bars") && headedToBaseWall(0, wallId)) - return setHalfGrabType(HalfGrab, wallId, false); - if(wallId != null && isOnMiddleLadderFront(0)) - return setHalfGrabType(AroundGrab, remoteId, false); - - if(Config._freeFenceClimbing.value) - { - if(isFence(remoteId, remote_i, 0, remote_k) && headedToFrontWall(remote_i, 0, remote_k, remoteId)) - if(!isFence(getBaseBlockId(0), base_i, 0, base_k)) - return setHalfGrabType(HalfGrab, remoteId); - else if(headedToFrontSideWall(remote_i, 0, remote_k, remoteId)) - return setHalfGrabType(HalfGrab, remoteId); - - Block remoteBelowId = getRemoteBlockId(-1); - if(isFence(remoteBelowId, remote_i, -1, remote_k) && headedToFrontWall(remote_i, -1, remote_k, remoteBelowId)) - if(!isFence(getBaseBlockId(-1), remote_i, -1, remote_k)) - return setHalfGrabType(HalfGrab, remoteId); - else if(headedToFrontSideWall(remote_i, -1, remote_k, remoteBelowId)) - return setHalfGrabType(HalfGrab, remoteId); - - if(isFence(wallId, base_i, 0, base_k) && headedToBaseWall(0, wallId)) - return setHalfGrabType(HalfGrab, wallId, false); - - Block belowWallId = getWallBlockId(base_i, -1, base_k); - if(isFence(belowWallId, base_i, -1, base_k) && headedToBaseWall(-1, belowWallId)) - return setHalfGrabType(HalfGrab, belowWallId, false); - - if(remoteId == Block.getBlockFromName("cobblestone_wall") && !headedToRemoteFlatWall(remoteId, 0)) - return setHalfGrabType(HalfGrab, remoteId); - - if(remoteBelowId == Block.getBlockFromName("cobblestone_wall") && !headedToRemoteFlatWall(remoteBelowId, -1)) - return setHalfGrabType(HalfGrab, remoteBelowId); - } - - int remoteMetadata = getRemoteBlockMetadata(0); - if(isBottomHalfBlock(remoteId, remoteMetadata) || (isStairCompact(remoteId) && isBottomStairCompactNotBack(remoteMetadata) && !(isStairCompact(getBaseBlockId(-1)) && isBottomStairCompactFront(getBaseBlockMetadata(-1))))) - return setHalfGrabType(HalfGrab, remoteId); - - if(isTrapDoor(remoteId) && isClosedTrapDoor(getRemoteBlockMetadata(0))) - return setHalfGrabType(HalfGrab, remoteId); - - Block baseId = getBaseBlockId(0); - if(isTrapDoor(baseId) && !isClosedTrapDoor(getBaseBlockMetadata(0))) - return setHalfGrabType(HalfGrab, baseId, false); - - if(SmartMovingOptions.hasASGrapplingHook && Config._replaceRopeClimbing.value || SmartMovingOptions.hasRopesPlus) - { - if(isASRope(baseId) && isASGrapplingHookFront(getBaseBlockMetadata(0))) - return setHalfGrabType(HalfGrab, baseId, false); - if(isASRope(remoteId) && rotate(180).isASGrapplingHookFront(remoteMetadata)) - return setHalfGrabType(HalfGrab, remoteId, true); - } - - if(Config.isFreeBaseClimb()) - { - int meta = baseVineClimbing(0); - if(meta > -1) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - meta = remoteVineClimbing(0); - if(meta > -1) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - } - - return setHalfGrabType(NoGrab, null); - } - - private boolean hasBottomHold() - { - if(Config.isFreeBaseClimb()) - { - if(isOnLadder(-1) && isOnLadderFront(-1)) - return setBottomGrabType(AroundGrab, getBaseBlockId(-1) , false); - - if(isOnLadder(0) && isOnLadderFront(0)) - return setBottomGrabType(AroundGrab, getBaseBlockId(0), false); - - if(remoteLadderClimbing(-1)) - return setBottomGrabType(AroundGrab, getRemoteBlockId(-1), true); - - if(remoteLadderClimbing(0)) - return setBottomGrabType(AroundGrab, getRemoteBlockId(0), true); - } - - if(SmartMovingOptions.hasBetterThanWolves || SmartMovingOptions.hasRopesPlus) - { - Block id; - if((id = getRopeId(-1)) != null && isHeadedToRope() || (id = getRopeId(0)) != null && isHeadedToRope()) - return setBottomGrabType(AroundGrab, id, false); - if((id = getAnchorId(-1)) != null && isOnAnchorFront(-1) || (id = getAnchorId(0)) != null && isOnAnchorFront(0)) - return setBottomGrabType(HalfGrab, id, false); - } - - Block remoteId = getRemoteBlockId(0); - Block remoteBelowId = getRemoteBlockId(-1); - boolean remoteLowerHalfEmpty = isLowerHalfFrontFullEmpty(remote_i, 0, remote_k); - if(SmartMovingOptions.hasRedPowerWire) - { - if(isRedPowerWire(remoteBelowId)) - { - int coverSides = getRpCoverSides(remote_i, -1, remote_k); - if((isRedPowerWireFullFront(coverSides) || isRedPowerWireTop(coverSides)) && remoteLowerHalfEmpty) - return setBottomGrabType(HalfGrab, remoteBelowId); - } - - if(isRedPowerWire(remoteId)) - { - int coverSides = getRpCoverSides(remote_i, 0, remote_k); - if(isRedPowerWireBottom(coverSides) && remoteLowerHalfEmpty) - return setBottomGrabType(HalfGrab, remoteBelowId); - } - - Block baseId = getBaseBlockId(-1); - if(isRedPowerWire(baseId)) - { - int coverSides = getRpCoverSides(base_i, -1, base_k); - if(isRedPowerWireFullBack(coverSides) && remoteLowerHalfEmpty) - return setBottomGrabType(HalfGrab, remoteBelowId); - } - - if(isRedPowerWire(remoteBelowId)) - return false; - } - - if(isEmpty(base_i, -1, base_k)) - { - if(remoteBelowId == Block.getBlockFromName("iron_bars") && headedToFrontWall(remote_i, -1, remote_k, remoteBelowId)) - return setBottomGrabType(HalfGrab, remoteBelowId); - } - - if(Config._freeFenceClimbing.value) - { - Block baseBelowBlockId = getBaseBlockId(-1); - if(isFence(remoteBelowId, remote_i, -1, remote_k) && headedToFrontWall(remote_i, -1, remote_k, remoteBelowId)) - if(!isFence(baseBelowBlockId, base_i, -1, base_k)) - return setBottomGrabType(HalfGrab, remoteBelowId); - else if(headedToFrontSideWall(remote_i, -1, remote_k, remoteBelowId)) - return setBottomGrabType(HalfGrab, remoteBelowId); - - if(remoteBelowId == Block.getBlockFromName("cobblestone_wall") && !headedToRemoteFlatWall(remoteBelowId, -1)) - return setHalfGrabType(HalfGrab, remoteBelowId); - - if(remoteId == Block.getBlockFromName("cobblestone_wall") && !headedToRemoteFlatWall(remoteId, 0)) - return setHalfGrabType(HalfGrab, remoteId); - } - - Block belowWallBlockId = getWallBlockId(base_i, -1, base_k); - if(belowWallBlockId != null) - { - if(isEmpty(base_i - _i, 0, base_k - _k) && isEmpty(base_i - _i, -1, base_k - _k)) - { - if(belowWallBlockId == Block.getBlockFromName("iron_bars") && headedToBaseWall(-1, belowWallBlockId)) - return setBottomGrabType(HalfGrab, belowWallBlockId, false); - if(isOnMiddleLadderFront(-1)) - return setHalfGrabType(AroundGrab, remoteId, false); - - if(headedToBaseGrabWall(-1, belowWallBlockId)) - return setBottomGrabType(HalfGrab, belowWallBlockId, false); - } - - if(Config._freeFenceClimbing.value && isFence(belowWallBlockId, base_i, -1, base_k) && headedToBaseWall(-1, belowWallBlockId)) - return setBottomGrabType(HalfGrab, belowWallBlockId, false); - } - - int remoteBelowMetadata = getRemoteBlockMetadata(-1); - if(remoteLowerHalfEmpty && isBaseAccessible(-1, true, false)) - if(isUpperHalfFrontAnySolid(remote_i, -1, remote_k)) - if(!isBottomHalfBlock(remoteBelowId, remoteBelowMetadata)) - if(!isStairCompact(remoteBelowId) || !isBottomStairCompactFront(remoteBelowMetadata)) - if(!isDoor(remoteBelowId) || isDoorTop(remoteBelowMetadata)) - if(!isDoor(getBaseBlockId(0)) || !isDoorFrontBlocked(base_i, 0, base_k)) - if(Config._freeFenceClimbing.value || !isFence(remote_i, -1, remote_k)) - return setBottomGrabType(HalfGrab, remoteBelowId); - - if(isStairCompact(remoteId)) - { - int remoteMetadata = getRemoteBlockMetadata(0); - if(isTopStairCompact(remoteMetadata) && !isTopStairCompactBack(remoteMetadata) && isUpperHalfFrontFullSolid(remote_i, -1, remote_k)) - return setBottomGrabType(HalfGrab, remoteBelowId); - } - - Block baseBelowId = getBaseBlockId(-1); - int baseBelowMetadata = getBaseBlockMetadata(-1); - - // for trap door bottom hold - //if(isTrapDoor(remoteId) && isClosedTrapDoor(remote_i, local_offset, remote_k)) - // return setBottomGrabType(HalfGrab, remoteId); - - // for trap door top hold - if(isTrapDoor(baseBelowId) && !isClosedTrapDoor(getBaseBlockMetadata(-1))) - return setBottomGrabType(HalfGrab,baseBelowId, false); - - if(isDoor(baseBelowId) && isDoorTop(baseBelowMetadata) && isDoorFrontBlocked(base_i, -1, base_k) && isBaseAccessible(0)) - return setBottomGrabType(HalfGrab, baseBelowId, false); - - if(SmartMovingOptions.hasASGrapplingHook && Config._replaceRopeClimbing.value || SmartMovingOptions.hasRopesPlus) - { - if(isASRope(baseBelowId) && isASGrapplingHookFront(getBaseBlockMetadata(0))) - return setBottomGrabType(HalfGrab, baseBelowId, false); - - Block baseId = getBaseBlockId(0); - if(isASRope(baseId) && isASGrapplingHookFront(getBaseBlockMetadata(0))) - return setBottomGrabType(HalfGrab, baseId, false); - - if(isASRope(remoteBelowId) && rotate(180).isASGrapplingHookFront(remoteBelowMetadata)) - return setHalfGrabType(HalfGrab, remoteBelowId, true); - - if(isASRope(remoteId) && rotate(180).isASGrapplingHookFront(getRemoteBlockMetadata(0))) - return setHalfGrabType(HalfGrab, remoteId, true); - } - - if(Config.isFreeBaseClimb()) - { - int meta = baseVineClimbing(-1); - if(meta != DefaultMeta) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - - meta = baseVineClimbing(0); - if(meta != DefaultMeta) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - - meta = remoteVineClimbing(-1); - if(meta != DefaultMeta) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - - meta = remoteVineClimbing(0); - if(meta != DefaultMeta) - return setHalfGrabType(HalfGrab, Block.getBlockFromName("vine"), false, meta); - } - - return setBottomGrabType(NoGrab, null); - } - - private boolean setHalfGrabType(int type, Block block) - { - return setHalfGrabType(type, block, true); - } - - private boolean setHalfGrabType(int type, Block block, boolean remote) - { - return setHalfGrabType(type, block, remote, -1); - } - - private boolean setHalfGrabType(int type, Block block, boolean remote, int metaClimb) - { - boolean hasGrab = type != NoGrab; - if(hasGrab && remote && _isDiagonal) - { - boolean edgeConnectCCW = rotate(90).isUpperHalfFrontEmpty(base_i, 0, remote_k); - boolean edgeConnectCW = rotate(-90).isUpperHalfFrontEmpty(remote_i, 0, base_k); - hasGrab &= edgeConnectCCW && edgeConnectCW; - } - return setGrabType(type, block, remote, hasGrab, metaClimb); - } - - private boolean setBottomGrabType(int type, Block block) - { - return setBottomGrabType(type, block, true); - } - - private boolean setBottomGrabType(int type, Block block, boolean remote) - { - return setBottomGrabType(type, block, remote, -1); - } - - private boolean setBottomGrabType(int type, Block block, boolean remote, int metaClimb) - { - boolean hasGrab = type != NoGrab; - if(hasGrab && remote && _isDiagonal) - { - boolean edgeConnectCCW = rotate(90).isLowerHalfFrontFullEmpty(base_i, 0, remote_k); - boolean edgeConnectCW = rotate(-90).isLowerHalfFrontFullEmpty(remote_i, 0, base_k); - hasGrab &= edgeConnectCCW && edgeConnectCW; - } - return setGrabType(type, block, remote, hasGrab, metaClimb); - } - - private static boolean setGrabType(int type, Block block, boolean remote, boolean hasGrab, int metaClimb) - { - grabRemote = remote; - grabType = hasGrab ? type : NoGrab; - grabBlock = block; - grabMeta = metaClimb; - return hasGrab; - } - - @SuppressWarnings("incomplete-switch") - private boolean setClimbingAngles() - { - switch(_i) - { - case -1: - switch(_k) - { - case -1: - return setClimbingAngles(135); //NN - case 0: - return setClimbingAngles(90); // NZ - case 1: - return setClimbingAngles(45); // NP - } - break; - case 0: - switch(_k) - { - case -1: - return setClimbingAngles(180); // ZN - case 0: - return setClimbingAngles(0, 360); // ZZ - case 1: - return setClimbingAngles(0); // ZP - } - break; - case 1: - switch(_k) - { - case -1: - return setClimbingAngles(225); // PN - case 0: - return setClimbingAngles(270); // PZ - case 1: - return setClimbingAngles(315); // PP - } - break; - } - return false; - } - - private boolean setClimbingAngles(float directionAngle) - { - _directionAngle = directionAngle; - float halfAreaAngle = (_isDiagonal ? Config._freeClimbingDiagonalDirectionAngle.value : Config._freeClimbingOrthogonalDirectionAngle.value) / 2F; - return setClimbingAngles(directionAngle - halfAreaAngle, directionAngle + halfAreaAngle); - } - - private boolean setClimbingAngles(float mimimumClimbingAngle, float maximumClimbingAngle) - { - if(mimimumClimbingAngle < 0F) - mimimumClimbingAngle += 360F; - - if(maximumClimbingAngle > 360F) - maximumClimbingAngle -= 360F; - - _mimimumClimbingAngle = mimimumClimbingAngle; - _maximumClimbingAngle = maximumClimbingAngle; - - return mimimumClimbingAngle != maximumClimbingAngle; - } - - private boolean isWithinAngle(float minimumRotation, float maximumRotation) - { - return isWithinAngle(_directionAngle, minimumRotation, maximumRotation); - } - - private boolean isRotationForClimbing(float rotation) - { - return isWithinAngle(rotation, _mimimumClimbingAngle, _maximumClimbingAngle); - } - - private static boolean isWithinAngle(float rotation, float minimumRotation, float maximumRotation) - { - if(minimumRotation > maximumRotation) - return rotation >= minimumRotation || rotation <= maximumRotation; - return rotation >= minimumRotation && rotation <= maximumRotation; - } - - private int baseVineClimbing(int j_offset) - { - boolean result = isOnVine(j_offset); - if(result) - { - result = isOnVineFront(j_offset); - if(result) - return VineFrontMeta; - - if(baseVineClimbing(j_offset, PZ) || baseVineClimbing(j_offset, NZ) || baseVineClimbing(j_offset, ZP) || baseVineClimbing(j_offset, ZN)) - return VineSideMeta; - } - return DefaultMeta; - } - - private boolean baseVineClimbing(int j_offset, Orientation orientation) - { - if(orientation == this) - return false; - - return orientation.rotate(180).hasVineOrientation(world, base_i, local_offset + j_offset, base_k) && orientation.getHorizontalBorderGap() >= 0.65; - } - - private boolean remoteLadderClimbing(int j_offset) - { - return isBehindLadder(j_offset) && isOnLadderBack(j_offset); - } - - private int remoteVineClimbing(int j_offset) - { - if(isBehindVine(j_offset) && isOnVineBack(j_offset)) - return VineFrontMeta; - - if(remoteVineClimbing(j_offset, PZ) || remoteVineClimbing(j_offset, NZ) || remoteVineClimbing(j_offset, ZP) || remoteVineClimbing(j_offset, ZN)) - return VineSideMeta; - - return DefaultMeta; - } - - private boolean remoteVineClimbing(int j_offset, Orientation orientation) - { - if(orientation == this) - return false; - - int i = base_i - orientation._i; - int k = base_k - orientation._k; - return isVine(getBlock(i, j_offset, k)) && orientation.hasVineOrientation(world, i, local_offset + j_offset, k) && orientation.getHorizontalBorderGap() >= 0.65F; - } - - private static boolean isOnLadder(int j_offset) - { - Block block = getBaseBlockId(j_offset); - if(isLadder(block)) - return true; - if(isVine(block)) - return false; - if(isClimbable(world, base_i, local_offset + j_offset, base_k)) - return true; - return false; - } - - private static boolean isBehindLadder(int j_offset) - { - Block block = getRemoteBlockId(j_offset); - if(isLadder(block)) - return true; - if(isVine(block)) - return false; - if(isClimbable(world, remote_i, local_offset + j_offset, remote_k)) - return true; - return false; - } - - private static boolean isOnVine(int j_offset) - { - return isVine(getBaseBlockId(j_offset)); - } - - private static boolean isBehindVine(int j_offset) - { - return isVine(getRemoteBlockId(j_offset)); - } - - private static boolean isOnLadderOrVine(int j_offset) - { - return isLadderOrVine(getBaseBlockId(j_offset)) || isVine(grabBlock); - } - - public static boolean isLadder(Block block) - { - return block == Block.getBlockFromName("ladder"); - } - - public static boolean isVine(Block block) - { - return block == Block.getBlockFromName("vine"); - } - - public static boolean isLadderOrVine(Block block) - { - return isLadder(block) || isVine(block) || isBlockIdOfType(block, _ladderKitLadderTypes); - } - - public static boolean isKnownLadder(Block block) - { - return isLadder(block) || isBlockIdOfType(block, _ladderKitLadderTypes); - } - - public static boolean isClimbable(World world, int i, int j, int k) - { - Block block = world.getBlock(i, j, k); - return block != null && block.isLadder(world, i, j, k, Minecraft.getMinecraft().thePlayer); - } - - private boolean isOnLadderFront(int j_offset) - { - return hasLadderOrientation(base_i, j_offset, base_k); - } - - private boolean isOnLadderBack(int j_offset) - { - return rotate(180).hasLadderOrientation(remote_i, j_offset, remote_k); - } - - private boolean isOnVineFront(int j_offset) - { - return hasVineOrientation(world, base_i, local_offset + j_offset, base_k); - } - - private boolean isOnVineBack(int j_offset) - { - return rotate(180).hasVineOrientation(world, remote_i, local_offset + j_offset, remote_k); - } - - @SuppressWarnings("incomplete-switch") - private boolean isOnMiddleLadderFront(int j_offset) - { - switch(getCarpentersBlockData(base_i, j_offset, base_k)) - { - case 0: - if(this == ZN) - return isTopHalf(base_kd); - if(this == ZP) - return !isTopHalf(base_kd); - break; - case 1: - if(this == NZ) - return isTopHalf(base_id); - if(this == PZ) - return !isTopHalf(base_id); - break; - } - return false; - } - - private static int getCarpentersBlockData(int i, int j_offset, int k) - { - if (isExternalBlockType(getBlock(i, j_offset, k), _blockCarpentersLadder)) - { - TileEntity entity = getBlockTileEntity(i, j_offset, k); - if (entity != null) - return (Integer)Reflect.Invoke(_carpentersTEBaseBlockGetData, entity); - } - return -1; - } - - @SuppressWarnings("incomplete-switch") - public static Orientation getKnownLadderOrientation(World world, int i, int j, int k) - { - Block block = world.getBlock(i, j, k); - int metadata = world.getBlockMetadata(i, j, k); - - if(isBlockIdOfType(block, _ladderKitLadderTypes)) - { - switch(metadata & 0x3) - { - case 1: - return NZ; - case 3: - return PZ; - case 0: - return ZP; - case 2: - return ZN; - } - return null; - } - - switch(metadata & 0x7) - { - case 5: - return NZ; - case 4: - return PZ; - case 2: - return ZP; - case 3: - return ZN; - } - return null; - } - - public boolean hasVineOrientation(World world, int i, int j, int k) - { - int metaData = world.getBlockMetadata(i, j, k); - if(this == NZ) - return (metaData & 2) != 0; - if(this == PZ) - return (metaData & 8) != 0; - if(this == ZP) - return (metaData & 1) != 0; - if(this == ZN) - return (metaData & 4) != 0; - return false; - } - - private boolean hasLadderOrientation(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - int metadata = getBlockMetadata(i, j_offset, k); - - if(isBlockIdOfType(block, _ladderKitLadderTypes)) - { - metadata &= 0x3; - if(this == NZ) - return metadata == 1; - if(this == PZ) - return metadata == 3; - if(this == ZP) - return metadata == 0; - if(this == ZN) - return metadata == 2; - return false; - } - - int carpentersBlockData = getCarpentersBlockData(i, j_offset, k); - if(carpentersBlockData > -1) - metadata = carpentersBlockData; - else - metadata &= 0x7; - - if(this == NZ) - return metadata == 5; - if(this == PZ) - return metadata == 4; - if(this == ZP) - return metadata == 2; - if(this == ZN) - return metadata == 3; - return false; - } - - public boolean isRemoteSolid(World world, int i, int j, int k) - { - return isSolid(world.getBlock(i + _i, j, k + _k).getMaterial()); - } - - @SuppressWarnings("incomplete-switch") - public static Orientation getOpenTrapDoorOrientation(World world, int i, int j, int k) - { - int metadata = world.getBlockMetadata(i, j, k); - if(!isClosedTrapDoor(metadata)) - switch(metadata & 3) - { - case 0: - return ZP; - case 1: - return ZN; - case 2: - return PZ; - case 3: - return NZ; - } - return null; - } - - private boolean isHeadedToRope() - { - int iTriple = getTriple(base_id, base_kd); - int kTriple = getTriple(base_kd, base_id); - - if(iTriple > 0) - if(kTriple > 0) - return this == NN; - else if(kTriple < 0) - return this == NP; - else - return this == NZ; - else if(iTriple < 0) - if(kTriple > 0) - return this == PN; - else if(kTriple < 0) - return this == PP; - else - return this == PZ; - else - if(kTriple > 0) - return this == ZN; - else if(kTriple < 0) - return this == ZP; - else - return this == ZZ; - } - - @SuppressWarnings("incomplete-switch") - private boolean isOnAnchorFront(int j_offset) - { - switch(getBaseBlockMetadata(j_offset)) - { - case 0: - return false; - case 1: - return false; - case 2: - return this._k == 1; - case 3: - return this._k == -1; - case 4: - return this._i == 1; - case 5: - return this._i == -1; - } - return false; - } - - private static Block getRopeId(int j_offset) - { - Block block = getBaseBlockId(j_offset); - if(isRopeId(block)) - return block; - return null; - } - - private static boolean isRope(int j_offset) - { - return getRopeId(j_offset) != null; - } - - private static boolean isRopeId(Block block) - { - return - SmartMovingOptions.hasBetterThanWolves && hasBlockName(block, "tile.fcRopeBlock") || - SmartMovingOptions.hasRopesPlus && hasBlockName(block, "tile.blockRopeCentral"); - } - - private static Block getAnchorId(int j_offset) - { - Block block = getBaseBlockId(j_offset); - if(isAnchorId(block)) - return block; - return null; - } - - private static boolean isAnchorId(Block block) - { - return hasBlockName(block, "tile.fcAnchor"); - } - - private static boolean isOnWallRope(int j_offset) - { - return (SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASRope(getBaseBlockId(j_offset)); - } - - private static boolean isASRope(Block block) - { - return hasBlockName(block, "tile.blockRope"); - } - - private static boolean isASGrapplingHook(Block block) - { - return hasBlockName(block, "tile.blockGrHk"); - } - - private boolean isASGrapplingHookFront(int metaData) - { - boolean kPos = metaData % 2 != 0; - boolean iNeg = (metaData / 2) % 2 != 0; - boolean kNeg = (metaData / 4) % 2 != 0; - boolean iPos = (metaData / 8) % 2 != 0; - - if(_i > 0 && iPos || _i < 0 && iNeg) - if(_k > 0) - return kPos; - else if(_k < 0) - return kNeg; - else - return true; - - if(_k > 0 && kPos || _k < 0 && kNeg) - if(_i > 0) - return iPos; - else if(_i < 0) - return iNeg; - else - return true; - - return false; - } - - private static boolean isOnOpenTrapDoor(int j_offset) - { - return isTrapDoor(getBaseBlockId(j_offset)) && !isClosedTrapDoor(getBaseBlockMetadata(j_offset)); - } - - private boolean isTrapDoorFront(int trapDoorMetadata) - { - if(this == NZ) - return (trapDoorMetadata & 3) == 3; - if(this == PZ) - return (trapDoorMetadata & 3) == 2; - if(this == ZP) - return (trapDoorMetadata & 3) == 0; - if(this == ZN) - return (trapDoorMetadata & 3) == 1; - if(this == PN) - return (trapDoorMetadata & 3) == 2 || (trapDoorMetadata & 3) == 1; - if(this == PP) - return (trapDoorMetadata & 3) == 2 || (trapDoorMetadata & 3) == 0; - if(this == NN) - return (trapDoorMetadata & 3) == 3 || (trapDoorMetadata & 3) == 1; - if(this == NP) - return (trapDoorMetadata & 3) == 3 || (trapDoorMetadata & 3) == 0; - return false; - } - - private boolean isBottomStairCompactNotBack(int stairMetadata) - { - return !isTopStairCompact(stairMetadata) && !isStairCompactBack(stairMetadata); - } - - private boolean isBottomStairCompactFront(int stairMetadata) - { - return !isTopStairCompact(stairMetadata) && isStairCompactFront(stairMetadata); - } - - private boolean isTopStairCompactFront(int stairMetadata) - { - return isTopStairCompact(stairMetadata) && isStairCompactFront(stairMetadata); - } - - private boolean isTopStairCompactBack(int stairMetadata) - { - return isTopStairCompact(stairMetadata) && isStairCompactBack(stairMetadata); - } - - private boolean isStairCompactFront(int stairMetadata) - { - stairMetadata = stairMetadata & 3; - if(this == NZ) - return stairMetadata == 1; - if(this == PZ) - return stairMetadata == 0; - if(this == ZP) - return stairMetadata == 2; - if(this == ZN) - return stairMetadata == 3; - if(this == PN) - return stairMetadata == 0 || stairMetadata == 3; - if(this == PP) - return stairMetadata == 0 || stairMetadata == 2; - if(this == NN) - return stairMetadata == 1 || stairMetadata == 3; - if(this == NP) - return stairMetadata == 1 || stairMetadata == 2; - return false; - } - - private boolean isStairCompactBack(int stairMetadata) - { - stairMetadata = stairMetadata & 3; - if(this == NZ) - return stairMetadata == 0; - if(this == PZ) - return stairMetadata == 1; - if(this == ZP) - return stairMetadata == 3; - if(this == ZN) - return stairMetadata == 2; - if(this == PN) - return stairMetadata == 1 || stairMetadata == 2; - if(this == PP) - return stairMetadata == 1 || stairMetadata == 3; - if(this == NN) - return stairMetadata == 0 || stairMetadata == 2; - if(this == NP) - return stairMetadata == 0 || stairMetadata == 3; - return false; - } - - private static boolean isTopStairCompact(int stairMetadata) - { - return (stairMetadata & 4) != 0; - } - - private static boolean isRedPowerWireTop(int coverSides) - { - return (coverSides >> 1) % 2 == 1; - } - - private static boolean isRedPowerWireBottom(int coverSides) - { - return (coverSides >> 0) % 2 == 1; - } - - private boolean isRedPowerWireFullFront(int coverSides) - { - if(this == NZ) - return (coverSides >> 5) % 2 == 1; - if(this == PZ) - return (coverSides >> 4) % 2 == 1; - if(this == ZP) - return (coverSides >> 2) % 2 == 1; - if(this == ZN) - return (coverSides >> 3) % 2 == 1; - if(this == PN) - return PZ.isRedPowerWireFullFront(coverSides) && ZN.isRedPowerWireFullFront(coverSides); - if(this == PP) - return PZ.isRedPowerWireFullFront(coverSides) && ZP.isRedPowerWireFullFront(coverSides); - if(this == NN) - return NZ.isRedPowerWireFullFront(coverSides) && ZN.isRedPowerWireFullFront(coverSides); - if(this == NP) - return NZ.isRedPowerWireFullFront(coverSides) && ZP.isRedPowerWireFullFront(coverSides); - return false; - } - - private boolean isRedPowerWireAnyFront(int coverSides) - { - if(this == NZ) - return (coverSides >> 5) % 2 == 1; - if(this == PZ) - return (coverSides >> 4) % 2 == 1; - if(this == ZP) - return (coverSides >> 2) % 2 == 1; - if(this == ZN) - return (coverSides >> 3) % 2 == 1; - if(this == PN) - return PZ.isRedPowerWireFullFront(coverSides) || ZN.isRedPowerWireFullFront(coverSides); - if(this == PP) - return PZ.isRedPowerWireFullFront(coverSides) || ZP.isRedPowerWireFullFront(coverSides); - if(this == NN) - return NZ.isRedPowerWireFullFront(coverSides) || ZN.isRedPowerWireFullFront(coverSides); - if(this == NP) - return NZ.isRedPowerWireFullFront(coverSides) || ZP.isRedPowerWireFullFront(coverSides); - return false; - } - - private boolean isRedPowerWireFullBack(int coverSides) - { - if(this == NZ) - return (coverSides >> 4) % 2 == 1; - if(this == PZ) - return (coverSides >> 5) % 2 == 1; - if(this == ZP) - return (coverSides >> 3) % 2 == 1; - if(this == ZN) - return (coverSides >> 2) % 2 == 1; - if(this == PN) - return PZ.isRedPowerWireFullBack(coverSides) && ZN.isRedPowerWireFullBack(coverSides); - if(this == PP) - return PZ.isRedPowerWireFullBack(coverSides) && ZP.isRedPowerWireFullBack(coverSides); - if(this == NN) - return NZ.isRedPowerWireFullBack(coverSides) && ZN.isRedPowerWireFullBack(coverSides); - if(this == NP) - return NZ.isRedPowerWireFullBack(coverSides) && ZP.isRedPowerWireFullBack(coverSides); - return false; - } - - private boolean isRedPowerWireAnyBack(int coverSides) - { - if(this == NZ) - return (coverSides >> 4) % 2 == 1; - if(this == PZ) - return (coverSides >> 5) % 2 == 1; - if(this == ZP) - return (coverSides >> 3) % 2 == 1; - if(this == ZN) - return (coverSides >> 2) % 2 == 1; - if(this == PN) - return PZ.isRedPowerWireFullBack(coverSides) || ZN.isRedPowerWireFullBack(coverSides); - if(this == PP) - return PZ.isRedPowerWireFullBack(coverSides) || ZP.isRedPowerWireFullBack(coverSides); - if(this == NN) - return NZ.isRedPowerWireFullBack(coverSides) || ZN.isRedPowerWireFullBack(coverSides); - if(this == NP) - return NZ.isRedPowerWireFullBack(coverSides) || ZP.isRedPowerWireFullBack(coverSides); - return false; - } - - private boolean isFenceGateFront(int metaData) - { - int direction = metaData % 4; - if(this == NZ) - return direction == 0 || direction == 2; - if(this == PZ) - return direction == 0 || direction == 2; - if(this == ZP) - return direction == 1 || direction == 3; - if(this == ZN) - return direction == 1 || direction == 3; - return false; - } - - private boolean headedToFrontWall(int i, int j_offset, int k, Block block) - { - boolean zn = getWallFlag(ZN, i, j_offset, k, block); - boolean zp = getWallFlag(ZP, i, j_offset, k, block); - boolean nz = getWallFlag(NZ, i, j_offset, k, block); - boolean pz = getWallFlag(PZ, i, j_offset, k, block); - boolean allOnNone = getAllWallsOnNoWall(block); - - if(allOnNone && !zn && !zp && !nz && !pz) - zn = zp = nz = pz = true; - - return - headedToWall(NZ, pz) || - headedToWall(PZ, nz) || - headedToWall(ZN, zp) || - headedToWall(ZP, zn); - } - - private boolean headedToFrontSideWall(int i, int j_offset, int k, Block block) - { - boolean zn = getWallFlag(ZN, i, j_offset, k, block); - boolean zp = getWallFlag(ZP, i, j_offset, k, block); - boolean nz = getWallFlag(NZ, i, j_offset, k, block); - boolean pz = getWallFlag(PZ, i, j_offset, k, block); - boolean allOnNone = getAllWallsOnNoWall(block); - - if(allOnNone && !zn && !zp && !nz && !pz) - zn = zp = nz = pz = true; - - boolean iTop = isTopHalf(base_id); - boolean kTop = isTopHalf(base_kd); - if(iTop) - if(kTop) - return - headedToWall(NZ, zp) || - headedToWall(PZ, zp) || - headedToWall(ZN, pz) || - headedToWall(ZP, pz); - else - return - headedToWall(NZ, zn) || - headedToWall(PZ, zn) || - headedToWall(ZN, pz) || - headedToWall(ZP, pz); - else - if(kTop) - return - headedToWall(NZ, zp) || - headedToWall(PZ, zp) || - headedToWall(ZN, nz) || - headedToWall(ZP, nz); - else - return - headedToWall(NZ, zn) || - headedToWall(PZ, zn) || - headedToWall(ZN, nz) || - headedToWall(ZP, nz); - } - - private boolean headedToWall(Orientation base, boolean result) - { - if(this == base || this == base.rotate(45) || this == base.rotate(-45)) - return result; - return false; - } - - private boolean headedToBaseWall(int j_offset, Block block) - { - boolean zn = getWallFlag(ZN, base_i, j_offset, base_k, block); - boolean zp = getWallFlag(ZP, base_i, j_offset, base_k, block); - boolean nz = getWallFlag(NZ, base_i, j_offset, base_k, block); - boolean pz = getWallFlag(PZ, base_i, j_offset, base_k, block); - boolean allOnNone = getAllWallsOnNoWall(block); - - if(allOnNone && !zn && !zp && !nz && !pz) - zn = zp = nz = pz = true; - - boolean leaf = zn || zp || nz || pz; - boolean coreOnly = !allOnNone && !leaf; - - boolean iTop = isTopHalf(base_id); - boolean kTop = isTopHalf(base_kd); - if(iTop) - if(kTop) - return headedToBaseWall(NN, NZ, ZN, zp, nz, pz, zn, coreOnly, leaf); - else - return headedToBaseWall(NP, NZ, ZP, zn, nz, pz, zp, coreOnly, leaf); - else - if(kTop) - return headedToBaseWall(PN, PZ, ZN, zp, pz, nz, zn, coreOnly, leaf); - else - return headedToBaseWall(PP, PZ, ZP, zn, pz, nz, zp, coreOnly, leaf); - } - - private boolean headedToBaseWall(Orientation diagonal, Orientation left, Orientation right, boolean leftFront, boolean rightFrontOpposite, boolean rightFront, boolean leftFrontOpposite, boolean co, boolean leaf) - { - if(this == diagonal) - return leaf || co; - if(this == left) - return headedToBaseWall(leftFront, rightFrontOpposite, rightFront, leftFrontOpposite, co); - if(this == right) - return headedToBaseWall(rightFront, leftFrontOpposite, leftFront, rightFrontOpposite, co); - return false; - } - - private static boolean headedToBaseWall(boolean front, boolean sideOpposite, boolean side, boolean frontOpposite, boolean coreOnly) - { - return front || sideOpposite && !side || frontOpposite && !front && !side || coreOnly; - } - - private boolean headedToBaseGrabWall(int j_offset, Block block) - { - boolean zn = getWallFlag(ZN, base_i, j_offset, base_k, block); - boolean zp = getWallFlag(ZP, base_i, j_offset, base_k, block); - boolean nz = getWallFlag(NZ, base_i, j_offset, base_k, block); - boolean pz = getWallFlag(PZ, base_i, j_offset, base_k, block); - boolean allOnNone = getAllWallsOnNoWall(block); - - if(allOnNone && !zn && !zp && !nz && !pz) - zn = zp = nz = pz = true; - - boolean azn, azp, anz, apz; - - Block aboveBlock = getBlock(base_i, j_offset + 1, base_k); - if(isFullEmpty(aboveBlock)) - azn = azp = anz = apz = false; - else if(isWallBlock(aboveBlock, base_i, j_offset + 1, base_k)) - { - azn = getWallFlag(ZN, base_i, j_offset + 1, base_k, aboveBlock); - azp = getWallFlag(ZP, base_i, j_offset + 1, base_k, aboveBlock); - anz = getWallFlag(NZ, base_i, j_offset + 1, base_k, aboveBlock); - apz = getWallFlag(PZ, base_i, j_offset + 1, base_k, aboveBlock); - boolean aboveAllOnNone = getAllWallsOnNoWall(aboveBlock); - - if(aboveAllOnNone && !azn && !azp && !anz && !apz) - azn = azp = anz = apz = true; - } - else - azn = azp = anz = apz = true; - - boolean iTop = isTopHalf(base_id); - boolean kTop = isTopHalf(base_kd); - if(iTop) - if(kTop) - return headedToBaseGrabWall(-this._i, -this._k, zp, pz, nz, zn, azp, apz, anz, azn); - else - return headedToBaseGrabWall(-this._i, this._k, pz, zn, zp, nz, apz, azn, azp, anz); - else - if(kTop) - return headedToBaseGrabWall(this._i, -this._k, nz, zp, zn, pz, anz, azp, azn, apz); - else - return headedToBaseGrabWall(this._i, this._k, zn, nz, pz, zp, azn, anz, apz, azp); - } - - private static boolean headedToBaseGrabWall(int i, int k, boolean front, boolean side, boolean frontOpposite, boolean sideOpposite, boolean aboveFront, boolean aboveSide, boolean aboveFrontOpposite, boolean aboveSideOpposite) - { - if(sideOpposite && !aboveSideOpposite && !front && !aboveFront && i == 1) - return true; - if(frontOpposite && !aboveFrontOpposite && !side && !aboveSide && k == 1) - return true; - if(side && !aboveSide && k >= 0) - return true; - if(front && !aboveFront && k >= 0) - return true; - if(frontOpposite && !aboveFrontOpposite && !aboveFront && i == 1 && k >= 0) - return true; - if(sideOpposite && !aboveSideOpposite && !aboveSide && k == 1 && i >= 0) - return true; - return false; - } - - private boolean headedToRemoteFlatWall(Block block, int j_offset) - { - return - !getWallFlag(this, remote_i, j_offset, remote_k, block) && - getWallFlag(this.rotate(90), remote_i, j_offset, remote_k, block) && - !getWallFlag(this.rotate(180), remote_i, j_offset, remote_k, block) && - getWallFlag(this.rotate(-90), remote_i, j_offset, remote_k, block); - } - - @SuppressWarnings("incomplete-switch") - private boolean getWallFlag(Orientation direction, int i, int j_offset, int k, Block block) - { - if(block instanceof BlockPane) - return ((BlockPane)block).canPaneConnectToBlock(getBlock(i + direction._i, j_offset, k + direction._k)); - else if(isFenceBase(block)) - { - if(block instanceof BlockFence) - return ((BlockFence)block).canConnectFenceTo(world, i + direction._i, local_offset + j_offset, k + direction._k); - if(block instanceof BlockWall) - return ((BlockWall)block).canConnectWallTo(world, i + direction._i, local_offset + j_offset, k + direction._k); - else if(SmartMovingOptions.hasBetterMisc && _canConnectFenceTo != null) - return (Boolean)Reflect.Invoke(_canConnectFenceTo, block, world, i + direction._i, local_offset + j_offset, k + direction._k); - } - else if (isFenceGate(block)) - { - int metaData = getBlockMetadata(i, j_offset, k); - return isClosedFenceGate(metaData) && isFenceGateFront(metaData); - } - else - { - switch(getCarpentersBlockData(i, j_offset, k)) - { - case -1: - break; - case 0: - if (direction._k == 0 && direction._i != 0) - return true; - break; - case 1: - if (direction._i == 0 && direction._k != 0) - return true; - break; - } - } - return false; - } - - private static boolean getAllWallsOnNoWall(Block block) - { - return block instanceof BlockPane; - } - - private static boolean isTopHalf(double d) - { - return (int)Math.abs(Math.floor(d * 2D)) % 2 == 1; - } - - private static int getTriple(double primary, double secondary) - { - primary = primary - Math.floor(primary) - 0.5; - secondary = secondary - Math.floor(secondary) - 0.5; - - if(Math.abs(primary) * 2 < Math.abs(secondary)) - return 0; - else if(primary > 0) - return 1; - else if(primary < 0) - return -1; - else - return 0; - } - - private static boolean isBottomHalfBlock(Block block, int metadata) - { - if(isHalfBlock(block) && isHalfBlockBottomMetaData(metadata)) - return true; - if(block == Block.getBlockFromName("bed")) - return true; - if(SmartMovingOptions.hasBetterThanWolves && isAnchorId(block) && metadata == 1) - return true; - return false; - } - - private static boolean isTopHalfBlock(Block block, int metadata) - { - return isHalfBlock(block) && isHalfBlockTopMetaData(metadata); - } - - private static boolean isHalfBlockBottomMetaData(int metadata) - { - return (metadata & 8) == 0; - } - - private static boolean isHalfBlockTopMetaData(int metadata) - { - return (metadata & 8) != 0; - } - - private static boolean isHalfBlock(Block block) - { - return isBlock(block, BlockSlab.class, _knownHalfBlocks) && !((BlockSlab)block).isOpaqueCube(); - } - - private static boolean isStairCompact(Block block) - { - return isBlock(block, BlockStairs.class, _knownCompactStairBlocks); - } - - private boolean isLowerHalfFrontFullEmpty(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - boolean empty = isFullEmpty(block); - - if(!empty && SmartMovingOptions.hasRedPowerWire) - { - if(isRedPowerWire(block)) - { - int coverSides = getRpCoverSides(i, j_offset, k); - if(!isRedPowerWireAnyFront(coverSides)) - empty = true; - } - } - - if(!empty && SmartMovingOptions.hasBetterThanWolves) - { - if(isAnchorId(block)) - { - empty = getBlockMetadata(i, j_offset, k) == 0; - } - } - - if(!empty && isStairCompact(block) && isTopStairCompactFront(getBlockMetadata(i, j_offset, k))) - empty = true; - - if(!empty && isHalfBlock(block) && isHalfBlockTopMetaData(getBlockMetadata(i, j_offset, k))) - empty = true; - - if(!empty && isWallBlock(block, i, j_offset, k) && !headedToFrontWall(i, j_offset, k, block)) - empty = true; - - if(!empty && isDoor(block) && !rotate(180).isDoorFrontBlocked(i, j_offset, k)) - empty = true; - - if(!empty && (SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASRope(block) && !rotate(180).isASGrapplingHookFront(getRemoteBlockMetadata(j_offset))) - empty = true; - - if(empty && isBlockIdOfType(block, _ladderKitLadderTypes) && rotate(180).hasLadderOrientation(i, j_offset, k)) - empty = false; - - return empty; - } - - private boolean isUpperHalfFrontAnySolid(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - boolean solid = isUpperHalfFrontFullSolid(i, j_offset, k); - if(solid && isWallBlock(block, i, j_offset, k) && !headedToFrontWall(i, j_offset, k, block)) - solid = false; - return solid; - } - - private static boolean isUpperHalfFrontFullSolid(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - if(block == null) - return false; - - boolean solid = isSolid(block.getMaterial()); - if(solid && block == Block.getBlockFromName("standing_sign")) - solid = false; - if(solid && block == Block.getBlockFromName("wall_sign")) - solid = false; - if(solid && block instanceof BlockPressurePlate) - solid = false; - if(solid && isTrapDoor(block)) - solid = false; - if(solid && SmartMovingOptions.hasASGrapplingHook && isASGrapplingHook(block)) - solid = false; - if(solid && isOpenFenceGate(block, getBlockMetadata(i, j_offset, k))) - solid = false; - if(solid && isExternalBlockType(block, _blockCarpentersLadder)) - solid = false; - return solid; - } - - private static boolean isFullEmpty(Block block) - { - if(block == null) - return true; - - boolean empty = !isSolid(block.getMaterial()); - if(!empty && block == Block.getBlockFromName("standing_sign")) - empty = true; - if(!empty && block == Block.getBlockFromName("wall_sign")) - empty = true; - if(!empty && block instanceof BlockPressurePlate) - empty = true; - if(!empty && (SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASGrapplingHook(block)) - empty = true; - if(empty && (SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASRope(block)) - empty = false; - return empty; - } - - private static boolean isFenceBase(Block block) - { - return isBlock(block, BlockFence.class, _knownFenceBlocks) || isBlock(block, BlockWall.class, _knownWallBlocks); - } - - private static boolean isFence(Block block, int i, int j_offset, int k) - { - return isFenceBase(block) || isClosedFenceGate(block, getBlockMetadata(i, j_offset, k)); - } - - private static boolean isFence(int i, int j_offset, int k) - { - return getFenceId(i, j_offset, k) != null; - } - - private static Block getFenceId(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - if(isFenceBase(block) || isClosedFenceGate(block, getBlockMetadata(i, j_offset, k))) - return block; - return null; - } - - private static boolean isClosedFenceGate(Block block, int metdata) - { - return isFenceGate(block) && isClosedFenceGate(metdata); - } - - private static boolean isFenceGate(Block block) - { - return isBlock(block, BlockFenceGate.class, _knownFanceGateBlocks); - } - - private static boolean isOpenFenceGate(Block block, int metdata) - { - return isFenceGate(block) && !isClosedFenceGate(metdata); - } - - private static boolean isClosedFenceGate(int metdata) - { - return (metdata & 4) == 0; - } - - private static boolean isOpenTrapDoor(int i, int j_offset, int k) - { - return isTrapDoor(i, j_offset, k) && !isClosedTrapDoor(getBlockMetadata(i, j_offset, k)); - } - - private static boolean isClosedTrapDoor(int i, int j_offset, int k) - { - return isTrapDoor(i, j_offset, k) && isClosedTrapDoor(getBlockMetadata(i, j_offset, k)); - } - - private static boolean isTrapDoor(int i, int j_offset, int k) - { - return isTrapDoor(getBlock(i, j_offset, k)); - } - - public static boolean isTrapDoor(Block block) - { - return isBlock(block, BlockTrapDoor.class, _knownTrapDoorBlocks); - } - - private static boolean isBlock(Block block, Class type, Block[] baseBlocks) - { - if(block == null) - return false; - - if(type != null && baseBlocks.length > 1 && isBlockType(block, type)) - return true; - - for(int i=0; i blockType = block.getClass(); - for(int i=0; i externalType) - { - return externalType != null && isBlockType(block, externalType); - } - - private static boolean isBlockType(Block block, Class type) - { - return block != null && type.isAssignableFrom(block.getClass()); - } - - public static boolean isClosedTrapDoor(int metaData) - { - return (metaData & 4) == 0; - } - - private static boolean isDoor(Block block) - { - return block == Block.getBlockFromName("wooden_door") || block == Block.getBlockFromName("iron_door"); - } - - private static boolean isDoorTop(int metaData) - { - return metaData == 8; - } - - @SuppressWarnings("incomplete-switch") - private boolean isDoorFrontBlocked(int i, int j_offset, int k) - { - int metaData = getBlockMetadata(i, j_offset, k); - switch(metaData) - { - case 8: - return isDoorFrontBlocked(i, j_offset - 1, k); - case 4: - case 1: - return this._k < 0; - case 5: - case 2: - return this._i > 0; - case 6: - case 3: - return this._k > 0; - case 7: - case 0: - return this._i < 0; - } - - return true; - } - - private static Block getWallBlockId(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - if(isWallBlock(block, i, j_offset, k)) - return block; - return null; - } - - private static boolean isWallBlock(Block block, int i, int j_offset, int k) - { - return isBlock(block, BlockPane.class, _knownThinWallBlocks) || isFence(block, i, j_offset, k) || (isExternalBlockType(block, _blockCarpentersLadder) && getCarpentersBlockData(i, j_offset, k) < 2); - } - - private static boolean isBaseAccessible(int j_offset) - { - return isBaseAccessible(j_offset, false, false); - } - - private static boolean isBaseAccessible(int j_offset, boolean bottom, boolean full) - { - Block id = getBaseBlockId(j_offset); - boolean accessible = isEmpty(base_i, j_offset, base_k); - if(SmartMovingOptions.hasRedPowerWire && !accessible) - { - if(isRedPowerWire(id)) - { - int coverSides = getRpCoverSides(base_i, j_offset, base_k); - accessible = !isRedPowerWireBottom(coverSides); - - Block lowerId = getBaseBlockId(j_offset - 1); - if(isRedPowerWire(lowerId)) - { - int lowerCoverSides = getRpCoverSides(base_i, j_offset - 1, base_k); - accessible &= !isRedPowerWireTop(lowerCoverSides); - } - } - } - - if(!accessible && isFullEmpty(id)) - accessible = true; - - if(!accessible && isOpenTrapDoor(base_i, j_offset, base_k)) - accessible = true; - - if(!accessible && bottom && isClosedTrapDoor(base_i, j_offset, base_k)) - accessible = true; - - if(!accessible && !full && isWallBlock(id, base_i, j_offset, base_k)) - accessible = true; - - if(!accessible && !full && (SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASRope(id)) - accessible = true; - - if(!accessible && isDoor(id)) - accessible = true; - - if(!accessible && isExternalBlockType(id, _blockCarpentersLadder)) - accessible = true; - - return accessible; - } - - private boolean isRemoteAccessible(int j_offset) - { - boolean accessible = isEmpty(remote_i, j_offset, remote_k); - if(SmartMovingOptions.hasRedPowerWire && !accessible) - { - Block id = getRemoteBlockId(j_offset); - if(isRedPowerWire(id)) - { - int coverSides = getRpCoverSides(remote_i, j_offset, remote_k); - accessible = !isRedPowerWireAnyFront(coverSides); - - Block baseId = getBaseBlockId(j_offset); - if(isRedPowerWire(baseId)) - { - int baseCoverSides = getRpCoverSides(base_i, j_offset, base_k); - accessible &= !isRedPowerWireAnyBack(baseCoverSides); - } - } - } - - if(accessible) - { - Block id = getBaseBlockId(j_offset); - if(isTrapDoor(id)) - accessible = !isTrapDoorFront(getBlockMetadata(base_i, j_offset, base_k)); - - if(accessible && isDoor(id)) - accessible = !isDoorFrontBlocked(base_i, j_offset, base_k); - - if(remoteLadderClimbing(j_offset)) - accessible = false; - } - - if(!accessible && isTrapDoor(remote_i, j_offset, remote_k)) - accessible = isClosedTrapDoor(getRemoteBlockMetadata(j_offset)); - - if(!accessible) - { - Block id = getRemoteBlockId(j_offset); - if(isWallBlock(id, remote_i, j_offset, remote_k) && !headedToFrontWall(remote_i, j_offset, remote_k, id) && !isFence(remote_i, j_offset - 1, remote_k)) - accessible = true; - - Block belowId = getRemoteBlockId(j_offset - 1); - if(!accessible && isFence(belowId, remote_i, j_offset - 1, remote_k) && (!headedToFrontWall(remote_i, j_offset - 1, remote_k, belowId) || isWallBlock(getBaseBlockId(j_offset - 1), base_i, j_offset - 1, base_k))) - if(belowId != Block.getBlockFromName("cobblestone_wall") || headedToRemoteFlatWall(belowId, -1)) - accessible = true; - - if(!accessible && isDoor(id) && !rotate(180).isDoorFrontBlocked(remote_i, j_offset, remote_k)) - accessible = true; - - if((SmartMovingOptions.hasASGrapplingHook || SmartMovingOptions.hasRopesPlus) && isASRope(id) && !rotate(180).isASGrapplingHookFront(getRemoteBlockMetadata(j_offset))) - accessible = true; - } - - return accessible; - } - - private boolean isAccessAccessible(int j_offset) - { - if(!_isDiagonal) - return true; - - return isEmpty(remote_i, j_offset, base_k) && isEmpty(base_i, j_offset, remote_k); - } - - private boolean isFullExtentAccessible(int j_offset, boolean grabRemote) - { - boolean accessible = isFullAccessible(j_offset, grabRemote); - if(SmartMovingOptions.hasRedPowerWire && accessible) - { - Block topId = getRemoteBlockId(j_offset); - if(isRedPowerWire(topId)) - { - int coverSides = getRpCoverSides(remote_i, j_offset, remote_k); - if(isRedPowerWireBottom(coverSides)) - accessible = false; - - } - - Block bottomId = getRemoteBlockId(j_offset - 1); - if(isRedPowerWire(bottomId)) - { - int coverSides = getRpCoverSides(remote_i, j_offset - 1, remote_k); - if(isRedPowerWireTop(coverSides)) - accessible = false; - } - } - return accessible; - } - - private boolean isJustLowerHalfExtentAccessible(int j_offset) - { - Block remoteId = getRemoteBlockId(j_offset); - int remoteMetaData = getRemoteBlockMetadata(j_offset); - - boolean accessible = false; - if(!accessible) - accessible = isTopHalfBlock(remoteId, remoteMetaData); - if(!accessible) - accessible = isStairCompact(remoteId) && isTopStairCompactFront(remoteMetaData); - return accessible; - } - - private boolean isFullAccessible(int j_offset, boolean grabRemote) - { - if(grabRemote) - return isBaseAccessible(j_offset) && isRemoteAccessible(j_offset) && isAccessAccessible(j_offset); - return isEmpty(base_i, j_offset, base_k); - } - - private static boolean isEmpty(int i, int j_offset, int k) - { - return isFullEmpty(getBlock(i, j_offset, k)) && !isFence(i, j_offset - 1, k); - } - - private boolean isUpperHalfFrontEmpty(int i, int j_offset, int k) - { - Block block = getBlock(i, j_offset, k); - boolean empty = isFullEmpty(block); - - if(!empty) - { - int metadata = getBlockMetadata(i, j_offset, k); - if(isBottomHalfBlock(block, metadata)) - empty = true; - - if(!empty && isStairCompact(block) && isBottomStairCompactFront(metadata)) - empty = true; - } - - if(SmartMovingOptions.hasRedPowerWire && !empty) - { - if(isRedPowerWire(block)) - { - int coverSides = getRpCoverSides(i, j_offset, k); - if(!isRedPowerWireAnyFront(coverSides)) - empty = true; - } - } - if(!empty && isTrapDoor(block)) - empty = true; - - if(!empty) - { - Block wallId = getWallBlockId(i, j_offset, k); - if(wallId != null && (!headedToFrontWall(i, j_offset, k, wallId) || isWallBlock(getBlock(i - _i, j_offset, k - _k), i - _i, j_offset, k - _k))) - empty = true; - } - - if(empty && isBlockIdOfType(block, _ladderKitLadderTypes) && rotate(180).hasLadderOrientation(i, j_offset, k)) - empty = false; - - return empty; - } - - private static int getRpCoverSides(int i, int j_offset, int k) - { - TileEntity tileEntity = getBlockTileEntity(i, j_offset, k); - Class tileEntityClass = tileEntity.getClass(); - while(!tileEntityClass.getSimpleName().equals("TileCovered")) - tileEntityClass = tileEntityClass.getSuperclass(); - return (Integer)Reflect.GetField(tileEntityClass, tileEntity, new Name("CoverSides")); - } - - private static boolean isRedPowerWire(Block block) - { - return hasBlockName(block, "tile.rpwire"); - } - - public static int getFiniteLiquidWater(Block block) - { - String blockName = getBlockName(block); - if(blockName == null) - return 0; - if(blockName.equals("tile.nocean")) - return 2; - if(blockName.equals("tile.nwater_still")) - return 1; - return 0; - } - - private static boolean isSolid(Material material) - { - return material.isSolid() && material.blocksMovement(); - } - - private static Block getBlock(int i, int j_offset, int k) - { - return world.getBlock(i, local_offset + j_offset, k); - } - - private static int getBlockMetadata(int i, int j_offset, int k) - { - return world.getBlockMetadata(i, local_offset + j_offset, k); - } - - private static TileEntity getBlockTileEntity(int i, int j_offset, int k) - { - return world.getTileEntity(i, local_offset + j_offset, k); - } - - private static Block getBaseBlockId(int j_offset) - { - return world.getBlock(base_i, local_offset + j_offset, base_k); - } - - private static int getBaseBlockMetadata(int j_offset) - { - return world.getBlockMetadata(base_i, local_offset + j_offset, base_k); - } - - private static boolean isBlockIdOfType(Block block, Class... types) - { - if(types == null || block == null) - return false; - - Class blockType = block.getClass(); - for(Class type : types) - if(type.isAssignableFrom(blockType)) - return true; - - return false; - } - - private static Block getRemoteBlockId(int j_offset) - { - return world.getBlock(remote_i, local_offset + j_offset, remote_k); - } - - private static int getRemoteBlockMetadata(int j_offset) - { - return world.getBlockMetadata(remote_i, local_offset + j_offset, remote_k); - } - - private static boolean hasBlockName(Block block, String name) - { - String blockName = getBlockName(block); - return blockName != null && blockName.equals(name); - } - - private static String getBlockName(Block block) - { - if(block == null) - return null; - return block.getUnlocalizedName(); - } - - private void initialize(World w, int i, double id, double jhd, int k, double kd) - { - world = w; - - base_i = i; - base_id = id; - base_jhd = jhd; - base_k = k; - base_kd = kd; - - remote_i = i + _i; - remote_k = k + _k; - } - - private static void initializeOffset(double offset_halfs, boolean isClimbCrawling, boolean isCrawlClimbing, boolean isCrawling) - { - crawl = isClimbCrawling || isCrawlClimbing || isCrawling; - - double offset_jhd = base_jhd + offset_halfs; - int offset_jh = MathHelper.floor_double(offset_jhd); - jh_offset = offset_jhd - offset_jh; - - all_j = offset_jh / 2; - all_offset = offset_jh % 2; - } - - private static void initializeLocal(int localOffset) - { - local_halfOffset = localOffset + all_offset; - local_half = Math.abs(local_halfOffset) % 2; - local_offset = all_j + (local_halfOffset - local_half) / 2; - } - - private final static float _handClimbingHoldGap = Math.min(0.25F, 0.06F * Math.max(Config._freeClimbingUpSpeedFactor.value, Config._freeClimbingDownSpeedFactor.value)); - - private static ClimbGap _climbGapTemp = new ClimbGap(); - private static ClimbGap _climbGapOuterTemp = new ClimbGap(); - - private static World world; - private static double base_jhd, jh_offset; - private static int all_j, all_offset; - private static int base_i, base_k; - private static double base_id, base_kd; - private static int remote_i, remote_k; - private static boolean crawl; - - private static int local_halfOffset; - private static int local_half; - private static int local_offset; - - private static boolean grabRemote; - private static int grabType; - private static Block grabBlock; - private static int grabMeta; - - @Override - public String toString() - { - if(this == ZZ) - return "ZZ"; - if(this == NZ) - return "NZ"; - if(this == PZ) - return "PZ"; - if(this == ZP) - return "ZP"; - if(this == ZN) - return "ZN"; - if(this == PN) - return "PN"; - if(this == PP) - return "PP"; - if(this == NN) - return "NN"; - if(this == NP) - return "NP"; - return "UNKNOWN(" + _i + "," + _k + ")"; - } - - private static final Method _canConnectFenceTo; - - private static final Block[] _knownFanceGateBlocks; - private static final Block[] _knownFenceBlocks; - private static final Block[] _knownWallBlocks; - private static final Block[] _knownHalfBlocks; - private static final Block[] _knownCompactStairBlocks; - private static final Block[] _knownTrapDoorBlocks; - private static final Block[] _knownThinWallBlocks; - - private static final Class[] _ladderKitLadderTypes; - private static final Class _blockCarpentersLadder; - private static final Method _carpentersTEBaseBlockGetData; - - static - { - Class modFenceBlock = Reflect.LoadClass(Block.class, SmartMovingInstall.ModBlockFence, false); - _canConnectFenceTo = modFenceBlock != null ? Reflect.GetMethod(modFenceBlock, new Name("canConnectFenceTo"), false, IBlockAccess.class, int.class, int.class, int.class) : null; - - _blockCarpentersLadder = Reflect.LoadClass(Block.class, SmartMovingInstall.CarpentersBlockLadder, false); - if (_blockCarpentersLadder != null) - { - Class carpentersTEBaseBlock = Reflect.LoadClass(Block.class, SmartMovingInstall.CarpentersTEBaseBlock, false); - _carpentersTEBaseBlockGetData = Reflect.GetMethod(carpentersTEBaseBlock, SmartMovingInstall.CarpentersTEBaseBlock_getData); - } - else - _carpentersTEBaseBlockGetData = null; - - _knownFanceGateBlocks = new Block[] { Block.getBlockFromName("fence_gate") }; - _knownFenceBlocks = new Block[] { Block.getBlockFromName("fence"), Block.getBlockFromName("nether_brick_fence") }; - _knownWallBlocks = new Block[] { Block.getBlockFromName("cobblestone_wall") }; - _knownHalfBlocks = new Block[] {Block.getBlockFromName("stone_slab"), Block.getBlockFromName("double_stone_slab"), Block.getBlockFromName("wooden_slab"), Block.getBlockFromName("double_wooden_slab") }; - _knownCompactStairBlocks = new Block[] { Block.getBlockFromName("stone_stairs"), Block.getBlockFromName("oak_stairs"), Block.getBlockFromName("dark_oak_stairs"), Block.getBlockFromName("brick_stairs"), Block.getBlockFromName("nether_brick_stairs"), Block.getBlockFromName("sandstone_stairs"), Block.getBlockFromName("stone_brick_stairs"), Block.getBlockFromName("birch_stairs"), Block.getBlockFromName("jungle_stairs"), Block.getBlockFromName("spruce_stairs"), Block.getBlockFromName("quartz_stairs"), Block.getBlockFromName("acacia_stairs") }; - _knownTrapDoorBlocks = new Block[] { Block.getBlockFromName("trapdoor") }; - _knownThinWallBlocks = new Block[] { Block.getBlockFromName("iron_bars"), Block.getBlockFromName("glass_pane") }; - - Class blockRopeLadder = Reflect.LoadClass(Block.class, SmartMovingInstall.BlockRopeLadder, false); - Class blockSturdyLadder = Reflect.LoadClass(Block.class, SmartMovingInstall.BlockSturdyLadder, false); - if(blockRopeLadder != null) - if(blockSturdyLadder != null) - _ladderKitLadderTypes = new Class[] { blockRopeLadder, blockSturdyLadder }; - else - _ladderKitLadderTypes = new Class[] { blockRopeLadder }; - else - if(blockSturdyLadder != null) - _ladderKitLadderTypes = new Class[] { blockSturdyLadder }; - else - _ladderKitLadderTypes = null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMoving.java b/src/main/java/net/smart/moving/SmartMoving.java deleted file mode 100644 index e1ad47d3..00000000 --- a/src/main/java/net/smart/moving/SmartMoving.java +++ /dev/null @@ -1,157 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.block.*; -import net.minecraft.client.*; -import net.minecraft.client.particle.*; -import net.minecraft.entity.player.*; -import net.minecraft.util.*; - -public abstract class SmartMoving extends SmartMovingBase -{ - public boolean isSlow; - public boolean isFast; - - public boolean isClimbing; - public boolean isHandsVineClimbing; - public boolean isFeetVineClimbing; - - public boolean isClimbJumping; - public boolean isClimbBackJumping; - public boolean isWallJumping; - public boolean isClimbCrawling; - public boolean isCrawlClimbing; - public boolean isCeilingClimbing; - public boolean isRopeSliding; - - public boolean isDipping; - public boolean isSwimming; - public boolean isDiving; - public boolean isLevitating; - public boolean isHeadJumping; - public boolean isCrawling; - public boolean isSliding; - public boolean isFlying; - - public int actualHandsClimbType; - public int actualFeetClimbType; - - public int angleJumpType; - - public float heightOffset; - - private float spawnSlindingParticle; - private float spawnSwimmingParticle; - - public SmartMoving(EntityPlayer sp, IEntityPlayerSP isp) - { - super(sp, isp); - } - - public boolean isAngleJumping() - { - return angleJumpType > 1 && angleJumpType < 7; - } - - public abstract boolean isJumping(); - - public abstract boolean doFlyingAnimation(); - - public abstract boolean doFallingAnimation(); - - protected void spawnParticles(Minecraft minecraft, double playerMotionX, double playerMotionZ) - { - float horizontalSpeedSquare = 0; - if(isSliding || isSwimming) - horizontalSpeedSquare = (float)(playerMotionX * playerMotionX + playerMotionZ * playerMotionZ); - - if(isSliding) - { - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.minY - 0.1F); - int k = MathHelper.floor_double(sp.posZ); - Block block = sp.worldObj.getBlock(i, j, k); - if(block != null) - { - double posY = sp.boundingBox.minY + 0.1D; - double motionX = -playerMotionX * 4D; - double motionY = 1.5D; - double motionZ = -playerMotionZ * 4D; - - spawnSlindingParticle += horizontalSpeedSquare; - - float maxSpawnSlindingParticle = Config._slideParticlePeriodFactor.value * 0.1F; - while(spawnSlindingParticle > maxSpawnSlindingParticle) - { - double posX = sp.posX + getSpawnOffset(); - double posZ = sp.posZ + getSpawnOffset(); - int metaData = sp.worldObj.getBlockMetadata(i, j, k); - sp.worldObj.spawnParticle("blockcrack_" + Block.getIdFromBlock(block) + "_" + metaData, posX, posY, posZ, motionX, motionY, motionZ); - spawnSlindingParticle -= maxSpawnSlindingParticle; - } - } - } - - if(isSwimming) - { - float posY = MathHelper.floor_double(sp.boundingBox.minY) + 1.0F; - int i = (int)Math.floor(sp.posX); - int j = (int)Math.floor(posY - 0.5); - int k = (int)Math.floor(sp.posZ); - - Block block = sp.worldObj.getBlock(i, j, k); - - boolean isLava = block != null && isLava(block); - spawnSwimmingParticle += horizontalSpeedSquare; - - float maxSpawnSwimmingParticle = (isLava ? Config._lavaSwimParticlePeriodFactor.value : Config._swimParticlePeriodFactor.value) * 0.01F; - while(spawnSwimmingParticle > maxSpawnSwimmingParticle) - { - double posX = sp.posX + getSpawnOffset(); - double posZ = sp.posZ + getSpawnOffset(); - EntityFX splash = isLava ? new EntityLavaFX(sp.worldObj, posX, posY, posZ) : new EntitySplashFX(sp.worldObj, posX, posY, posZ, 0, 0, 0); - splash.motionX = 0; - splash.motionY = 0.2; - splash.motionZ = 0; - minecraft.effectRenderer.addEffect(splash); - - spawnSwimmingParticle -= maxSpawnSwimmingParticle; - } - } - } - - private float getSpawnOffset() - { - return (sp.getRNG().nextFloat() - 0.5F) * 2F * sp.width; - } - - protected void onStartClimbBackJump() - { - net.smart.render.SmartRenderRender.getPreviousRendererData(sp).rotateAngleY += isHeadJumping ? Half : Quarter; - isClimbBackJumping = true; - } - - protected void onStartWallJump(Float angle) - { - if (angle != null) - net.smart.render.SmartRenderRender.getPreviousRendererData(sp).rotateAngleY = angle / RadiantToAngle; - isWallJumping = true; - sp.fallDistance = 0F; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingBase.java b/src/main/java/net/smart/moving/SmartMovingBase.java deleted file mode 100644 index c32fd8a1..00000000 --- a/src/main/java/net/smart/moving/SmartMovingBase.java +++ /dev/null @@ -1,933 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.util.*; - -import net.minecraft.block.*; -import net.minecraft.block.material.*; -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; -import net.minecraft.util.*; -import net.minecraft.world.*; -import net.smart.moving.config.*; - -public abstract class SmartMovingBase extends SmartMovingContext -{ - public final EntityPlayer sp; - public final EntityPlayerSP esp; - public final IEntityPlayerSP isp; - - public SmartMovingBase(EntityPlayer sp, IEntityPlayerSP isp) - { - this.sp = sp; - this.isp = isp; - - if (sp instanceof EntityPlayerSP) - { - esp = (EntityPlayerSP) sp; - if(Minecraft.getMinecraft().thePlayer == null) - { - Options.resetForNewGame(); - Config = Options; - } - } - else - esp = null; - } - - protected void moveFlying(float moveUpward, float moveStrafing, float moveForward, float speedFactor, boolean treeDimensional) - { - float diffMotionXStrafing = 0, diffMotionXForward = 0, diffMotionZStrafing = 0, diffMotionZForward = 0; - { - float total = MathHelper.sqrt_float(moveStrafing * moveStrafing + moveForward * moveForward); - if(total >= 0.01F) - { - if(total < 1.0F) - total = 1.0F; - - float moveStrafingFactor = moveStrafing / total; - float moveForwardFactor = moveForward / total; - float sin = MathHelper.sin((sp.rotationYaw * 3.141593F) / 180F); - float cos = MathHelper.cos((sp.rotationYaw * 3.141593F) / 180F); - diffMotionXStrafing = moveStrafingFactor * cos; - diffMotionXForward = -moveForwardFactor * sin; - diffMotionZStrafing = moveStrafingFactor * sin; - diffMotionZForward = moveForwardFactor * cos; - } - } - - float rotation = treeDimensional ? sp.rotationPitch / RadiantToAngle : 0; - float divingHorizontalFactor = MathHelper.cos(rotation); - float divingVerticalFactor = -MathHelper.sin(rotation) * Math.signum(moveForward); - - float diffMotionX = diffMotionXForward * divingHorizontalFactor + diffMotionXStrafing; - float diffMotionY = MathHelper.sqrt_float(diffMotionXForward * diffMotionXForward + diffMotionZForward * diffMotionZForward) * divingVerticalFactor + moveUpward; - float diffMotionZ = diffMotionZForward * divingHorizontalFactor + diffMotionZStrafing; - - float total = MathHelper.sqrt_float(MathHelper.sqrt_float(diffMotionX * diffMotionX + diffMotionZ * diffMotionZ) + diffMotionY * diffMotionY); - if(total > 0.01F) - { - float factor = speedFactor / total; - sp.motionX += diffMotionX * factor; - sp.motionY += diffMotionY * factor; - sp.motionZ += diffMotionZ * factor; - } - } - - protected Block supportsCeilingClimbing(int i, int j, int k) - { - Block block = sp.worldObj.getBlock(i, j, k); - if(block == null) - return null; - - Dictionary> configuration = Config._ceilingClimbConfigurationObject.value; - Set metaDatas = configuration.get(block); - if(metaDatas == null) - { - String blockName = block.getUnlocalizedName(); - if (blockName != null && !blockName.isEmpty()) - { - metaDatas = configuration.get(blockName); - if(metaDatas == null && blockName.startsWith("tile.") && blockName.length() > 5) - metaDatas = configuration.get(blockName.substring(5)); - } - } - - if(metaDatas == null) - return null; - if(metaDatas.isEmpty()) - return block; - if(metaDatas.contains(sp.worldObj.getBlockMetadata(i, j, k))) - return block; - return null; - } - - @SuppressWarnings("static-method") - protected boolean isLava(Block block) - { - if(block == Block.getBlockFromName("lava") || block == Block.getBlockFromName("flowing_lava")) - return true; - return block != null && block.getMaterial() == Material.lava; - } - - protected float getLiquidBorder(int i, int j, int k) - { - float finiteLiquidBorder; - Block block = sp.worldObj.getBlock(i, j, k); - if(block == Block.getBlockFromName("water") || block == Block.getBlockFromName("flowing_water")) - return getNormalWaterBorder(i, j, k); - if(SmartMovingOptions.hasFiniteLiquid && (finiteLiquidBorder = getFiniteLiquidWaterBorder(i, j, k, block)) > 0) - return finiteLiquidBorder; - if(block == Block.getBlockFromName("lava") || block == Block.getBlockFromName("flowing_lava")) - return Config._lavaLikeWater.value ? getNormalWaterBorder(i, j, k) : 0F; - - Material material = sp.worldObj.getBlock(i, j, k).getMaterial(); - if(material == null || material == Material.lava) - return Config._lavaLikeWater.value ? 1F : 0F; - if(material == Material.water) - return getNormalWaterBorder(i, j, k); - if(material.isLiquid()) - return 1F; - - return 0F; - } - - protected float getNormalWaterBorder(int i, int j, int k) - { - int blockMetaData = sp.worldObj.getBlockMetadata(i, j, k); - if(blockMetaData >= 8) - return 1F; - if(blockMetaData == 0) - if(sp.worldObj.isAirBlock(i, j + 1, k)) - return 0.8875F; - else - return 1F; - return (8 - blockMetaData) / 8F; - } - - protected float getFiniteLiquidWaterBorder(int i, int j, int k, Block block) - { - int type; - if((type = Orientation.getFiniteLiquidWater(block)) > 0) - { - if(type == 2) - return 1F; - if(type == 1) - { - Block aboveBlock = sp.worldObj.getBlock(i, j + 1, k); - if(Orientation.getFiniteLiquidWater(aboveBlock) > 0) - return 1F; - return (sp.worldObj.getBlockMetadata(i, j, k) + 1) / 16F; - } - } - return 0F; - } - - public boolean isFacedToLadder(boolean isSmall) - { - return getOnLadder(1, true, isSmall) > 0; - } - - public boolean isFacedToSolidVine(boolean isSmall) - { - return getOnVine(1, true, isSmall) > 0; - } - - public boolean isOnLadderOrVine(boolean isSmall) - { - return getOnLadderOrVine(1, false, isSmall) > 0; - } - - public boolean isOnVine(boolean isSmall) - { - return getOnLadderOrVine(1, false, false, true, isSmall) > 0; - } - - public boolean isOnLadder(boolean isSmall) - { - return getOnLadderOrVine(1, false, true, false, isSmall) > 0; - } - - protected int getOnLadder(int maxResult, boolean faceOnly, boolean isSmall) - { - return getOnLadderOrVine(maxResult, faceOnly, true, false, isSmall); - } - - protected int getOnVine(int maxResult, boolean faceOnly, boolean isSmall) - { - return getOnLadderOrVine(maxResult, faceOnly, false, true, isSmall); - } - - protected int getOnLadderOrVine(int maxResult, boolean faceOnly, boolean isSmall) - { - return getOnLadderOrVine(maxResult, faceOnly, true, true, isSmall); - } - - protected int getOnLadderOrVine(int maxResult, boolean faceOnly, boolean ladder, boolean vine, boolean isSmall) - { - int i = MathHelper.floor_double(sp.posX); - int minj = MathHelper.floor_double(sp.boundingBox.minY); - int k = MathHelper.floor_double(sp.posZ); - - if(Config.isStandardBaseClimb()) - { - Block block = sp.worldObj.getBlock(i, minj, k); - if(ladder) - if(vine) - return Orientation.isClimbable(sp.worldObj, i, minj, k) ? 1 : 0; - else - return block != Block.getBlockFromName("vine") && Orientation.isClimbable(sp.worldObj, i, minj, k) ? 1 : 0; - else - if(vine) - return block == Block.getBlockFromName("vine") && Orientation.isClimbable(sp.worldObj, i, minj, k) ? 1 : 0; - else - return 0; - } - else - { - if(isSmall) - minj--; - - HashSet facedOnlyTo = null; - if(faceOnly) - facedOnlyTo = Orientation.getClimbingOrientations(sp, true, false); - - int result = 0; - int maxj = MathHelper.floor_double(sp.boundingBox.minY + Math.ceil(sp.boundingBox.maxY - sp.boundingBox.minY)) - 1; - for(int j = minj; j <= maxj; j++) - { - Block block = sp.worldObj.getBlock(i, j, k); - if(ladder) - { - boolean localLadder = Orientation.isKnownLadder(block); - Orientation localLadderOrientation = null; - if(localLadder) - { - localLadderOrientation = Orientation.getKnownLadderOrientation(sp.worldObj, i, j, k); - if(facedOnlyTo == null || facedOnlyTo.contains(localLadderOrientation)) - result++; - } - - for(Orientation direction : facedOnlyTo != null ? facedOnlyTo : Orientation.Orthogonals) - { - if(result >= maxResult) - return result; - - if(direction != localLadderOrientation) - { - Block remoteBlock = sp.worldObj.getBlock(i + direction._i, j, k + direction._k); - if(Orientation.isKnownLadder(remoteBlock)) - { - Orientation remoteLadderOrientation = Orientation.getKnownLadderOrientation(sp.worldObj, i + direction._i, j, k + direction._k); - if(remoteLadderOrientation.rotate(180) == direction) - result++; - } - } - } - } - - if(result >= maxResult) - return result; - - if(vine && Orientation.isVine(block)) - if(facedOnlyTo == null) - result++; - else - { - Iterator iterator = facedOnlyTo.iterator(); - while(iterator.hasNext()) - { - Orientation climbOrientation = iterator.next(); - if(climbOrientation.hasVineOrientation(sp.worldObj, i, j, k) && climbOrientation.isRemoteSolid(sp.worldObj, i, j, k)) - { - result++; - break; - } - } - } - - if(result >= maxResult) - return result; - } - return result; - } - } - - public boolean climbingUpIsBlockedByLadder() - { - if(sp.isCollidedHorizontally && sp.isCollidedVertically && !sp.onGround && esp.movementInput.moveForward > 0F) - { - Orientation orientation = Orientation.getOrientation(sp, 20F, true, false); - if(orientation != null) - { - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.maxY); - int k = MathHelper.floor_double(sp.posZ); - if(Orientation.isLadder(sp.worldObj.getBlock(i, j, k))) - return Orientation.getKnownLadderOrientation(sp.worldObj, i, j, k) == orientation; - } - } - return false; - } - - public boolean climbingUpIsBlockedByTrapDoor() - { - if(sp.isCollidedHorizontally && sp.isCollidedVertically && !sp.onGround && esp.movementInput.moveForward > 0F) - { - Orientation orientation = Orientation.getOrientation(sp, 20F, true, false); - if(orientation != null) - { - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.maxY); - int k = MathHelper.floor_double(sp.posZ); - if(Orientation.isTrapDoor(sp.worldObj.getBlock(i, j, k))) - return Orientation.getOpenTrapDoorOrientation(sp.worldObj, i, j, k) == orientation; - } - } - return false; - } - - public boolean climbingUpIsBlockedByCobbleStoneWall() - { - if(sp.isCollidedHorizontally && sp.isCollidedVertically && !sp.onGround && esp.movementInput.moveForward > 0F) - { - Orientation orientation = Orientation.getOrientation(sp, 20F, true, false); - if(orientation != null) - { - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.maxY); - int k = MathHelper.floor_double(sp.posZ); - if(sp.worldObj.getBlock(i, j, k) == Block.getBlockFromName("cobblestone_wall")) - return !((BlockWall)Block.getBlockFromName("cobblestone_wall")).canConnectWallTo(sp.worldObj, i - orientation._i, j, k - orientation._k); - } - } - return false; - } - - private List getPlayerSolidBetween(double yMin, double yMax, double horizontalTolerance) - { - double minY = sp.boundingBox.minY; - double maxY = sp.boundingBox.maxY; - sp.boundingBox.minY = yMin; - sp.boundingBox.maxY = yMax; - - List result = sp.worldObj.getCollidingBoundingBoxes(sp, horizontalTolerance == 0 ? sp.boundingBox : sp.boundingBox.contract(-horizontalTolerance, 0, -horizontalTolerance)); - - sp.boundingBox.minY = minY; - sp.boundingBox.maxY = maxY; - - return result; - } - - protected boolean isPlayerInSolidBetween(double yMin, double yMax) - { - return getPlayerSolidBetween(yMin, yMax, 0).size() > 0; - } - - protected double getMaxPlayerSolidBetween(double yMin, double yMax, double horizontalTolerance) - { - List solids = getPlayerSolidBetween(yMin, yMax, horizontalTolerance); - double result = yMin; - for(int i = 0; i < solids.size(); i++) - { - AxisAlignedBB box = (AxisAlignedBB)solids.get(i); - if(isCollided(box, yMin, yMax, horizontalTolerance)) - result = Math.max(result, box.maxY); - } - return Math.min(result, yMax); - } - - protected double getMinPlayerSolidBetween(double yMin, double yMax, double horizontalTolerance) - { - List solids = getPlayerSolidBetween(yMin, yMax, horizontalTolerance); - double result = yMax; - for(int i = 0; i < solids.size(); i++) - { - AxisAlignedBB box = (AxisAlignedBB)solids.get(i); - if(isCollided(box, yMin, yMax, horizontalTolerance)) - result = Math.min(result, box.minY); - } - return Math.max(result, yMin); - } - - protected boolean isInLiquid() - { - return - getMaxPlayerLiquidBetween(sp.boundingBox.minY, sp.boundingBox.maxY) != sp.boundingBox.minY || - getMinPlayerLiquidBetween(sp.boundingBox.minY, sp.boundingBox.maxY) != sp.boundingBox.maxY; - } - - protected double getMaxPlayerLiquidBetween(double yMin, double yMax) - { - int i = MathHelper.floor_double(sp.posX); - int jMin = MathHelper.floor_double(yMin); - int jMax = MathHelper.floor_double(yMax); - int k = MathHelper.floor_double(sp.posZ); - - for(int j = jMax; j >= jMin; j--) - { - float swimWaterBorder = getLiquidBorder(i, j, k); - if(swimWaterBorder > 0) - return j + swimWaterBorder; - } - return yMin; - } - - protected double getMinPlayerLiquidBetween(double yMin, double yMax) - { - int i = MathHelper.floor_double(sp.posX); - int jMin = MathHelper.floor_double(yMin); - int jMax = MathHelper.floor_double(yMax); - int k = MathHelper.floor_double(sp.posZ); - - for(int j = jMin; j <= jMax; j++) - { - float swimWaterBorder = getLiquidBorder(i, j, k); - if(swimWaterBorder > 0) - if(j > yMin) - return j; - else if(j + swimWaterBorder > yMin) - return yMin; - } - return yMax; - } - - public boolean isCollided(AxisAlignedBB box, double yMin, double yMax, double horizontalTolerance) - { - return - box.maxX >= sp.boundingBox.minX - horizontalTolerance && - box.minX <= sp.boundingBox.maxX + horizontalTolerance && - box.maxY >= yMin && - box.minY <= yMax && - box.maxZ >= sp.boundingBox.minZ - horizontalTolerance && - box.minZ <= sp.boundingBox.maxZ + horizontalTolerance; - } - - private boolean isBlockTranslucent(int i, int j, int k) - { - return sp.worldObj.isBlockNormalCubeDefault(i, j, k, false); - } - - public boolean pushOutOfBlocks(double d, double d1, double d2, boolean top) - { - int i = MathHelper.floor_double(d); - int j = MathHelper.floor_double(d1); - int k = MathHelper.floor_double(d2); - double d3 = d - i; - double d4 = d2 - k; - if(isBlockTranslucent(i, j, k) || (top && isBlockTranslucent(i, j + 1, k))) - { - boolean flag = !isBlockTranslucent(i - 1, j, k) && (!top || !isBlockTranslucent(i - 1, j + 1, k)); - boolean flag1 = !isBlockTranslucent(i + 1, j, k) && (!top || !isBlockTranslucent(i + 1, j + 1, k)); - boolean flag2 = !isBlockTranslucent(i, j, k - 1) && (!top || !isBlockTranslucent(i, j + 1, k - 1)); - boolean flag3 = !isBlockTranslucent(i, j, k + 1) && (!top || !isBlockTranslucent(i, j + 1, k + 1)); - byte byte0 = -1; - double d5 = 9999D; - if(flag && d3 < d5) - { - d5 = d3; - byte0 = 0; - } - if(flag1 && 1.0D - d3 < d5) - { - d5 = 1.0D - d3; - byte0 = 1; - } - if(flag2 && d4 < d5) - { - d5 = d4; - byte0 = 4; - } - if(flag3 && 1.0D - d4 < d5) - { - byte0 = 5; - } - float f = 0.1F; - if(byte0 == 0) - { - sp.motionX = -f; - } - if(byte0 == 1) - { - sp.motionX = f; - } - if(byte0 == 4) - { - sp.motionZ = -f; - } - if(byte0 == 5) - { - sp.motionZ = f; - } - } - return false; - } - - public boolean isInsideOfMaterial(Material material) - { - if(SmartMovingOptions.hasFiniteLiquid && material == Material.water) - { - double d = sp.posY + sp.getEyeHeight(); - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_float(MathHelper.floor_double(d)); - int k = MathHelper.floor_double(sp.posZ); - Block l = sp.worldObj.getBlock(i, j, k); - float border; - if(l != null && (border = getFiniteLiquidWaterBorder(i, j, k, l)) > 0) - { - float f = (1 - border) - 0.1111111F; - float f1 = (j + 1) - f; - return d < f1; - } - return false; - } - return isp.localIsInsideOfMaterial(material); - } - - public int calculateSeparateCollisions(double par1, double par3, double par5) - { - float ySize = sp.ySize; - boolean isInWeb = isp.getIsInWebField(); - AxisAlignedBB boundingBox = sp.boundingBox.copy(); - boolean onGround = sp.onGround; - World worldObj = sp.worldObj; - Entity _this = sp; - boolean field_9293_aM = sp.field_70135_K; - float stepHeight = sp.stepHeight; - - ySize *= 0.4F; - - if (isInWeb) - { - isInWeb = false; - par1 *= 0.25D; - par3 *= 0.05000000074505806D; - par5 *= 0.25D; - } - - double d2 = par1; - double d3 = par3; - double d4 = par5; - AxisAlignedBB axisalignedbb = boundingBox.copy(); - boolean flag = onGround && isSneaking(); - - if (flag) - { - double d5 = 0.050000000000000003D; - - for (; par1 != 0.0D && worldObj.getCollidingBoundingBoxes(_this, boundingBox.getOffsetBoundingBox(par1, -1D, 0.0D)).size() == 0; d2 = par1) - { - if (par1 < d5 && par1 >= -d5) - { - par1 = 0.0D; - continue; - } - - if (par1 > 0.0D) - { - par1 -= d5; - } - else - { - par1 += d5; - } - } - - for (; par5 != 0.0D && worldObj.getCollidingBoundingBoxes(_this, boundingBox.getOffsetBoundingBox(0.0D, -1D, par5)).size() == 0; d4 = par5) - { - if (par5 < d5 && par5 >= -d5) - { - par5 = 0.0D; - continue; - } - - if (par5 > 0.0D) - { - par5 -= d5; - } - else - { - par5 += d5; - } - } - - while (par1 != 0.0D && par5 != 0.0D && worldObj.getCollidingBoundingBoxes(_this, boundingBox.getOffsetBoundingBox(par1, -1D, par5)).size() == 0) - { - if (par1 < d5 && par1 >= -d5) - { - par1 = 0.0D; - } - else if (par1 > 0.0D) - { - par1 -= d5; - } - else - { - par1 += d5; - } - - if (par5 < d5 && par5 >= -d5) - { - par5 = 0.0D; - } - else if (par5 > 0.0D) - { - par5 -= d5; - } - else - { - par5 += d5; - } - - d2 = par1; - d4 = par5; - } - } - - List list = worldObj.getCollidingBoundingBoxes(_this, boundingBox.addCoord(par1, par3, par5)); - - for (int i = 0; i < list.size(); i++) - { - par3 = ((AxisAlignedBB)list.get(i)).calculateYOffset(boundingBox, par3); - } - - boundingBox.offset(0.0D, par3, 0.0D); - - if (!field_9293_aM && d3 != par3) - { - par1 = par3 = par5 = 0.0D; - } - - boolean flag1 = onGround || d3 != par3 && d3 < 0.0D; - - for (int j = 0; j < list.size(); j++) - { - par1 = ((AxisAlignedBB)list.get(j)).calculateXOffset(boundingBox, par1); - } - - boundingBox.offset(par1, 0.0D, 0.0D); - - if (!field_9293_aM && d2 != par1) - { - par1 = par3 = par5 = 0.0D; - } - - for (int k = 0; k < list.size(); k++) - { - par5 = ((AxisAlignedBB)list.get(k)).calculateZOffset(boundingBox, par5); - } - - boundingBox.offset(0.0D, 0.0D, par5); - - if (!field_9293_aM && d4 != par5) - { - par1 = par3 = par5 = 0.0D; - } - - if (stepHeight > 0.0F && flag1 && (flag || ySize < 0.05F) && (d2 != par1 || d4 != par5)) - { - double d6 = par1; - double d8 = par3; - double d10 = par5; - par1 = d2; - par3 = stepHeight; - par5 = d4; - AxisAlignedBB axisalignedbb1 = boundingBox.copy(); - boundingBox.setBB(axisalignedbb); - List list1 = worldObj.getCollidingBoundingBoxes(_this, boundingBox.addCoord(par1, par3, par5)); - - for (int j2 = 0; j2 < list1.size(); j2++) - { - par3 = ((AxisAlignedBB)list1.get(j2)).calculateYOffset(boundingBox, par3); - } - - boundingBox.offset(0.0D, par3, 0.0D); - - if (!field_9293_aM && d3 != par3) - { - par1 = par3 = par5 = 0.0D; - } - - for (int k2 = 0; k2 < list1.size(); k2++) - { - par1 = ((AxisAlignedBB)list1.get(k2)).calculateXOffset(boundingBox, par1); - } - - boundingBox.offset(par1, 0.0D, 0.0D); - - if (!field_9293_aM && d2 != par1) - { - par1 = par3 = par5 = 0.0D; - } - - for (int l2 = 0; l2 < list1.size(); l2++) - { - par5 = ((AxisAlignedBB)list1.get(l2)).calculateZOffset(boundingBox, par5); - } - - boundingBox.offset(0.0D, 0.0D, par5); - - if (!field_9293_aM && d4 != par5) - { - par1 = par3 = par5 = 0.0D; - } - - if (!field_9293_aM && d3 != par3) - { - par1 = par3 = par5 = 0.0D; - } - else - { - par3 = -stepHeight; - - for (int i3 = 0; i3 < list1.size(); i3++) - { - par3 = ((AxisAlignedBB)list1.get(i3)).calculateYOffset(boundingBox, par3); - } - - boundingBox.offset(0.0D, par3, 0.0D); - } - - if (d6 * d6 + d10 * d10 >= par1 * par1 + par5 * par5) - { - par1 = d6; - par3 = d8; - par5 = d10; - boundingBox.setBB(axisalignedbb1); - } - else - { - double d11 = boundingBox.minY - (int)boundingBox.minY; - - if (d11 > 0.0D) - { - ySize += d11 + 0.01D; - } - } - } - - boolean isCollidedPositiveX = d2 > par1; - boolean isCollidedNegativeX = d2 < par1; - boolean isCollidedPositiveY = d3 > par3; - boolean isCollidedNegativeY = d3 < par3; - boolean isCollidedPositiveZ = d4 > par5; - boolean isCollidedNegativeZ = d4 < par5; - - int result = 0; - if(isCollidedPositiveX) - result += CollidedPositiveX; - if(isCollidedNegativeX) - result += CollidedNegativeX; - if(isCollidedPositiveY) - result += CollidedPositiveY; - if(isCollidedNegativeY) - result += CollidedNegativeY; - if(isCollidedPositiveZ) - result += CollidedPositiveZ; - if(isCollidedNegativeZ) - result += CollidedNegativeZ; - return result; - } - - public final static int CollidedPositiveX = 1; - public final static int CollidedNegativeX = 2; - public final static int CollidedPositiveY = 4; - public final static int CollidedNegativeY = 8; - public final static int CollidedPositiveZ = 16; - public final static int CollidedNegativeZ = 32; - - public boolean isSneaking() - { - return sp.isSneaking(); - } - - public void correctOnUpdate(boolean isSmall, boolean reverseMaterialAcceleration) - { - double d = sp.posX - sp.prevPosX; - double d1 = sp.posZ - sp.prevPosZ; - float f = MathHelper.sqrt_double(d * d + d1 * d1); - if(f < 0.05F && f > 0.02 && isSmall) - { - float f1 = sp.renderYawOffset; - - f1 = ((float)Math.atan2(d1, d) * 180F) / 3.141593F - 90F; - - if(sp.swingProgress > 0.0F) - { - f1 = sp.rotationYaw; - } - float f4; - for(f4 = f1 - sp.renderYawOffset; f4 < -180F; f4 += 360F) { } - for(; f4 >= 180F; f4 -= 360F) { } - float x = sp.renderYawOffset + f4 * 0.3F; - float f5; - for(f5 = sp.rotationYaw - x; f5 < -180F; f5 += 360F) { } - for(; f5 >= 180F; f5 -= 360F) { } - if(f5 < -75F) - { - f5 = -75F; - } - if(f5 >= 75F) - { - f5 = 75F; - } - sp.renderYawOffset = sp.rotationYaw - f5; - if(f5 * f5 > 2500F) - { - sp.renderYawOffset += f5 * 0.2F; - } - for(; sp.renderYawOffset - sp.prevRenderYawOffset < -180F; sp.prevRenderYawOffset -= 360F) { } - for(; sp.renderYawOffset - sp.prevRenderYawOffset >= 180F; sp.prevRenderYawOffset += 360F) { } - } - - if(reverseMaterialAcceleration) - reverseHandleMaterialAcceleration(); - } - - protected double getGapUnderneight() - { - return sp.boundingBox.minY - getMaxPlayerSolidBetween(sp.boundingBox.minY - 1.1D, sp.boundingBox.minY, 0); - } - - protected double getGapOverneight() - { - return getMinPlayerSolidBetween(sp.boundingBox.maxY, sp.boundingBox.maxY + 1.1D, 0) - sp.boundingBox.maxY; - } - - public double getOverGroundHeight(double maximum) - { - if(esp != null) - return (sp.boundingBox.minY - getMaxPlayerSolidBetween(sp.boundingBox.minY - maximum, sp.boundingBox.minY, 0)); - return (sp.boundingBox.minY + 1D - getMaxPlayerSolidBetween(sp.boundingBox.minY - maximum + 1D, sp.boundingBox.minY + 1D, 0.1)); - } - - public Block getOverGroundBlockId(double distance) - { - int x = MathHelper.floor_double(sp.posX); - int y = MathHelper.floor_double(sp.boundingBox.minY); - int z = MathHelper.floor_double(sp.posZ); - int minY = y - (int)Math.ceil(distance); - - if(esp == null) - { - y++; - minY++; - } - - for(; y >= minY; y--) - { - Block block = sp.worldObj.getBlock(x, y, z); - if(block != null) - return block; - } - return null; - } - - public void reverseHandleMaterialAcceleration() - { - AxisAlignedBB axisalignedbb = sp.boundingBox.expand(0.0D, -0.40000000596046448D, 0.0D).contract(0.001D, 0.001D, 0.001D); - Material material = Material.water; - Entity entity = sp; - - int i = MathHelper.floor_double(axisalignedbb.minX); - int j = MathHelper.floor_double(axisalignedbb.maxX + 1.0D); - int k = MathHelper.floor_double(axisalignedbb.minY); - int l = MathHelper.floor_double(axisalignedbb.maxY + 1.0D); - int i1 = MathHelper.floor_double(axisalignedbb.minZ); - int j1 = MathHelper.floor_double(axisalignedbb.maxZ + 1.0D); - if(!entity.worldObj.checkChunksExist(i, k, i1, j, l, j1)) - { - return; - } - - Vec3 vec3d = Vec3.createVectorHelper(0.0D, 0.0D, 0.0D); - for(int k1 = i; k1 < j; k1++) - { - for(int l1 = k; l1 < l; l1++) - { - for(int i2 = i1; i2 < j1; i2++) - { - Block block = entity.worldObj.getBlock(k1, l1, i2); - if(block == null || block.getMaterial() != material) - { - continue; - } - double d1 = (l1 + 1) - BlockLiquid.getLiquidHeightPercent(entity.worldObj.getBlockMetadata(k1, l1, i2)); - if(l >= d1) - { - block.velocityToAddToEntity(entity.worldObj, k1, l1, i2, entity, vec3d); - } - } - - } - - } - - if(vec3d.lengthVector() > 0.0D) - { - vec3d = vec3d.normalize(); - double d = -0.014D; // instead +0.014D for reversal - entity.motionX += vec3d.xCoord * d; - entity.motionY += vec3d.yCoord * d; - entity.motionZ += vec3d.zCoord * d; - } - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingClient.java b/src/main/java/net/smart/moving/SmartMovingClient.java deleted file mode 100644 index 421723b1..00000000 --- a/src/main/java/net/smart/moving/SmartMovingClient.java +++ /dev/null @@ -1,81 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.util.*; - -public class SmartMovingClient extends SmartMovingContext implements ISmartMovingClient -{ - private final Map maximumExhaustionValues = new HashMap(); - private boolean nativeUserInterfaceDrawing = true; - - @Override - public float getMaximumExhaustion() - { - float maxExhaustion = Config.getMaxExhaustion(); - if(maximumExhaustionValues.size() > 0) - { - Iterator iterator = maximumExhaustionValues.values().iterator(); - while(iterator.hasNext()) - maxExhaustion = Math.max(iterator.next(), maxExhaustion); - } - return maxExhaustion; - } - - @Override - public float getMaximumUpJumpCharge() - { - return Config._jumpChargeMaximum.value; - } - - @Override - public float getMaximumHeadJumpCharge() - { - return Config._headJumpChargeMaximum.value; - } - - @Override - public void setMaximumExhaustionValue(String key, float value) - { - maximumExhaustionValues.put(key, value); - } - - @Override - public float getMaximumExhaustionValue(String key) - { - return maximumExhaustionValues.get(key); - } - - @Override - public boolean removeMaximumExhaustionValue(String key) - { - return maximumExhaustionValues.remove(key) != null; - } - - @Override - public void setNativeUserInterfaceDrawing(boolean value) - { - nativeUserInterfaceDrawing = value; - } - - @Override - public boolean getNativeUserInterfaceDrawing() - { - return nativeUserInterfaceDrawing; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingComm.java b/src/main/java/net/smart/moving/SmartMovingComm.java deleted file mode 100644 index 1500a569..00000000 --- a/src/main/java/net/smart/moving/SmartMovingComm.java +++ /dev/null @@ -1,174 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import cpw.mods.fml.common.network.internal.*; -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.entity.*; -import net.minecraft.network.play.client.*; -import net.minecraft.server.*; -import net.smart.moving.config.*; -import net.smart.properties.*; - -public class SmartMovingComm extends SmartMovingContext implements IPacketReceiver, IPacketSender -{ - @Override - public boolean processStatePacket(FMLProxyPacket packet, IEntityPlayerMP player, int entityId, long state) - { - Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(entityId); - if(entity == null) - return true; - - SmartMovingOther moving = SmartMovingFactory.getOtherSmartMoving((EntityOtherPlayerMP)entity); - if(moving != null) - moving.processStatePacket(state); - return true; - } - - @Override - public boolean processConfigInfoPacket(FMLProxyPacket packet, IEntityPlayerMP player, String info) - { - return false; - } - - @Override - public boolean processConfigContentPacket(FMLProxyPacket packet, IEntityPlayerMP player, String[] content, String username) - { - processConfigPacket(content, username, false); - return true; - } - - @Override - public boolean processConfigChangePacket(FMLProxyPacket packet, IEntityPlayerMP player) - { - SmartMovingOptions.writeNoRightsToChangeConfigMessageToChat(isConnectedToRemoteServer()); - return true; - } - - @Override - public boolean processSpeedChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, int difference, String username) - { - if(difference == 0) - SmartMovingOptions.writeNoRightsToChangeSpeedMessageToChat(isConnectedToRemoteServer()); - else - { - Config.changeSpeed(difference); - Options.writeServerSpeedMessageToChat(username, Config._globalConfig.value); - } - return true; - } - - @Override - public boolean processHungerChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, float hunger) - { - return false; - } - - @Override - public boolean processSoundPacket(FMLProxyPacket packet, IEntityPlayerMP player, String soundId, float distance, float pitch) - { - return false; - } - - private static boolean isConnectedToRemoteServer() - { - return MinecraftServer.getServer() == null || Minecraft.getMinecraft().getIntegratedServer() == null || !Minecraft.getMinecraft().getIntegratedServer().isSinglePlayer(); - } - - public static void processConfigPacket(String[] content, String username, boolean blockCode) - { - boolean isGloballyConfigured = false; - if(content != null && content.length == 2 && Options._globalConfig.getCurrentKey().equals(content[0])) - { - isGloballyConfigured = "true".equals(content[1]); - content = null; - } - - boolean wasEnabled = Config.enabled; - boolean first = Config != ServerConfig; - if(first) - ServerConfig.reset(); - - if(content != null) - if(content.length != 0) - { - ServerConfig.loadFromProperties(content, blockCode); - isGloballyConfigured = ServerConfig._globalConfig.value; - } - else - { - Config = Options; - Options.writeServerDeconfigMessageToChat(); - return; - } - else - { - ServerConfig.load(false); - ServerConfig.setCurrentKey(null); - } - - ServerConfig._globalConfig.value = isGloballyConfigured; - - if(!first) - { - Options.writeServerReconfigMessageToChat(wasEnabled, username, isGloballyConfigured); - return; - } - - Config = ServerConfig; - Options.writeServerConfigMessageToChat(); - if (!blockCode) - SmartMovingPacketStream.sendConfigInfo(SmartMovingComm.instance, SmartMovingConfig._sm_current); - } - - @Override - public void sendPacket(byte[] data) - { - Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C17PacketCustomPayload(SmartMovingPacketStream.Id, data)); - } - - public static boolean processBlockCode(String text) - { - if(!text.startsWith("§0§1") || !text.endsWith("§f§f")) - return false; - - String codes = text.substring(4, text.length() - 4); - processBlockCode(codes, "§0", Options._baseClimb, "standard"); - processBlockCode(codes, "§1", Options._freeClimb); - processBlockCode(codes, "§2", Options._ceilingClimbing); - processBlockCode(codes, "§3", Options._swim); - processBlockCode(codes, "§4", Options._dive); - processBlockCode(codes, "§5", Options._crawl); - processBlockCode(codes, "§6", Options._slide); - processBlockCode(codes, "§7", Options._fly); - processBlockCode(codes, "§8", Options._jumpCharge); - processBlockCode(codes, "§9", Options._headJump); - processBlockCode(codes, "§a", Options._angleJumpSide); - processBlockCode(codes, "§b", Options._angleJumpBack); - return true; - } - - private static void processBlockCode(String text, String blockCode, Property property, String... value) - { - if(text.contains(blockCode)) - processConfigPacket(new String[] { property.getCurrentKey(), value.length > 0 ? value[0] : "false" }, null, true); - } - - public static final SmartMovingComm instance = new SmartMovingComm(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingContext.java b/src/main/java/net/smart/moving/SmartMovingContext.java deleted file mode 100644 index 5866071c..00000000 --- a/src/main/java/net/smart/moving/SmartMovingContext.java +++ /dev/null @@ -1,107 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import cpw.mods.fml.client.registry.*; -import cpw.mods.fml.common.*; - -import net.minecraft.client.*; -import net.minecraft.server.*; - -import net.smart.moving.config.*; -import net.smart.render.*; - -public abstract class SmartMovingContext extends SmartRenderContext -{ - public static final float ClimbPullMotion = 0.3F; - - public static final double FastUpMotion = 0.2D; - public static final double MediumUpMotion = 0.14D; - public static final double SlowUpMotion = 0.1D; - public static final double HoldMotion = 0.08D; - public static final double SinkDownMotion = 0.05D; - public static final double ClimbDownMotion = 0.01D; - public static final double CatchCrawlGapMotion = 0.17D; - - public static final float SwimCrawlWaterMaxBorder = 1F; - public static final float SwimCrawlWaterTopBorder = 0.65F; - public static final float SwimCrawlWaterMediumBorder = 0.6F; - public static final float SwimCrawlWaterBottomBorder = 0.55F; - - public static final float HorizontalGroundDamping = 0.546F; - public static final float HorizontalAirDamping = 0.91F; - public static final float HorizontalAirodynamicDamping = 0.999F; - - public static final float SwimSoundDistance = 1F / 0.7F; - public static final float SlideToHeadJumpingFallDistance = 0.05F; - - - public static final SmartMovingClient Client = new SmartMovingClient(); - public static final SmartMovingOptions Options = new SmartMovingOptions(); - public static final SmartMovingServerConfig ServerConfig = new SmartMovingServerConfig(); - public static SmartMovingClientConfig Config = Options; - - - private static boolean wasInitialized; - - public static void onTickInGame() - { - Minecraft minecraft = Minecraft.getMinecraft(); - - if(minecraft.theWorld != null && minecraft.theWorld.isRemote) - SmartMovingFactory.handleMultiPlayerTick(minecraft); - - Options.initializeForGameIfNeccessary(); - - initializeServerIfNecessary(); - } - - public static void initialize() - { - if(!wasInitialized) - net.smart.render.statistics.SmartStatisticsContext.setCalculateHorizontalStats(true); - - ClientRegistry.registerKeyBinding(Options.keyBindGrab); - ClientRegistry.registerKeyBinding(Options.keyBindConfigToggle); - ClientRegistry.registerKeyBinding(Options.keyBindSpeedIncrease); - ClientRegistry.registerKeyBinding(Options.keyBindSpeedDecrease); - - if(wasInitialized) - return; - - wasInitialized = true; - - System.out.println(SmartMovingInfo.ModComMessage); - FMLLog.getLogger().info(SmartMovingInfo.ModComMessage); - } - - public static void initializeServerIfNecessary() - { - MinecraftServer currentMinecraftServer = MinecraftServer.getServer(); - if(currentMinecraftServer != null && currentMinecraftServer != lastMinecraftServer) - SmartMovingServer.initialize(SmartMovingOptions.optionsPath, currentMinecraftServer.getGameType().getID(), Options); - lastMinecraftServer = currentMinecraftServer; - } - - public static void registerRenderers() - { - registerRenderers(net.smart.moving.render.RenderPlayer.class); - } - - private static MinecraftServer lastMinecraftServer = null; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingCoreEventHandler.java b/src/main/java/net/smart/moving/SmartMovingCoreEventHandler.java deleted file mode 100644 index 9a85e242..00000000 --- a/src/main/java/net/smart/moving/SmartMovingCoreEventHandler.java +++ /dev/null @@ -1,103 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.client.entity.*; -import net.minecraft.client.multiplayer.*; -import net.minecraft.entity.player.*; -import net.minecraft.item.*; -import net.minecraft.network.*; -import net.minecraft.network.play.client.*; -import net.minecraft.server.management.*; - -import net.smart.core.*; -import net.smart.moving.playerapi.*; - -public class SmartMovingCoreEventHandler extends SmartCoreEventHandler -{ - - @Override - public void beforeProcessPlayer(NetHandlerPlayServer netServerHandler) - { - SmartMovingServerPlayerBase playerBase = SmartMovingServerPlayerBase.getPlayerBase(netServerHandler.playerEntity); - playerBase.moving.beforeAddMovingHungerBatch(); - } - - @Override - public void afterProcessPlayer(NetHandlerPlayServer netServerHandler) - { - SmartMovingServerPlayerBase playerBase = SmartMovingServerPlayerBase.getPlayerBase(netServerHandler.playerEntity); - playerBase.moving.afterAddMovingHungerBatch(); - } - - @Override - public void beforeProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - if (packet15place.func_149568_f() == 255) - { - ItemStack itemstack = netServerHandler.playerEntity.inventory.getCurrentItem(); - if (itemstack != null) - { - float offset = 1.62F - netServerHandler.playerEntity.getEyeHeight(); - netServerHandler.playerEntity.yOffset += offset; - } - } - } - - @Override - public void afterProcessPlayerBlockPlacement(NetHandlerPlayServer netServerHandler, C08PacketPlayerBlockPlacement packet15place) - { - if (packet15place.func_149568_f() == 255) - { - ItemStack itemstack = netServerHandler.playerEntity.inventory.getCurrentItem(); - if (itemstack != null) - { - float offset = 1.62F - netServerHandler.playerEntity.getEyeHeight(); - netServerHandler.playerEntity.yOffset -= offset; - } - } - } - - @Override - public void beforeOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP) - { - SmartMovingPlayerBase playerBase = SmartMovingPlayerBase.getPlayerBase((EntityPlayerSP)entityPlayerSP); - playerBase.moving.beforeActivateBlockOrUseItem(); - } - - @Override - public void afterOnPlayerRightClick(PlayerControllerMP playerControllerMP, EntityPlayer entityPlayerSP) - { - SmartMovingPlayerBase playerBase = SmartMovingPlayerBase.getPlayerBase((EntityPlayerSP)entityPlayerSP); - playerBase.moving.afterActivateBlockOrUseItem(); - } - - @Override - public void beforeActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer) - { - SmartMovingServerPlayerBase playerBase = SmartMovingServerPlayerBase.getPlayerBase(entityPlayer); - playerBase.moving.beforeActivateBlockOrUseItem(); - } - - @Override - public void afterActivateBlockOrUseItem(ItemInWorldManager itemInWorldManager, EntityPlayer entityPlayer) - { - SmartMovingServerPlayerBase playerBase = SmartMovingServerPlayerBase.getPlayerBase(entityPlayer); - playerBase.moving.afterActivateBlockOrUseItem(); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingFactory.java b/src/main/java/net/smart/moving/SmartMovingFactory.java deleted file mode 100644 index eec1c5c2..00000000 --- a/src/main/java/net/smart/moving/SmartMovingFactory.java +++ /dev/null @@ -1,143 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.util.*; - -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; - -public class SmartMovingFactory extends SmartMovingContext -{ - private static SmartMovingFactory factory; - - private Hashtable otherSmartMovings; - - public SmartMovingFactory() - { - if(factory != null) - throw new RuntimeException("FATAL: Can only create one instance of type 'SmartMovingFactory'"); - factory = this; - } - - protected static boolean isInitialized() - { - return factory != null; - } - - public static void initialize() - { - if(!isInitialized()) - new SmartMovingFactory(); - } - - public static void handleMultiPlayerTick(Minecraft minecraft) - { - factory.doHandleMultiPlayerTick(minecraft); - } - - public static SmartMoving getInstance(EntityPlayer entityPlayer) - { - return factory.doGetInstance(entityPlayer); - } - - public static SmartMoving getOtherSmartMoving(int entityId) - { - return factory.doGetOtherSmartMoving(entityId); - } - - public static SmartMovingOther getOtherSmartMoving(EntityOtherPlayerMP entity) - { - return factory.doGetOtherSmartMoving(entity); - } - - protected void doHandleMultiPlayerTick(Minecraft minecraft) - { - Iterator others = minecraft.theWorld.playerEntities.iterator(); - while(others.hasNext()) - { - Entity player = (Entity)others.next(); - if(player instanceof EntityOtherPlayerMP) - { - EntityOtherPlayerMP otherPlayer = (EntityOtherPlayerMP)player; - SmartMovingOther moving = doGetOtherSmartMoving(otherPlayer); - moving.spawnParticles(minecraft, otherPlayer.posX - otherPlayer.prevPosX, otherPlayer.posZ - otherPlayer.prevPosZ); - moving.foundAlive = true; - } - } - - if(otherSmartMovings == null || otherSmartMovings.isEmpty()) - return; - - Iterator entityIds = otherSmartMovings.keySet().iterator(); - while(entityIds.hasNext()) - { - Integer entityId = entityIds.next(); - SmartMovingOther moving = otherSmartMovings.get(entityId); - if(moving.foundAlive) - moving.foundAlive = false; - else - entityIds.remove(); - } - } - - protected SmartMoving doGetInstance(EntityPlayer entityPlayer) - { - if(entityPlayer instanceof EntityOtherPlayerMP) - return doGetOtherSmartMoving(entityPlayer.getEntityId()); - else if(entityPlayer instanceof IEntityPlayerSP) - return ((IEntityPlayerSP)entityPlayer).getMoving(); - return null; - } - - protected SmartMoving doGetOtherSmartMoving(int entityId) - { - SmartMoving moving = tryGetOtherSmartMoving(entityId); - if(moving == null) - { - Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(entityId); - if(entity != null && entity instanceof EntityOtherPlayerMP) - moving = addOtherSmartMoving((EntityOtherPlayerMP)entity); - } - return moving; - } - - protected SmartMovingOther doGetOtherSmartMoving(EntityOtherPlayerMP entity) - { - SmartMovingOther moving = tryGetOtherSmartMoving(entity.getEntityId()); - if(moving == null) - moving = addOtherSmartMoving(entity); - return moving; - } - - protected final SmartMovingOther tryGetOtherSmartMoving(int entityId) - { - if(otherSmartMovings == null) - otherSmartMovings = new Hashtable(); - return otherSmartMovings.get(entityId); - } - - protected final SmartMovingOther addOtherSmartMoving(EntityOtherPlayerMP entity) - { - SmartMovingOther moving = new SmartMovingOther(entity); - otherSmartMovings.put(entity.getEntityId(), moving); - return moving; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingInfo.java b/src/main/java/net/smart/moving/SmartMovingInfo.java deleted file mode 100644 index fec6ef85..00000000 --- a/src/main/java/net/smart/moving/SmartMovingInfo.java +++ /dev/null @@ -1,45 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import cpw.mods.fml.common.*; - -public class SmartMovingInfo -{ - public static final byte StatePacketId = 0; - public static final byte ConfigInfoPacketId = 1; - public static final byte ConfigContentPacketId = 2; - public static final byte ConfigChangePacketId = 3; - public static final byte SpeedChangePacketId = 4; - public static final byte HungerChangePacketId = 5; - public static final byte SoundPacketId = 6; - - private static final Mod Mod = SmartMovingMod.class.getAnnotation(Mod.class); - - public static final String ModId = Mod.modid(); - public static final String ModName = Mod.name(); - public static final String ModVersion = Mod.version(); - public static final String ModComVersion = SmartMovingMod.ModComVersion; - - public static final String ModComMessage = ModName + " uses communication protocol " + ModComVersion; - public static final String ModComId = ModName.replace(" ", "") + " " + ModComVersion; - - public static final int DefaultChatId = 0; - public static final int ConfigChatId = ModName.hashCode(); - public static final int SpeedChatId = ModName.hashCode() + 1; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingInstall.java b/src/main/java/net/smart/moving/SmartMovingInstall.java deleted file mode 100644 index 1063d1ea..00000000 --- a/src/main/java/net/smart/moving/SmartMovingInstall.java +++ /dev/null @@ -1,41 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.smart.utilities.*; - -public class SmartMovingInstall -{ - public final static Name RopesPlusCore = new Name("atomicstryker.ropesplus.common.RopesPlusCore"); - public final static Name ModBlockFence = new Name("net.minecraft.src.modBlockFence", "modBlockFence"); - public final static Name MacroModCore = new Name("net.eq2online.macros.core.MacroModCore"); - public final static Name BlockSturdyLadder = new Name("mods.chupmacabre.ladderKit.sturdyLadders.BlockSturdyLadder"); - public final static Name BlockRopeLadder = new Name("mods.chupmacabre.ladderKit.ropeLadders.BlockRopeLadder"); - - public final static Name RopesPlusClient = new Name("atomicstryker.ropesplus.client.RopesPlusClient"); - public final static Name RopesPlusClient_onZipLine = new Name("onZipLine"); - - public final static Name CarpentersBlockLadder = new Name("com.carpentersblocks.block.BlockCarpentersLadder"); - public final static Name CarpentersTEBaseBlock = new Name("com.carpentersblocks.tileentity.TEBase"); - public final static Name CarpentersTEBaseBlock_getData = new Name("getData"); - - public final static Name NetServerHandler_ticksForFloatKick = new Name("floatingTickCount", "field_147365_f", "f"); - public final static Name GuiNewChat_chatMessageList = new Name("chatLines", "field_146252_h", "h"); - public final static Name PlayerControllerMP_currentGameType = new Name("currentGameType", "field_78779_k", "k"); - public final static Name ModifiableAttributeInstance_attributeValue = new Name("cachedValue", "field_111139_h", "h"); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingMod.java b/src/main/java/net/smart/moving/SmartMovingMod.java deleted file mode 100644 index 756facf2..00000000 --- a/src/main/java/net/smart/moving/SmartMovingMod.java +++ /dev/null @@ -1,174 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.io.*; -import java.lang.reflect.*; -import java.util.*; - -import cpw.mods.fml.common.*; -import cpw.mods.fml.common.Mod.*; -import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.eventhandler.*; -import cpw.mods.fml.common.gameevent.TickEvent.*; -import cpw.mods.fml.common.network.*; -import cpw.mods.fml.common.network.FMLNetworkEvent.*; -import net.minecraft.entity.player.*; -import net.minecraft.network.*; -import net.smart.core.*; -import net.smart.moving.config.*; -import net.smart.utilities.*; - -@Mod(modid = "SmartMoving", name = "Smart Moving", version = "15.6", dependencies = "required-after:PlayerAPI@[1.3,)") -public class SmartMovingMod -{ - protected static String ModComVersion = "2.3.1"; - - private final boolean isClient; - - private boolean hasRenderer = false; - - public SmartMovingMod() - { - isClient = FMLCommonHandler.instance().getSide().isClient(); - } - - @EventHandler - @SuppressWarnings("unused") - public void init(FMLInitializationEvent event) - { - NetworkRegistry.INSTANCE.newEventDrivenChannel(SmartMovingPacketStream.Id).register(this); - - if(isClient) - { - hasRenderer = Loader.isModLoaded("RenderPlayerAPI"); - - net.smart.moving.playerapi.SmartMoving.register(); - - if(hasRenderer) - { - Class type = Reflect.LoadClass(SmartMovingMod.class, new Name("net.smart.moving.render.playerapi.SmartMoving"), true); - Method method = Reflect.GetMethod(type, new Name("register")); - Reflect.Invoke(method, null); - } - else - net.smart.render.SmartRenderMod.doNotAddRenderer(); - - SmartMovingServerComm.localUserNameProvider = new LocalUserNameProvider(); - if(!hasRenderer) - SmartMovingContext.registerRenderers(); - - registerGameTicks(); - - net.smart.moving.playerapi.SmartMovingFactory.initialize(); - - checkForPresentModsAndInitializeOptions(); - - SmartMovingContext.initialize(); - } - else - SmartMovingServer.initialize(new File("."), FMLCommonHandler.instance().getMinecraftServerInstance().getGameType().getID(), new SmartMovingConfig()); - - SmartCoreEventHandler.Add(new SmartMovingCoreEventHandler()); - } - - @EventHandler - @SuppressWarnings("unused") - public void postInit(FMLPostInitializationEvent event) - { - if(!isClient) - net.smart.moving.playerapi.SmartMovingServerPlayerBase.registerPlayerBase(); - } - - @SubscribeEvent - @SuppressWarnings({ "static-method", "unused" }) - public void tickStart(ClientTickEvent event) - { - SmartMovingContext.onTickInGame(); - } - - @SubscribeEvent - @SuppressWarnings("static-method") - public void onPacketData(ServerCustomPacketEvent event) - { - SmartMovingPacketStream.receivePacket(event.packet, SmartMovingServerComm.instance, net.smart.moving.playerapi.SmartMovingServerPlayerBase.getPlayerBase(((NetHandlerPlayServer)event.handler).playerEntity)); - } - - @SubscribeEvent - @SuppressWarnings("static-method") - public void onPacketData(ClientCustomPacketEvent event) - { - SmartMovingPacketStream.receivePacket(event.packet, SmartMovingComm.instance, null); - } - - public void registerGameTicks() - { - FMLCommonHandler.instance().bus().register(this); - } - - @SuppressWarnings("static-method") - public Object getInstance(EntityPlayer entityPlayer) - { - return SmartMovingFactory.getInstance(entityPlayer); - } - - @SuppressWarnings("static-method") - public Object getClient() - { - return SmartMovingContext.Client; - } - - @SuppressWarnings("static-method") - public void checkForPresentModsAndInitializeOptions() - { - List modList = Loader.instance().getActiveModList(); - boolean hasRedPowerWiring = false; - boolean hasBuildCraftTransport = false; - boolean hasFiniteLiquid = false; - boolean hasBetterThanWolves = false; - boolean hasSinglePlayerCommands = false; - boolean hasRopesPlus = false; - boolean hasASGrapplingHook = false; - boolean hasBetterMisc = false; - - for(int i = 0; i < modList.size(); i++) - { - ModContainer mod = modList.get(i); - String name = mod.getName(); - - if(name.contains("RedPowerWiring")) - hasRedPowerWiring = true; - else if(name.contains("BuildCraftTransport")) - hasBuildCraftTransport = true; - else if(name.contains("Liquid")) - hasFiniteLiquid = true; - else if(name.contains("FCBetterThanWolves")) - hasBetterThanWolves = true; - else if(name.contains("SinglePlayerCommands")) - hasSinglePlayerCommands = true; - else if(name.contains("ASGrapplingHook")) - hasASGrapplingHook = true; - else if(name.contains("BetterMisc")) - hasBetterMisc = true; - } - - hasRopesPlus = Reflect.CheckClasses(SmartMovingMod.class, SmartMovingInstall.RopesPlusCore); - - SmartMovingOptions.initialize(hasRedPowerWiring, hasBuildCraftTransport, hasFiniteLiquid, hasBetterThanWolves, hasSinglePlayerCommands, hasRopesPlus, hasASGrapplingHook, hasBetterMisc); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingOther.java b/src/main/java/net/smart/moving/SmartMovingOther.java deleted file mode 100644 index 873dbf9d..00000000 --- a/src/main/java/net/smart/moving/SmartMovingOther.java +++ /dev/null @@ -1,137 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import net.minecraft.client.entity.*; - -public class SmartMovingOther extends SmartMoving -{ - public boolean foundAlive; - - public SmartMovingOther(EntityOtherPlayerMP sp) - { - super(sp, null); - } - - public void processStatePacket(long state) - { - actualFeetClimbType = (int)(state & 15); - state >>>= 4; - - actualHandsClimbType = (int)(state & 15); - state >>>= 4; - - _isJumping = (state & 1) != 0; - state >>>= 1; - - isDiving = (state & 1) != 0; - state >>>= 1; - - isDipping = (state & 1) != 0; - state >>>= 1; - - isSwimming = (state & 1) != 0; - state >>>= 1; - - isCrawlClimbing = (state & 1) != 0; - state >>>= 1; - - isCrawling = (state & 1) != 0; - state >>>= 1; - - isClimbing = (state & 1) != 0; - state >>>= 1; - - boolean isSmall = (state & 1) != 0; - heightOffset = isSmall ? -1 : 0; - sp.height = 1.8F + heightOffset; - state >>>= 1; - - _doFallingAnimation = (state & 1) != 0; - state >>>= 1; - - _doFlyingAnimation = (state & 1) != 0; - state >>>= 1; - - isCeilingClimbing = (state & 1) != 0; - state >>>= 1; - - isLevitating = (state & 1) != 0; - state >>>= 1; - - isHeadJumping = (state & 1) != 0; - state >>>= 1; - - isSliding = (state & 1) != 0; - state >>>= 1; - - angleJumpType = (int)(state & 7); - state >>>= 3; - - isFeetVineClimbing = (state & 1) != 0; - state >>>= 1; - - isHandsVineClimbing = (state & 1) != 0; - state >>>= 1; - - isClimbJumping = (state & 1) != 0; - state >>>= 1; - - boolean wasClimbBackJumping = isClimbBackJumping; - isClimbBackJumping = (state & 1) != 0; - if(!wasClimbBackJumping && isClimbBackJumping) - onStartClimbBackJump(); - state >>>= 1; - - isSlow = (state & 1) != 0; - state >>>= 1; - - isFast = (state & 1) != 0; - state >>>= 1; - - boolean wasWallJumping = isWallJumping; - isWallJumping = (state & 1) != 0; - if(!wasWallJumping && isWallJumping) - onStartWallJump(null); - state >>>= 1; - - isRopeSliding = (state & 1) != 0; - } - - @Override - public boolean isJumping() - { - return _isJumping; - } - - @Override - public boolean doFlyingAnimation() - { - return _doFlyingAnimation; - } - - @Override - public boolean doFallingAnimation() - { - return _doFallingAnimation; - } - - private boolean _isJumping = false; - private boolean _doFlyingAnimation = false; - private boolean _doFallingAnimation = false; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingPacketStream.java b/src/main/java/net/smart/moving/SmartMovingPacketStream.java deleted file mode 100644 index 52758e60..00000000 --- a/src/main/java/net/smart/moving/SmartMovingPacketStream.java +++ /dev/null @@ -1,215 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.io.*; -import java.util.*; - -import cpw.mods.fml.common.network.internal.*; - -public class SmartMovingPacketStream -{ - public static final String Id; - public static final Set errors; - - static - { - String id = SmartMovingInfo.ModComId; - if(id.length() > 15) - id = id.substring(0, 15); - Id = id; - errors = new HashSet(); - } - - public static void receivePacket(FMLProxyPacket packet, IPacketReceiver comm, IEntityPlayerMP player) - { - try - { - ByteArrayInputStream byteInput = new ByteArrayInputStream(packet.payload().array()); - ObjectInputStream objectInput = new ObjectInputStream(byteInput); - byte packetId = objectInput.readByte(); - switch(packetId) - { - case SmartMovingInfo.StatePacketId: - int entityId = objectInput.readInt(); - long state = objectInput.readLong(); - comm.processStatePacket(packet, player, entityId, state); - break; - case SmartMovingInfo.ConfigInfoPacketId: - String info = (String)objectInput.readObject(); - comm.processConfigInfoPacket(packet, player, info); - break; - case SmartMovingInfo.ConfigContentPacketId: - String[] content = (String[])objectInput.readObject(); - String username = (String)objectInput.readObject(); - comm.processConfigContentPacket(packet, player, content, username); - break; - case SmartMovingInfo.ConfigChangePacketId: - comm.processConfigChangePacket(packet, player); - break; - case SmartMovingInfo.SpeedChangePacketId: - int difference = objectInput.readInt(); - username = (String)objectInput.readObject(); - comm.processSpeedChangePacket(packet, player, difference, username); - break; - case SmartMovingInfo.HungerChangePacketId: - float hunger = objectInput.readFloat(); - comm.processHungerChangePacket(packet, player, hunger); - break; - case SmartMovingInfo.SoundPacketId: - String soundId = (String)objectInput.readObject(); - float volume = objectInput.readFloat(); - float pitch = objectInput.readFloat(); - comm.processSoundPacket(packet, player, soundId, volume, pitch); - break; - default: - throw new RuntimeException("Unknown packet id '" + packetId + "' found"); - } - } - catch(Throwable t) - { - if(errors.add(t.getStackTrace()[0])) - t.printStackTrace(); - else - System.err.println(t.getClass().getName() + ": " + t.getMessage()); - } - } - - public static void sendState(IPacketSender comm, int entityId, long state) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.StatePacketId); - objectOutput.writeInt(entityId); - objectOutput.writeLong(state); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendConfigInfo(IPacketSender comm, String info) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.ConfigInfoPacketId); - objectOutput.writeObject(info); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendConfigContent(IPacketSender comm, String[] content, String username) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.ConfigContentPacketId); - objectOutput.writeObject(content); - objectOutput.writeObject(username); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendConfigChange(IPacketSender comm) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.ConfigChangePacketId); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendSpeedChange(IPacketSender comm, int difference, String username) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.SpeedChangePacketId); - objectOutput.writeInt(difference); - objectOutput.writeObject(username); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendHungerChange(IPacketSender comm, float hunger) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.HungerChangePacketId); - objectOutput.writeFloat(hunger); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } - - public static void sendSound(IPacketSender comm, String soundId, float volume, float pitch) - { - ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); - try - { - ObjectOutputStream objectOutput = new ObjectOutputStream(byteOutput); - objectOutput.writeByte(SmartMovingInfo.SoundPacketId); - objectOutput.writeObject(soundId); - objectOutput.writeFloat(volume); - objectOutput.writeFloat(pitch); - objectOutput.flush(); - } - catch(Throwable t) - { - throw new RuntimeException(t); - } - comm.sendPacket(byteOutput.toByteArray()); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingSelf.java b/src/main/java/net/smart/moving/SmartMovingSelf.java deleted file mode 100644 index 412dfcf6..00000000 --- a/src/main/java/net/smart/moving/SmartMovingSelf.java +++ /dev/null @@ -1,3206 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.lang.reflect.*; -import java.util.*; - -import net.minecraft.block.*; -import net.minecraft.block.Block.*; -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.client.gui.*; -import net.minecraft.client.gui.inventory.*; -import net.minecraft.client.settings.*; -import net.minecraft.entity.*; -import net.minecraft.entity.ai.attributes.*; -import net.minecraft.entity.player.*; -import net.minecraft.entity.player.EntityPlayer.*; -import net.minecraft.item.*; -import net.minecraft.nbt.*; -import net.minecraft.network.play.client.*; -import net.minecraft.potion.*; -import net.minecraft.stats.*; -import net.minecraft.util.*; -import net.smart.moving.config.*; -import net.smart.moving.render.*; -import net.smart.utilities.*; - -@SuppressWarnings("static-access") -public class SmartMovingSelf extends SmartMoving implements ISmartMovingSelf -{ - private boolean initialized; - private int multiPlayerInitialized; - private int updateCounter; - private float distanceSwom; - - public SmartMovingSelf(EntityPlayer sp, IEntityPlayerSP isp) - { - super(sp, isp); - - initialized = false; - - nextClimbDistance = 0; - distanceClimbedModified = 0; - - exhaustion = 0; - lastHorizontalCollisionX = 0; - lastHorizontalCollisionZ = 0; - lastHungerIncrease = -2; - - prevPacketState = -1; - } - - public void moveEntityWithHeading(float moveStrafing, float moveForward) - { - if(sp.motionX == 0 && prevMotionX < 0.005) - sp.motionX = prevMotionX; - - if(sp.motionZ == 0 && prevMotionZ < 0.005) - sp.motionZ = prevMotionZ; - - if(sp.capabilities.isFlying && !Config.isFlyingEnabled()) - { - double d3 = sp.motionY; - float f2 = sp.jumpMovementFactor; - sp.jumpMovementFactor = 0.05F; - superMoveEntityWithHeading(moveStrafing, moveForward); - sp.motionY = d3 * 0.59999999999999998D; - sp.jumpMovementFactor = f2; - } - else - { - superMoveEntityWithHeading(moveStrafing, moveForward); - } - } - - private void superMoveEntityWithHeading(float moveStrafing, float moveForward) - { - if(isRunning() && !Config.isRunningEnabled()) - sp.setSprinting(false); - - boolean wasShortInWater = isSwimming || isDiving; - boolean wasSwimming = isSwimming; - boolean wasClimbing = isClimbing; - boolean wasDiving = isDiving; - boolean wasCeilingClimbing = isCeilingClimbing; - boolean wasJumpingOutOfWater = isJumpingOutOfWater; - - handleJumping(); - - double d_S = sp.posX; - double d1_S = sp.posY; - double d2_S = sp.posZ; - - if(sp.isCollidedHorizontally) - { - lastHorizontalCollisionX = sp.posX; - lastHorizontalCollisionZ = sp.posZ; - } - - float speedFactor = this.getSpeedFactor(moveForward, moveStrafing); - - boolean isLiquidClimbing = Config.isFreeClimbingEnabled() && sp.fallDistance <= 3.0 && wantClimbUp && sp.isCollidedHorizontally && !isDiving; - boolean handledSwimming = handleSwimming(moveForward, moveStrafing, speedFactor, wasSwimming, wasDiving, isLiquidClimbing, wasJumpingOutOfWater); - boolean handledLava = handleLava(moveForward, moveStrafing, handledSwimming, isLiquidClimbing); - boolean handledAlternativeFlying = handleAlternativeFlying(moveForward, moveStrafing, speedFactor, handledSwimming, handledLava); - handleLand(moveForward, moveStrafing, speedFactor, handledSwimming, handledLava, handledAlternativeFlying, wasShortInWater, wasClimbing, wasCeilingClimbing); - - handleWallJumping(); - - double diffX = sp.posX - d_S; - double diffY = sp.posY - d1_S; - double diffZ = sp.posZ - d2_S; - - sp.addMovementStat(diffX, diffY, diffZ); - - handleExhaustion(diffX, diffY, diffZ); - } - - private float getSpeedFactor() - { - return Config.enabled ? Config._speedFactor.value * Config.getUserSpeedFactor() * getLandMovementFactor() * 10F / (sp.isSprinting() ? 1.3F : 1F) : 1F; - } - - private float getSpeedFactor(float moveForward, float moveStrafing) - { - float speedFactor = getSpeedFactor(); - - if (sp.isUsingItem()) - { - float itemFactor = 0.2F; - if(Config.enabled) - { - Item item = sp.getItemInUse().getItem(); - if(item instanceof ItemSword) - itemFactor = Config._usageSwordSpeedFactor.value; - else if(item instanceof ItemBow) - itemFactor = Config._usageBowSpeedFactor.value; - else if(item instanceof ItemFood) - itemFactor = Config._usageFoodSpeedFactor.value; - else - itemFactor = Config._usageSpeedFactor.value; - } - speedFactor *= itemFactor; - } - - if(isCrawling || (isCrawlClimbing && !isClimbCrawling)) - speedFactor *= Config._crawlFactor.value; - else if(isSlow) - speedFactor *= Config._sneakFactor.value; - - if(isFast) - speedFactor *= Config._sprintFactor.value; - - if(isClimbing) - if(moveStrafing != 0F || moveForward != 0F) - speedFactor *= Config._freeClimbingHorizontalSpeedFactor.value; - else if(wantClimbDown && isNeighborClimbing && !(Math.abs(sp.posX - lastHorizontalCollisionX) < 0.05 && Math.abs(sp.posZ - lastHorizontalCollisionZ) < 0.05)) - { - moveForward = ClimbPullMotion; - if(isVineOnlyClimbing) - { - if(handsEdgeMeta != Orientation.VineFrontMeta && feetEdgeMeta != Orientation.VineFrontMeta) - moveForward = 0F; - else - { - Orientation orientation = Orientation.getOrientation(sp, 45F, true, false); - if(orientation != null) - { - float gap = (float)orientation.getHorizontalBorderGap(sp); - float minGap = sp.width / 2; - float factor = Math.max(0, gap * (1 + minGap) - minGap); - moveForward = factor * factor * 0.3F; - } - } - } - } - - if(isCeilingClimbing) - speedFactor *= Config._ceilingClimbingSpeedFactor.value; - - return speedFactor; - } - - private boolean handleSwimming(float moveForward, float moveStrafing, float speedFactor, boolean wasSwimming, boolean wasDiving, boolean isLiquidClimbing, boolean wasJumpingOutOfWater) - { - boolean handleSwimmingRejected = false; - boolean handleSwimming = !isFlying && !isLiquidClimbing && (sp.isInWater() || (wasSwimming && isInLiquid()) || (Config.isLavaLikeWaterEnabled() && sp.handleLavaMovement())); - if(handleSwimming) - { - resetClimbing(); - - float wasHeightOffset = heightOffset; - - boolean useStandard = !Config.isSwimmingEnabled() && !Config.isDivingEnabled(); - if(sp.ridingEntity != null) - { - resetSwimming(); - useStandard = true; - } - - if(useStandard && isCrawling) - standupIfPossible(); - else - resetHeightOffset(); - - if(!useStandard) - { - resetSwimming(); - - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.minY); - int k = MathHelper.floor_double(sp.posZ); - - boolean swimming = false; - boolean diving = false; - boolean dipping = false; - - double j_offset = sp.boundingBox.minY - j; - - double totalSwimWaterBorder = getMaxPlayerLiquidBetween(sp.boundingBox.maxY - 1.8, sp.boundingBox.maxY + 1.2); - double minPlayerSwimWaterCeiling = getMinPlayerSolidBetween(sp.boundingBox.maxY - 1.8, sp.boundingBox.maxY + 1.2, 0); - double realTotalSwimWaterBorder = Math.min(totalSwimWaterBorder, minPlayerSwimWaterCeiling); - double minPlayerSwimWaterDepth = totalSwimWaterBorder - getMaxPlayerSolidBetween(totalSwimWaterBorder - 2, totalSwimWaterBorder, 0); - double realMinPlayerSwimWaterDepth = totalSwimWaterBorder - getMaxPlayerSolidBetween(realTotalSwimWaterBorder - 2, realTotalSwimWaterBorder, 0); - double playerSwimWaterBorder = totalSwimWaterBorder - j - j_offset; - - if(isCrawling && playerSwimWaterBorder > SwimCrawlWaterTopBorder) - standupIfPossible(); - - double motionYDiff = 0; - boolean couldStandUp = playerSwimWaterBorder >= 0 && minPlayerSwimWaterDepth <= 1.5; - - boolean diveUp = isp.getIsJumpingField(); - boolean diveDown = esp.movementInput.sneak && Config._diveDownOnSneak.value; - boolean swimDown = esp.movementInput.sneak && Config._swimDownOnSneak.value; - - boolean wantShallowSwim = couldStandUp && (wasSwimming || wasDiving); - if(wantShallowSwim) - { - HashSet orientations = Orientation.getClimbingOrientations(sp, true, true); - Iterator iterator = orientations.iterator(); - while(iterator.hasNext()) - if(!(wantShallowSwim &= !iterator.next().isTunnelAhead(sp.worldObj, i, j, k))) - break; - } - - if(wasSwimming && wantShallowSwim && swimDown) - { - swimDown = false; - isFakeShallowWaterSneaking = true; - } - - if(isDiving && diveUp && diveDown) - diveUp = diveDown = false; - - if(isCrawling || isClimbCrawling || isCrawlClimbing) - isDipping = true; - else if(playerSwimWaterBorder >= 0 && playerSwimWaterBorder <= 2) - { - double offset = playerSwimWaterBorder + 0.1625D; // for fine tuning - boolean moveSwim = sp.rotationPitch < 0F && esp.movementInput.moveForward > 0F || sp.rotationPitch > 0F && esp.movementInput.moveForward < 0F; - if(diveUp || moveSwim || wantShallowSwim) - { - if(offset < 1.4) - { - dipping = true; - if(offset < 1) - motionYDiff = -0.02D; - else - motionYDiff = -0.01D; - } - else if(offset < 1.9) - { - swimming = true; - if(swimDown) - motionYDiff = -0.05D * (isFast ? Config._sprintFactor.value : 1F); - else if(offset < 1.5) - motionYDiff = -0.02D; - if(offset < 1.6) - motionYDiff = -0.01D; - else if(offset < 1.62) - motionYDiff = -0.005D; - else if(offset < 1.64) - motionYDiff = -0.0025D; - else if(offset < 1.66) - motionYDiff = -0.00125D; - else if(offset < 1.664) - motionYDiff = -0.000625D; - else if(offset < 1.668) - motionYDiff = 0D; - else if(offset < 1.672) - motionYDiff = 0.000625D; - else if(offset < 1.676) - motionYDiff = 0.00125D; - else if(offset < 1.68) - motionYDiff = 0.0025D; - else if(offset < 1.7) - motionYDiff = 0.005D; - else if(offset < 1.8) - motionYDiff = 0.01D; - else - motionYDiff = 0.02D; - } - else - { - diving = true; - if(diveUp) - motionYDiff = 0.05D * (isFast ? Config._sprintFactor.value : 1F); - else if(diveDown) - motionYDiff = 0.01 - 0.1 * speedFactor; - else - motionYDiff = moveSwim ? 0.04D : 0.02D; - } - } - else - { - if(offset < 1.5) - { - dipping = true; - if(offset < 1) - motionYDiff = -0.02D; - else - motionYDiff = -0.02D; - } - else - { - diving = true; - if(diveDown) - motionYDiff = 0.01 - 0.1 * speedFactor; - else if(offset < 1.8) - motionYDiff = -0.02D; - else if(offset < 1.82) - motionYDiff = -0.01D; - else if(offset < 1.84) - motionYDiff = -0.005D; - else if(offset < 1.86) - motionYDiff = -0.0025D; - else if(offset < 1.864) - motionYDiff = -0.00125D; - else if(offset < 1.868) - motionYDiff = 0D; - else if(offset < 1.872) - motionYDiff = 0.00125D; - else if(offset < 1.876) - motionYDiff = 0.0025D; - else if(offset < 1.88) - motionYDiff = 0.005D; - else if(offset < 1.9) - motionYDiff = 0.01D; - else - motionYDiff = 0.01D; - } - } - } - else if(playerSwimWaterBorder > 2) - { - diving = true; - if(diveUp) - if(isFast && playerSwimWaterBorder < 2.5 && sp.worldObj.isAirBlock(i, j + 3, k)) - motionYDiff = 0.11D / Config._sprintFactor.value; - else - motionYDiff = 0.01 + 0.1 * speedFactor; - else if(diveDown) - motionYDiff = 0.01 - 0.1 * speedFactor; - else - motionYDiff = 0.01D; - } - else - handleSwimmingRejected = true; - - dippingDepth = (float)playerSwimWaterBorder; - float playerCrawlWaterBorder = dippingDepth + wasHeightOffset; - if((isCrawling || isSliding) && playerCrawlWaterBorder < SwimCrawlWaterMaxBorder) - if(playerCrawlWaterBorder < SwimCrawlWaterTopBorder) - { - // continue crawling in shallow water - setHeightOffset(wasHeightOffset); - handleSwimmingRejected = true; - } - else - { - // from crawling in shallow water to swimming/diving - if(wantShallowSwim) - move(0, 0.1, 0, true); // to avoid diving in shallow water - isCrawling = false; - isDiving = false; - isSwimming = true; - isDipping = false; - } - - if(!handleSwimmingRejected) - { - swimming = !useStandard && swimming && Config.isSwimmingEnabled(); - diving = !useStandard && diving && Config.isDivingEnabled(); - dipping = !useStandard && dipping && Config.isSwimmingEnabled(); - useStandard = !swimming && !diving && !dipping; - - if(!useStandard) - { - if(diveUp) - sp.motionY -= 0.039999999105930328D; - - if(swimming) - { - sp.motionX *= 0.85D; - sp.motionY *= 0.85D; - sp.motionZ *= 0.85D; - } - else if(diving) - { - sp.motionX *= 0.83D; - sp.motionY *= 0.83D; - sp.motionZ *= 0.83D; - } - else if(dipping) - { - sp.motionX *= 0.80D; - sp.motionY *= 0.83D; - sp.motionZ *= 0.80D; - } - else - { - sp.motionX *= 0.9D; - sp.motionY *= 0.85D; - sp.motionZ *= 0.9D; - } - - boolean moveFlying = true; - boolean levitating = diving && !diveUp && !diveDown && moveStrafing == 0F && moveForward == 0F; - - if(diving) - speedFactor *= Config._diveSpeedFactor.value; - if(swimming) - speedFactor *= Config._swimSpeedFactor.value; - - if(swimming || diving) - waterMovementTicks++; - else - waterMovementTicks = 0; - - boolean wantJumpOutOfWater = (moveForward != 0 || moveStrafing != 0) && sp.isCollidedHorizontally && diveUp && !isSlow; - isJumpingOutOfWater = wantJumpOutOfWater && (waterMovementTicks > 10 || sp.onGround || wasJumpingOutOfWater); - - if(diving) - { - if(diveUp || diveDown || levitating) - sp.motionY = (sp.motionY + motionYDiff) * 0.6; - else - moveFlying((float)motionYDiff, moveStrafing, moveForward, 0.02F * speedFactor, Options._diveControlVertical.value); - moveFlying = false; - } - else if(swimming && swimDown) - sp.motionY = (sp.motionY + motionYDiff) * 0.6; - else if(isJumpingOutOfWater) - sp.motionY = 0.30000001192092896D; - else - sp.motionY += motionYDiff; - - isDiving = diving; - isLevitating = levitating; - isSwimming = swimming; - isShallowDiveOrSwim = couldStandUp && (isDiving || isSwimming); - isDipping = dipping; - - if(isDiving || isSwimming) - setHeightOffset(-1F); - - if(isShallowDiveOrSwim && realMinPlayerSwimWaterDepth < SwimCrawlWaterBottomBorder) - { - if(isSlow) - { - // from swimming/diving in shallow water to crawling in shallow water - setHeightOffset(-1F); - isCrawling = true; - isDiving = false; - isSwimming = false; - isShallowDiveOrSwim = false; - isDipping = true; - } - else - { - // from swimming/diving in shallow water to walking in shallow water - resetHeightOffset(); - sp.moveEntity(0, getMaxPlayerSolidBetween(sp.boundingBox.minY, sp.boundingBox.maxY, 0) - sp.boundingBox.minY, 0); - isCrawling = false; - isDiving = false; - isSwimming = false; - isShallowDiveOrSwim = false; - isDipping = true; - } - } - - if(moveFlying) - sp.moveFlying(moveStrafing, moveForward, 0.02F * speedFactor); - sp.moveEntity(sp.motionX, sp.motionY, sp.motionZ); - } - } - } - else - { - isDiving = false; - isSwimming = false; - isShallowDiveOrSwim = false; - isDipping = false; - isStillSwimmingJump = false; - } - - if(useStandard) - { - resetSwimming(); - - if(isCrawling) - setHeightOffset(wasHeightOffset); - - double dY = sp.posY; - sp.moveFlying(moveStrafing, moveForward, 0.02F * speedFactor); - sp.moveEntity(sp.motionX, sp.motionY, sp.motionZ); - - sp.motionX *= 0.80000001192092896D; - sp.motionY *= 0.80000001192092896D; - sp.motionZ *= 0.80000001192092896D; - sp.motionY -= 0.02D; - if(sp.isCollidedHorizontally && sp.isOffsetPositionInLiquid(sp.motionX, ((sp.motionY + 0.60000002384185791D) - sp.posY) + dY, sp.motionZ)) - { - sp.motionY = 0.30000001192092896D; - } - } - } - - return handleSwimming && !handleSwimmingRejected; - } - - private boolean handleLava(float moveForward, float moveStrafing, boolean handledSwimming, boolean isLiquidClimbing) - { - boolean handleLava = !isFlying && !handledSwimming && !isLiquidClimbing && sp.handleLavaMovement(); - if(handleLava) - { - standupIfPossible(); - resetClimbing(); - resetSwimming(); - - double d1 = sp.posY; - sp.moveFlying(moveStrafing, moveForward, 0.02F); - sp.moveEntity(sp.motionX, sp.motionY, sp.motionZ); - sp.motionX *= 0.5D; - sp.motionY *= 0.5D; - sp.motionZ *= 0.5D; - sp.motionY -= 0.02D; - if(sp.isCollidedHorizontally && sp.isOffsetPositionInLiquid(sp.motionX, ((sp.motionY + 0.60000002384185791D) - sp.posY) + d1, sp.motionZ)) - { - sp.motionY = 0.30000001192092896D; - } - } - return handleLava; - } - - private boolean handleAlternativeFlying(float moveForward, float moveStrafing, float speedFactor, boolean handledSwimming, boolean handledLava) - { - boolean handleAlternativeFlying = !handledSwimming && !handledLava && sp.capabilities.isFlying && Config.isFlyingEnabled(); - if(handleAlternativeFlying) - { - resetSwimming(); - resetClimbing(); - - float moveUpward = 0F; - if(esp.movementInput.sneak) - { - sp.motionY += 0.14999999999999999D; - moveUpward -= 0.98F; - } - if(esp.movementInput.jump) - { - sp.motionY -= 0.14999999999999999D; - moveUpward += 0.98F; - } - - moveFlying(moveUpward, moveStrafing, moveForward, speedFactor * 0.05F * Config._flyingSpeedFactor.value, Options._flyControlVertical.value); - - sp.moveEntity(sp.motionX, sp.motionY, sp.motionZ); - - sp.motionX *= HorizontalAirDamping; - sp.motionY *= HorizontalAirDamping; - sp.motionZ *= HorizontalAirDamping; - } - return handleAlternativeFlying; - } - - private void handleLand(float moveForward, float moveStrafing, float speedFactor, boolean handledSwimming, boolean handledLava, boolean handledAlternativeFlying, boolean wasShortInWater, boolean wasClimbing, boolean wasCeilingClimbing) - { - if(!handledSwimming && !handledLava && !handledAlternativeFlying) - { - resetSwimming(); - - if (!grabButton.Pressed) - fromSwimmingOrDiving(wasShortInWater); - - boolean isOnLadder = isOnLadder(isClimbCrawling); - boolean isOnVine = isOnVine(isClimbCrawling); - - float horizontalDamping = landMotion(moveForward, moveStrafing, speedFactor, isOnLadder, isOnVine); - boolean crawlingThroughWeb = (isCrawling || isCrawlClimbing) && isp.getIsInWebField(); - move(sp.motionX, sp.motionY, sp.motionZ, crawlingThroughWeb); - - handleClimbing(isOnLadder, isOnVine, wasClimbing); - handleCeilingClimbing(wasCeilingClimbing); - setLandMotions(horizontalDamping); - } - - landMotionPost(wasShortInWater); - } - - private void move(double motionX, double motionY, double motionZ, boolean relocate) - { - boolean isInWeb = isp.getIsInWebField(); - if(relocate) - isp.setIsInWebField(false); - sp.moveEntity(motionX, motionY, motionZ); - if(relocate) - isp.setIsInWebField(isInWeb); - } - - private float landMotion(float moveForward, float moveStrafing, float speedFactor, boolean isOnLadder, boolean isOnVine) - { - float horizontalDamping; - if(sp.onGround && !isJumping) - { - Block block = sp.worldObj.getBlock(MathHelper.floor_double(sp.posX), MathHelper.floor_double(sp.boundingBox.minY) - 1, MathHelper.floor_double(sp.posZ)); - if(block != null) - horizontalDamping = block.slipperiness * HorizontalAirDamping; - else - horizontalDamping = HorizontalGroundDamping; - - if(esp.movementInput.jump && isFast && Config.isJumpingEnabled(Config.Sprinting, Config.Up)) - speedFactor *= Config._sprintJumpVerticalFactor.value; - } - else - horizontalDamping = HorizontalAirDamping; - - if(isClimbing && climbingUpIsBlockedByLadder()) - sp.moveFlying(0F, -1F, 0.07F); - else if(isClimbing && climbingUpIsBlockedByTrapDoor()) - if(sp.isOnLadder()) - sp.moveFlying(0F, -1F, 0.09F); - else - sp.moveFlying(0F, -1F, 0.09F); - else if(isClimbing && climbingUpIsBlockedByCobbleStoneWall()) - sp.moveFlying(0F, -1F, 0.07F); - else if(!isSliding) - { - if(isHeadJumping) - speedFactor *= Config._headJumpControlFactor.value; - else if(Config.enabled && !sp.onGround && !sp.capabilities.isFlying && !isFlying) - speedFactor *= Config._jumpControlFactor.value; - - float f3 = 0.1627714F / (horizontalDamping * horizontalDamping * horizontalDamping); - float f4 = sp.onGround ? getLandMovementFactor() * f3 : sp.jumpMovementFactor; - float rawSpeed = sp.isSprinting() ? f4 / 1.3F : f4; - if(Config.isRunningEnabled() && isRunning() && !isFast) - speedFactor *= Config._runFactor.value; - - sp.moveFlying(moveStrafing, moveForward, rawSpeed * speedFactor); - } - - if(sp.onGround && !isJumping) - { - Block block = sp.worldObj.getBlock(MathHelper.floor_double(sp.posX), MathHelper.floor_double(sp.boundingBox.minY) - 1, MathHelper.floor_double(sp.posZ)); - if(block != null) - { - float slipperiness = block.slipperiness; - if(isSliding) - { - horizontalDamping = 1F / (((1F / slipperiness) - 1F) / 25F * Config._slideSlipperinessFactor.value + 1F) * 0.98F; - if(moveStrafing != 0 && Config._slideControlDegrees.value > 0) - { - double angle = -Math.atan(sp.motionX / sp.motionZ); - if (!Double.isNaN(angle)) - { - if(sp.motionZ < 0) - angle += Math.PI; - - angle -= Config._slideControlDegrees.value / RadiantToAngle * Math.signum(moveStrafing); - - double hMotion = Math.sqrt(sp.motionX * sp.motionX + sp.motionZ * sp.motionZ); - sp.motionX = hMotion * -Math.sin(angle); - sp.motionZ = hMotion * Math.cos(angle); - } - } - } - else - horizontalDamping = slipperiness * HorizontalAirDamping; - } - else - horizontalDamping = HorizontalGroundDamping; - } - else if(isAerodynamic) - horizontalDamping = HorizontalAirodynamicDamping; - else - horizontalDamping = HorizontalAirDamping; - - if(isOnLadder || isOnVine) - { - float f4 = 0.15F; - if(sp.motionX < -f4) - { - sp.motionX = -f4; - } - if(sp.motionX > f4) - { - sp.motionX = f4; - } - if(sp.motionZ < (-f4)) - { - sp.motionZ = -f4; - } - if(sp.motionZ > f4) - { - sp.motionZ = f4; - } - boolean notTotalFreeClimbing = !isClimbing && isOnLadder && !Config.isTotalFreeLadderClimb() || isOnVine && !Config.isTotalFreeVineClimb(); - if(notTotalFreeClimbing) - { - sp.fallDistance = 0.0F; - sp.motionY = Math.max(sp.motionY, -0.15 * getSpeedFactor()); - } - if(Config.isFreeBaseClimb()) - { - if(esp.movementInput.sneak && sp.motionY < 0.0D && !sp.onGround && notTotalFreeClimbing) - { - sp.motionY = 0.0D; - } - } - else - { - if(isp.localIsSneaking() && sp.motionY < 0.0D) - { - sp.motionY = 0.0D; - } - } - } - else if(Config.isFreeClimbAutoLaddderEnabled() && moveForward > 0) - { - int j = MathHelper.floor_double(sp.boundingBox.minY); - double jGap = sp.boundingBox.minY - j; - - if(jGap < 0.1) - { - int i = MathHelper.floor_double(sp.posX); - int k = MathHelper.floor_double(sp.posZ); - - if(Orientation.isLadder(sp.worldObj.getBlock(i, j - 1, k))) - sp.motionY = Math.max(sp.motionY, 0.0); - } - } - return horizontalDamping; - } - - private void handleClimbing(boolean isOnLadder, boolean isOnVine, boolean wasClimbing) - { - resetClimbing(); - - boolean isOnLadderOrVine = isOnLadder || isOnVine; - - if(Config.isStandardBaseClimb() && sp.isCollidedHorizontally && isOnLadderOrVine) - { - sp.motionY = 0.2 * getSpeedFactor(); - } - - if(Config.isSimpleBaseClimb() && sp.isCollidedHorizontally && isOnLadderOrVine) - { - int i = MathHelper.floor_double(sp.posX); - int j = MathHelper.floor_double(sp.boundingBox.minY); - int k = MathHelper.floor_double(sp.posZ); - - boolean feet = Orientation.isClimbable(sp.worldObj, i, j, k); - boolean hands = Orientation.isClimbable(sp.worldObj, i, j + 1, k); - - if(feet && hands) - sp.motionY = FastUpMotion; - else if(feet) - sp.motionY = FastUpMotion; - else if(hands) - sp.motionY = SlowUpMotion; - else - sp.motionY = 0.0D; - - sp.motionY *= getSpeedFactor(); - } - - if(Config.isSmartBaseClimb() || Config.isFreeClimbingEnabled()) - { - double id = sp.posX; - double jd = sp.boundingBox.minY; - double kd = sp.posZ; - - int i = MathHelper.floor_double(id); - int j = MathHelper.floor_double(jd); - int k = MathHelper.floor_double(kd); - - if(Config.isSmartBaseClimb() && isOnLadderOrVine && sp.isCollidedHorizontally) - { - boolean feet = Orientation.isClimbable(sp.worldObj, i, j, k); - boolean hands = Orientation.isClimbable(sp.worldObj, i, j + 1, k); - - if(feet && hands) - sp.motionY = FastUpMotion; - else if(feet) - { - boolean handsSubstitute = - Orientation.PZ.isHandsLadderSubstitute(sp.worldObj, i, j + 1, k) || - Orientation.NZ.isHandsLadderSubstitute(sp.worldObj, i, j + 1, k) || - Orientation.ZP.isHandsLadderSubstitute(sp.worldObj, i, j + 1, k) || - Orientation.ZN.isHandsLadderSubstitute(sp.worldObj, i, j + 1, k); - - if(handsSubstitute) - sp.motionY = FastUpMotion; - else - sp.motionY = SlowUpMotion; - } - else if(hands) - { - boolean feetSubstitute = - Orientation.ZZ.isFeetLadderSubstitute(sp.worldObj, i, j, k) || - Orientation.PZ.isFeetLadderSubstitute(sp.worldObj, i, j, k) || - Orientation.NZ.isFeetLadderSubstitute(sp.worldObj, i, j, k) || - Orientation.ZP.isFeetLadderSubstitute(sp.worldObj, i, j, k) || - Orientation.ZN.isFeetLadderSubstitute(sp.worldObj, i, j, k); - - if(feetSubstitute) - sp.motionY = FastUpMotion; - else - sp.motionY = SlowUpMotion; - } - else - sp.motionY = 0.0D; - - sp.motionY *= getSpeedFactor(); - } - - if(Config.isFreeClimbingEnabled() && sp.fallDistance <= Config._freeClimbFallMaximumDistance.value && (!isOnLadderOrVine || Config.isFreeBaseClimb())) - { - boolean exhaustionAllowsClimbing = - !Config.isClimbExhaustionEnabled() || - ( - exhaustion <= Config._climbExhaustionStop.value && - (wasClimbing || exhaustion <= Config._climbExhaustionStart.value) - ); - - boolean preferClimb = false; - if(wantClimbUp || wantClimbDown) - { - if(Config.isClimbExhaustionEnabled()) - { - maxExhaustionForAction = Math.min(maxExhaustionForAction, Config._climbExhaustionStop.value); - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, Config._climbExhaustionStart.value); - } - if(exhaustionAllowsClimbing) - preferClimb = true; - } - if(preferClimb) - { - boolean isSmallClimbing = isCrawling || isSliding; - if(isClimbCrawling || isCrawlClimbing || isSmallClimbing) - jd += -1D; - - float rotation = sp.rotationYaw % 360F; - if(rotation < 0) - rotation += 360F; - - double jh = jd * 2D + 1; - - HandsClimbing handsClimbing = HandsClimbing.None; - FeetClimbing feetClimbing = FeetClimbing.None; - - inout_handsClimbing[0] = handsClimbing; - inout_feetClimbing[0] = feetClimbing; - - out_handsClimbGap.reset(); - out_feetClimbGap.reset(); - - Orientation.PZ.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.NZ.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.ZP.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.ZN.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - - handsClimbing = inout_handsClimbing[0]; - feetClimbing = inout_feetClimbing[0]; - - isNeighborClimbing = handsClimbing != HandsClimbing.None || feetClimbing != FeetClimbing.None; - hasNeighborClimbGap = out_handsClimbGap.CanStand || out_feetClimbGap.CanStand; - hasNeighborClimbCrawlGap = out_handsClimbGap.MustCrawl || out_feetClimbGap.MustCrawl; - - if(!isSmallClimbing) - { - Orientation.PP.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.NP.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.NN.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - Orientation.PN.seekClimbGap(rotation, sp.worldObj, i, id, jh, k, kd, isClimbCrawling, isCrawlClimbing, isSmallClimbing, inout_handsClimbing, inout_feetClimbing, out_handsClimbGap, out_feetClimbGap); - } - - handsClimbing = inout_handsClimbing[0]; - feetClimbing = inout_feetClimbing[0]; - - hasClimbGap = out_handsClimbGap.CanStand || out_feetClimbGap.CanStand; - hasClimbCrawlGap = out_handsClimbGap.MustCrawl || out_feetClimbGap.MustCrawl; - - if(handsClimbing == HandsClimbing.BottomHold && Orientation.isLadder(sp.worldObj.getBlock(i, j + 2, k))) - { - Orientation ladderOrientation = Orientation.getKnownLadderOrientation(sp.worldObj, i, j + 2, k); - int remote_i = i + ladderOrientation._i; - int remote_k = k + ladderOrientation._k; - if(!sp.worldObj.getBlock(remote_i, j, remote_k).getMaterial().isSolid() && !sp.worldObj.getBlock(remote_i, j + 1, remote_k).getMaterial().isSolid()) - handsClimbing = HandsClimbing.None; - } - - if(!grabButton.Pressed && handsClimbing == HandsClimbing.Up && feetClimbing == FeetClimbing.None) - { - if(!sp.isCollidedHorizontally && sp.worldObj.isAirBlock(i, j, k) && sp.worldObj.isAirBlock(i, j + 1, k)) - handsClimbing = HandsClimbing.None; - } - - // feet climbing only with balancing in gaps or combined with hand climbing - if(feetClimbing.IsRelevant() || handsClimbing.IsRelevant()) - { - if(wantClimbUp) - { - if(isSliding && handsClimbing.IsRelevant()) - { - isSliding = false; - isCrawling = true; - } - - handsClimbing = handsClimbing.ToUp(); - - if(feetClimbing == FeetClimbing.FastUp && !(handsClimbing == HandsClimbing.None && sp.onGround && out_feetClimbGap.Block != Block.getBlockFromName("bed"))) - { - // climbing fast - setShouldClimbSpeed(FastUpMotion, HandsClimbing.NoGrab, FeetClimbing.DownStep); - } - else if((hasClimbGap || hasClimbCrawlGap) && handsClimbing == HandsClimbing.FastUp && (feetClimbing == FeetClimbing.None || feetClimbing == FeetClimbing.BaseWithHands)) - { - // climb into crawl gap - setShouldClimbSpeed(feetClimbing == FeetClimbing.None ? SlowUpMotion : FastUpMotion, HandsClimbing.MiddleGrab, FeetClimbing.DownStep); - } - else if(feetClimbing.IsRelevant() && handsClimbing.IsRelevant() && !(feetClimbing == FeetClimbing.BaseHold && handsClimbing == HandsClimbing.Sink) && !(handsClimbing == HandsClimbing.Sink && feetClimbing == FeetClimbing.TopWithHands) && !(handsClimbing == HandsClimbing.TopHold && feetClimbing == FeetClimbing.TopWithHands)) - { - // climbing all limbed - setShouldClimbSpeed(MediumUpMotion, (hasClimbGap || hasClimbCrawlGap) && !(handsClimbing == HandsClimbing.Sink && feetClimbing == FeetClimbing.BaseWithHands) ? HandsClimbing.MiddleGrab : HandsClimbing.UpGrab, FeetClimbing.DownStep); - } - else if(handsClimbing.IsUp()) - { - // climbing slow - setShouldClimbSpeed(SlowUpMotion); - } - else if(handsClimbing == HandsClimbing.TopHold || feetClimbing == FeetClimbing.BaseHold || (feetClimbing == FeetClimbing.SlowUpWithHoldWithoutHands && handsClimbing == HandsClimbing.None)) - { - // holding at top - if (!jumpButton.StartPressed || !(isClimbJumping = tryJump(feetClimbing != FeetClimbing.None ? Config.ClimbUp : Config.ClimbUpHandsOnly, null, null, null))) - { - if(handsClimbing == HandsClimbing.Sink && feetClimbing == FeetClimbing.BaseHold || handsClimbing == HandsClimbing.TopHold && feetClimbing == FeetClimbing.TopWithHands) - setShouldClimbSpeed(HoldMotion, HandsClimbing.MiddleGrab, FeetClimbing.DownStep); - else - setShouldClimbSpeed(HoldMotion); - } - } - else if(handsClimbing == HandsClimbing.Sink || (feetClimbing == FeetClimbing.SlowUpWithSinkWithoutHands && handsClimbing == HandsClimbing.None)) - { - // sinking unwillingly - setShouldClimbSpeed(SinkDownMotion); - } - } - else if(wantClimbDown) - { - handsClimbing = handsClimbing.ToDown(); - - if(handsClimbing == HandsClimbing.BottomHold && !feetClimbing.IsIndependentlyRelevant()) - { - // holding at bottom - setShouldClimbSpeed(HoldMotion); - } - else if(handsClimbing.IsRelevant()) - { - // sinking willingly - if(feetClimbing == FeetClimbing.FastUp) - setShouldClimbSpeed(ClimbDownMotion, HandsClimbing.NoGrab, FeetClimbing.DownStep); - else if(feetClimbing == FeetClimbing.SlowUpWithHoldWithoutHands) - setShouldClimbSpeed(ClimbDownMotion); - else if(feetClimbing == FeetClimbing.TopWithHands) - setShouldClimbSpeed(ClimbDownMotion); - else if(feetClimbing == FeetClimbing.BaseWithHands || feetClimbing == FeetClimbing.BaseHold) - if((handsClimbing != HandsClimbing.None && handsClimbing != HandsClimbing.Up) || (handsClimbing == HandsClimbing.Up && feetClimbing == FeetClimbing.BaseHold)) - setShouldClimbSpeed(ClimbDownMotion); - else - setShouldClimbSpeed(SinkDownMotion); - else - setShouldClimbSpeed(SinkDownMotion, handsClimbing == HandsClimbing.FastUp ? HandsClimbing.MiddleGrab : HandsClimbing.UpGrab, FeetClimbing.NoStep); - } - - if(isClimbHolding) - { - // holding - setOnlyShouldClimbSpeed(HoldMotion); - - if(jumpButton.StartPressed) - { - boolean handsOnly = feetClimbing != FeetClimbing.None; - - int type = (Options._climbJumpBackHeadOnGrab.value ? grabButton.Pressed : !grabButton.Pressed) - ? (handsOnly ? Config.ClimbBackHead : Config.ClimbBackHeadHandsOnly) - : (handsOnly ? Config.ClimbBackUp : Config.ClimbBackUpHandsOnly); - - float jumpAngle = sp.rotationYaw + 180F; - if(tryJump(type, null, null, jumpAngle)) - { - continueWallJumping = !isHeadJumping; - isClimbing = false; - sp.rotationYaw = jumpAngle; - onStartClimbBackJump(); - } - } - } - } - - if(isClimbing) - handleCrash(Config._freeClimbFallDamageStartDistance.value, Config._freeClimbFallDamageFactor.value); - - if(wantClimbUp || wantClimbDown) - { - if(handsClimbing == HandsClimbing.None) - actualHandsClimbType = HandsClimbing.NoGrab; - else if(feetClimbing == FeetClimbing.None) - actualFeetClimbType = FeetClimbing.NoStep; - - handsEdgeBlock = out_handsClimbGap.Block; - handsEdgeMeta = out_handsClimbGap.Meta; - feetEdgeBlock = out_feetClimbGap.Block; - feetEdgeMeta = out_feetClimbGap.Meta; - } - } - } - - if(SmartMovingOptions.hasRedPowerWire && !isClimbing && wantClimbUp && wasClimbing) // to climb up RedPower wire bottom covers - sp.motionY = 0.15; - - isHandsVineClimbing = isClimbing && handsEdgeBlock == Block.getBlockFromName("vine"); - isFeetVineClimbing = isClimbing && feetEdgeBlock == Block.getBlockFromName("vine"); - - isVineAnyClimbing = isHandsVineClimbing || isFeetVineClimbing; - - isVineOnlyClimbing = isVineAnyClimbing && - !(handsEdgeBlock != null && handsEdgeBlock != Block.getBlockFromName("vine") || feetEdgeBlock != null && feetEdgeBlock != Block.getBlockFromName("vine")); - } - } - } - - private void handleCeilingClimbing(boolean wasCeilingClimbing) - { - boolean exhaustionAllowsClimbCeiling = - !Config.isCeilingClimbExhaustionEnabled() || - ( - exhaustion <= Config._ceilingClimbExhaustionStop.value && - (wasCeilingClimbing || exhaustion <= Config._ceilingClimbExhaustionStart.value) - ); - - boolean climbCeilingCrawlingStartConflict = !Config.isFreeClimbingEnabled() && isCrawling && !wasCrawling; - boolean couldClimbCeiling = wantClimbCeiling && !isClimbing && (!isCrawling || climbCeilingCrawlingStartConflict) && !isCrawlClimbing; - if(couldClimbCeiling && Config.isCeilingClimbExhaustionEnabled()) - { - maxExhaustionForAction = Math.min(maxExhaustionForAction, Config._ceilingClimbExhaustionStop.value); - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, Config._ceilingClimbExhaustionStart.value); - } - - if(couldClimbCeiling && exhaustionAllowsClimbCeiling) - { - double id = sp.posX; - double jd = sp.boundingBox.maxY + (climbCeilingCrawlingStartConflict ? 1F : 0F); - double kd = sp.posZ; - - int i = MathHelper.floor_double(id); - int j = MathHelper.floor_double(jd); - int k = MathHelper.floor_double(kd); - - Block topBlock = supportsCeilingClimbing(i, j, k); - Block bottomBlock = supportsCeilingClimbing(i, j + 1, k); - - boolean topCeilingClimbing = topBlock != null; - boolean bottomCeilingClimbing = bottomBlock != null; - - if(topCeilingClimbing || bottomCeilingClimbing) - { - double jgap = 1D - jd + j; - if(bottomCeilingClimbing) - jgap++; - - double actuallySolidHeight = getMinPlayerSolidBetween(jd, jd + 0.6, 0.2); - if(jgap < 1.9 && actuallySolidHeight < jd + 0.5) - { - if(jgap > 1.2) - sp.motionY = 0.12; - else if(jgap > 1.115) - sp.motionY = 0.08; - else - sp.motionY = 0.04; - - sp.fallDistance = 0.0F; - isCeilingClimbing = true; - handsEdgeBlock = topCeilingClimbing ? topBlock : bottomBlock; - } - } - } - - if (isCeilingClimbing && climbCeilingCrawlingStartConflict) - { - isCrawling = false; - this.resetHeightOffset(); - move(0, 1D, 0, true); - } - } - - private void setLandMotions(float horizontalDamping) - { - sp.motionY -= 0.080000000000000002D; - sp.motionY *= 0.98000001907348633D; - sp.motionX *= horizontalDamping; - sp.motionZ *= horizontalDamping; - } - - private void handleExhaustion(double diffX, double diffY, double diffZ) - { - float hungerIncrease = 0; - if(Config.enabled) - { - boolean isRunning = isRunning(); - boolean isVerticalStill = Math.abs(diffY) < 0.007; - boolean isStill = isStanding && isVerticalStill; - - if(sp.ridingEntity == null) - { - float horizontalMovement = MathHelper.sqrt_double(diffX * diffX + diffZ * diffZ); - float movement = MathHelper.sqrt_double(horizontalMovement * horizontalMovement + diffY * diffY); - - int relevantMovementFactor = Math.round(movement * 100F); - - if(Config.isHungerGainEnabled()) - { - float hungerGainFactor = Config.getFactor(true, sp.onGround, isStanding, isStill, isSlow, isRunning, isFast, isClimbing, isClimbCrawling, isCeilingClimbing, isDipping, isSwimming, isDiving, isCrawling, isCrawlClimbing); - hungerIncrease += Config._alwaysHungerGain.value + relevantMovementFactor * 0.0001F * hungerGainFactor; - } - - float additionalExhaustion = 0F; - if(isClimbing && !isStill && Config.isClimbExhaustionEnabled()) - { - float climbingExhaustion = Config._baseExhautionGainFactor.value; - if(isVerticalStill) - climbingExhaustion *= Config._climbStrafeExhaustionGain.value; - else - { - if(!isStanding) - { - if(wantClimbUp) - climbingExhaustion *= Config._climbStrafeUpExhaustionGain.value; - else if(wantClimbDown) - climbingExhaustion *= Config._climbStrafeDownExhaustionGain.value; - else - climbingExhaustion *= 0F; - } - else - { - if(wantClimbUp) - climbingExhaustion *= Config._climbUpExhaustionGain.value; - else if(wantClimbDown) - climbingExhaustion *= Config._climbDownExhaustionGain.value; - else - climbingExhaustion *= 0F; - } - } - additionalExhaustion += climbingExhaustion; - } - - if(isCeilingClimbing && !isStanding && Config.isCeilingClimbExhaustionEnabled()) - additionalExhaustion += Config._baseExhautionGainFactor.value * Config._ceilingClimbExhaustionGain.value; - - if(isFast && Config.isSprintExhaustionEnabled()) - { - if(additionalExhaustion == 0) - additionalExhaustion = Config._baseExhautionGainFactor.value; - - additionalExhaustion *= Config._sprintExhaustionGainFactor.value; - } - - if(isRunning() && Config.isRunExhaustionEnabled()) - { - if(additionalExhaustion == 0) - additionalExhaustion = Config._baseExhautionGainFactor.value; - - additionalExhaustion *= Config._runExhaustionGainFactor.value; - } - - if (foreignExhaustionFactor > 0) - { - additionalExhaustion += foreignExhaustionFactor * Config._baseExhautionGainFactor.value; - - if(foreignMaxExhaustionForAction == Float.MAX_VALUE) - foreignMaxExhaustionForAction = Client.getMaximumExhaustion(); - maxExhaustionForAction = Math.min(maxExhaustionForAction, foreignMaxExhaustionForAction); - - if(foreignMaxExhaustionToStartAction == Float.MAX_VALUE) - foreignMaxExhaustionToStartAction = Client.getMaximumExhaustion(); - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, foreignMaxExhaustionToStartAction); - } - - exhaustion += additionalExhaustion; - } - else - hungerIncrease = -1; - - if(exhaustion > 0) - { - boolean exhaustionLossPossible = !Config.isExhaustionLossHungerEnabled() || sp.getFoodStats().getFoodLevel() > Config._exhaustionLossFoodLevelMinimum.value; - if(exhaustionLossPossible) - { - float exhaustionLossFactor = Config.getFactor(false, sp.onGround, isStanding, isStill, isSlow, isRunning, isFast, isClimbing, isClimbCrawling, isCeilingClimbing, isDipping, isSwimming, isDiving, isCrawling, isCrawlClimbing); - float exhaustionLoss = 1F * exhaustionLossFactor; - exhaustion -= exhaustionLoss; - if(Config.isExhaustionLossHungerEnabled()) - hungerIncrease += Config._exhaustionLossHungerFactor.value * exhaustionLoss; - } - } - - if(exhaustion < 0) - exhaustion = 0; - - if(exhaustion == 0) - maxExhaustionForAction = maxExhaustionToStartAction = Float.NaN; - - if(maxExhaustionForAction == Float.MAX_VALUE) - maxExhaustionForAction = prevMaxExhaustionForAction; - - if(maxExhaustionToStartAction == Float.MAX_VALUE) - maxExhaustionToStartAction = prevMaxExhaustionToStartAction; - - foreignExhaustionFactor = 0; - foreignMaxExhaustionForAction = Float.MAX_VALUE; - foreignMaxExhaustionToStartAction = Float.MAX_VALUE; - } - else - hungerIncrease = -1; - - if(hungerIncrease != lastHungerIncrease) - { - SmartMovingPacketStream.sendHungerChange(SmartMovingComm.instance, hungerIncrease); - lastHungerIncrease = hungerIncrease; - } - } - - @Override - public float getExhaustion() - { - return exhaustion; - } - - @Override - public float getUpJumpCharge() - { - return jumpCharge; - } - - @Override - public float getHeadJumpCharge() - { - return headJumpCharge; - } - - @Override - public void addExhaustion(float factor) - { - if(!Float.isNaN(factor) && factor > 0) - foreignExhaustionFactor += factor; - } - - @Override - public void setMaxExhaustionForAction(float maxExhaustionForAction) - { - if(!Float.isNaN(maxExhaustionForAction) && maxExhaustionForAction >= 0) - foreignMaxExhaustionForAction = Math.min(foreignMaxExhaustionForAction, maxExhaustionForAction); - } - - @Override - public void setMaxExhaustionToStartAction(float maxExhaustionToStartAction) - { - if(!Float.isNaN(maxExhaustionToStartAction) && maxExhaustionToStartAction >= 0) - foreignMaxExhaustionToStartAction = Math.min(foreignMaxExhaustionToStartAction, maxExhaustionToStartAction); - } - - private void landMotionPost(boolean wasShortInWater) - { - if (grabButton.Pressed) - fromSwimmingOrDiving(wasShortInWater); - - if(heightOffset != 0 && isp.getSleepingField()) - { - // from swimming/diving to sleeping - resetInternalHeightOffset(); - } - } - - private void fromSwimmingOrDiving(boolean wasShortInWater) - { - boolean isShortInWater = isSwimming || isDiving; - if(wasShortInWater && !isShortInWater && !isp.getSleepingField()) - { - // from diving in deep water to walking/sneaking/crawling - setHeightOffset(-1F); - - double crawlStandUpBottom = getMaxPlayerSolidBetween(sp.boundingBox.minY - 1D, sp.boundingBox.minY, 0); - double crawlStandUpLiquidCeiling = getMinPlayerLiquidBetween(sp.boundingBox.maxY, sp.boundingBox.maxY + 1.1D); - double crawlStandUpCeiling = getMinPlayerSolidBetween(sp.boundingBox.maxY, sp.boundingBox.maxY + 1.1D, 0); - - resetHeightOffset(); - - if(crawlStandUpCeiling - crawlStandUpBottom < sp.height) - { - // from diving in deep water to crawling in small hole - isCrawling = true; - isDipping = false; - setHeightOffset(-1F); - } - else if(crawlStandUpLiquidCeiling - crawlStandUpBottom < sp.height) - { - // from diving in deep water to crawling below the water - isCrawling = true; - contextContinueCrawl = true; - isDipping = false; - setHeightOffset(-1F); - } - else if(crawlStandUpBottom > sp.boundingBox.minY) - { - // from diving in deep water to walking/crawling - if(isSlow && crawlStandUpBottom > sp.boundingBox.minY + 0.5D) - { - // from diving in deep water to crawling - isCrawling = true; - isDipping = false; - setHeightOffset(-1F); - } - move(0, (crawlStandUpBottom - sp.boundingBox.minY), 0, true); - } - } - } - - private static ClimbGap out_handsClimbGap = new ClimbGap(); - private static ClimbGap out_feetClimbGap = new ClimbGap(); - - private static HandsClimbing[] inout_handsClimbing = new HandsClimbing[1]; - private static FeetClimbing[] inout_feetClimbing = new FeetClimbing[1]; - - public boolean wantClimbUp; - public boolean wantClimbDown; - public boolean wantSprint; - public boolean wantCrawlNotClimb; - public boolean wantClimbCeiling; - - public boolean isStanding; - public boolean wouldIsSneaking; - public boolean isVineOnlyClimbing; - public boolean isVineAnyClimbing; - - public boolean isClimbingStill; - public boolean isClimbHolding; - public boolean isNeighborClimbing; - public boolean hasClimbGap; - public boolean hasClimbCrawlGap; - public boolean hasNeighborClimbGap; - public boolean hasNeighborClimbCrawlGap; - - public float dippingDepth; - - public boolean isJumping; - public boolean isJumpingOutOfWater; - public boolean isShallowDiveOrSwim; - public boolean isFakeShallowWaterSneaking; - public boolean isStillSwimmingJump; - public boolean isGroundSprinting; - public boolean isSprintJump; - public boolean isAerodynamic; - - public Block handsEdgeBlock; - public int handsEdgeMeta; - public Block feetEdgeBlock; - public int feetEdgeMeta; - - public int waterMovementTicks; - - public float exhaustion; - public float jumpCharge; - public float headJumpCharge; - public boolean blockJumpTillButtonRelease; - - public float maxExhaustionForAction; - public float maxExhaustionToStartAction; - - public float prevMaxExhaustionForAction = Float.NaN; - public float prevMaxExhaustionToStartAction = Float.NaN; - - public float foreignExhaustionFactor; - public float foreignMaxExhaustionForAction = Float.MAX_VALUE; - public float foreignMaxExhaustionToStartAction = Float.MAX_VALUE; - - public double lastHorizontalCollisionX; - public double lastHorizontalCollisionZ; - public float lastHungerIncrease; - - public boolean canTriggerWalking() - { - return !isClimbing && !isDiving; - } - - private void resetClimbing() - { - isClimbing = false; - isHandsVineClimbing = false; - isFeetVineClimbing = false; - isVineOnlyClimbing = false; - isVineAnyClimbing = false; - isClimbingStill = false; - isNeighborClimbing = false; - actualHandsClimbType = HandsClimbing.NoGrab; - actualFeetClimbType = FeetClimbing.NoStep; - isCeilingClimbing = false; - } - - private void resetSwimming() - { - dippingDepth = -1; - isDipping = false; - isSwimming = false; - isDiving = false; - isLevitating = false; - isShallowDiveOrSwim = false; - isFakeShallowWaterSneaking = false; - isJumpingOutOfWater = false; - } - - private void setShouldClimbSpeed(double value) - { - setShouldClimbSpeed(value, HandsClimbing.UpGrab, FeetClimbing.DownStep); - } - - private void setShouldClimbSpeed(double value, int handsClimbType, int feetClimbType) - { - setOnlyShouldClimbSpeed(value); - actualHandsClimbType = handsClimbType; - actualFeetClimbType = feetClimbType; - } - - @SuppressWarnings("incomplete-switch") - private void setOnlyShouldClimbSpeed(double value) - { - isClimbing = true; - - if(this.climbIntoCount > 0) - value = HoldMotion; - - if(value != HoldMotion) - { - float factor = getSpeedFactor(); - if(isFast) - factor *= Config._sprintFactor.value; - if(Config.isFreeBaseClimb() && value == MediumUpMotion) - switch(getOnLadder(Integer.MAX_VALUE, false, isClimbCrawling)) - { - case 1: - factor *= Config._freeOneLadderClimbUpSpeedFactor.value; - break; - case 2: - factor *= Config._freeBothLadderClimbUpSpeedFactor.value; - break; - } - - if(value > HoldMotion) - value = ((value - HoldMotion) * Config._freeClimbingUpSpeedFactor.value * factor + HoldMotion); - else - value = HoldMotion - (HoldMotion - value) * Config._freeClimbingDownSpeedFactor.value * factor; - - if(hasClimbCrawlGap && isClimbCrawling && value > HoldMotion) - value = Math.min(CatchCrawlGapMotion, value); // to avoid climbing over really small gaps (RedPowerWire Cover Top / RedPowerWire Cover Bottom) - } - else - isClimbingStill = true; - - boolean relevant = value < 0 || value > sp.motionY; - if(relevant) - sp.motionY = value; - isClimbJumping = !relevant && !isClimbHolding; - } - - public boolean isOnLadderOrVine() - { - return isOnLadderOrVine(isClimbCrawling); - } - - private double beforeMoveEntityPosX; - private double beforeMoveEntityPosY; - private double beforeMoveEntityPosZ; - private float beforeDistanceWalkedModified; - private float horizontalCollisionAngle; - - public void beforeMoveEntity(double d, double d1, double d2) - { - beforeMoveEntityPosX = sp.posX; - beforeMoveEntityPosY = sp.posZ; - beforeMoveEntityPosZ = sp.posY; - - if(esp.movementInput.sneak || sneakToggled) - if(isSwimming || isDiving || isCrawling || isClimbing || (!Config.isSneakingEnabled() && !isSneaking())) - sp.ySize = 0F; - else if(isSlow) - sp.ySize = 0.6F; - else - sp.ySize = 0F; - - if(isSliding || isCrawling) - { - beforeDistanceWalkedModified = sp.distanceWalkedModified; - sp.distanceWalkedModified = Float.MIN_VALUE; - } - - if(wantWallJumping) - { - int collisions = calculateSeparateCollisions(d, d1, d2); - horizontalCollisionAngle = getHorizontalCollisionangle( - (collisions & CollidedPositiveZ) != 0, - (collisions & CollidedNegativeZ) != 0, - (collisions & CollidedPositiveX) != 0, - (collisions & CollidedNegativeX) != 0); - } - } - - public void moveEntity(double d, double d1, double d2) - { - beforeMoveEntity(d, d1, d2); - isp.localMoveEntity(d, d1, d2); - afterMoveEntity(d, d1, d2); - } - - @SuppressWarnings("unused") - public void afterMoveEntity(double d, double d1, double d2) - { - if(isSliding || isCrawling) - sp.distanceWalkedModified = beforeDistanceWalkedModified; - - if(heightOffset != 0F) - sp.posY = sp.posY + heightOffset; - - wasOnGround = sp.onGround; - - double d10 = sp.posX - beforeMoveEntityPosX; - double d12 = sp.posZ - beforeMoveEntityPosY; - double d13 = sp.posY - beforeMoveEntityPosZ; - - double distance = MathHelper.sqrt_double(d10 * d10 + d12 * d12 + d13 * d13); - - if(isClimbing || isCeilingClimbing) - { - distanceClimbedModified += distance * (isClimbing ? 1.2 : 0.9); - if(distanceClimbedModified > nextClimbDistance) - { - Block stepBlock; - if(isClimbing) - if(handsEdgeBlock == null) - if(feetEdgeBlock == null) - stepBlock = Block.getBlockFromName("cobblestone"); - else - stepBlock = feetEdgeBlock; - else - if(feetEdgeBlock == null) - stepBlock = handsEdgeBlock; - else - stepBlock = nextClimbDistance % 2 != 0 ? feetEdgeBlock : handsEdgeBlock; - else - stepBlock = handsEdgeBlock; - - nextClimbDistance++; - if(stepBlock != null) - { - SoundType stepsound = stepBlock.stepSound; - if(stepsound != null) - playSound(stepsound.getStepResourcePath(), stepsound.getVolume() * 0.15F, stepsound.getPitch()); - } - } - } - - if(isSwimming) - { - distanceSwom += distance; - if(distanceSwom > SwimSoundDistance) - { - Random rand = sp.getRNG(); - playSound("random.splash", 0.05F, 1.0F + (rand.nextFloat() - rand.nextFloat()) * 0.4F); - - distanceSwom -= SwimSoundDistance; - } - } - } - - private void playSound(String id, float volume, float pitch) - { - Minecraft.getMinecraft().theWorld.playSound(sp.posX, sp.posY - sp.yOffset, sp.posZ, id, volume, pitch, false); - SmartMovingPacketStream.sendSound(SmartMovingComm.instance, id, volume, pitch); - } - - @SuppressWarnings("unused") - public void beforeSleepInBedAt(int i, int j, int k) - { - if(!isp.getSleepingField()) - updateEntityActionState(true); - } - - public EnumStatus sleepInBedAt(int i, int j, int k) - { - beforeSleepInBedAt(i, j, k); - return isp.localSleepInBedAt(i, j, k); - } - - private void resetHeightOffset() - { - sp.boundingBox.minY += heightOffset; - sp.height -= heightOffset; - heightOffset = 0F; - } - - private void resetInternalHeightOffset() - { - sp.height -= heightOffset; - heightOffset = 0F; - } - - private void setHeightOffset(float offset) - { - resetHeightOffset(); - if(offset == 0F) - return; - - heightOffset = offset; - - sp.boundingBox.minY -= heightOffset; - sp.height += heightOffset; - } - - boolean wasOnGround; - - public float getBrightness(float f) - { - sp.posY -= heightOffset; - float result = isp.localGetBrightness(f); - sp.posY += heightOffset; - return result; - } - - public int getBrightnessForRender(float f) - { - sp.posY -= heightOffset; - int result = isp.localGetBrightnessForRender(f); - sp.posY += heightOffset; - return result; - } - - public boolean pushOutOfBlocks(double d, double d1, double d2) - { - if(multiPlayerInitialized > 0) - return false; - - boolean top = false; - if(heightOffset != 0F) - top = sp.height > 1F; - - return pushOutOfBlocks(d, d1, d2, top); - } - - public void beforeOnUpdate() - { - prevMotionX = sp.motionX; - prevMotionY = sp.motionY; - prevMotionZ = sp.motionZ; - - wasCollidedHorizontally = sp.isCollidedHorizontally; - - isJumping = false; - - if(sp.worldObj.isRemote && updateCounter < 10) - { - List chatMessageList = (List)Reflect.GetField(GuiNewChat.class, isp.getMcField().ingameGUI.getChatGUI(), SmartMovingInstall.GuiNewChat_chatMessageList); - for(int i=0; i= 0.01D) - return; // Maybe SPC flying? - } - - jumpMotionX = sp.motionX; - jumpMotionZ = sp.motionZ; - - boolean isJumpCharging = false; - if(Config.isJumpChargingEnabled()) - { - boolean isJumpChargingPossible = sp.onGround && isStanding; - isJumpCharging = isJumpChargingPossible && wouldIsSneaking; - - boolean actualJumpCharging = isJumpChargingPossible && (!Config._jumpChargeCancelOnSneakRelease.value || wouldIsSneaking); - if(actualJumpCharging) - if(esp.movementInput.jump && (Config._jumpChargeCancelOnSneakRelease.value || wouldIsSneaking)) - jumpCharge++; - else - { - if(jumpCharge > 0) - tryJump(Config.ChargeUp, null, null, null); - jumpCharge = 0; - } - else - { - if(jumpCharge > 0) - blockJumpTillButtonRelease = true; - jumpCharge = 0; - } - } - - boolean isHeadJumpCharging = false; - if(Config.isHeadJumpingEnabled()) - { - isHeadJumpCharging = grabButton.Pressed && (isGroundSprinting || isSprintJump || (isRunning() && sp.onGround)) && !isCrawling; - if(isHeadJumpCharging) - if(esp.movementInput.jump) - headJumpCharge++; - else - { - if(headJumpCharge > 0 && sp.onGround) - tryJump(Config.HeadUp, null, null, null); - headJumpCharge = 0; - } - else - { - if(headJumpCharge > 0) - blockJumpTillButtonRelease = true; - headJumpCharge = 0; - } - } - - if(esp.movementInput.jump && sp.isInWater() && isDipping) - if(sp.posY - MathHelper.floor_double(sp.posY) > (isSlow ? 0.37 : 0.6)) - { - sp.motionY -= 0.039999999105930328D; - if(!isStillSwimmingJump && sp.onGround && jumpCharge == 0) - { - if(tryJump(Config.Up, true, null, null)) - { - Random rand = sp.getRNG(); - playSound("random.splash", 0.05F, 1.0F + (rand.nextFloat() - rand.nextFloat()) * 0.4F); - } - } - } - - if(jump && !blockJumpTillButtonRelease && !isJumpCharging && !isHeadJumpCharging && !isVineAnyClimbing) - tryJump(Config.Up, false, null, null); - - int left = 0; - int back = 0; - if(leftJumpCount == -1) - left++; - if(rightJumpCount == -1) - left--; - if(backJumpCount == -1) - back++; - - if(left != 0 || back != 0) - { - int angle; - if(left > 0) - angle = back == 0 ? 270 : 225; - else if(left < 0) - angle = back == 0 ? 90 : 135; - else - angle = 180; - - if(tryJump(Config.Angle, null, null, sp.rotationYaw + angle)) - angleJumpType = ((360 - angle) / 45) % 8; - - leftJumpCount = 0; - rightJumpCount = 0; - backJumpCount = 0; - } - } - - public void handleWallJumping() - { - if(!wantWallJumping || Double.isNaN(horizontalCollisionAngle)) - return; - - int jumpType; - if(grabButton.Pressed) - { - if(sp.fallDistance > Config._wallHeadJumpFallMaximumDistance.value) - return; - jumpType = wasCollidedHorizontally ? Config.WallHeadSlide : Config.WallHead; - } - else - { - if(sp.fallDistance > Config._wallUpJumpFallMaximumDistance.value) - return; - jumpType = wasCollidedHorizontally ? Config.WallUpSlide : Config.WallUp; - } - - float jumpAngle; - if(!wasCollidedHorizontally) - { - float movementAngle = getAngle(jumpMotionZ, -jumpMotionX); - if(Double.isNaN(movementAngle)) - return; - - jumpAngle = horizontalCollisionAngle * 2 - movementAngle + 180F; - } - else - jumpAngle = horizontalCollisionAngle; - - while(jumpAngle > 360F) - jumpAngle -= 360F; - - if(Config._wallUpJumpOrthogonalTolerance.value != 0F) - { - float aligned = jumpAngle; - while(aligned > 45F) - aligned -= 90F; - - if(Math.abs(aligned) < Config._wallUpJumpOrthogonalTolerance.value) - jumpAngle = Math.round(jumpAngle / 90F) * 90F; - } - - if(tryJump(jumpType, null, null, jumpAngle)) - { - continueWallJumping = !isHeadJumping; - sp.isCollidedHorizontally = false; - sp.rotationYaw = jumpAngle; - onStartWallJump(jumpAngle); - } - } - - public boolean tryJump(int type, Boolean inWaterOrNull, Boolean isRunningOrNull, Float angle) - { - boolean noVertical = false; - if(type == Config.WallUpSlide || type == Config.WallHeadSlide) - { - type = type == Config.WallUpSlide ? Config.WallUp : Config.WallHead; - noVertical = true; - } - - boolean inWater = inWaterOrNull != null ? inWaterOrNull : isDipping; - boolean isRunning = isRunningOrNull != null ? isRunningOrNull : isRunning(); - boolean charged = type == Config.ChargeUp; - boolean up = type == Config.Up || type == Config.ChargeUp || type == Config.HeadUp || type == Config.ClimbUp || type == Config.ClimbUpHandsOnly || type == Config.ClimbBackUp || type == Config.ClimbBackUpHandsOnly || type == Config.ClimbBackHead || type == Config.ClimbBackHeadHandsOnly || type == Config.Angle || type == Config.WallUp || type == Config.WallHead; - boolean head = type == Config.HeadUp || type == Config.ClimbBackHead || type == Config.ClimbBackHeadHandsOnly || type == Config.WallHead; - - int speed = getJumpSpeed(isStanding, isSlow, isRunning, isFast, angle); - boolean enabled = Config.isJumpingEnabled(speed, type); - if(enabled) - { - boolean exhausionEnabled = Config.isJumpExhaustionEnabled(speed, type); - if(exhausionEnabled) - { - float maxExhausionForJump = Config.getJumpExhaustionStop(speed, type, jumpCharge); - if(exhaustion > maxExhausionForJump) - return false; - - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, maxExhausionForJump); - maxExhaustionForAction = Math.min(maxExhaustionForAction, maxExhausionForJump + Config.getJumpExhaustionGain(speed, type, jumpCharge)); - } - - float jumpFactor = sp.isPotionActive(Potion.jump) ? 1 + (sp.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.2F : 1; - float horizontalJumpFactor = Config.getJumpHorizontalFactor(speed, type) * jumpFactor; - float verticalJumpFactor = Config.getJumpVerticalFactor(speed, type) * jumpFactor; - float jumpChargeFactor = charged ? Config.getJumpChargeFactor(jumpCharge) : 1F; - - if(!up) - { - horizontalJumpFactor = MathHelper.sqrt_float(horizontalJumpFactor * horizontalJumpFactor + verticalJumpFactor * verticalJumpFactor); - verticalJumpFactor = 0; - } - - Double maxHorizontalMotion = null; - double horizontalMotion = MathHelper.sqrt_double(jumpMotionX * jumpMotionX + jumpMotionZ * jumpMotionZ); - double verticalMotion = -0.078 + 0.498 * verticalJumpFactor * jumpChargeFactor; - - if(horizontalJumpFactor > 1F && !sp.isCollidedHorizontally) - maxHorizontalMotion = (double)Config.getMaxHorizontalMotion(speed, type, inWater) * getSpeedFactor(); - - if(head) - { - double normalAngle = Math.atan(verticalMotion / horizontalMotion); - double totalMotion = Math.sqrt(verticalMotion * verticalMotion + horizontalMotion * horizontalMotion); - - double newAngle = Config.getHeadJumpFactor(headJumpCharge) * normalAngle; - double newVerticalMotion = totalMotion * Math.sin(newAngle); - double newHorizontalMotion = totalMotion * Math.cos(newAngle); - - if(maxHorizontalMotion != null) - maxHorizontalMotion = maxHorizontalMotion * (newHorizontalMotion / horizontalMotion); - - verticalMotion = newVerticalMotion; - horizontalMotion = newHorizontalMotion; - } - - if(angle != null) - { - float jumpAngle = angle / RadiantToAngle; - boolean reset = type == Config.WallUp || type == Config.WallHead; - - double horizontal = Math.max(horizontalMotion, horizontalJumpFactor); - double moveX = -Math.sin(jumpAngle); - double moveZ = Math.cos(jumpAngle); - - sp.motionX = getJumpMoving(jumpMotionX, moveX, reset, horizontal, horizontalJumpFactor); - sp.motionZ = getJumpMoving(jumpMotionZ, moveZ, reset, horizontal, horizontalJumpFactor); - - horizontalMotion = 0; - verticalMotion = verticalJumpFactor; - } - - if(horizontalMotion > 0) - { - double absoluteMotionX = Math.abs(sp.motionX) * horizontalJumpFactor; - double absoluteMotionZ = Math.abs(sp.motionZ) * horizontalJumpFactor; - - if(maxHorizontalMotion != null) - { - absoluteMotionX = Math.min(absoluteMotionX, maxHorizontalMotion * (horizontalJumpFactor * (Math.abs(sp.motionX) / horizontalMotion))); - absoluteMotionZ = Math.min(absoluteMotionZ, maxHorizontalMotion * (horizontalJumpFactor * (Math.abs(sp.motionZ) / horizontalMotion))); - } - - sp.motionX = Math.signum(sp.motionX) * absoluteMotionX; - sp.motionZ = Math.signum(sp.motionZ) * absoluteMotionZ; - } - - if(up && !noVertical) - { - sp.motionY = verticalMotion; - sp.addStat(StatList.jumpStat, 1); - isSprintJump = isFast; - } - - if(exhausionEnabled) - { - float exhaustionFromJump = Config.getJumpExhaustionGain(speed, type, jumpCharge); - exhaustion += exhaustionFromJump; - } - - if(head) - { - isHeadJumping = true; - setHeightOffset(-1); - } - sp.isAirBorne = true; - isJumping = true; - onLivingJump(); - } - return enabled; - } - - private static double getJumpMoving(double actual, double move, boolean reset, double horizontal, float horizontalJumpFactor) - { - if(!reset) - return actual + move * horizontal; - else if(Math.signum(actual) != Math.signum(move)) - return move * horizontalJumpFactor; - else - return Math.max(Math.abs(actual), Math.abs(move) * horizontal) * Math.signum(move); - } - - private static int getJumpSpeed(boolean isStanding, boolean isSneaking, boolean isRunning, boolean isSprinting, Float angle) - { - isSprinting &= angle == null; - isRunning &= angle == null; - - if(isSprinting) - return Config.Sprinting; - else if(isRunning) - return Config.Running; - else if(isSneaking) - return Config.Sneaking; - else if(isStanding) - return Config.Standing; - else - return Config.Walking; - } - - private void standupIfPossible() - { - if(heightOffset >= 0) - return; - - double gapUnderneight = getGapUnderneight(); - boolean groundClose = gapUnderneight < 1D; - if(!groundClose) - resetHeightOffset(); - else - { - double gapOverneight = groundClose ? getGapOverneight() : -1D; - boolean standUpPossible = gapUnderneight + gapOverneight >= 1D; - - if(standUpPossible) - standUp(gapUnderneight); - else - toSlidingOrCrawling(gapUnderneight); - } - } - - private void standupIfPossible(boolean tryLanding, boolean restoreFromFlying) - { - if(heightOffset >= 0) - return; - - double gapUnderneight = getGapUnderneight(); - boolean groundClose = gapUnderneight < 1D; - double gapOverneight = groundClose ? getGapOverneight() : -1D; - boolean standUpPossible = gapUnderneight + gapOverneight >= 1D; - - if(tryLanding && groundClose && standUpPossible) - { - isFlying = false; - sp.capabilities.isFlying = false; - restoreFromFlying = true; - } - - if(!restoreFromFlying) - return; - - if(!groundClose && !sneakButton.Pressed) - resetHeightOffset(); - else if(standUpPossible && !(sneakButton.Pressed && grabButton.Pressed)) - standUp(gapUnderneight); - else - toSlidingOrCrawling(gapUnderneight); - } - - private void standUp(double gapUnderneight) - { - move(0, (1D - gapUnderneight), 0, true); - isCrawling = false; - isHeadJumping = false; - resetHeightOffset(); - } - - private void toSlidingOrCrawling(double gapUnderneight) - { - move(0, (-gapUnderneight), 0, true); - - if(Config.isSlidingEnabled() && (grabButton.Pressed || wasHeadJumping)) - isSliding = true; - else - wasCrawling = toCrawling(); - } - - private void handleCrash(float fallDamageStartDistance, float fallDamageFactor) - { - if(sp.fallDistance >= 2.0F) - sp.addStat(StatList.distanceFallenStat, (int)Math.round(sp.fallDistance * 100D)); - - if(sp.fallDistance >= fallDamageStartDistance) - { - sp.attackEntityFrom(DamageSource.fall, (int)Math.ceil((sp.fallDistance - fallDamageStartDistance) * fallDamageFactor)); - distanceClimbedModified = nextClimbDistance; // to force step sound - } - sp.fallDistance = 0F; - } - - public void beforeSetPositionAndRotation() - { - if(sp.worldObj.isRemote) - { - initialized = false; - multiPlayerInitialized = 5; - } - } - - public void updateEntityActionState(boolean startSleeping) - { - jumpAvoided = false; - - prevMaxExhaustionForAction = maxExhaustionForAction; - prevMaxExhaustionToStartAction = maxExhaustionToStartAction; - - maxExhaustionForAction = Float.MAX_VALUE; - maxExhaustionToStartAction = Float.MAX_VALUE; - - boolean isLevitating = sp.capabilities.isFlying && !isFlying; - boolean isRunning = isRunning(); - - toggleButton.update(Options.keyBindConfigToggle); - speedIncreaseButton.update(Options.keyBindSpeedIncrease); - speedDecreaseButton.update(Options.keyBindSpeedDecrease); - - if(toggleButton.StartPressed) - { - if(Config == Options) - Config.toggle(); - else - SmartMovingPacketStream.sendConfigChange(SmartMovingComm.instance); - } - - if(Config.isUserSpeedEnabled() && !Config.isUserSpeedAlwaysDefault() && (speedIncreaseButton.StartPressed || speedDecreaseButton.StartPressed)) - { - int difference = 0; - if (speedIncreaseButton.StartPressed) - difference++; - if (speedDecreaseButton.StartPressed) - difference--; - - if(difference != 0) - { - if(Config == Options) - Config.changeSpeed(difference); - else - SmartMovingPacketStream.sendSpeedChange(SmartMovingComm.instance, difference, null); - } - } - - boolean initializeCrawling = false; - if(!initialized && !(sp.worldObj.isRemote && multiPlayerInitialized != 0) && !sp.isRiding()) - { - if(getMaxPlayerSolidBetween(sp.boundingBox.minY, sp.boundingBox.maxY, 0) > sp.boundingBox.minY) - { - initializeCrawling = true; - toCrawling(); - } - - initialized = true; - } - - if(multiPlayerInitialized > 0) - multiPlayerInitialized--; - - if(!esp.movementInput.jump) - isStillSwimmingJump = false; - - if(!startSleeping) - { - isp.localUpdateEntityActionState(); - isp.setMoveStrafingField(Math.signum(esp.movementInput.moveStrafe)); - isp.setMoveForwardField(Math.signum(esp.movementInput.moveForward)); - isp.setIsJumpingField( - esp.movementInput.jump && !isCrawling && !isSliding && - !(Config.isHeadJumpingEnabled() && grabButton.Pressed && sp.isSprinting()) && - !(Config.isJumpChargingEnabled() && wouldIsSneaking && sp.onGround && isStanding) && - !blockJumpTillButtonRelease); - } - - boolean isRiding = sp.ridingEntity != null; - boolean isSleeping = isp.getSleepingField(); - boolean disabled = !Config.enabled || isRiding || isSleeping || startSleeping; - - Minecraft minecraft = isp.getMcField(); - GameSettings gameSettings = minecraft.gameSettings; - - forwardButton.update(gameSettings.keyBindForward); - leftButton.update(gameSettings.keyBindLeft); - rightButton.update(gameSettings.keyBindRight); - backButton.update(gameSettings.keyBindBack); - jumpButton.update(esp.movementInput.jump); - sprintButton.update(gameSettings.keyBindSprint); - sneakButton.update(esp.movementInput.sneak); - grabButton.update(Options.keyBindGrab); - - double horizontalSpeedSquare = sp.motionX * sp.motionX + sp.motionZ * sp.motionZ; - // double verticalSpeedSquare = (sp.motionY + HoldMotion) * (sp.motionY + HoldMotion); - // double speedSquare = horizontalSpeedSquare + verticalSpeedSquare; - - boolean blocked = minecraft.currentScreen != null && !minecraft.currentScreen.allowUserInput; - - boolean mustCrawl = false; - double crawlStandUpBottom = -1; - if(isCrawling || isClimbCrawling) - { - crawlStandUpBottom = getMaxPlayerSolidBetween(sp.boundingBox.minY - (initializeCrawling ? 0D : 1D), sp.boundingBox.minY, Config._crawlOverEdge.value ? 0 : -0.05); - double crawlStandUpCeiling = getMinPlayerSolidBetween(sp.boundingBox.maxY, sp.boundingBox.maxY + 1.1D, 0); - mustCrawl = crawlStandUpCeiling - crawlStandUpBottom < sp.height - heightOffset; - } - - if(esp.capabilities.isFlying && (Config.isFlyingEnabled() || Config.isLevitateSmallEnabled())) - mustCrawl = false; - - boolean inputContinueCrawl = Options.isCrawlToggleEnabled() ? crawlToggled : sneakButton.Pressed || !Config.isFreeClimbingEnabled() && grabButton.Pressed; - if(contextContinueCrawl) - { - if(inputContinueCrawl || sp.isInWater() || mustCrawl) - contextContinueCrawl = false; - else if(isCrawling) - { - double crawlStandUpLiquidCeiling = getMinPlayerLiquidBetween(sp.boundingBox.maxY, sp.boundingBox.maxY + 1.1D); - if(crawlStandUpLiquidCeiling - crawlStandUpBottom >= sp.height + 1F) - contextContinueCrawl = false; - } - } - boolean wouldWantCrawl = - !esp.capabilities.isFlying && - ( - (isCrawling && (inputContinueCrawl || contextContinueCrawl)) || - ( - grabButton.StartPressed && - (sneakToggled || sneakButton.Pressed) && - sp.onGround - ) - ); - - boolean wantCrawl = - Config.isCrawlingEnabled() && - wouldWantCrawl; - - boolean canCrawl = - !isSwimming && - !isDiving && - (!isDipping || (dippingDepth + heightOffset) < SwimCrawlWaterTopBorder) && - !isClimbing && - sp.fallDistance < Config._fallingDistanceMinimum.value; - - wasCrawling = isCrawling; - isCrawling = - canCrawl && - (wantCrawl || mustCrawl); - - if(!isCrawling) - contextContinueCrawl = false; - - if (wasCrawling && !isCrawling && esp.capabilities.isFlying) - tryJump(Config.Up, null, null, null); - - wantCrawlNotClimb = - ( - wantCrawlNotClimb || - ( - grabButton.StartPressed && - !wasCrawling - ) - ) && - grabButton.Pressed && - esp.movementInput.moveForward > 0F && - isCrawling && - sp.isCollidedHorizontally; - - boolean isFacedToSolidVine = isFacedToSolidVine(isClimbCrawling); - - boolean wouldWantClimb = - ( - grabButton.Pressed || - (isClimbHolding && sneakButton.Pressed) || - (Config.isFreeClimbAutoLaddderEnabled() && isFacedToLadder(isClimbCrawling)) || - (Config.isFreeClimbAutoVineEnabled() && isFacedToSolidVine) - ) && - (!isSliding || grabButton.Pressed && esp.movementInput.moveForward > 0F) && - !isHeadJumping && - !wantCrawlNotClimb && - !disabled; - - boolean wantClimb = - Config.isFreeClimbingEnabled() && - wouldWantClimb; - - if(!wantClimb || sp.isCollidedVertically) - isClimbJumping = false; - - if(sp.isCollided) - isClimbBackJumping = false; - - wantClimbUp = - wantClimb && - esp.movementInput.moveForward > 0F || (isVineAnyClimbing && jumpButton.Pressed && !(sneakButton.Pressed && isFacedToSolidVine))&& - (!isCrawling || sp.isCollidedHorizontally) && - (!isSliding || sp.isCollidedHorizontally); - - wantClimbDown = - wantClimb && - esp.movementInput.moveForward <= 0F && - !wantCrawl; - - wantClimbCeiling = - Config.isCeilingClimbingEnabled() && - grabButton.Pressed && - !wantCrawlNotClimb && - !isSneaking() && - !disabled; - - boolean restoreFromFlying = false; - - boolean wasFlying = isFlying; - isFlying = Config.isFlyingEnabled() && sp.capabilities.isFlying && !isSwimming && !isDiving; - if(isFlying && !wasFlying) - setHeightOffset(-1); - else if(!isFlying && wasFlying) - restoreFromFlying = true; - - if(!Config.isFlyingEnabled() && Config.isLevitateSmallEnabled()) - { - if(isLevitating && !wasLevitating) - setHeightOffset(-1); - else if(!isLevitating && wasLevitating) - restoreFromFlying = true; - } - - wasHeadJumping = isHeadJumping; - isHeadJumping = isHeadJumping && - !sp.onGround && - !(isSwimming || isDiving) && - !(isFlying || sp.capabilities.isFlying) && - !(sp.handleWaterMovement() && sp.motionY < 0) && - !sp.handleLavaMovement(); - - if(!isHeadJumping) - isAerodynamic = false; - - if(wasHeadJumping && !isHeadJumping) - if(sp.onGround) - { - handleCrash(Config._headFallDamageStartDistance.value, Config._headFallDamageFactor.value); - restoreFromFlying = true; - } - - boolean tryLanding = isFlying && !Options._flyCloseToGround.value && horizontalSpeedSquare < 0.003D && sp.motionY > -0.03D; - if(restoreFromFlying || tryLanding) - standupIfPossible(tryLanding, restoreFromFlying); - - if(isSliding && sp.fallDistance > SlideToHeadJumpingFallDistance) - { - isSliding = false; - isHeadJumping = true; - isAerodynamic = true; - } - - if(Config.isSlidingEnabled() && grabButton.Pressed && (isGroundSprinting || (wasRunning && !isRunning && sp.onGround)) && !isCrawling && sneakButton.StartPressed && !isDipping) - { - setHeightOffset(-1); - move(0, (-1D), 0, true); - tryJump(Config.SlideDown, false, wasRunning, null); - isSliding = true; - isHeadJumping = false; - isAerodynamic = false; - } - - if(isSliding && (!sneakButton.Pressed || horizontalSpeedSquare < Config._slidingSpeedStopFactor.value * 0.01)) - { - isSliding = false; - wasCrawling = toCrawling(); - } - - if(isSliding && sp.fallDistance > Config._fallingDistanceMinimum.value) - { - isSliding = false; - wasCrawling = true; - isCrawling = false; - } - - boolean sneakContinueInput = Options.isSneakToggleEnabled() ? sneakToggled || sneakButton.StartPressed : sneakButton.Pressed; - boolean wouldWantSneak = - !isFlying && - !isSliding && - !isHeadJumping && - !(isDiving && Config._diveDownOnSneak.value) && - !(isSwimming && Config._swimDownOnSneak.value && !isFakeShallowWaterSneaking) && - sneakContinueInput && - !wantCrawl && - !mustCrawl && - (!Config.isCrawlingEnabled() || !grabButton.Pressed); - - boolean wantSneak = - Config.isSneakingEnabled() && - wouldWantSneak; - - boolean moveButtonPressed = esp.movementInput.moveForward != 0F || esp.movementInput.moveStrafe != 0F; - boolean moveForwardButtonPressed = esp.movementInput.moveForward > 0F; - - wantSprint = - Config.isSprintingEnabled() && - !isSliding && - sprintButton.Pressed && - ( - moveForwardButtonPressed || - isClimbing || - ( - isSwimming && - (moveButtonPressed || (sneakButton.Pressed && Config._swimDownOnSneak.value)) - ) || - ( - isDiving && - (moveButtonPressed || jumpButton.Pressed || (sneakButton.Pressed && Config._diveDownOnSneak.value)) - ) || - ( - isFlying && - (moveButtonPressed || jumpButton.Pressed || sneakButton.Pressed) - ) - ) && - !disabled; - - boolean exhaustionAllowsRunning = - !Config.isRunExhaustionEnabled() || - ( - exhaustion < Config._runExhaustionStop.value && - (wasRunning || exhaustion < Config._runExhaustionStart.value) - ); - - if(isRunning && sp.onGround && Config.isRunExhaustionEnabled()) - { - maxExhaustionForAction = Math.min(maxExhaustionForAction, Config._runExhaustionStop.value); - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, Config._runExhaustionStart.value); - } - - if(!exhaustionAllowsRunning && isRunning) - sp.setSprinting(isRunning = false); - - if(!sp.onGround && isFast && !isClimbing && !isCeilingClimbing && !isDiving && !isSwimming) - isSprintJump = true; - - boolean exhaustionAllowsSprinting = - !Config.isSprintExhaustionEnabled() || - ( - exhaustion <= Config._sprintExhaustionStop.value && - (isFast || isSprintJump || exhaustion <= Config._sprintExhaustionStart.value) - ); - - if(sp.onGround || isFlying || isSwimming || isDiving || sp.handleLavaMovement()) - isSprintJump = false; - - boolean preferSprint = false; - if(wantSprint && !wantSneak) - { - if(!isSprintJump && Config.isSprintExhaustionEnabled()) - { - maxExhaustionForAction = Math.min(maxExhaustionForAction, Config._sprintExhaustionStop.value); - maxExhaustionToStartAction = Math.min(maxExhaustionToStartAction, Config._sprintExhaustionStart.value); - } - - if(exhaustionAllowsSprinting) - preferSprint = true; - } - - boolean isClimbSprintSpeed = true; - if(isClimbing && preferSprint) - { - double minTickDistance; - if(wantClimbUp) - minTickDistance = 0.07 * Config._freeClimbingUpSpeedFactor.value; - else if(wantClimbDown) - minTickDistance = 0.11 * Config._freeClimbingDownSpeedFactor.value; - else - minTickDistance = 0.07; - - isClimbSprintSpeed = net.smart.render.statistics.SmartStatisticsFactory.getInstance(sp).getTickDistance() >= minTickDistance; - } - - boolean canAnySprint = preferSprint && !sp.isBurning() && (Config._sprintDuringItemUsage.value || !sp.isUsingItem()); - boolean canVerticallySprint = canAnySprint && !sp.isCollidedVertically; - boolean canHorizontallySprint = canAnySprint && collidedHorizontallyTickCount < 3; - boolean canAllSprint = canHorizontallySprint && canVerticallySprint; - - boolean wasGroundSprinting = isGroundSprinting; - isGroundSprinting = canHorizontallySprint && sp.onGround && !isSwimming && !isDiving && !isClimbing; - boolean isSwimSprinting = canHorizontallySprint && isSwimming; - boolean isDiveSprinting = canAllSprint && isDiving; - boolean isCeilingSprinting = canHorizontallySprint && isCeilingClimbing; - boolean isFlyingSprinting = canAllSprint && isFlying; - boolean isClimbSprinting = canAnySprint && isClimbing && isClimbSprintSpeed; - - isFast = - isGroundSprinting || - isClimbSprinting || - isSwimSprinting || - isDiveSprinting || - isCeilingSprinting || - isFlyingSprinting || - isClimbSprinting; - - if(isGroundSprinting && !wasGroundSprinting) - { - wasRunningWhenSprintStarted = sp.isSprinting(); - sp.setSprinting(isStandupSprintingOrRunning()); - } - else if(wasGroundSprinting && !isGroundSprinting) - sp.setSprinting(wasRunningWhenSprintStarted); - - wouldIsSneaking = - wouldWantSneak && - !wantSprint && - !isClimbing; - - boolean wasSneaking = isSlow; - isSlow = - wantSneak && - wouldIsSneaking; - - boolean wantClimbHolding = - (isClimbHolding && sneakButton.Pressed) || - (isClimbing && blocked) || - (wantClimb && - !isSwimming && - !isDiving && - !isCrawling && - (sneakButton.Pressed || crawlToggled)); - - isClimbHolding = - wantClimbHolding && - isClimbing; - - isStanding = horizontalSpeedSquare < 0.0005; - - boolean wasCrawlClimbing = isCrawlClimbing; - isCrawlClimbing = (wasCrawling || isCrawlClimbing) && isClimbing && isNeighborClimbing && (sneakButton.Pressed || crawlToggled) && esp.movementInput.moveForward > 0F; - if(isCrawlClimbing) - { - boolean canStandUp = !isPlayerInSolidBetween(sp.boundingBox.minY - (isClimbCrawling ? 0.95D : 1D), sp.boundingBox.minY); - if(canStandUp) - { - wasCrawlClimbing = false; - isCrawlClimbing = false; - if(!isClimbCrawling) - resetHeightOffset(); - } - - if(!wasCrawlClimbing) - { - wasCrawling = false; - isCrawling = false; - } - } - else if(wasCrawlClimbing) - { - boolean toCrawling = sneakButton.Pressed || crawlToggled; - if(!isClimbing) - { - wasCrawling = toCrawling(); - - double minY = sp.boundingBox.minY; - move(0, (-minY + Math.floor(minY)), 0, true); - } - else if(esp.movementInput.moveForward <= 0F) - { - wasCrawling = toCrawling; - isCrawling = toCrawling; - - wantClimbUp = false; - wantClimbDown = false; - - if(!toCrawling) - resetHeightOffset(); - double minY = sp.boundingBox.minY; - move(0, (-minY + Math.floor(minY) + (toCrawling ? 0F : 1F)), 0, true); - } - else if(!toCrawling) - { - resetHeightOffset(); - double minY = sp.boundingBox.minY; - move(0, (Math.ceil(minY) - minY), 0, true); - } - } - - boolean wasClimbCrawling = isClimbCrawling; - boolean needClimbCrawling = hasClimbCrawlGap || (hasClimbGap && isClimbHolding); - boolean canClimbCrawling = wantClimbHolding && wantClimbUp; - - if(climbIntoCount > 1) - climbIntoCount--; - else if(isClimbCrawling && !needClimbCrawling && climbIntoCount == 0) - climbIntoCount = 6; - - isClimbCrawling = canClimbCrawling && ((needClimbCrawling && climbIntoCount == 0) || climbIntoCount > 1); - if(isClimbCrawling && !wasClimbCrawling) - { - setHeightOffset(-1F); - - boolean wasCollidedHorizontally = sp.isCollidedHorizontally; // preserve the horizontal collision state - move(0, 0.05, 0, true); // to avoid climb crawling into solid when standing with solid above head (SMP: Illegal Stance) - sp.isCollidedHorizontally = wasCollidedHorizontally; // to avoid climb crawling out of water bug - } - else if(!isClimbCrawling && wasClimbCrawling) - { - climbIntoCount = 0; - if(mustCrawl || sneakButton.Pressed || crawlToggled) - { - double gapUnderneight = sp.boundingBox.minY - getMaxPlayerSolidBetween(sp.boundingBox.minY - 1D, sp.boundingBox.minY, 0); - if(gapUnderneight >= 0D && gapUnderneight < 1D) - { - wasCrawling = toCrawling(); - move(0, (-gapUnderneight), 0, true); - } - else - resetHeightOffset(); - } - else - resetHeightOffset(); - } - - if((wasCrawling && !isCrawling) && !initializeCrawling && !esp.capabilities.isFlying) - { - resetHeightOffset(); - move(0, (crawlStandUpBottom - sp.boundingBox.minY), 0, true); - } - else if((isCrawling && !wasCrawling) || initializeCrawling) - { - setHeightOffset(-1F); - - if(!initializeCrawling || sp.worldObj.isRemote) - move(0, (-1D), 0, true); - - if(initializeCrawling) - wasCrawling = toCrawling(); - } - - if(grabButton.StartPressed) - if(isShallowDiveOrSwim && wouldWantClimb) - { - // from swimming/diving in shallow water to walking in shallow water - resetHeightOffset(); - move(0, (getMaxPlayerSolidBetween(sp.boundingBox.minY, sp.boundingBox.maxY, 0) - sp.boundingBox.minY), 0, true); - if(jumpButton.Pressed) - isStillSwimmingJump = true; - } - else if(isDipping && wouldWantCrawl && dippingDepth >= SwimCrawlWaterBottomBorder) - if(dippingDepth >= SwimCrawlWaterMediumBorder) - { - // from sneaking in shallow water to swimming/diving in shallow water - setHeightOffset(-1F); - move(0, (-1.6F + dippingDepth), 0, true); - isCrawling = false; - } - else - { - // from sneaking in shallow water to crawling in shallow water - setHeightOffset(-1F); - move(0, (-1D), 0, true); - wasCrawling = toCrawling(); - } - - isWallJumping = false; - - if(continueWallJumping && (sp.onGround || isClimbing || !jumpButton.Pressed)) - continueWallJumping = false; - - boolean canWallJumping = Config.isWallJumpEnabled() && !isHeadJumping && !sp.onGround && !isClimbing && !isSwimming && !isDiving && !isLevitating && !isFlying; - boolean triggerWallJumping = false; - - if(Options._wallJumpDoubleClick.value) - { - if(canWallJumping) - { - if(jumpButton.StartPressed) - { - if(wallJumpCount == 0) - wallJumpCount = Options.wallJumpDoubleClickTicks(); - else - { - triggerWallJumping = true; - wallJumpCount = 0; - } - } - else if(wallJumpCount > 0) - wallJumpCount--; - } - else - wallJumpCount = 0; - } - else - triggerWallJumping = jumpButton.StartPressed; - - wantWallJumping = canWallJumping && - (triggerWallJumping || continueWallJumping || - (wantWallJumping && jumpButton.Pressed && !sp.isCollidedHorizontally)); - - boolean canAngleJump = !isSleeping && sp.onGround && !isCrawling && !isClimbing && !isClimbCrawling && !isSwimming && !isDiving; - boolean canSideJump = Config.isSideJumpEnabled() && canAngleJump; - boolean canLeftJump = canSideJump && !rightButton.Pressed; - boolean canRightJump = canSideJump && !leftButton.Pressed; - boolean canBackJump = Config.isBackJumpEnabled() && canAngleJump && !forwardButton.Pressed && !isStandupSprintingOrRunning(); - - if(canLeftJump) - { - if(leftButton.StartPressed) - { - if(leftJumpCount == 0) - leftJumpCount = Options.angleJumpDoubleClickTicks(); - else - leftJumpCount = -1; - } - else if(leftJumpCount > 0) - leftJumpCount--; - } - else - leftJumpCount = 0; - - if(canRightJump) - { - if(rightButton.StartPressed) - { - if(rightJumpCount == 0) - rightJumpCount = Options.angleJumpDoubleClickTicks(); - else - rightJumpCount = -1; - } - else if(rightJumpCount > 0) - rightJumpCount--; - } - else - rightJumpCount = 0; - - if(canBackJump) - { - if(backButton.StartPressed) - { - if(backJumpCount == 0) - backJumpCount = Options.angleJumpDoubleClickTicks(); - else - backJumpCount = -1; - } - else if(backJumpCount > 0) - backJumpCount--; - } - else - backJumpCount = 0; - - if(rightJumpCount == -2 && backJumpCount <= 0) - rightJumpCount = -1; - if(leftJumpCount == -2 && backJumpCount <= 0) - leftJumpCount = -1; - if(backJumpCount == -2 && (leftJumpCount <= 0 || rightJumpCount <= 0)) - backJumpCount = -1; - - if(rightJumpCount == -1 && backJumpCount > 0) - rightJumpCount = -2; - if(leftJumpCount == -1 && backJumpCount > 0) - leftJumpCount = -2; - if(backJumpCount == -1 && (leftJumpCount > 0 || rightJumpCount > 0)) - backJumpCount = -2; - - if(sp.onGround || sp.isCollidedVertically) - angleJumpType = 0; - - isRopeSliding = isRopeSliding(); - - boolean isSneakToggleEnabled = Options.isSneakToggleEnabled(); - boolean isCrawlToggleEnabled = Options.isCrawlToggleEnabled(); - - boolean willStopCrawl = false; - boolean willStopCrawlStartSneak = false; - if(isSneakToggleEnabled || isCrawlToggleEnabled) - { - if(isCrawling && jumpButton.StopPressed) - willStopCrawlStartSneak = true; - if(isCrawling && sneakButton.StopPressed && !ignoreNextStopSneakButtonPressed) - willStopCrawlStartSneak = true; - if(!isCrawling && !isCrawlClimbing && !isClimbCrawling) - willStopCrawl = true; - - willStopCrawl |= willStopCrawlStartSneak; - } - - boolean willStopSneak = false; - if(isSneakToggleEnabled) - { - if(isCrawling && !willStopCrawlStartSneak) - willStopSneak = true; - if(wantSneak && wantSprint && sneakButton.StartPressed && sneakToggled) - { - willStopSneak = true; - ignoreNextStopSneakButtonPressed = true; - } - if(wasSneaking && sneakButton.StartPressed) - willStopSneak = true; - if(!isSwimming && !isDiving && jumpButton.StopPressed) - willStopSneak = true; - } - - boolean willStartSneak = false; - if(isSneakToggleEnabled) - { - if(willStopCrawlStartSneak && sneakButton.StopPressed) - willStartSneak = true; - if(isFast && sneakButton.StopPressed && !ignoreNextStopSneakButtonPressed) - willStartSneak = true; - if(isSlow && !wasSneaking) - willStartSneak = true; - } - - boolean willStartCrawl = false; - if(isCrawlToggleEnabled) - { - if(isCrawling && !wasCrawling) - willStartCrawl = true; - if(isClimbCrawling && !wasClimbCrawling) - willStartCrawl = true; - } - - if(isSneakToggleEnabled) - { - if(willStartSneak) - sneakToggled = true; - if(willStopSneak) - sneakToggled = false; - } - - if(isCrawlToggleEnabled) - { - if(willStartCrawl) - { - crawlToggled = true; - ignoreNextStopSneakButtonPressed = sneakButton.Pressed; - } - if(willStopCrawl) - crawlToggled = false; - } - - if(sneakButton.StopPressed) - ignoreNextStopSneakButtonPressed = false; - - wasRunning = isRunning; - wasLevitating = isLevitating; - } - - private boolean toCrawling() - { - isCrawling = true; - if(Options.isCrawlToggleEnabled()) - crawlToggled = true; - ignoreNextStopSneakButtonPressed = true; - return true; - } - - public double prevMotionX; - public double prevMotionY; - public double prevMotionZ; - - public final Button forwardButton = new Button(); - public final Button leftButton = new Button(); - public final Button rightButton = new Button(); - public final Button backButton = new Button(); - public final Button jumpButton = new Button(); - public final Button sneakButton = new Button(); - public final Button grabButton = new Button(); - public final Button sprintButton = new Button(); - public final Button toggleButton = new Button(); - public final Button speedIncreaseButton = new Button(); - public final Button speedDecreaseButton = new Button(); - - public boolean wasRunning; - public boolean wasLevitating; - public boolean wasCrawling; - public boolean wasHeadJumping; - - private boolean contextContinueCrawl; - private boolean ignoreNextStopSneakButtonPressed; - private int collidedHorizontallyTickCount; - private boolean wantWallJumping; - private boolean continueWallJumping; - private boolean wasCollidedHorizontally; - private boolean wasRunningWhenSprintStarted; - - private boolean jumpAvoided; - - - private int climbIntoCount; - - private int leftJumpCount; - private int rightJumpCount; - private int backJumpCount; - private int wallJumpCount; - - private int nextClimbDistance; - public float distanceClimbedModified; - - private boolean sneakToggled = false; - private boolean crawlToggled = false; - - private int lastWorldPlayerEntitiesSize = -1; - private int lastWorldPlayerLastEnttyId = -1; - - public void addToSendQueue() - { - if(!sp.worldObj.isRemote) - return; - - boolean isSmall = sp.height < 1; - - long state = 0; - state |= isp.localIsSneaking() ? 1 : 0; - - state <<= 1; - state |= isRopeSliding ? 1 : 0; - - state <<= 1; - state |= isWallJumping ? 1 : 0; - - state <<= 1; - state |= isFast ? 1 : 0; - - state <<= 1; - state |= isSlow ? 1 : 0; - - state <<= 1; - state |= isClimbBackJumping ? 1 : 0; - - state <<= 1; - state |= isClimbJumping ? 1 : 0; - - state <<= 1; - state |= isHandsVineClimbing ? 1 : 0; - - state <<= 1; - state |= isFeetVineClimbing ? 1 : 0; - - state <<= 3; - state |= angleJumpType; - - state <<= 1; - state |= isSliding ? 1 : 0; - - state <<= 1; - state |= isHeadJumping ? 1 : 0; - - state <<= 1; - state |= isLevitating ? 1 : 0; - - state <<= 1; - state |= isCeilingClimbing ? 1 : 0; - - state <<= 1; - state |= doFlyingAnimation() ? 1 : 0; - - state <<= 1; - state |= doFallingAnimation() ? 1 : 0; - - state <<= 1; - state |= isSmall ? 1 : 0; - - state <<= 1; - state |= isClimbing ? 1 : 0; - - state <<= 1; - state |= isCrawling ? 1 : 0; - - state <<= 1; - state |= isCrawlClimbing ? 1 : 0; - - state <<= 1; - state |= isSwimming ? 1 : 0; - - state <<= 1; - state |= isDipping ? 1 : 0; - - state <<= 1; - state |= isDiving ? 1 : 0; - - state <<= 1; - state |= isp.getIsJumpingField() ? 1 : 0; - - state <<= 4; - state |= actualHandsClimbType; - - state <<= 4; - state |= actualFeetClimbType; - - boolean sendStatePacket = state != prevPacketState; - - int currentWorldPlayerEntitiesSize = sp.worldObj.playerEntities.size(); - if(currentWorldPlayerEntitiesSize == 0) - { - sendStatePacket = false; - lastWorldPlayerEntitiesSize = currentWorldPlayerEntitiesSize; - lastWorldPlayerLastEnttyId = -1; - } - else - { - int currentWorldPlayerLastEnttyId = ((Entity)sp.worldObj.playerEntities.get(currentWorldPlayerEntitiesSize - 1)).getEntityId(); - if(currentWorldPlayerEntitiesSize != lastWorldPlayerEntitiesSize) - { - if(currentWorldPlayerEntitiesSize > lastWorldPlayerEntitiesSize) - sendStatePacket = true; - lastWorldPlayerEntitiesSize = currentWorldPlayerEntitiesSize; - lastWorldPlayerLastEnttyId = currentWorldPlayerLastEnttyId; - } - else if(currentWorldPlayerLastEnttyId != lastWorldPlayerLastEnttyId) - { - sendStatePacket = true; - lastWorldPlayerLastEnttyId = currentWorldPlayerLastEnttyId; - } - } - - if(sendStatePacket) - { - SmartMovingPacketStream.sendState(SmartMovingComm.instance, sp.getEntityId(), state); - prevPacketState = state; - } - } - - private long prevPacketState; - - @Override - public boolean isSneaking() - { - if(forceIsSneaking != null) - return forceIsSneaking; - - return (isSlow && (sp.onGround || isp.getIsInWebField())) || (!Config._sneak.value && wouldIsSneaking && jumpCharge > 0) || ((sp.ridingEntity != null || !Config.enabled) && isp.localIsSneaking()) || (!Config._crawlOverEdge.value && isCrawling && !isClimbing); - } - - public boolean isStandupSprintingOrRunning() - { - return (isFast || sp.isSprinting()) && sp.onGround && !isSliding && !isCrawling; - } - - public boolean isRunning() - { - return sp.isSprinting() && !isFast && sp.onGround; - } - - public void beforeGetSleepTimer() - { - SmartMovingRender.renderGuiIngame(isp.getMcField()); - } - - public void jump() - { - jumpAvoided = true; - } - - public void writeEntityToNBT(NBTTagCompound nBTTagCompound) - { - isp.localWriteEntityToNBT(nBTTagCompound); - NBTTagCompound abilities = nBTTagCompound.getCompoundTag("abilities"); - if(abilities != null && abilities.hasKey("flying")) - abilities.setBoolean("flying", sp.capabilities.isFlying); - } - - @Override - public boolean isJumping() - { - return isp.getIsJumpingField(); - } - - @Override - public boolean doFlyingAnimation() - { - if(Config.isFlyingEnabled() || Config.isLevitationAnimationEnabled()) - return sp.capabilities.isFlying; - return false; - } - - @Override - public boolean doFallingAnimation() - { - if(Config.isFallAnimationEnabled()) - return !sp.onGround && sp.fallDistance > Config._fallAnimationDistanceMinimum.value; - return false; - } - - public void onLivingJump() - { - net.minecraftforge.common.ForgeHooks.onLivingJump(sp); - } - - public float getFOVMultiplier() - { - if(!Config.enabled) - return isp.localGetFOVMultiplier(); - - float landMovmentFactor = getLandMovementFactor(); - setLandMovementFactor(fadingPerspectiveFactor); - float result = isp.localGetFOVMultiplier(); - setLandMovementFactor(landMovmentFactor); - return result; - } - - public float getLandMovementFactor() - { - return sp.getAIMoveSpeed(); - } - - public void setLandMovementFactor(float landMovementFactor) - { - Reflect.SetField(ModifiableAttributeInstance.class, sp.getEntityAttribute(SharedMonsterAttributes.movementSpeed), SmartMovingInstall.ModifiableAttributeInstance_attributeValue, landMovementFactor); - } - - public static boolean isRopeSliding() - { - return onZipLine != null && Reflect.GetField(onZipLine, null) != null; - } - - public void beforeActivateBlockOrUseItem() - { - forceIsSneaking = isp.localIsSneaking(); - } - - public void afterActivateBlockOrUseItem() - { - forceIsSneaking = null; - } - - private Boolean forceIsSneaking; - - private static Class ropesPlusClient = Reflect.LoadClass(SmartMovingInstall.class, SmartMovingInstall.RopesPlusClient, false); - private static Field onZipLine = ropesPlusClient != null ? Reflect.GetField(ropesPlusClient, SmartMovingInstall.RopesPlusClient_onZipLine, false) : null; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingServer.java b/src/main/java/net/smart/moving/SmartMovingServer.java deleted file mode 100644 index 80c9eda8..00000000 --- a/src/main/java/net/smart/moving/SmartMovingServer.java +++ /dev/null @@ -1,355 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import java.io.*; -import java.util.*; - -import cpw.mods.fml.common.*; -import cpw.mods.fml.common.network.internal.*; -import net.minecraft.entity.*; -import net.minecraft.util.*; -import net.smart.moving.config.*; -import net.smart.properties.*; - -public class SmartMovingServer -{ - public static final float SmallSizeItemGrabHeight = 0.25F; - - protected final IEntityPlayerMP mp; - private boolean resetFallDistance = false; - private boolean resetTicksForFloatKick = false; - private boolean initialized = false; - private boolean withinOnLivingUpdate = false; - - public boolean crawlingInitialized; - public int crawlingCooldown; - public boolean isCrawling; - public boolean isSmall; - public float hunger; - - private int disableAddExhaustionDepth; - private boolean disableAddExhaustion; - private boolean isSneakButtonPressed; - private Boolean forceIsSneaking; - - public SmartMovingServer(IEntityPlayerMP mp, boolean onTheFly) - { - this.mp = mp; - if (onTheFly) - initialize(true); - } - - public void initialize(boolean alwaysSendMessage) - { - if(Options._globalConfig.value) - SmartMovingPacketStream.sendConfigContent(mp, optionsHandler.writeToProperties(), null); - else if(Options._serverConfig.value) - SmartMovingPacketStream.sendConfigContent(mp, optionsHandler.writeToProperties(mp, false), null); - else if(alwaysSendMessage) - SmartMovingPacketStream.sendConfigContent(mp, Options.enabled ? new String[0] : null, null); - initialized = true; - } - - public void processStatePacket(FMLProxyPacket packet, long state) - { - if(!initialized) - initialize(false); - - boolean isCrawling = ((state >>> 13) & 1) != 0; - setCrawling(isCrawling); - - boolean isSmall = ((state >>> 15) & 1) != 0; - setSmall(isSmall); - - boolean isClimbing = ((state >>> 14) & 1) != 0; - boolean isCrawlClimbing = ((state >>> 12) & 1) != 0; - boolean isCeilingClimbing = ((state >>> 18) & 1) != 0; - - boolean isWallJumping = ((state >>> 31) & 1) != 0; - - isSneakButtonPressed = ((state >>> 33) & 1) != 0; - - resetFallDistance = isClimbing || isCrawlClimbing || isCeilingClimbing || isWallJumping; - resetTicksForFloatKick = isClimbing || isCrawlClimbing || isCeilingClimbing; - mp.sendPacketToTrackedPlayers(packet); - } - - public void processConfigPacket(String clientConfigurationVersion) - { - boolean warn = true; - String type = "unknown"; - if(clientConfigurationVersion != null) - for(int i = 0; i < SmartMovingConfig._all.length; i++) - if(clientConfigurationVersion.equals(SmartMovingConfig._all[i])) - { - warn = i > 0; - type = warn ? "outdated" : "matching"; - break; - } - - String message = "Smart Moving player \"" + mp.getUsername() + "\" connected with " + type + " configuration system"; - if(clientConfigurationVersion != null) - message += " version \"" + clientConfigurationVersion + "\""; - - if(warn) - FMLLog.warning(message); - else - FMLLog.info(message); - } - - public void processConfigChangePacket(String localUserName) - { - if(!Options._globalConfig.value) - { - toggleSingleConfig(); - return; - } - - String username = mp.getUsername(); - - if(localUserName == username) - { - toggleConfig(); - return; - } - - String[] rightPlayerNames = Options._usersWithChangeConfigRights.value; - for(int i=0; i rights) - { - String username = mp.getUsername(); - - if(localUserName == username) - return true; - - String[] rightPlayerNames = rights.value; - for(int i=0; i 0) - crawlingCooldown --; - } - - public void beforeOnLivingUpdate() - { - withinOnLivingUpdate = true; - } - - public void afterOnLivingUpdate() - { - withinOnLivingUpdate = false; - - if(!isSmall) - return; - - if (mp.doGetHealth() <= 0) - return; - - double offset = SmallSizeItemGrabHeight; - AxisAlignedBB box = mp.expandBox(mp.getBox(), 1, offset, 1); - - List offsetEntities = mp.getEntitiesExcludingPlayer(box); - if (offsetEntities != null && offsetEntities.size() > 0) - { - Object[] offsetEntityArray = offsetEntities.toArray(); - - box = mp.expandBox(box, 0, -offset, 0); - List standardEntities = mp.getEntitiesExcludingPlayer(box); - - for (int i=0; i 0) - return false; - - return mp.localIsEntityInsideOpaqueBlock(); - } - - public void addMovementStat(double var1, double var3, double var5) - { - beforeAddMovingHungerBatch(); - mp.localAddMovementStat(var1, var3, var5); - if(disableAddExhaustion && hunger != 0 && !withinOnLivingUpdate) - mp.localAddExhaustion(hunger); - afterAddMovingHungerBatch(); - } - - public void beforeAddMovingHungerBatch() - { - disableAddExhaustionDepth++; - if(hunger != -1) - disableAddExhaustion = true; - } - - public void addExhaustion(float exhaustion) - { - if(!disableAddExhaustion) - mp.localAddExhaustion(exhaustion); - } - - public void afterAddMovingHungerBatch() - { - disableAddExhaustionDepth--; - if(disableAddExhaustionDepth == 0) - disableAddExhaustion = false; - } - - public boolean isSneaking() - { - if(forceIsSneaking != null) - return forceIsSneaking; - - return mp.localIsSneaking(); - } - - public void beforeActivateBlockOrUseItem() - { - forceIsSneaking = isSneakButtonPressed; - } - - public void afterActivateBlockOrUseItem() - { - forceIsSneaking = null; - } - - public static SmartMovingConfig Options = null; - private static SmartMovingServerOptions optionsHandler = null; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/SmartMovingServerComm.java b/src/main/java/net/smart/moving/SmartMovingServerComm.java deleted file mode 100644 index fa5ae59e..00000000 --- a/src/main/java/net/smart/moving/SmartMovingServerComm.java +++ /dev/null @@ -1,75 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving; - -import cpw.mods.fml.common.network.internal.*; - -public class SmartMovingServerComm implements IPacketReceiver -{ - public static ILocalUserNameProvider localUserNameProvider = null; - - @Override - public boolean processStatePacket(FMLProxyPacket packet, IEntityPlayerMP player, int entityId, long state) - { - player.getMoving().processStatePacket(packet, state); - return true; - } - - @Override - public boolean processConfigInfoPacket(FMLProxyPacket packet, IEntityPlayerMP player, String info) - { - player.getMoving().processConfigPacket(info); - return true; - } - - @Override - public boolean processConfigContentPacket(FMLProxyPacket packet, IEntityPlayerMP player, String[] content, String username) - { - return false; - } - - @Override - public boolean processConfigChangePacket(FMLProxyPacket packet, IEntityPlayerMP player) - { - player.getMoving().processConfigChangePacket(localUserNameProvider != null ? localUserNameProvider.getLocalConfigUserName() : null); - return true; - } - - @Override - public boolean processSpeedChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, int difference, String username) - { - player.getMoving().processSpeedChangePacket(difference, localUserNameProvider != null ? localUserNameProvider.getLocalSpeedUserName() : null); - return true; - } - - @Override - public boolean processHungerChangePacket(FMLProxyPacket packet, IEntityPlayerMP player, float hunger) - { - player.getMoving().processHungerChangePacket(hunger); - return true; - } - - @Override - public boolean processSoundPacket(FMLProxyPacket packet, IEntityPlayerMP player, String soundId, float volume, float pitch) - { - player.getMoving().processSoundPacket(soundId, volume, pitch); - return true; - } - - public static final SmartMovingServerComm instance = new SmartMovingServerComm(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingClientConfig.java b/src/main/java/net/smart/moving/config/SmartMovingClientConfig.java deleted file mode 100644 index 690089b2..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingClientConfig.java +++ /dev/null @@ -1,596 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -public class SmartMovingClientConfig extends SmartMovingConfig -{ - public boolean isSneakingEnabled() - { - return _sneak.value || !enabled; - } - - public boolean isStandardBaseClimb() - { - return _isStandardBaseClimb.value || !enabled; - } - - public boolean isSimpleBaseClimb() - { - return _isSimpleBaseClimb.value && enabled; - } - - public boolean isSmartBaseClimb() - { - return _isSmartBaseClimb.value && enabled; - } - - public boolean isFreeBaseClimb() - { - return _isFreeBaseClimb.value && enabled; - } - - public boolean isTotalFreeLadderClimb() - { - return isFreeBaseClimb() && _freeBaseLadderClimb.value; - } - - public boolean isTotalFreeVineClimb() - { - return isFreeBaseClimb() && _freeBaseVineClimb.value; - } - - public boolean isFreeClimbAutoLaddderEnabled() - { - return _freeClimbingAutoLaddder.value && enabled; - } - - public boolean isFreeClimbAutoVineEnabled() - { - return _freeClimbingAutoVine.value && enabled; - } - - public boolean isFreeClimbingEnabled() - { - return _freeClimb.value && enabled; - } - - public boolean isCeilingClimbingEnabled() - { - return _ceilingClimbing.value && enabled; - } - - public boolean isSwimmingEnabled() - { - return _swim.value && enabled; - } - - public boolean isDivingEnabled() - { - return _dive.value && enabled; - } - - public boolean isLavaLikeWaterEnabled() - { - return _lavaLikeWater.value && enabled; - } - - public boolean isFlyingEnabled() - { - return _fly.value && enabled; - } - - public boolean isLevitateSmallEnabled() - { - return this._levitateSmall.value && enabled; - } - - public boolean isRunningEnabled() - { - return _run.value || !enabled; - } - - public boolean isRunExhaustionEnabled() - { - return _runExhaustion.value && enabled; - } - - public boolean isClimbExhaustionEnabled() - { - return _climbExhaustion.value && enabled; - } - - public boolean isCeilingClimbExhaustionEnabled() - { - return _ceilingClimbExhaustion.value && enabled; - } - - public boolean isSprintingEnabled() - { - return _sprint.value && enabled; - } - - public boolean isSprintExhaustionEnabled() - { - return _sprintExhaustion.value && enabled; - } - - public boolean isJumpChargingEnabled() - { - return _jumpCharge.value && enabled; - } - - public boolean isHeadJumpingEnabled() - { - return _headJump.value && enabled; - } - - public boolean isSlidingEnabled() - { - return _slide.value && enabled; - } - - public boolean isCrawlingEnabled() - { - return _crawl.value && enabled; - } - - public boolean isExhaustionLossHungerEnabled() - { - return _exhaustionLossHunger.value && _hungerGain.value && enabled; - } - - public boolean isHungerGainEnabled() - { - return _hungerGain.value || !enabled; - } - - public boolean isLevitationAnimationEnabled() - { - return _levitateAnimation.value && enabled; - } - - public boolean isFallAnimationEnabled() - { - return _fallAnimation.value && enabled; - } - - public final static int Sprinting = 0; - public final static int Running = 1; - public final static int Walking = 2; - public final static int Sneaking = 3; - public final static int Standing = 4; - - public final static int Up = 0; - public final static int ChargeUp = 1; - public final static int Angle = 2; - public final static int HeadUp = 3; - public final static int SlideDown = 4; - public final static int ClimbUp = 5; - public final static int ClimbUpHandsOnly = 6; - public final static int ClimbBackUp = 7; - public final static int ClimbBackUpHandsOnly = 8; - public final static int ClimbBackHead = 9; - public final static int ClimbBackHeadHandsOnly = 10; - public final static int WallUp = 11; - public final static int WallHead = 12; - public final static int WallUpSlide = 13; - public final static int WallHeadSlide = 14; - - public boolean isJumpingEnabled(int speed, int type) - { - if(!enabled) - return true; - - if(type == ChargeUp) - return _jumpCharge.value; - if(type == SlideDown) - return _slide.value; - if(type == ClimbUp || type == ClimbUpHandsOnly) - return _climbUpJump.value; - if(type == ClimbBackUp || type == ClimbBackUpHandsOnly) - return _climbBackUpJump.value; - if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - return _climbBackHeadJump.value; - - if(type == WallUp) - return _wallUpJump.value; - if(type == WallHead) - return _wallHeadJump.value; - - if(speed == Sprinting) - return _sprintJump.value; - else if(speed == Running) - return _runJump.value; - else if(speed == Walking) - return _walkJump.value; - else if(speed == Sneaking) - return _sneakJump.value; - else if(speed == Standing) - return _standJump.value; - - return true; - } - - public boolean isSideJumpEnabled() - { - return enabled && this._angleJumpSide.value; - } - - public boolean isBackJumpEnabled() - { - return enabled && this._angleJumpBack.value; - } - - public boolean isWallJumpEnabled() - { - return enabled && this._wallUpJump.value; - } - - public boolean isJumpExhaustionEnabled(int speed, int type) - { - if(!enabled) - return false; - - boolean result = _jumpExhaustion.value; - - if(type == SlideDown) - return result && _jumpSlideExhaustion.value; - else if(type == Angle) - result &= _angleJumpExhaustion.value; - else if(type == ClimbUp || type == ClimbUpHandsOnly) - result &= _climbJumpUpExhaustion.value; - else if(type == ClimbBackUp || type == ClimbBackUpHandsOnly ) - result &= _climbJumpBackUpExhaustion.value; - else if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - result &= _climbJumpBackHeadExhaustion.value; - else if(type == WallUp) - result &= _wallUpJumpExhaustion.value; - else if(type == WallHead) - result &= _wallHeadJumpExhaustion.value; - else - result &= _upJumpExhaustion.value; - - if(type == ClimbUp || type == ClimbUpHandsOnly || type == ClimbBackUp || type == ClimbBackUpHandsOnly || type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - return result && _climbJumpExhaustion.value; - - if(type == WallUp || type == WallHead) - return result && _wallJumpExhaustion.value; - - if(speed == Sprinting) - result &= _sprintJumpExhaustion.value; - else if(speed == Running) - result &= _runJumpExhaustion.value; - else if(speed == Walking) - result &= _walkJumpExhaustion.value; - else if(speed == Sneaking) - result &= _sneakJumpExhaustion.value; - else if(speed == Standing) - result &= _standJumpExhaustion.value; - - if(type == ChargeUp) - result |= _jumpChargeExhaustion.value; - - return result; - } - - public float getJumpExhaustionGain(int speed, int type, float jumpCharge) - { - if(!enabled) - return 0F; - - float result = _baseExhautionGainFactor.value * _jumpExhaustionGainFactor.value; - - if(type == SlideDown) - return result * _jumpSlideExhaustionGainFactor.value; - else if(type == Angle) - result *= _angleJumpExhaustionGainFactor.value; - else if(type == ClimbUp || type == ClimbUpHandsOnly) - result *= _climbJumpUpExhaustionGainFactor.value; - else if(type == ClimbBackUp || type == ClimbBackUpHandsOnly) - result *= _climbJumpBackUpExhaustionGainFactor.value; - else if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - result *= _climbJumpBackHeadExhaustionGainFactor.value; - else if(type == WallUp) - result *= _wallUpJumpExhaustionGainFactor.value; - else if(type == WallHead) - result *= _wallHeadJumpExhaustionGainFactor.value; - else - result *= _upJumpExhaustionGainFactor.value; - - if(type == ClimbUp || type == ClimbUpHandsOnly || type == ClimbBackUp || type == ClimbBackUpHandsOnly || type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - return result * _climbJumpExhaustionGainFactor.value; - - if(type == WallUp || type == WallHead) - return result * _wallJumpExhaustionGainFactor.value; - - if(speed == Sprinting) - result *= _sprintJumpExhaustionGainFactor.value; - else if(speed == Running) - result *= _runJumpExhaustionGainFactor.value; - else if(speed == Walking) - result *= _walkJumpExhaustionGainFactor.value; - else if(speed == Sneaking) - result *= _sneakJumpExhaustionGainFactor.value; - else if(speed == Standing) - result *= _standJumpExhaustionGainFactor.value; - - if(type == ChargeUp) - { - if(!isJumpExhaustionEnabled(speed, Up)) - result = 0; - - result += - _baseExhautionGainFactor.value * - _jumpExhaustionGainFactor.value * - _upJumpExhaustionGainFactor.value * - _jumpChargeExhaustionGainFactor.value * - Math.min(jumpCharge, _jumpChargeMaximum.value) / _jumpChargeMaximum.value; - } - - return result; - } - - public float getJumpExhaustionStop(int speed, int type, float jumpCharge) - { - float result = _jumpExhaustionStopFactor.value; - - if(type == SlideDown) - return result * _jumpSlideExhaustionStopFactor.value; - else if(type == Angle) - result *= _angleJumpExhaustionStopFactor.value; - else if(type == ClimbUp || type == ClimbUpHandsOnly) - result *= _climbJumpUpExhaustionStopFactor.value; - else if(type == ClimbBackUp || type == ClimbBackUpHandsOnly) - result *= _climbJumpBackUpExhaustionStopFactor.value; - else if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - result *= _climbJumpBackHeadExhaustionStopFactor.value; - else if(type == WallUp) - result *= _wallUpJumpExhaustionStopFactor.value; - else if(type == WallHead) - result *= _wallHeadJumpExhaustionStopFactor.value; - else - result *= _upJumpExhaustionStopFactor.value; - - if(type == ClimbUp || type == ClimbUpHandsOnly || type == ClimbBackUp || type == ClimbBackUpHandsOnly || type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - return result * _climbJumpExhaustionStopFactor.value; - - if(type == WallUp || type == WallHead) - return result * _wallJumpExhaustionStopFactor.value; - - if(speed == Sprinting) - result *= _sprintJumpExhaustionStopFactor.value; - else if(speed == Running) - result *= _runJumpExhaustionStopFactor.value; - else if(speed == Walking) - result *= _walkJumpExhaustionStopFactor.value; - else if(speed == Sneaking) - result *= _sneakJumpExhaustionStopFactor.value; - else if(speed == Standing) - result *= _standJumpExhaustionStopFactor.value; - - if(type == ChargeUp) - { - if(!isJumpExhaustionEnabled(speed, Up)) - result += getJumpExhaustionGain(speed, Up, 0); - - result -= - _jumpExhaustionStopFactor.value * - _upJumpExhaustionStopFactor.value * - _jumpChargeExhaustionStopFactor.value * - Math.min(jumpCharge, _jumpChargeMaximum.value) / _jumpChargeMaximum.value; - } - - return result; - } - - public float getJumpChargeFactor(float jumpCharge) - { - if(!enabled || !_jumpCharge.value) - return 1F; - - jumpCharge = Math.min(jumpCharge, _jumpChargeMaximum.value); - return 1F + jumpCharge / _jumpChargeMaximum.value * (_jumpChargeFactor.value - 1F); - } - - public float getHeadJumpFactor(float headJumpCharge) - { - if(!enabled || !_headJump.value) - return 1F; - headJumpCharge = Math.min(headJumpCharge, _headJumpChargeMaximum.value); - return (headJumpCharge - 1) / (_headJumpChargeMaximum.value - 1); - } - - public float getJumpVerticalFactor(int speed, int type) - { - if(!enabled) - return 1F; - - float result = _jumpVerticalFactor.value; - - if(type == Angle) - return result * _angleJumpVerticalFactor .value; - - if(type == ClimbUp || type == ClimbUpHandsOnly) - result *= _climbUpJumpVerticalFactor.value; - if(type == ClimbUpHandsOnly) - result *= _climbUpJumpHandsOnlyVerticalFactor.value; - - if(type == ClimbBackUp || type == ClimbBackUpHandsOnly) - result *= _climbBackUpJumpVerticalFactor.value; - if(type == ClimbBackUpHandsOnly) - result *= _climbBackUpJumpHandsOnlyVerticalFactor.value; - - if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - result *= _climbBackHeadJumpVerticalFactor.value; - if(type == ClimbBackHeadHandsOnly) - result *= _climbBackHeadJumpHandsOnlyVerticalFactor.value; - - if(type == WallUp || type == WallHead) - result *= _wallUpJumpVerticalFactor.value; - if(type == WallHead) - result *= _wallHeadJumpVerticalFactor.value; - - if(type == Angle || type == ClimbUp || type == ClimbUpHandsOnly || type == ClimbBackUp || type == ClimbBackUpHandsOnly || type == ClimbBackHead || type == ClimbBackHeadHandsOnly || type == WallUp || type == WallHead) - return result; - - if(speed == Sprinting) - result *= _sprintJumpVerticalFactor.value; - else if(speed == Running) - result *= _runJumpVerticalFactor.value; - else if(speed == Walking) - result *= _walkJumpVerticalFactor.value; - else if(speed == Sneaking) - result *= _sneakJumpVerticalFactor.value; - else if(speed == Standing) - result *= _standJumpVerticalFactor.value; - - return result; - } - - public float getJumpHorizontalFactor(int speed, int type) - { - if(!enabled) - return speed == Running ? 2F : 1F; - - float result = _jumpHorizontalFactor.value; - - if(type == Angle) - result *= _angleJumpHorizontalFactor.value; - - if(type == ClimbBackUp || type == ClimbBackUpHandsOnly) - result *= _climbBackUpJumpHorizontalFactor.value; - if(type == ClimbBackUpHandsOnly) - result *= _climbBackUpJumpHandsOnlyHorizontalFactor.value; - - if(type == ClimbBackHead || type == ClimbBackHeadHandsOnly) - result *= _climbBackHeadJumpHorizontalFactor.value; - if(type == ClimbBackHeadHandsOnly) - result *= _climbBackHeadJumpHandsOnlyHorizontalFactor.value; - - if(type == WallUp) - result *= _wallUpJumpHorizontalFactor.value; - if(type == WallHead) - result *= _wallHeadJumpHorizontalFactor.value; - - if(type == Angle || type == ClimbUp || type == ClimbUpHandsOnly || type == ClimbBackUp || type == ClimbBackUpHandsOnly || type == ClimbBackHead || type == ClimbBackHeadHandsOnly || type == WallUp || type == WallHead) - return result; - - if(speed == Sprinting) - result *= _sprintJumpHorizontalFactor.value; - else if(speed == Running) - result *= _runJumpHorizontalFactor.value; - else if(speed == Walking) - result *= _walkJumpHorizontalFactor.value; - else if(speed == Sneaking) - result *= _sneakJumpHorizontalFactor.value; - else if(speed == Standing && type != ClimbBackUp && type != ClimbBackUpHandsOnly && type != ClimbBackHead && type != ClimbBackHeadHandsOnly) - result *= 0F; - - return result; - } - - @SuppressWarnings("unused") - public float getMaxHorizontalMotion(int speed, int type, boolean inWater) - { - float maxMotion = 0.117852041920949F; - if(!enabled) - return speed == Running ? maxMotion * 1.3F : maxMotion; - - if(inWater) - maxMotion = 0.07839602977037292F; - - if(speed == Sprinting) - maxMotion *= _sprintFactor.value; - else if(speed == Running) - maxMotion *= _runFactor.value; - else if(speed == Sneaking) - maxMotion *= _sneakFactor.value; - - return maxMotion; - } - - public float getMaxExhaustion() - { - float result = 0F; - if(_run.value && _runExhaustion.value) - result = max(result, _runExhaustionStop.value); - if(_sprint.value && _sprintExhaustion.value) - result = max(result, _sprintExhaustionStop.value); - - if(_jump.value) - for(int i = Sprinting; i <= Standing; i++) - for(int n = Up; n <= WallHeadSlide; n++) - if(isJumpExhaustionEnabled(i, n)) - for(int t = 0; t <= 1; t++) - result = max(result, getJumpExhaustionStop(i, n, t) + getJumpExhaustionGain(i, n, t)); - - if(_freeClimb.value && _climbExhaustion.value) - result = max(result, _climbExhaustionStop.value); - if(_ceilingClimbing.value && _ceilingClimbExhaustion.value) - result = max(result, _ceilingClimbExhaustionStop.value); - return result; - } - - private static float max(float value, float valueOrInfinite) - { - return valueOrInfinite == java.lang.Float.POSITIVE_INFINITY ? value : Math.max(value, valueOrInfinite); - } - - public float getFactor(boolean hunger, boolean onGround, boolean isStanding, boolean isStill, boolean isSneaking, boolean isRunning, boolean isSprinting, boolean isClimbing, boolean isClimbCrawling, boolean isCeilingClimbing, boolean isDipping, boolean isSwimming, boolean isDiving, boolean isCrawling, boolean isCrawlClimbing) - { - isClimbing |= isClimbCrawling; - isCrawling |= isCrawlClimbing; - boolean actionOverGound = isClimbing || isCeilingClimbing || isDiving || isSwimming; - boolean airBorne = !onGround && !actionOverGound; - isStanding = actionOverGound ? isStill : isStanding; - isSneaking = isSneaking & !isStanding; - - float factor = hunger ? _baseHungerGainFactor.value : _baseExhautionLossFactor.value; - if(airBorne) - factor *= hunger ? 0F : _fallExhautionLossFactor.value; - else if(isSprinting) - factor *= hunger ? _sprintingHungerGainFactor.value : _sprintingExhautionLossFactor.value; - else if(isRunning) - factor *= hunger ? _runningHungerGainFactor.value : _runningExhautionLossFactor.value; - else if(isSneaking) - factor *= hunger ? _sneakingHungerGainFactor.value : _sneakingExhautionLossFactor.value; - else if(isStanding) - factor *= hunger ? _standingHungerGainFactor.value : _standingExhautionLossFactor.value; - else - factor *= hunger ? _walkingHungerGainFactor.value : _walkingExhautionLossFactor.value; - - if(isClimbing) - factor *= hunger ? _climbingHungerGainFactor.value : _climbingExhaustionLossFactor.value; - else if(isCrawling) - factor *= hunger ? _crawlingHungerGainFactor.value : _crawlingExhaustionLossFactor.value; - else if(isCeilingClimbing) - factor *= hunger ? _ceilClimbingHungerGainFactor.value : _ceilClimbingExhaustionLossFactor.value; - else if(isSwimming) - factor *= hunger ? _swimmingHungerGainFactor.value : _swimmingExhaustionLossFactor.value; - else if(isDiving) - factor *= hunger ? _divingHungerGainFactor.value : _divingExhaustionLossFactor.value; - else if(isDipping) - factor *= hunger ? _dippingHungerGainFactor.value : _dippingExhaustionLossFactor.value; - else if(onGround) - factor *= hunger ? _normalHungerGainFactor.value : _normalExhaustionLossFactor.value; - else - factor *= hunger ? _normalHungerGainFactor.value : _normalExhaustionLossFactor.value; - - return factor; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingConfig.java b/src/main/java/net/smart/moving/config/SmartMovingConfig.java deleted file mode 100644 index 0c58dc7a..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingConfig.java +++ /dev/null @@ -1,647 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -import java.io.*; -import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.util.*; - -import net.smart.properties.*; -import net.smart.properties.Properties; - -public class SmartMovingConfig extends SmartMovingProperties -{ - private static final String _smartLadderClimbingSpeedPropertiesFileName = "smart_ladder_climbing_speed_options.txt"; - private static final String _smartClimbingPropertiesFileName = "smart_climbing_options.txt"; - private static final String _smartMovingPropertiesFileName = "smart_moving_options.txt"; - private static final String _smartMovingClientServerPropertiesFileName = "smart_moving_server_options.txt"; - - private static final String _slcs = "0.1"; - private static final String _sc = "0.2"; - private static final String _sm_1_0 = "1.0"; - private static final String _sm_1_1 = "1.1"; - private static final String _sm_1_2 = "1.2"; - private static final String _sm_1_3 = "1.3"; - private static final String _sm_1_4 = "1.4"; - private static final String _sm_1_5 = "1.5"; - private static final String _sm_1_6 = "1.6"; - private static final String _sm_1_7 = "1.7"; - private static final String _sm_1_8 = "1.8"; - private static final String _sm_1_9 = "1.9"; - private static final String _sm_1_10 = "1.10"; - private static final String _sm_1_11 = "1.11"; - public static final String _sm_2_0 = "2.0"; - public static final String _sm_2_1 = "2.1"; - public static final String _sm_2_2 = "2.2"; - public static final String _sm_2_3 = "2.3"; - public static final String _sm_2_4 = "2.4"; - public static final String _sm_2_5 = "2.5"; - public static final String _sm_2_6 = "2.6"; - public static final String _sm_3_0 = "3.0"; - public static final String _sm_3_1 = "3.1"; - public static final String _sm_3_2 = "3.2"; - public static final String _sm_current = _sm_3_2; - - private static final String[] _all_sm = new String[] { _sm_3_2, _sm_3_1, _sm_3_0, _sm_2_6, _sm_2_5, _sm_2_4, _sm_2_3, _sm_2_2, _sm_2_1, _sm_2_0, _sm_1_11, _sm_1_10, _sm_1_9, _sm_1_8, _sm_1_7, _sm_1_6, _sm_1_5, _sm_1_4, _sm_1_3, _sm_1_2, _sm_1_1, _sm_1_0 }; - private static final String[] _all_old = new String[] { _sc, _slcs }; - - protected static final String[] _pre_sm_1_3 = new String[] { _sm_1_2, _sm_1_1, _sm_1_0 }; - protected static final String[] _pre_sm_1_4 = concat(_sm_1_3, _pre_sm_1_3); - protected static final String[] _pre_sm_1_5 = concat(_sm_1_4, _pre_sm_1_4); - protected static final String[] _pre_sm_1_6 = concat(_sm_1_5, _pre_sm_1_5); - protected static final String[] _pre_sm_1_7 = concat(_sm_1_6, _pre_sm_1_6); - protected static final String[] _pre_sm_1_8 = concat(_sm_1_7, _pre_sm_1_7); - protected static final String[] _pre_sm_1_9 = concat(_sm_1_8, _pre_sm_1_8); - protected static final String[] _pre_sm_1_10 = concat(_sm_1_9, _pre_sm_1_9); - protected static final String[] _pre_sm_1_11 = concat(_sm_1_10, _pre_sm_1_10); - protected static final String[] _pre_sm_2_0 = concat(_sm_1_11, _pre_sm_1_11); - protected static final String[] _pre_sm_2_1 = concat(_sm_2_0, _pre_sm_2_0); - protected static final String[] _pre_sm_2_2 = concat(_sm_2_1, _pre_sm_2_1); - protected static final String[] _pre_sm_2_3 = concat(_sm_2_2, _pre_sm_2_2); - protected static final String[] _pre_sm_2_4 = concat(_sm_2_3, _pre_sm_2_3); - protected static final String[] _pre_sm_2_5 = concat(_sm_2_4, _pre_sm_2_4); - protected static final String[] _pre_sm_2_6 = concat(_sm_2_5, _pre_sm_2_5); - protected static final String[] _pre_sm_3_0 = concat(_sm_2_6, _pre_sm_2_6); - protected static final String[] _pre_sm_3_1 = concat(_sm_3_0, _pre_sm_3_0); - protected static final String[] _pre_sm_3_2 = concat(_sm_3_1, _pre_sm_3_1); - - private static final String[] _pre_sm_1_7_post_1_4 = new String[] { _sm_1_6, _sm_1_5 }; - private static final String[] _pre_sm_1_7_post_1_0 = new String[] { _sm_1_6, _sm_1_5, _sm_1_4, _sm_1_3, _sm_1_2, _sm_1_1 }; - - public static final String[] _all = concat(_all_sm, _all_old); - - - - public final Property _speedFactor = PositiveFactor("move.speed.factor").defaults(1F).comment("Global player speed factor (>= 0)").book("Global Speed", "Below you find the options to manipulate the global speed applied to all speeds."); - public final Property _speedUser = Creative("move.speed.user").defaults(true, _pre_sm_3_2).comment("To switch on/off in-game speed manipulation"); - public final Property _speedUserFactor = PositiveFactor("move.speed.user.factor").singular().defaults(0.2F).min(0.0001F).comment("The factor for in-game speed manipulation (>= 0.0001)"); - public final Property _speedUserExponent = Integer("move.speed.user.exponent").singular().defaults(0).comment("The exponent for in-game speed manipulation"); - - - - public final Property _baseClimb = String().defaults("free").key("move.climb.base") .key("move.climb.ladder", _pre_sm_1_10).key("climbing.ladder", _all_old).comment("To manipulate the ladder and vine climbing mode (possible values are \"free\", \"smart\", \"simple\" and \"standard\")").book("Climbing", "Below you find all free and ladder climbing options except those for ceiling climbing."); - public final Property _freeClimb = Unmodified().key("move.climb.free").key("climbing.free", _all_old).comment("To switch on/off free climbing"); - public final Property _freeBaseLadderClimb = Modified().key("move.climb.free.base.ladder").comment("To switch on/off remaining base climbing behavior on ladders while free climbing is enabled for ladders (also see \"move.climb.base\")"); - public final Property _freeBaseVineClimb = Modified().key("move.climb.free.base.vine").defaults(true, _pre_sm_1_11).comment("To switch on/off remaining base climbing behavior on vines while free climbing is enabled for vines (also see \"move.climb.base\")"); - - public final Property _isFreeBaseClimb = _baseClimb.is("free").and(_freeClimb); - public final Property _isSmartBaseClimb = _baseClimb.is("smart").andNot(_isFreeBaseClimb); - public final Property _isSimpleBaseClimb = _baseClimb.is("simple").andNot(_isFreeBaseClimb).andNot(_isSmartBaseClimb); - public final Property _isStandardBaseClimb = _isFreeBaseClimb.not().andNot(_isSmartBaseClimb).andNot(_isSimpleBaseClimb); - - - public final Property _freeClimbingUpSpeedFactor = PositiveFactor("move.climb.free.up.speed.factor").comment("Climbing up speed factor relative to default climbing up speed (>= 0)").chapter(); - public final Property _freeClimbingDownSpeedFactor = PositiveFactor("move.climb.free.down.speed.factor").comment("Climbing down speed factor relative to default climbing down speed (>= 0)"); - public final Property _freeClimbingHorizontalSpeedFactor = PositiveFactor("move.climb.free.horizontal.speed.factor").comment("Climbing horizontal speed factor relative to default climbing horizontal speed (>= 0)"); - public final Property _freeClimbingOrthogonalDirectionAngle = Positive("move.climb.free.direction.orthogonal.angle").values(90F, 90F, 180F).comment("Climbing N,S,E,W grabbing angle in degrees"); - public final Property _freeClimbingDiagonalDirectionAngle = Positive("move.climb.free.direction.diagonal.angle").values(80F, 45F, 180F).comment("Climbing NW,SW,SE,NE grabbing angle in degrees"); - - public final Property _freeClimbingAutoLaddder = Unmodified("move.climb.free.ladder.auto").depends(_isFreeBaseClimb).comment("Whether the \"grab\" button will automatically be triggered while being on ladders and looking in the right direction").section(); - public final Property _freeClimbingAutoVine = Unmodified("move.climb.free.vine.auto").depends(_isFreeBaseClimb).comment("Whether the \"grab\" button will automatically be triggered while being on standard climbable vines and looking in the right direction"); - public final Property _freeOneLadderClimbUpSpeedFactor = PositiveFactor("move.climb.free.ladder.one.up.speed.factor").defaults(1.0153F).defaults(0.71F, _pre_sm_2_4).comment("Additional speed factor when climbing straight up on one ladder block (>= 0)"); - public final Property _freeBothLadderClimbUpSpeedFactor = IncreasingFactor("move.climb.free.ladder.two.up.speed.factor").defaults(1.43F).comment("Additional speed factor when climbing straight up on two ladder blocks (>= 1)"); - public final Property _freeFenceClimbing = Unmodified("move.climb.free.fence").comment("Climbing over fences"); - - public final Property _freeClimbFallDamageStartDistance = Positive("move.climb.fall.damage.start.distance").values(2F, 1F, 3F).comment("Distance in blocks to fall before suffering fall damage when starting to climb (>= 1, <= 3)").section(); - public final Property _freeClimbFallDamageFactor = IncreasingFactor("move.climb.fall.damage.factor").defaults(2F).comment("Damage factor applied to the remaining distance (>= 1)"); - public final Property _freeClimbFallMaximumDistance = Positive("move.climb.fall.maximum.distance").defaults(3F).min(_freeClimbFallDamageStartDistance).comment("Distance in blocks to fall to block all climbing attempts (>= \"move.climb.fall.damage.start.distance\")"); - - public final Property _climbExhaustion = Hard("move.climb.exhaustion").comment("To switch on/off exhaustion while climbing").section(); - public final Property _climbExhaustionStart = Positive("move.climb.exhaustion.start").defaults(60F).defaults(0F, _pre_sm_1_4).comment("Maximum exhaustion to start climbing along ceilings (>= 0)"); - public final Property _climbExhaustionStop = Positive("move.climb.exhaustion.stop").up(80F, _climbExhaustionStart).defaults(100F, _pre_sm_1_4).comment("Maximum exhaustion to climb (>= 0)"); - public final Property _climbStrafeExhaustionGain = Positive("move.climb.strafe.exhaustion.gain").defaults(1.1F).defaults(0.75F, _pre_sm_1_4).comment("Exhaustion added every tick while climbing horizontally (>= 0)"); - public final Property _climbUpExhaustionGain = Positive("move.climb.up.exhaustion.gain").defaults(1.2F).defaults(1F, _pre_sm_1_4).comment("Exhaustion added every tick while climbing up (>= 0)"); - public final Property _climbDownExhaustionGain = Positive("move.climb.down.exhaustion.gain").defaults(1.05F).defaults(0.5F, _pre_sm_1_4).comment("Exhaustion added every tick while climbing down (>= 0)"); - public final Property _climbStrafeUpExhaustionGain = Positive("move.climb.strafe.up.exhaustion.gain").defaults(1.3F).comment("Exhaustion added every tick while climbing diagonally up (>= 0)"); - public final Property _climbStrafeDownExhaustionGain = Positive("move.climb.strafe.down.exhaustion.gain").defaults(1.25F).comment("Exhaustion added every tick while climbing diagonally down (>= 0)"); - - - - public final Property _ceilingClimbing = Unmodified("move.climb.ceiling").comment("To switch on/off climbing along ceilings").book("Ceiling climbing", "Below you find all ceiling climbing options"); - public final Property _ceilingClimbingSpeedFactor = PositiveFactor("move.climb.ceiling.speed.factor").defaults(0.2F).comment("Speed factor while climbing along ceilings (>= 0, relative to default movement speed)"); - public final Property _ceilingClimbConfigurationString = Strings("move.climb.ceiling.configuration").defaults(new String[] { "tile.fenceIron", "tile.trapdoor/0/1/2/3", "tile.trapdoor_iron/0/1/2/3" }).defaults(new String[] { "tile.fenceIron", "tile.trapdoor/0/1/2/3" }, _pre_sm_2_5).comment("To define which blocks are ceiling climbable (syntax: '(/)*' seperator: ',')"); - public final Property>> _ceilingClimbConfigurationObject = _ceilingClimbConfigurationString.toBlockConfig(); - - public final Property _ceilingClimbExhaustion = Hard("move.climb.ceiling.exhaustion").comment("To switch on/off exhaustion while climbing along ceilings").section(); - public final Property _ceilingClimbExhaustionStart = Positive("move.climb.ceiling.exhaustion.start").defaults(40F).defaults(0F, _pre_sm_1_4).comment("Maximum exhaustion to start climbing along ceilings (>= 0)"); - public final Property _ceilingClimbExhaustionStop = Positive("move.climb.ceiling.exhaustion.stop").up(60F, _ceilingClimbExhaustionStart).defaults(100F, _pre_sm_1_4).comment("Maximum exhaustion to climbing along ceilings (>= \"move.climb.ceiling.exhaustion.start\")"); - public final Property _ceilingClimbExhaustionGain = Positive("move.climb.ceiling.exhaustion.gain").defaults(1.3F).defaults(2F, _pre_sm_1_4).comment("Exhaustion added every tick while climbing along ceilings (>= 0)"); - - - - public final Property _swim = Unmodified().key("move.swim").key("climbing.swim", _all_old).comment("To switch on/off swimming").book("Swimming", "Below you find all swimming options"); - public final Property _swimSpeedFactor = PositiveFactor("move.swim.speed.factor").comment("Speed factor while swimming (>= 0, relative to default movement speed)"); - public final Property _swimDownOnSneak = Unmodified().key("move.swim.down.sneak").defaults(false, _pre_sm_1_6).comment("To switch on/off diving down instead of swimming slow on sneaking while swimming"); - public final Property _swimParticlePeriodFactor = PositiveFactor("move.swim.particle.period.factor").comment("Swim particle spawning period factor (>= 0)"); - - - public final Property _dive = Unmodified().key("move.dive").key("climbing.dive", _all_old).comment("To switch on/off diving").book("Diving", "Below you find all diving options"); - public final Property _diveSpeedFactor = PositiveFactor("move.dive.speed.factor").comment("Speed factor while diving (>= 0, relative to default movement speed)"); - public final Property _diveDownOnSneak = Unmodified().key("move.dive.down.sneak").defaults(false, _pre_sm_1_6).comment("To switch on/off diving down instead of diving slow on sneaking while diving"); - - - public final Property _lavaLikeWater = Creative("move.lava.water").comment("To switch on/off swimming and diving in lava").book("Lava", "Below you find all lava movement options"); - public final Property _lavaSwimParticlePeriodFactor = PositiveFactor("move.lava.swim.particle.period.factor").defaults(4F).comment("Lava swim particle spawning period factor (>= 0)"); - - - public final Property _run = Unmodified("move.run").comment("To switch on/off standard sprinting").book("Standard sprinting", "Below you find the options for standard vanilla Minecraft sprinting (sometimes referred as \"running\" here)"); - public final Property _runFactor = PositiveFactor("move.run.factor").defaults(1.3F).min(1.1F).comment("Standard sprinting factor (>= 1.1)"); - public final Property _runExhaustion = Hard("move.run.exhaustion").depends(_run).comment("To switch on/off standard sprinting exhaustion"); - - public final Property _runExhaustionStart = Positive("move.exhaustion.run.start").defaults(75F).comment("Maximum exhaustion to start a standard sprint (>= 0)").section(); - public final Property _runExhaustionStop = Positive("move.exhaustion.run.stop").up(100F, _runExhaustionStart).comment("Maximum exhaustion to continue a standard sprint (>= \"move.exhaustion.run.start\")"); - public final Property _runExhaustionGainFactor = Positive("move.exhaustion.run.gain.factor").defaults(1.5F).comment("Exhaustion gain factor while standard sprinting (>= 0)"); - - - - public final Property _sprint = Unmodified("move.sprint").comment("To switch on/off generic sprinting").book("Generic sprinting", "Below you find the options for Smart Moving's generic sprinting available for many different smart movings plus standard walking"); - public final Property _sprintFactor = PositiveFactor("move.sprint.factor").defaults(1.5F).min(_run.eitherOr(_runFactor.plus(0.1F), 1.1F)).comment("Generic sprinting factor (>= 1.1 AND >= 'move.run.factor' + 0.1 if relevant)"); - public final Property _sprintExhaustion = Medium("move.sprint.exhaustion").depends(_sprint).comment("To switch on/off sprinting exhaustion"); - - public final Property _sprintExhaustionStart = Positive("move.exhaustion.sprint.start").defaults(50F).comment("Maximum exhaustion to start a sprint (>= 0)").section(); - public final Property _sprintExhaustionStop = Positive("move.exhaustion.sprint.stop").up(100F, _sprintExhaustionStart).comment("Maximum exhaustion to continue a sprint (>= \"move.exhaustion.sprint.start\")"); - public final Property _sprintExhaustionGainFactor = IncreasingFactor("move.exhaustion.sprint.gain.factor").defaults(2F).comment("Exhaustion gain factor while sprinting (>= 0)"); - - - - public final Property _sneak = Unmodified("move.sneak").comment("To switch on/off standard sneaking").book("Generic sneaking", "Below you find the options for Smart Moving's generic sneaking available for many different smart movings. These options also apply to standard sneaking!"); - public final Property _sneakFactor = DecreasingFactor("move.sneak.factor").defaults(0.3F).comment("Speed factor while sneaking (>= 0, <= 1, relative to default movement speed)"); - public final Property _sneakNameTag = Modified("move.sneak.name").comment("Whether to display a name tag above other standard sneaking players"); - - - public final Property _crawl = Unmodified("move.crawl").comment("To switch on/off crawling").book("Crawling", "Below you find all crawling options."); - public final Property _crawlFactor = DecreasingFactor("move.crawl.factor").defaults(0.15F).comment("Speed factor while crawling (>= 0, <= 1, relative to default movement speed)"); - public final Property _crawlNameTag = Modified("move.crawl.name").comment("Whether to display a name tag above other crawling players"); - public final Property _crawlOverEdge = Unmodified("move.crawl.edge").comment("Whether to allow crawling over edges"); - - - - public final Property _slide = Unmodified("move.slide").comment("To switch on/off sliding").book("Sliding", "Below you find all sliding options."); - public final Property _slideControlDegrees = PositiveFactor("move.slide.control.angle").defaults(1F).comment("Sliding control movement factor (>= 0, in degrees per tick)"); - public final Property _slideSlipperinessFactor = PositiveFactor("move.slide.glide.factor").comment("Slipperiness factor while sliding (>= 0)"); - public final Property _slidingSpeedStopFactor = PositiveFactor("move.slide.speed.stop.factor").comment("Sliding to crawling transition speed factor (>= 0)"); - public final Property _slideParticlePeriodFactor = PositiveFactor("move.slide.particle.period.factor").defaults(0.5F).defaults(1F, _pre_sm_1_6).comment("Sliding particle spawning period factor (>= 0)"); - - - - public final Property _fly = Unmodified("move.fly").comment("To switch on/off smart flying").book("Smart flying", "Below you find all options for Smart Moving's own flying mode."); - public final Property _flyingSpeedFactor = PositiveFactor("move.fly.speed.factor").comment("To manipulate smart flying speed (>= 0)"); - - - - public final Property _levitateSmall = Unmodified("move.levitate.small").comment("To switch on/off standard flying small size").book("Standard flying", "Below you find the options for standard vanilla Minecraft flying (sometimes referred as \"levitating\" here)"); - public final Property _levitateAnimation = Unmodified("move.levitate.animation").key("move.fly.animation").comment("To switch on/off standard flying animation"); - - - - public final Property _fallingDistanceMinimum = Positive("move.fall.distance.minimum").defaults(3F).comment("Minimum fall distance for stopping ground based moves like crawling or sliding (>= 0)").book("Falling", "Below you find the options for Smart Moving's falling"); - public final Property _fallAnimation = Unmodified("move.fall.animation").comment("To switch on/off smart falling animation"); - public final Property _fallAnimationDistanceMinimum = Positive("move.fall.animation.distance.minimum").min(_fallingDistanceMinimum).defaults(3F, _pre_sm_1_6).comment("Minimum fall distance for the smart falling animation (>= 0, >= \"move.fall.animation.distance.minimum\""); - - - - public final Property _jump = Unmodified("move.jump").comment("To switch on/off jumping").book("Jumping", "Below you find the options for all Smart Moving's different jump types. These options also apply to standard jumping!"); - public final Property _jumpControlFactor = DecreasingFactor("move.jump.control.factor").defaults(1F).comment("Jumping control movement factor (>= 0, <= 1, relative to default air movement speed)"); - - public final Property _jumpHorizontalFactor = IncreasingFactor("move.jump.horizontal.factor").comment("Horizontal jumping factor relative to actual horizontal movement (>= 1)").section(); - public final Property _jumpVerticalFactor = PositiveFactor("move.jump.vertical.factor").comment("Vertical jumping factor relative to default jump height (>= 0)"); - - - public final Property _standJump = Unmodified("move.jump.stand").depends(_jump).comment("To switch on/off jumping while standing (Relevant only if \"move.jump\" is true)").chapter(); - public final Property _standJumpVerticalFactor = PositiveFactor("move.jump.stand.vertical.factor").comment("Vertical stand jumping factor relative to default jump height (>= 0)"); - - public final Property _sneakJump = Unmodified("move.jump.sneak").key("move.sneak.jump", _pre_sm_1_7).depends(_sneak, _jump).comment("To switch on/off jumping while sneaking (Relevant only if nether \"move.sneak\" nor \"move.jump\" are false)").chapter(); - public final Property _sneakJumpHorizontalFactor = IncreasingFactor("move.jump.sneak.horizontal.factor").key("move.sneak.jump.horizontal.factor", _pre_sm_1_7).comment("Horizontal sneak jumping factor relative to actual horizontal movement (>= 1)"); - public final Property _sneakJumpVerticalFactor = PositiveFactor("move.jump.sneak.vertical.factor").key("move.sneak.jump.vertical.factor", _pre_sm_1_7).comment("Vertical sneak jumping factor relative to default jump height (>= 0)"); - - public final Property _walkJump = Unmodified("move.jump.walk").depends(_jump).comment("To switch on/off jumping while walking (Relevant only if \"move.jump\" is true)").chapter(); - public final Property _walkJumpHorizontalFactor = IncreasingFactor("move.jump.walk.horizontal.factor").comment("Horizontal walk jumping factor relative to actual horizontal movement (>= 1)"); - public final Property _walkJumpVerticalFactor = PositiveFactor("move.jump.walk.vertical.factor").comment("Vertical walk jumping factor relative to default jump height (>= 0)"); - - public final Property _runJump = Unmodified("move.jump.run").key("move.run.jump", _pre_sm_1_7).depends(_run, _jump).comment("To switch on/off jumping while running (Relevant only if nether \"move.run\" nor \"move.jump\" are false)").chapter(); - public final Property _runJumpHorizontalFactor = IncreasingFactor("move.jump.run.horizontal.factor").key("move.run.jump.horizontal.factor", _pre_sm_1_7).defaults(2F).comment("Horizontal run jumping factor relative to actual horizontal movement (>= 1)"); - public final Property _runJumpVerticalFactor = PositiveFactor("move.jump.run.vertical.factor").key("move.run.jump.vertical.factor", _pre_sm_1_7).comment("Vertical run jumping factor relative to default jump height (>= 0)"); - - public final Property _sprintJump = Unmodified("move.jump.sprint").key("move.sprint.jump", _pre_sm_1_7).depends(_sprint, _jump).comment("To switch on/off jumping while sprinting (Relevant only if nether \"move.sprint\" nor \"move.jump\" are false)").chapter(); - public final Property _sprintJumpHorizontalFactor = IncreasingFactor("move.jump.sprint.horizontal.factor").key("move.sprint.jump.horizontal.factor", _pre_sm_1_7).defaults(2F).comment("Horizontal sprint jumping factor relative to actual horizontal movement (>= 1)"); - public final Property _sprintJumpVerticalFactor = PositiveFactor("move.jump.sprint.vertical.factor").key("move.sprint.jump.vertical.factor", _pre_sm_1_7).comment("Vertical sprint jumping factor relative to default jump height (>= 0)"); - - - public final Property _jumpCharge = Unmodified("move.jump.charge").depends(_jump).comment("Relevant only if \"move.jump\" is not false").chapter("Charged jumping", "Below you find all charged jump specific options except those for exhaustion."); - public final Property _jumpChargeMaximum = Positive("move.jump.charge.maximum").defaults(20F).comment("Maximum jump charge (counts up one per tick) (>= 0)"); - public final Property _jumpChargeFactor = IncreasingFactor("move.jump.charge.factor").defaults(1.3F).comment("Jump speed factor when completely charged (>= 1)"); - public final Property _jumpChargeCancelOnSneakRelease = Modified("move.jump.charge.sneak.release.cancel").comment("To switch between charged jump and charge cancel on sneak button release while jump charging"); - - - public final Property _headJump = Unmodified("move.jump.head.charge").key("move.forward.jump.charge", _pre_sm_1_8) .depends(_jump).comment("Relevant only if \"move.jump\" is not false").chapter("Head jumping", "Below you find all head jump and fall specific options except those for exhaustion."); - public final Property _headJumpControlFactor = DecreasingFactor("move.jump.head.control.factor").key("move.forward.jump.control.factor", _pre_sm_1_8).defaults(0.2F).comment("Head jump control movement factor (>= 0, <= 1, relative to default air movement speed)"); - public final Property _headJumpChargeMaximum = Positive("move.jump.head.charge.maximum").key("move.forward.jump.charge.maximum", _pre_sm_1_8).defaults(10F).comment("Maximum head jump charge (counts up one per tick) (>= 0)"); - - public final Property _headFallDamageStartDistance = Positive("move.fall.head.damage.start.distance").key("move.forward.fall.damage.start.distance", _pre_sm_1_8).values(2F, 1F, 3F).comment("Distance in blocks to fall head ahead before suffering fall damage (>= 1, <= 3)").section(); - public final Property _headFallDamageFactor = IncreasingFactor("move.fall.head.damage.factor").key("move.forward.fall.damage.factor", _pre_sm_1_8).defaults(2F).comment("Damage factor applied to the remaining distance when impacting head ahead (>= 1)"); - - - public final Property _angleJumpSide = Unmodified("move.jump.angle.side").comment("To switch on/off side jumping").chapter("Side and Back jumping", "Below you find all side and back jump specific options except those for exhaustion."); - public final Property _angleJumpBack = Unmodified("move.jump.angle.back").comment("To switch on/off back jumping"); - public final Property _angleJumpHorizontalFactor = PositiveFactor("move.jump.angle.horizontal.factor").defaults(0.3F).defaults(0.4F, _sm_1_3).comment("Horizontal jump speed factor for side and back jumps (>= 0)"); - public final Property _angleJumpVerticalFactor = PositiveFactor("move.jump.angle.vertical.factor").defaults(0.2F).comment("Vertical jump speed factor for side and back jumps (>= 0)"); - - - public final Property _climbUpJump = Unmodified("move.jump.climb.up").comment("To switch on/off jumping up while climbing").chapter("Climb jumping", "Below you find all climb up jump specific options except those for exhaustion."); - public final Property _climbUpJumpVerticalFactor = DecreasingFactor("move.jump.climb.up.vertical.factor").comment("Vertical jump speed factor for jumping while climbing (>= 0, <= 1)"); - public final Property _climbUpJumpHandsOnlyVerticalFactor = DecreasingFactor("move.jump.climb.up.hands.only.vertical.factor").defaults(0.8F).comment("Additional vertical jump speed factor for jumping while climbing with hands only (>= 0, <= 1)"); - - - public final Property _climbBackUpJump = Unmodified("move.jump.climb.back.up").comment("To switch on/off jumping back while climbing").chapter("Climb back jumping", "Below you find all climb back jump specific options except those for exhaustion."); - public final Property _climbBackUpJumpVerticalFactor = DecreasingFactor("move.jump.climb.back.up.vertical.factor").defaults(0.2F).defaults(1F, _pre_sm_3_1).comment("Vertical jump speed factor for jumping back while climbing (>= 0, <= 1)"); - public final Property _climbBackUpJumpHorizontalFactor = DecreasingFactor("move.jump.climb.back.up.horizontal.factor").defaults(0.3F).defaults(1F, _pre_sm_3_1).comment("Horizontal jump speed factor for jumping back while climbing (>= 0, <= 1)"); - public final Property _climbBackUpJumpHandsOnlyVerticalFactor = DecreasingFactor("move.jump.climb.back.up.hands.only.vertical.factor").defaults(0.8F).comment("Additional vertical jump speed factor for jumping back while climbing with hands only (>= 0, <= 1)"); - public final Property _climbBackUpJumpHandsOnlyHorizontalFactor = DecreasingFactor("move.jump.climb.back.up.hands.only.horizontal.factor").comment("Additional horizontal jump speed factor for jumping back while climbing with hands only (>= 0, <= 1)"); - - - public final Property _climbBackHeadJump = Unmodified("move.jump.climb.back.head").comment("To switch on/off head jumping back while climbing").chapter("Climb back head jumping", "Below you find all climb back head jump specific options except those for exhaustion."); - public final Property _climbBackHeadJumpVerticalFactor = DecreasingFactor("move.jump.climb.back.head.vertical.factor").defaults(0.2F).defaults(1F, _pre_sm_3_1).comment("Additional vertical jump speed factor for head jumping back while climbing(>= 0, <= 1)"); - public final Property _climbBackHeadJumpHorizontalFactor = DecreasingFactor("move.jump.climb.back.head.horizontal.factor").defaults(0.3F).defaults(1F, _pre_sm_3_1).comment("Additional horizontal jump speed factor for head jumping back while climbing(>= 0, <= 1)"); - public final Property _climbBackHeadJumpHandsOnlyVerticalFactor = DecreasingFactor("move.jump.climb.back.head.hands.only.vertical.factor").defaults(0.8F).comment("Additional vertical jump speed factor for head jumping while climbing with hands only (>= 0, <= 1)"); - public final Property _climbBackHeadJumpHandsOnlyHorizontalFactor = DecreasingFactor("move.jump.climb.back.head.hands.only.horizontal.factor").comment("Additional horizontal jump speed factor for head jumping while climbing with hands only (>= 0, <= 1)"); - - - public final Property _wallUpJump = Unmodified("move.jump.wall").comment("To switch on/off wall jumping").chapter("Wall jumping", "Below you find all wall jump specific options except those for exhaustion."); - public final Property _wallUpJumpVerticalFactor = DecreasingFactor("move.jump.wall.vertical.factor").defaults(0.4F).comment("Vertical jump speed factor for wall jumping (>= 0, <= 1)"); - public final Property _wallUpJumpHorizontalFactor = DecreasingFactor("move.jump.wall.horizontal.factor").defaults(0.15F).comment("Horizontal jump speed factor for wall jumping (>= 0, <= 1)"); - public final Property _wallUpJumpFallMaximumDistance = Positive("move.jump.wall.fall.maximum.distance").defaults(2F).comment("Distance in blocks to fall to block all wall jumping attempts"); - public final Property _wallUpJumpOrthogonalTolerance = Positive("move.jump.wall.orthogonal.tolerance").defaults(5F).comment("Tolerance angle in degree for wall jumping orthogonally (>= 0, <= 45)"); - - - public final Property _wallHeadJump = Unmodified("move.jump.wall.head").comment("To switch on/off wall head jumping").chapter("Wall head jumping", "Below you find all wall head jump specific options except those for exhaustion."); - public final Property _wallHeadJumpVerticalFactor = DecreasingFactor("move.jump.wall.head.vertical.factor").defaults(0.3F).comment("Vertical jump speed factor for wall head jumping (>= 0, <= 1)"); - public final Property _wallHeadJumpHorizontalFactor = DecreasingFactor("move.jump.wall.head.horizontal.factor").defaults(0.15F).comment("Horizontal jump speed factor for wall head jumping (>= 0, <= 1)"); - public final Property _wallHeadJumpFallMaximumDistance = Positive("move.jump.wall.head.fall.maximum.distance").defaults(3F).min(_wallUpJumpFallMaximumDistance).comment("Distance in blocks to fall to block all wall head jumping attempts (>= \"move.jump.wall.fall.maximum.distance\")"); - - - private final Property _old_jumpExhaustion = Hard("move.jump.exhaustion", _pre_sm_1_7); - private final Property _old_jumpExhaustionGain = Positive("move.jump.exhaustion.gain", _pre_sm_1_7_post_1_0).key("move.exhaustion.jump.gain", _sm_1_0).defaults(40F).defaults(10F, _pre_sm_1_4); - private final Property _old_jumpExhaustionStop = Positive("move.jump.exhaustion.stop", _pre_sm_1_7_post_1_0).key("move.exhaustion.jump.stop", _sm_1_0).defaults(60F).defaults(100F, _pre_sm_1_4); - - private final Property _old_sneakJumpExhaustion = Hard("move.jump.sneak.exhaustion", _pre_sm_1_7_post_1_4).key("move.sneak.jump.exhaustion", _pre_sm_1_4); - private final Property _old_sneakJumpExhaustionGain = Positive("move.sneak.jump.exhaustion.gain", _pre_sm_1_7).down(45F, _old_jumpExhaustionGain).defaults(10F, _pre_sm_1_4); - private final Property _old_sneakJumpExhaustionStop = Positive("move.sneak.jump.exhaustion.stop", _pre_sm_1_7).up(55F, _old_jumpExhaustionStop).defaults(100F, _pre_sm_1_4); - - private final Property _old_runJumpExhaustion = Medium("move.jump.run.exhaustion", _pre_sm_1_7_post_1_4).key("move.run.jump.exhaustion", _pre_sm_1_4); - private final Property _old_runJumpExhaustionGain = Positive("move.run.jump.exhaustion.gain", _pre_sm_1_7).defaults(60F).defaults(20F, _pre_sm_1_4); - private final Property _old_runJumpExhaustionStop = Positive("move.run.jump.exhaustion.stop", _pre_sm_1_7).defaults(40F).defaults(100F, _pre_sm_1_4); - - private final Property _old_sprintJumpExhaustion = Medium("move.jump.sprint.exhaustion", _pre_sm_1_7_post_1_4).key("move.sprint.jump.exhaustion", _pre_sm_1_4); - private final Property _old_sprintJumpExhaustionGain = Positive("move.sprint.jump.exhaustion.gain", _pre_sm_1_7_post_1_0).key("move.exhaustion.sprint.jump.gain", _sm_1_0).up(65F, _old_runJumpExhaustionGain).defaults(20F, _pre_sm_1_4); - private final Property _old_sprintJumpExhaustionStop = Positive("move.sprint.jump.exhaustion.stop", _pre_sm_1_7_post_1_0).key("move.exhaustion.sprint.jump.stop", _sm_1_0).down(35F, _old_runJumpExhaustionStop).defaults(100F, _pre_sm_1_4); - - - public final Property _jumpExhaustion = Unmodified("move.jump.exhaustion").comment("To switch on/off jump exhaustion").chapter("Jump exhaustion", "Below you find the exhaustion options for the different jump types. At runtime all relevant options are combined together to form the specific exhaustion value"); - public final Property _jumpExhaustionGainFactor = PositiveFactor("move.jump.exhaustion.gain.factor").comment("To manipulate the exhaustion increase by a jump (>= 0)"); - public final Property _jumpExhaustionStopFactor = PositiveFactor("move.jump.exhaustion.stop.factor").comment("To manipulate maximum exhaustion to jump (>= 0)"); - - - public final Property _upJumpExhaustion = Unmodified("move.jump.up.exhaustion").depends(_jumpExhaustion).comment("To switch on/off up jump exhaustion").chapter(); - public final Property _upJumpExhaustionGainFactor = PositiveFactor("move.jump.up.exhaustion.gain.factor").comment("To manipulate the exhaustion increase by a jump up (>= 0)"); - public final Property _upJumpExhaustionStopFactor = PositiveFactor("move.jump.up.exhaustion.stop.factor").comment("To manipulate maximum exhaustion to jump up (>= 0)"); - - - public final Property _climbJumpExhaustion = Hard("move.jump.climb.exhaustion").depends(_jumpExhaustion).comment("To switch on/off climb jump exhaustion").chapter(); - public final Property _climbJumpExhaustionGainFactor = PositiveFactor("move.climb.jump.exhaustion.gain.factor").comment("To manipulate the exhaustion increase by jumping while climbing (>= 0)"); - public final Property _climbJumpExhaustionStopFactor = PositiveFactor("move.climb.jump.exhaustion.stop.factor").comment("To manipulate maximum exhaustion to jumping while climbing (>= 0)"); - - public final Property _climbJumpUpExhaustion = Unmodified("move.jump.climb.up.exhaustion").depends(_climbJumpExhaustion).comment("To switch on/off climb up jump exhaustion").section(); - public final Property _climbJumpUpExhaustionGainFactor = PositiveFactor("move.jump.climb.up.exhaustion.gain.factor").defaults(40F).defaults(1F, _pre_sm_3_1).comment("To manipulate the exhaustion increase by a jump up while climbing (>= 0)"); - public final Property _climbJumpUpExhaustionStopFactor = PositiveFactor("move.jump.climb.up.exhaustion.stop.factor").defaults(60F).defaults(1F, _pre_sm_3_1).comment("To manipulate maximum exhaustion to jump up while climbing (>= 0)"); - - public final Property _climbJumpBackUpExhaustion = Unmodified("move.jump.climb.back.up.exhaustion").depends(_climbJumpExhaustion).comment("To switch on/off climb back jump exhaustion").section(); - public final Property _climbJumpBackUpExhaustionGainFactor = PositiveFactor("move.jump.climb.back.up.exhaustion.gain.factor").defaults(40F).defaults(1F, _pre_sm_3_1).comment("To manipulate the exhaustion increase by a jump back while climbing (>= 0)"); - public final Property _climbJumpBackUpExhaustionStopFactor = PositiveFactor("move.jump.climb.back.up.exhaustion.stop.factor").defaults(60F).defaults(1F, _pre_sm_3_1).comment("To manipulate maximum exhaustion to jump back while climbing (>= 0)"); - - public final Property _climbJumpBackHeadExhaustion = Unmodified("move.jump.climb.back.head.exhaustion").depends(_climbJumpExhaustion).comment("To switch on/off back climb head jump exhaustion").section(); - public final Property _climbJumpBackHeadExhaustionGainFactor = PositiveFactor("move.jump.climb.back.head.exhaustion.gain.factor").defaults(20F).defaults(1F, _pre_sm_3_1).comment("To manipulate the exhaustion increase by a head jump back while climbing (>= 0)"); - public final Property _climbJumpBackHeadExhaustionStopFactor = PositiveFactor("move.jump.climb.back.head.exhaustion.stop.factor").defaults(80F).defaults(1F, _pre_sm_3_1).comment("To manipulate maximum exhaustion to head jump back while climbing (>= 0)"); - - - public final Property _angleJumpExhaustion = Unmodified("move.jump.angle.exhaustion").depends(_jumpExhaustion).comment("To switch on/off angle jump exhaustion").chapter(); - public final Property _angleJumpExhaustionGainFactor = PositiveFactor("move.jump.angle.exhaustion.gain.factor").comment("To manipulate the exhaustion increase by a jump to the side or back (>= 0)"); - public final Property _angleJumpExhaustionStopFactor = PositiveFactor("move.jump.angle.exhaustion.stop.factor").comment("To manipulate maximum exhaustion to jump to the side or back (>= 0)"); - - - public final Property _wallJumpExhaustion = Medium("move.jump.wall.exhaustion").depends(_jumpExhaustion).comment("To switch on/off wall jump exhaustion").chapter(); - public final Property _wallJumpExhaustionGainFactor = PositiveFactor("move.jump.wall.exhaustion.gain.factor").comment("To manipulate the exhaustion increase by a wall jump (>= 0)"); - public final Property _wallJumpExhaustionStopFactor = PositiveFactor("move.jump.wall.exhaustion.stop.factor").comment("To manipulate maximum exhaustion to wall jump (>= 0)"); - - public final Property _wallUpJumpExhaustion = Unmodified("move.jump.wall.up.exhaustion").depends(_wallJumpExhaustion).comment("To switch on/off wall up jump exhaustion").section(); - public final Property _wallUpJumpExhaustionGainFactor = PositiveFactor("move.jump.wall.up.exhaustion.gain.factor").defaults(40F).comment("To manipulate the exhaustion increase by a wall up jump (>= 0)"); - public final Property _wallUpJumpExhaustionStopFactor = PositiveFactor("move.jump.wall.up.exhaustion.stop.factor").defaults(60F).comment("To manipulate maximum exhaustion to wall up jump (>= 0)"); - - public final Property _wallHeadJumpExhaustion = Unmodified("move.jump.wall.head.exhaustion").depends(_wallJumpExhaustion).comment("To switch on/off wall head jump exhaustion").section(); - public final Property _wallHeadJumpExhaustionGainFactor = PositiveFactor("move.jump.wall.head.exhaustion.gain.factor").defaults(20F).comment("To manipulate the exhaustion increase by a wall head jump (>= 0)"); - public final Property _wallHeadJumpExhaustionStopFactor = PositiveFactor("move.jump.wall.head.exhaustion.stop.factor").defaults(80F).comment("To manipulate maximum exhaustion to wall head jump (>= 0)"); - - - public final Property _standJumpExhaustion = Hard("move.jump.stand.exhaustion").depends(_jumpExhaustion).source(_old_jumpExhaustion, _pre_sm_1_7).comment("To switch on/off stand jump exhaustion").chapter(); - public final Property _standJumpExhaustionGainFactor = PositiveFactor("move.jump.stand.exhaustion.gain.factor").defaults(40F).source(_old_jumpExhaustionGain, _pre_sm_1_7).comment("To manipulate the exhaustion increase by a jump while standing (>= 0)"); - public final Property _standJumpExhaustionStopFactor = PositiveFactor("move.jump.stand.exhaustion.stop.factor").defaults(60F).source(_old_jumpExhaustionStop, _pre_sm_1_7).comment("To manipulate maximum exhaustion to jump while standing (>= 0)"); - - public final Property _sneakJumpExhaustion = Hard("move.jump.sneak.exhaustion").depends(_jumpExhaustion).source(_old_sneakJumpExhaustion, _pre_sm_1_7).comment("To switch on/off sneak jump exhaustion").section(); - public final Property _sneakJumpExhaustionGainFactor = PositiveFactor("move.jump.sneak.exhaustion.gain.factor").up(40F, _standJumpExhaustionGainFactor).source(_old_sneakJumpExhaustionGain, _pre_sm_1_7).comment("To manipulate the exhaustion increase by a jump while sneaking (>= \"move.jump.stand.exhaustion.gain.factor\")"); - public final Property _sneakJumpExhaustionStopFactor = PositiveFactor("move.jump.sneak.exhaustion.stop.factor").down(60F, _standJumpExhaustionStopFactor).source(_old_sneakJumpExhaustionStop, _pre_sm_1_7).comment("To manipulate maximum exhaustion to jump while sneaking (>= 0, <= \"move.jump.stand.exhaustion.stop.factor\")"); - - public final Property _walkJumpExhaustion = Hard("move.jump.walkexhaustion").depends(_jumpExhaustion).source(_old_jumpExhaustion, _pre_sm_1_7).comment("To switch on/off walk jump exhaustion").section(); - public final Property _walkJumpExhaustionGainFactor = PositiveFactor("move.jump.walk.exhaustion.gain.factor").up(45F, _sneakJumpExhaustionGainFactor).source(_old_jumpExhaustionGain, _pre_sm_1_7).comment("To manipulate the exhaustion increase by a jump while walking (>= \"move.jump.sneak.exhaustion.gain.factor\")"); - public final Property _walkJumpExhaustionStopFactor = PositiveFactor("move.jump.walk.exhaustion.stop.factor").down(55F, _sneakJumpExhaustionStopFactor).source(_old_jumpExhaustionStop, _pre_sm_1_7).comment("To manipulate maximum exhaustion to jump while walking (>= 0, <= \"move.jump.sneak.exhaustion.stop.factor\")"); - - public final Property _runJumpExhaustion = Medium("move.jump.run.exhaustion").depends(_jumpExhaustion).source(_old_runJumpExhaustion, _pre_sm_1_7).comment("To switch on/off run jump exhaustion").section(); - public final Property _runJumpExhaustionGainFactor = PositiveFactor("move.jump.run.exhaustion.gain.factor").up(60F, _walkJumpExhaustionGainFactor).source(_old_runJumpExhaustionGain, _pre_sm_1_7).comment("To manipulate the exhaustion increase by a jump while running (>= \"move.jump.walk.exhaustion.gain.factor\")"); - public final Property _runJumpExhaustionStopFactor = PositiveFactor("move.jump.run.exhaustion.stop.factor").down(40F, _walkJumpExhaustionStopFactor).source(_old_runJumpExhaustionStop, _pre_sm_1_7).comment("To manipulate maximum exhaustion to jump while running (>= 0, <= \"move.jump.walk.exhaustion.stop.factor\")"); - - public final Property _sprintJumpExhaustion = Medium("move.jump.sprint.exhaustion").depends(_jumpExhaustion).source(_old_sprintJumpExhaustion, _pre_sm_1_7).comment("To switch on/off sprint jump exhaustion").section(); - public final Property _sprintJumpExhaustionGainFactor = PositiveFactor("move.jump.sprint.exhaustion.gain.factor").up(65F, _runJumpExhaustionGainFactor).source(_old_sprintJumpExhaustionGain, _pre_sm_1_7).comment("To manipulate the exhaustion increase by a jump while sprinting (>= \"move.jump.run.exhaustion.gain.factor\")"); - public final Property _sprintJumpExhaustionStopFactor = PositiveFactor("move.jump.sprint.exhaustion.stop.factor").down(35F, _runJumpExhaustionStopFactor).source(_old_sprintJumpExhaustionStop, _pre_sm_1_7).comment("To manipulate maximum exhaustion to jump while sprinting (>= 0, <= \"move.jump.run.exhaustion.stop.factor\")"); - - public final Property _jumpChargeExhaustion = Medium("move.jump.charge.exhaustion").depends(_jumpExhaustion).defaults(true, _pre_sm_1_11) .comment("To switch on/off up additional jump charge exhaustion").section(); - public final Property _jumpChargeExhaustionGainFactor = PositiveFactor("move.jump.charge.exhaustion.gain.factor").defaults(Value(30F)).comment("To manipulate the additional exhaustion for the higher jump (>= 0, is multiplied with the actual charge factor)"); - public final Property _jumpChargeExhaustionStopFactor = PositiveFactor("move.jump.charge.exhaustion.stop.factor").defaults(Value(30F)).comment("To manipulate the subtractional maximum exhaustion to jump higher (>= 0, is multiplied with the actual charge factor)"); - - public final Property _jumpSlideExhaustion = Medium("move.jump.slide.exhaustion").depends(_jumpExhaustion).defaults(true, _pre_sm_1_11).comment("To switch on/off slide jump exhaustion").section(); - public final Property _jumpSlideExhaustionGainFactor = PositiveFactor("move.jump.slide.exhaustion.gain.factor").defaults(Value(10F)).comment("To manipulate the exhaustion increase by a slide jump (>= 0)"); - public final Property _jumpSlideExhaustionStopFactor = PositiveFactor("move.jump.slide.exhaustion.stop.factor").defaults(Value(90F)).comment("To manipulate maximum exhaustion to slide jump (>= 0)"); - - - - public final Property _baseExhautionGainFactor = PositiveFactor("move.exhaustion.gain.factor").comment("Exhaustion gain base factor, set to '0' to disable exhaustion (>= 0)").book("Exhaustion", "Below you find the options for the continuous exhaustion gain/loss factors."); - public final Property _baseExhautionLossFactor = PositiveFactor("move.exhaustion.loss.factor").defaults(Value(1F).e(1.2F).h(0.8F)).defaults(1F, _pre_sm_1_5).comment("Exhaustion loss base factor (>= 0)"); - - public final Property _sprintingExhautionLossFactor = PositiveFactor("move.exhaustion.sprint.loss.factor").defaults(0F).comment("Smart sprinting exhaustion loss factor (>= 0)").section(); - public final Property _runningExhautionLossFactor = PositiveFactor("move.exhaustion.run.loss.factor").up(0.5F, _sprintingExhautionLossFactor).comment("Standard sprinting exhaustion loss factor while (>= 0, >= \"move.exhaustion.sprint.loss.factor\")"); - public final Property _walkingExhautionLossFactor = PositiveFactor("move.exhaustion.walk.loss.factor").up(1F, _runningExhautionLossFactor).comment("Walking exhaustion loss factor (>= 0, >= \"move.exhaustion.run.loss.factor\")"); - public final Property _sneakingExhautionLossFactor = PositiveFactor("move.exhaustion.sneak.loss.factor").up(1.5F, _walkingExhautionLossFactor).defaults(1F, _sm_1_1).comment("Sneaking exhaustion loss factor (>= 0, >= \"move.exhaustion.walk.loss.factor\")"); - public final Property _standingExhautionLossFactor = PositiveFactor("move.exhaustion.stand.loss.factor").up(2F, _sneakingExhautionLossFactor.maximum(1F)).comment("Standing exhaustion loss factor (>= 1, >= \"move.exhaustion.sneak.loss.factor\")"); - public final Property _fallExhautionLossFactor = PositiveFactor("move.exhaustion.fall.loss.factor").up(2.5F, _standingExhautionLossFactor).comment("Falling exhaustion loss factor (>= \"move.exhaustion.stand.loss.factor\")"); - - public final Property _ceilClimbingExhaustionLossFactor = PositiveFactor("move.exhaustion.climb.ceiling.loss.factor").comment("Ceiling climbing exhaustion loss factor (>= 0)").section(); - public final Property _climbingExhaustionLossFactor = PositiveFactor("move.exhaustion.climb.loss.factor").comment("Climbing exhaustion loss factor (>= 0)"); - public final Property _crawlingExhaustionLossFactor = PositiveFactor("move.exhaustion.crawl.loss.factor").comment("Crawling exhaustion loss factor (>= 0)"); - public final Property _dippingExhaustionLossFactor = PositiveFactor("move.exhaustion.dip.loss.factor").comment("Water walking exhaustion loss factor (>= 0)"); - public final Property _swimmingExhaustionLossFactor = PositiveFactor("move.exhaustion.swim.loss.factor").comment("Swimming exhaustion loss factor (>= 0)"); - public final Property _divingExhaustionLossFactor = PositiveFactor("move.exhaustion.dive.loss.factor").comment("Diving exhaustion loss factor (>= 0)"); - public final Property _normalExhaustionLossFactor = PositiveFactor("move.exhaustion.normal.loss.factor").comment("Normal movement exhaustion loss factor (>= 0)"); - - public final Property _exhaustionLossHunger = Unmodified("move.exhaustion.hunger").comment("Whether exhaustion loss increases hunger").section(); - public final Property _exhaustionLossHungerFactor = PositiveFactor("move.exhaustion.hunger.factor").defaults(Value(0.05F).e(0.02F).h(0.08F)).defaults(0.05F, _pre_sm_1_5).comment("How much hunger is generated for exhaustion loss (>= 0)"); - public final Property _exhaustionLossFoodLevelMinimum = Positive("move.exhaustion.food.minimum").defaults(4F).comment("Until which food level exhaustion is continuously reduced"); - - - - public final Property _hungerGain = Medium("move.hunger.gain").comment("To switch on/off hunger generation").book("Hunger", "Below you find all hunger gain options."); - public final Property _baseHungerGainFactor = PositiveFactor("move.hunger.gain.factor").defaults(Value(1F).e(0.8F).h(1.2F)).defaults(1F, _pre_sm_1_5).comment("Hunger generation base factor (>= 0)"); - - public final Property _sprintingHungerGainFactor = PositiveFactor("move.hunger.sprint.gain.factor").key("move.hunger.gain.sprint.factor", _pre_sm_1_3).comment("Smart sprinting hunger generation factor (>= 0)").section(); - public final Property _runningHungerGainFactor = PositiveFactor("move.hunger.run.gain.factor").key("move.hunger.gain.run.factor", _pre_sm_1_3).defaults(10F).comment("Standard sprinting hunger generation factor (>= 0)"); - public final Property _walkingHungerGainFactor = PositiveFactor("move.hunger.walk.gain.factor").key("move.hunger.gain.walk.factor", _pre_sm_1_3).comment("Standard speed movement hunger generation factor (>= 0)"); - public final Property _sneakingHungerGainFactor = PositiveFactor("move.hunger.sneak.gain.factor").key("move.hunger.gain.sneak.factor", _pre_sm_1_3).comment("Sneaking hunger generation factor (>= 0)"); - public final Property _standingHungerGainFactor = PositiveFactor("move.hunger.stand.gain.factor").defaults(0F).comment("Sneaking hunger generation factor (>= 0)"); - - public final Property _climbingHungerGainFactor = PositiveFactor("move.hunger.climb.gain.factor").key("move.hunger.gain.climb.factor", _pre_sm_1_3).comment("Climbing hunger generation factor (>= 0)").section(); - public final Property _crawlingHungerGainFactor = PositiveFactor("move.hunger.crawl.gain.factor").key("move.hunger.gain.crawl.factor", _pre_sm_1_3).comment("Crawling hunger generation factor (>= 0)"); - public final Property _ceilClimbingHungerGainFactor = PositiveFactor("move.hunger.climb.gain.ceiling.factor").key("move.hunger.gain.climb.ceiling.factor", _pre_sm_1_3).comment("Ceiling climbing hunger generation factor (>= 0)"); - public final Property _swimmingHungerGainFactor = PositiveFactor("move.hunger.swim.gain.factor").key("move.hunger.gain.swim.factor", _pre_sm_1_3).defaults(1.5F).comment("Swimming hunger generation factor (>= 0)"); - public final Property _divingHungerGainFactor = PositiveFactor("move.hunger.dive.gain.factor").key("move.hunger.gain.dive.factor", _pre_sm_1_3).defaults(1.5F).comment("Diving hunger generation factor (>= 0)"); - public final Property _dippingHungerGainFactor = PositiveFactor("move.hunger.dip.gain.factor").key("move.hunger.gain.dip.factor", _pre_sm_1_3).defaults(1.5F).comment("Water walking hunger generation factor (>= 0)"); - public final Property _normalHungerGainFactor = PositiveFactor("move.hunger.normal.gain.factor").key("move.hunger.gain.ground.factor", _pre_sm_1_3).comment("Normal movement hunger generation factor (>= 0)"); - - public final Property _alwaysHungerGain = Positive("move.hunger.always.gain").defaults(Value(0F).h(0.005F)).defaults(0F, _pre_sm_1_5).comment("Basic hunger per tick (>= 0)").section(); - - - - public final Property _usageSpeedFactor = DecreasingFactor("move.usage.speed.factor").defaults(0.2F).comment("Speed factor while using an item, if not defined otherwise (>= 0 AND <= 1)").book("Item Usage", "Below you find the options to manipulate the speed factors additionally applied while using an item."); - public final Property _usageSwordSpeedFactor = DecreasingFactor("move.usage.sword.speed.factor").defaults(_usageSpeedFactor).comment("Speed factor while blocking with a sword (>= 0 AND <= 1, defaults to \"move.usage.speed.factor\" when not present)"); - public final Property _usageBowSpeedFactor = DecreasingFactor("move.usage.bow.speed.factor").defaults(_usageSpeedFactor).comment("Speed factor while pulling back a bow (>= 0 AND <= 1, defaults to \"move.usage.speed.factor\" when not present)"); - public final Property _usageFoodSpeedFactor = DecreasingFactor("move.usage.food.speed.factor").defaults(_usageSpeedFactor).comment("Speed factor while eating food (>= 0 AND <= 1, defaults to \"move.usage.speed.factor\" when not present)"); - - public final Property _sprintDuringItemUsage = Modified("move.usage.sprint").comment("To switch on/off generic sprinting while using an item").section(); - - - - public final Property _replaceRopeClimbing = Unmodified("move.mod.rope.replace.climb.rope").comment("Whether to replace the rope climbing of mod pack 'Ropes+'").book("Mod compatibility", "Below you find the options to manipulate how Smart Moving should interact with other mods"); - - - - public final Property _survivalConfigKeys = Strings("move.config.survival.keys").singular().defaults(new String[]{"e", "m", "h"}).comment("A list of survival option configuration keys, entries seperated by ','").book("Configuration Management", "Below you find the options to define multiple configuration option sets"); - public final Property _survivalDefaultConfigKey = String("move.config.survival.keys.default").singular().defaults("m").comment("The option configuration to start the next minecraft survival game with (can also be modified via in-game option configuration toggling)"); - - public final Property _creativeConfigKeys = Strings("move.config.creative.keys").singular().defaults(new String[]{"c"}).defaults(new String[0], _pre_sm_2_3).comment("A list of creative option configuration keys, entries seperated by ','").section(); - public final Property _creativeDefaultConfigKey = String("move.config.creative.keys.default").singular().defaults("c").defaults("", _pre_sm_2_3).comment("The option configuration to start the next minecraft creative game with (can also be modified via in-game option configuration toggling)"); - - public final Property _adventureConfigKeys = Strings("move.config.adventure.keys").singular().defaults(new String[]{"e", "m", "h"}).comment("A list of adventure option configuration keys, entries seperated by ','").section(); - public final Property _adventureDefaultConfigKey = String("move.config.adventure.keys.default").singular().defaults("m").comment("The option configuration to start the next minecraft adventure game with (can also be modified via in-game option configuration toggling)"); - - public final Property _configKeyName = String("move.config.key.name").defaults(Value((String)null).e("Easy").m("Medium").h("Hard")).comment("The display names of the option configuration keys").section(); - - - - public final Property _serverConfig = Modified("move.server.config").singular().comment("Whether the players on this server should be forced to use the configurations on this server").book("Server Management", "Below you find the options to manage your server"); - - public final Property> _survivalDefaultConfigUserKeys = StringMap("move.server.config.survival.user.keys").singular().comment("The option configuration to start the player's next minecraft survival game with (can also be modified via in-game option configuration toggling)").section(); - public final Property> _creativeDefaultConfigUserKeys = StringMap("move.server.config.creative.user.keys").singular().comment("The option configuration to start the player's next minecraft creative game with (can also be modified via in-game option configuration toggling)"); - public final Property> _adventureDefaultConfigUserKeys = StringMap("move.server.config.adventure.user.keys").singular().comment("The option configuration to start the player's next minecraft adventure game with (can also be modified via in-game option configuration toggling)"); - public final Property> _speedUsersExponents = IntegerMap("move.server.speed.user.exponents").singular().comment("The user specific exponents for in-game speed manipulation"); - - public final Property _globalConfig = Modified("move.global.config").key("move.config.overwrite", _pre_sm_3_0).key("move.config.send", _pre_sm_2_2).singular().depends(_serverConfig).comment("Whether all players on this server should be forced to use the same global configuration (Relevant only if \"move.server.config\" is true)").section(); - - public final Property _usersWithChangeConfigRights = Strings("move.global.config.right.user.names").singular().comment("The names of the users that have the right to change the global configuraton in-game, entries seperated by ','").section(); - public final Property _usersWithChangeSpeedRights = Strings("move.global.speed.right.user.names").singular().comment("The names of the users that have the right to change the global speed in-game, entries seperated by ','"); - - - - public void changeSpeed(int difference) - { - _speedUserExponent.setValue(_speedUserExponent.value + difference); - } - - public boolean isUserSpeedEnabled() - { - return enabled && _speedUser.value; - } - - public boolean isUserSpeedAlwaysDefault() - { - return !_speedUser.value || _speedUserFactor.value == 1F; - } - - public float getUserSpeedFactor() - { - if(isUserSpeedAlwaysDefault() || _speedUserExponent.value == 0) - return 1F; - return (float)Math.pow(1F + _speedUserFactor.value, _speedUserExponent.value); - } - - protected void loadFromProperties(Properties properties) - { - try - { - load(properties); - } - catch(Exception e) - { - throw new RuntimeException("Could not load Smart Moving properties from properties", e); - } - } - - protected void writeToProperties(Properties properties, List> except) - { - try - { - write(properties); - - if(except != null) - for(int i = 0; i < except.size(); i++) - { - String key = except.get(i).getCurrentKey(); - if(key != null) - properties.remove(key); - } - } - catch(Exception e) - { - throw new RuntimeException("Could not write Smart Moving properties to properties", e); - } - } - - protected void loadFromOptionsFile(File optionsPath) - { - Properties slcs_properties = new Properties(_slcs, new File(optionsPath, _smartLadderClimbingSpeedPropertiesFileName)); - Properties sc_properties = new Properties(_sc, new File(optionsPath, _smartClimbingPropertiesFileName)); - Properties sm_cs_properties = new Properties(new File(optionsPath, _smartMovingClientServerPropertiesFileName)); - Properties properties = new Properties(new File(optionsPath, _smartMovingPropertiesFileName)); - - try - { - load(properties, sm_cs_properties, sc_properties, slcs_properties); - } - catch(Exception e) - { - throw new RuntimeException("Could not load Smart Moving properties from file", e); - } - } - - protected void saveToOptionsFile(File optionsPath) - { - try - { - save(new File(optionsPath, _smartMovingPropertiesFileName), _sm_current, true, true); - } - catch(Exception e) - { - throw new RuntimeException("Could not save Smart Moving properties to file", e); - } - } - - @Override - protected void printHeader(PrintWriter printer) - { - printer.println("#######################################################################"); - printer.println("#"); - printer.println("# Smart Moving mod configuration file"); - printer.println("# -----------------------------------"); - printer.println("#"); - printer.println("# Modify the values behind the keys in this file to configure the"); - printer.println("# Smart Moving behavior as you like it."); - printer.println("#"); - printer.println("# * All options you leave at their default value will be automatically"); - printer.println("# updated when the default value is updated with a new version of"); - printer.println("# Smart Moving options."); - printer.println("#"); - printer.println("# * All options you modify will stay the same over the upgrade cycles"); - printer.println("# as long as they still fall in the allowed range."); - printer.println("#"); - printer.println("# * The character '!' will be used after the value's text's end to"); - printer.println("# mark a value that has originally been modified but became the"); - printer.println("# default value at some point in the update process to avoid it being"); - printer.println("# updated too with the next default value change."); - printer.println("#"); - printer.println("# * The '!' mark can also be used to create a 'modified' and so not"); - printer.println("# automatically updated value identical to the current default value"); - printer.println("#"); - printer.println("# Additionally you can create multiple option configurations and define"); - printer.println("# separate option values for each configuration."); - printer.println("#"); - printer.println("# * key-value separator is ':'"); - printer.println("# * key-value-pair separator is ';'"); - printer.println("# * a value without key will become the default value"); - printer.println("#"); - printer.println("#######################################################################"); - printer.println(); - } - - @Override - protected void printVersion(PrintWriter printer, String version, boolean comments) - { - if(comments) - printer.println("# The current version of this Smart Moving options file"); - - printer.print("move.options.version"); - printer.print(":"); - printer.print(version); - printer.println(); - } - - private static Property Creative(String key, String... versions) - { - return Modified(key, versions).defaults(Value(false).c(true)); - } - - private static Property Hard(String key, String... versions) - { - return Modified(key, versions).defaults(Value(false).h(true)).defaults(false, _pre_sm_1_5); - } - - private static Property Medium(String key, String... versions) - { - return Unmodified(key, versions).defaults(Value(true).e(false)).defaults(true, _pre_sm_1_5); - } - - protected final static int Unknown = -1; - protected final static int Survival = 0; - protected final static int Creative = 1; - protected final static int Adventure = 2; - - public Object getSpeedPercent() - { - float factor = getUserSpeedFactor() * 100F; - int fraction = 0; - while(factor < 100F) - { - fraction++; - factor *= 10F; - } - - int significant = Math.round(factor); - BigDecimal decimal = new BigDecimal(significant); - while(fraction-- > 0) - decimal = decimal.divide(ten); - return formatter.format(decimal); - } - - private final static DecimalFormat formatter = new DecimalFormat("0.############################################################"); - private final static BigDecimal ten = new BigDecimal(10); - public final static Object defaultSpeedPercent = "100"; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingOptions.java b/src/main/java/net/smart/moving/config/SmartMovingOptions.java deleted file mode 100644 index eadcd225..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingOptions.java +++ /dev/null @@ -1,391 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -import java.io.*; -import java.lang.reflect.*; - -import net.minecraft.client.*; -import net.minecraft.client.gui.*; -import net.minecraft.client.multiplayer.*; -import net.minecraft.client.resources.*; -import net.minecraft.client.settings.*; -import net.minecraft.util.*; -import net.minecraft.world.WorldSettings.*; - -import net.smart.moving.*; -import net.smart.properties.*; -import net.smart.utilities.*; - -public class SmartMovingOptions extends SmartMovingClientConfig -{ - public final Property _localUserHasChangeConfigRight = Unmodified("move.global.config.right.local.user").comment("Whether the current local user has the right to change the global configuration in-game (despite of the names listed in \"move.global.config.right.user.names\"").section(); - public final Property _localUserHasChangeSpeedRight = Unmodified("move.global.speed.right.local.user").comment("Whether the current local user has the right to change the global speed in-game (despite of the names listed in \"move.global.config.right.user.names\""); - - - - public final Property _perspectiveFadeFactor = PositiveFactor("move.perspective.fade.factor").values(0.5F, 0.1F, 1F).comment("Fading speed factor between the different perspectives (>= 0.1, <= 1, set to '1' to switch off)").book("Viewpoint perspective", "Below you find the options to manipulate the viewpoint perspective"); - public final Property _perspectiveRunFactor = Float("move.perspective.run.factor").key("move.run.perspective.factor", _pre_sm_2_1).defaults(1F).comment("Standard sprinting perspective (set to '0' to switch off)"); - public final Property _perspectiveSprintFactor = Float("move.perspective.sprint.factor").key("move.sprint.perspective.factor", _pre_sm_2_1).defaults(1.5F).comment("Smart on ground sprinting perspective (set to '0' to switch off)"); - - - - public final Property _angleJumpDoubleClickTicks = Positive("move.jump.angle.double.click.ticks").singular().up(3F, 2F).comment("The maximum number of ticks between two clicks to trigger a side or back jump (>= 2)").book("User interface", "Below you find the options to manipulate Smart Moving's user interface"); - - public final Property _wallJumpDoubleClick = Unmodified("move.jump.wall.double.click").singular().comment("Whether wall jumping should be triggered by single or double clicking (and then press and holding) the jump button").section(); - public final Property _wallJumpDoubleClickTicks = Positive("move.jump.wall.double.click.ticks").singular().up(3F, 2F).comment("The maximum number of ticks between two clicks to trigger a wall jump (>= 2, depends on \"move.jump.wall.double.click\")"); - - public final Property _climbJumpBackHeadOnGrab = Unmodified("move.jump.climb.back.head.on.grab").singular().comment("Whether pressing or not pressing the grab button while climb jumping back results in a head jump").section(); - - public final Property _displayExhaustionBar = Unmodified("move.gui.exhaustion.bar").singular().comment("Whether to display the exhaustion bar in the game overlay").section(); - public final Property _displayJumpChargeBar = Unmodified("move.gui.jump.charge.bar").singular().comment("Whether to display the jump charge bar in the game overlay"); - - public final Property _sneakToggle = Modified("move.sneak.toggle").comment("To switch on/off sneak toggling").section(); - public final Property _crawlToggle = Modified("move.crawl.toggle").comment("To switch on/off crawl toggling"); - - public final Property _flyCloseToGround = Modified("move.fly.ground.close").comment("To switch on/off flying close to the ground").section(); - public final Property _flyWhileOnGround = Modified("move.fly.ground.collide").depends(_flyCloseToGround).comment("To switch on/off flying while colliding with the grond (Relevant only if \"move.fly.ground.close\" is true)"); - - public final Property _flyControlVertical = Unmodified("move.fly.control.vertical").comment("Whether flying control also depends on where the player looks vertically.").section(); - public final Property _diveControlVertical = Unmodified("move.dive.control.vertical").comment("Whether diving control also depends on where the player looks vertically."); - - private final Property _old_toggleKeyCode = Integer("move.toggle.key", _pre_sm_1_7).singular().defaults(67); - private final Property _defaultConfigToggleKeyName = String("move.config.toggle.default.key.name").key("move.toggle.key.name", _pre_sm_3_2).singular().defaults("F9").source(_old_toggleKeyCode.toKeyName(), _pre_sm_1_7).singular().comment("Key name to toggle Smart Moving features in-game (default: \"F9\")").section(); - private final Property _defaultGrabKeyName = String("move.grab.default.key.name").singular().defaults("LCONTROL").singular().comment("Default key name to \"grab\" (default: \"LCONTROL\")"); - private final Property _speedIncreaseKeyName = String("move.speed.increase.default.key.name").key("move.speed.increase.key.name", _pre_sm_3_2).singular().defaults("O").singular().comment("Key name to increase the moving speed ingame (default: \"O\")"); - private final Property _speedDecreaseKeyName = String("move.speed.decrease.default.key.name").key("move.speed.decrease.key.name", _pre_sm_3_2).singular().defaults("I").singular().comment("Key name to decrease the moving speed ingame (default: \"I\")"); - - public final Property _defaultConfigToggleKeyCode = _defaultConfigToggleKeyName.toKeyCode(67); - public final Property _defaultGrabKeyCode = _defaultGrabKeyName.toKeyCode(29); - public final Property _defaultSpeedIncreaseKeyCode = _speedIncreaseKeyName.toKeyCode(24); - public final Property _defaultSpeedDecreaseKeyCode = _speedDecreaseKeyName.toKeyCode(23); - - - - public final Property _configChat = Unmodified("move.config.chat").singular().comment("To switch on/off option status messages via chat system").book("Message Management", "Below you find the options to define in which case Smart Moving should write messages about its current behavior to the ingame chat"); - public final Property _configChatInit = Unmodified("move.config.chat.init").depends(_configChat).singular().comment("To switch on/off the initial option status message when starting a game (Relevant only if \"move.config.chat\" is not false)"); - public final Property _configChatInitHelp = Unmodified("move.config.chat.init.help").depends(_configChatInit).singular().comment("To switch on/off the initial option help message (Relevant only if \"move.config.chat.init\" is not false and no improved keybinding GUI (Minecraft Forge or the Macros/Keybind mod) is installed)"); - public final Property _configChatServer = Unmodified("move.config.chat.server").depends(_configChat).singular().comment("To switch on/off the server config overridden status message when joining a multiplayer game (Relevant only if \"move.config.chat\" is not false)"); - - public final Property _speedChat = Unmodified("move.speed.chat").singular().comment("To switch on/off speed messages via chat system").section(); - public final Property _speedChatInit = Unmodified("move.speed.chat.init").depends(_speedChat).singular().comment("To switch on/off the intial speed message when starting a game (Relevant only if \"move.speed.chat\" is not false)"); - public final Property _speedChatInitHelp = Unmodified("move.speed.chat.init.help").depends(_speedChatInit).singular().comment("To switch on/off the initial speed help message (Relevant only if \"move.speed.chat.init\" is not false and no improved keybinding GUI (Minecraft Forge or the Macros/Keybind mod) is installed))"); - public final Property _speedChatServer = Unmodified("move.config.chat.server").depends(_speedChat).singular().comment("To switch on/off the server speed change message when joining a multiplayer game (Relevant only if \"move.speed.chat\" is not false)"); - - - public KeyBinding keyBindGrab; - public KeyBinding keyBindConfigToggle; - public KeyBinding keyBindSpeedIncrease; - public KeyBinding keyBindSpeedDecrease; - - public static final File optionsPath = net.minecraft.client.Minecraft.getMinecraft().mcDataDir; - - public SmartMovingOptions() - { - loadFromOptionsFile(optionsPath); - saveToOptionsFile(optionsPath); - - keyBindGrab = new KeyBinding("key.climb", _defaultGrabKeyCode.value, "key.categories.gameplay"); - keyBindConfigToggle = new KeyBinding("key.config.toggle", _defaultConfigToggleKeyCode.value, "key.categories.smartmoving"); - keyBindSpeedIncrease = new KeyBinding("key.speed.increase", _defaultSpeedIncreaseKeyCode.value, "key.categories.smartmoving"); - keyBindSpeedDecrease = new KeyBinding("key.speed.decrease", _defaultSpeedDecreaseKeyCode.value, "key.categories.smartmoving"); - } - - public boolean isSneakToggleEnabled() - { - return _sneakToggle.value && enabled; - } - - public boolean isCrawlToggleEnabled() - { - return _crawlToggle.value && enabled; - } - - public int angleJumpDoubleClickTicks() - { - return (int)Math.ceil(_angleJumpDoubleClickTicks.value); - } - - public int wallJumpDoubleClickTicks() - { - return (int)Math.ceil(_wallJumpDoubleClickTicks.value); - } - - @Override - public void toggle() - { - super.toggle(); - if(_configChat.value) - writeClientConfigMessageToChat(false); - - Property defaultKey = null; - switch(gameType) - { - default: - case Survival: - defaultKey = _survivalDefaultConfigKey; - break; - case Creative: - defaultKey = _creativeDefaultConfigKey; - break; - case Adventure: - defaultKey = _adventureDefaultConfigKey; - break; - } - - if(defaultKey != null) - { - String currentKey = getCurrentKey(); - defaultKey.setValue(currentKey); - saveToOptionsFile(optionsPath); - } - } - - @Override - public void changeSpeed(int difference) - { - super.changeSpeed(difference); - writeClientSpeedMessageToChat(false); - saveToOptionsFile(optionsPath); - } - - private void writeClientConfigMessageToChat(boolean everyone) - { - String prefix = getClientEveryonePrefix("move.config.chat.client", everyone); - if(SmartMovingContext.Config.enabled) - { - String name = SmartMovingContext.Config._configKeyName.value; - if(name.isEmpty()) - name = null; - - boolean unnamed = name == null; - if(unnamed) - name = getCurrentKey(); - - if(name == SmartMovingProperties.Enabled || (unnamed && getKeyCount() == 1)) - writeToChat(prefix + "enabled", SmartMovingInfo.ConfigChatId); - else - writeToChat(prefix + (unnamed ? "unnamed" : "named"), SmartMovingInfo.ConfigChatId, new Object[] { name }); - } - else - writeToChat(prefix + "disabled", SmartMovingInfo.ConfigChatId); - } - - public void writeClientSpeedMessageToChat(boolean everyone) - { - if(!_speedChat.value) - return; - - Object percent = SmartMovingContext.Config.getSpeedPercent(); - String prefix = getClientEveryonePrefix("move.speed.chat.client", everyone); - String key = prefix + (percent.equals(SmartMovingConfig.defaultSpeedPercent) ? "reset" : "change"); - writeToChat(key, SmartMovingInfo.SpeedChatId, percent); - } - - private static String getClientEveryonePrefix(String base, boolean everyone) - { - String result = base + "."; - if(everyone) - result += "everyone."; - return result; - } - - public void writeServerConfigMessageToChat() - { - if(!_configChatServer.value) - return; - - if(SmartMovingContext.Config.enabled) - { - String configName = SmartMovingContext.Config._configKeyName.value; - if(configName != null && !configName.isEmpty()) - writeToChat("move.config.chat.server.global.named", SmartMovingInfo.DefaultChatId, configName); - else - writeToChat("move.config.chat.server.global.unnamed", SmartMovingInfo.DefaultChatId); - } - else - writeToChat("move.config.chat.server.disable", SmartMovingInfo.DefaultChatId); - } - - public void writeServerReconfigMessageToChat(boolean wasEnabled, String username, boolean everyone) - { - if(Minecraft.getMinecraft().thePlayer.getGameProfile().getName().equals(username)) - writeClientConfigMessageToChat(everyone); - else if(_configChatServer.value) - { - if(SmartMovingContext.Config.enabled) - { - String configname = SmartMovingContext.Config._configKeyName.value; - boolean hasConfigName = configname != null && !configname.isEmpty(); - if(wasEnabled) - if(hasConfigName) - if(username != null) - writeToChat("move.config.chat.server.update.named.user", SmartMovingInfo.ConfigChatId, configname, username); - else - writeToChat("move.config.chat.server.update.named", SmartMovingInfo.ConfigChatId, configname); - else - if(username != null) - writeToChat("move.config.chat.server.update.unnamed.user", SmartMovingInfo.ConfigChatId, username); - else - writeToChat("move.config.chat.server.update.unnamed", SmartMovingInfo.ConfigChatId); - else - if(hasConfigName) - if(username != null) - writeToChat("move.config.chat.server.update.named.user", SmartMovingInfo.ConfigChatId, configname, username); - else - writeToChat("move.config.chat.server.update.named", SmartMovingInfo.ConfigChatId, configname); - else - if(username != null) - writeToChat("move.config.chat.server.enable.user", SmartMovingInfo.ConfigChatId, username); - else - writeToChat("move.config.chat.server.enable", SmartMovingInfo.ConfigChatId); - } - else if(wasEnabled) - if(username != null) - writeToChat("move.config.chat.server.disable.user", SmartMovingInfo.ConfigChatId, username); - else - writeToChat("move.config.chat.server.disable", SmartMovingInfo.ConfigChatId); - } - } - - public void writeServerDeconfigMessageToChat() - { - if(_configChatServer.value) - writeToChat("move.config.chat.server.local", SmartMovingInfo.DefaultChatId); - } - - public void writeServerSpeedMessageToChat(String username, boolean everyone) - { - if(Minecraft.getMinecraft().thePlayer.getGameProfile().getName().equals(username)) - writeClientSpeedMessageToChat(everyone); - else if(_speedChatServer.value) - { - Object percent = SmartMovingContext.Config.getSpeedPercent(); - String prefix = "move.speed.chat.server."; - if(percent.equals(SmartMovingConfig.defaultSpeedPercent)) - writeToChat(prefix + "reset", SmartMovingInfo.SpeedChatId, username); - else - writeToChat(prefix + "change", SmartMovingInfo.SpeedChatId, percent, username); - } - } - - public static void writeNoRightsToChangeConfigMessageToChat(boolean isRemote) - { - writeToChat("move.config.chat.server.illegal." + (isRemote ? "remote" : "local"), SmartMovingInfo.ConfigChatId); - } - - public static void writeNoRightsToChangeSpeedMessageToChat(boolean isRemote) - { - writeToChat("move.speed.chat.server.illegal." + (isRemote ? "remote" : "local"), SmartMovingInfo.SpeedChatId); - } - - private static void writeToChat(String key, int id, Object... parameters) - { - String message = parameters == null || parameters.length == 0 - ? I18n.format(key) - : I18n.format(key, parameters); - - GuiNewChat guiChat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); - - // bugfix: also delete multi-lined chat messages - if(id != 0) - for(int i=0; i<5; i++) - guiChat.deleteChatLine(id); - - guiChat.printChatMessageWithOptionalDeletion(new ChatComponentText(message), id); - } - - public static void initialize(boolean redPowerWiring, boolean buildCraftTransportation, boolean finiteLiquid, boolean betterThanWolves, boolean singlePlayerCommands, boolean ropesPlus, boolean aSGrapplingHook, boolean betterMisc) - { - hasRedPowerWire = redPowerWiring; - hasBuildCraftTransportation = buildCraftTransportation; - hasFiniteLiquid = finiteLiquid; - hasBetterThanWolves = betterThanWolves; - hasSinglePlayerCommands = singlePlayerCommands; - hasRopesPlus = ropesPlus; - hasASGrapplingHook = aSGrapplingHook; - hasBetterMisc = betterMisc; - } - - public void resetForNewGame() - { - gameType = -1; - } - - public void initializeForGameIfNeccessary() - { - PlayerControllerMP controller = Minecraft.getMinecraft().playerController; - if(controller == null) - return; - - int currentGameType = ((GameType)Reflect.GetField(_currentGameType, controller)).getID(); - if(currentGameType == gameType) - return; - - gameType = currentGameType; - - String[] keys = null; - String defaultKey = null; - - switch(gameType) - { - case Survival: - keys = _survivalConfigKeys.value; - defaultKey = _survivalDefaultConfigKey.value; - break; - case Creative: - keys = _creativeConfigKeys.value; - defaultKey = _creativeDefaultConfigKey.value; - break; - case Adventure: - keys = _adventureConfigKeys.value; - defaultKey = _adventureDefaultConfigKey.value; - break; - default: - defaultKey = ""; - } - - setKeys(keys); - if(!defaultKey.isEmpty()) - setCurrentKey(defaultKey); - - if(_configChatInit.value) - writeClientConfigMessageToChat(false); - - if(isUserSpeedEnabled() && _speedChatInit.value) - { - Object speedPercent = getSpeedPercent(); - - if(!speedPercent.equals(defaultSpeedPercent)) - writeToChat("move.speed.chat.client.init", SmartMovingInfo.DefaultChatId, speedPercent); - } - } - - public static boolean hasRedPowerWire = false; - public static boolean hasBuildCraftTransportation = false; - public static boolean hasFiniteLiquid = false; - public static boolean hasBetterThanWolves = false; - public static boolean hasSinglePlayerCommands = false; - public static boolean hasRopesPlus = false; - public static boolean hasASGrapplingHook = false; - public static boolean hasBetterMisc = false; - - public int gameType; - - private static Field _currentGameType = Reflect.GetField(PlayerControllerMP.class, SmartMovingInstall.PlayerControllerMP_currentGameType); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingProperties.java b/src/main/java/net/smart/moving/config/SmartMovingProperties.java deleted file mode 100644 index 98f4ef0b..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -import java.io.*; -import java.util.*; - -import net.smart.properties.*; -import net.smart.properties.Properties; - -public abstract class SmartMovingProperties extends Properties -{ - public final static String Enabled = "enabled"; - public final static String Disabled = "disabled"; - private final static String[] _defaultKeys = new String[1]; - - private int toggler = -2; - private String[] keys = _defaultKeys; - - public boolean enabled; - - protected void load(Properties... propertiesList) throws Exception - { - List> propertiesToLoad = getProperties(); - if(toggler != -2) - { - Iterator> iterator = propertiesToLoad.iterator(); - while(iterator.hasNext()) - iterator.next().reset(); - } - - while (propertiesToLoad.size() > 0) - { - Iterator> iterator = propertiesToLoad.iterator(); - while(iterator.hasNext()) - if(iterator.next().load(propertiesList)) - iterator.remove(); - } - - toggler = 0; - update(); - } - - protected void save(File file, String version, boolean header, boolean comments) throws Exception - { - List> propertiesToSave = getProperties(); - - FileOutputStream stream = new FileOutputStream(file); - PrintWriter printer = new PrintWriter(stream); - - if(header) - printHeader(printer); - - if(version != null) - printVersion(printer, version, comments); - - for(int i = 0; i < propertiesToSave.size(); i++) - if(propertiesToSave.get(i).print(printer, keys, version, comments) && i < propertiesToSave.size() - 1) - printer.println(); - - printer.close(); - } - - protected abstract void printVersion(PrintWriter printer, String version, boolean comments); - - protected abstract void printHeader(PrintWriter printer); - - public void toggle() - { - int length = keys == null ? 0 : keys.length; - toggler++; - if(toggler == length) - toggler = -1; - update(); - } - - public void setKeys(String[] keys) - { - if(keys == null || keys.length == 0) - keys = _defaultKeys; - this.keys = keys; - toggler = 0; - update(); - } - - public String getKey(int index) - { - if(keys[index] == null) - return Enabled; - return keys[index]; - } - - public String getNextKey(String key) - { - if(key == null || key.equals("disabled")) - return getKey(0); - int index; - for(index = 0; index < keys.length; index++) - if(key.equals(keys[index])) - break; - index++; - if(index < keys.length) - return keys[index]; - return Disabled; - } - - public void setCurrentKey(String key) - { - if(key == null || key.equals(Disabled)) - toggler = -1; - else if(keys.length == 1 && keys[0] == null && key.equals(Enabled)) - toggler = 0; - else - { - for(toggler = 0; toggler < keys.length; toggler++) - if(key.equals(keys[toggler])) - break; - - if(toggler == keys.length) - toggler = -1; - } - update(); - } - - public String getCurrentKey() - { - if(toggler == -1) - return Disabled; - return keys[toggler]; - } - - public boolean hasKey(String key) - { - if(Enabled.equals(key)) - return keys[0] == null; - if(Disabled.equals(key)) - return true; - - for(int i = 0; i < keys.length; i++) - if(key == null && keys[i] == null || key != null && key.equals(keys[i])) - return true; - return false; - } - - public int getKeyCount() - { - return keys.length; - } - - protected void update() - { - List> properties = getProperties(); - Iterator> iterator = properties.iterator(); - - String currentKey = getCurrentKey(); - while(iterator.hasNext()) - iterator.next().update(currentKey); - enabled = toggler != -1; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingServerConfig.java b/src/main/java/net/smart/moving/config/SmartMovingServerConfig.java deleted file mode 100644 index 90017fa7..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingServerConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -import java.util.Iterator; - -import net.smart.properties.*; - -public class SmartMovingServerConfig extends SmartMovingClientConfig -{ - private Properties properties = new Properties(); - private Properties topProperties = new Properties(); - - public void loadFromProperties(String[] propertyArray, boolean top) - { - for(int i = 0; i < propertyArray.length - 1; i += 2) - { - String key = propertyArray[i]; - String value = propertyArray[i + 1]; - properties.put(key, value); - if(top) - topProperties.put(key, value); - } - - load(top); - } - - public void load(boolean top) - { - if(!top && !topProperties.isEmpty()) - { - Iterator iterator = topProperties.keySet().iterator(); - while(iterator.hasNext()) - { - Object topKey = iterator.next(); - properties.put(topKey, topProperties.get(topKey)); - } - } - super.loadFromProperties(properties); - } - - public void reset() - { - properties.clear(); - topProperties.clear(); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/config/SmartMovingServerOptions.java b/src/main/java/net/smart/moving/config/SmartMovingServerOptions.java deleted file mode 100644 index 6e1512b9..00000000 --- a/src/main/java/net/smart/moving/config/SmartMovingServerOptions.java +++ /dev/null @@ -1,214 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.config; - -import java.io.*; -import java.util.*; - -import cpw.mods.fml.common.*; - -import net.smart.moving.*; -import net.smart.properties.*; -import net.smart.properties.Properties; - -public class SmartMovingServerOptions -{ - public final SmartMovingConfig config; - public final File optionsPath; - private final Property> _userConfigKeys; - - public SmartMovingServerOptions(SmartMovingConfig config, File optionsPath, int gameType) - { - this.config = config; - this.optionsPath = optionsPath; - - config.loadFromOptionsFile(optionsPath); - config.saveToOptionsFile(optionsPath); - - Property configKey = null; - Property configKeys = null; - switch(gameType) - { - default: - case SmartMovingConfig.Survival: - configKey = config._survivalDefaultConfigKey; - configKeys = config._survivalConfigKeys; - _userConfigKeys = config._survivalDefaultConfigUserKeys; - break; - case SmartMovingConfig.Creative: - configKey = config._creativeDefaultConfigKey; - configKeys = config._creativeConfigKeys; - _userConfigKeys = config._creativeDefaultConfigUserKeys; - break; - case SmartMovingConfig.Adventure: - configKey = config. _adventureDefaultConfigKey; - configKeys = config._adventureConfigKeys; - _userConfigKeys = config._adventureDefaultConfigUserKeys; - break; - } - - config.setKeys(configKeys.value); - config.setCurrentKey(configKey != null && !configKey.value.isEmpty() ? configKey.value : null); - - logConfigState(config, null, false); - } - - public void toggle(IEntityPlayerMP player) - { - config.toggle(); - config.saveToOptionsFile(optionsPath); - logConfigState(config, player.getUsername(), true); - } - - public void changeSpeed(int difference, IEntityPlayerMP player) - { - config.changeSpeed(difference); - config.saveToOptionsFile(optionsPath); - logSpeedState(config, player.getUsername()); - } - - private static void logConfigState(SmartMovingConfig config, String username, boolean reconfig) - { - String message = "Smart Moving "; - if(config._globalConfig.value) - { - if(!reconfig) - FMLLog.info(message + "overrides client configurations"); - - String postfix = getPostfix(username); - - if(config.enabled) - { - String currentKey = config.getCurrentKey(); - - message += reconfig ? "changed to " : "uses "; - if(currentKey == null) - FMLLog.info(message + "default server configuration" + postfix); - else - { - String configName = config._configKeyName.value; - - message += "server configuration "; - if(configName.isEmpty()) - FMLLog.info(message + "with key \"" + currentKey + "\"" + postfix); - else - FMLLog.info(message + "\"" + configName + "\"" + postfix); - } - } - else - FMLLog.info(message + "disabled" + postfix); - } - else - FMLLog.info(message + "allows client configurations"); - } - - private static void logSpeedState(SmartMovingConfig config, String username) - { - FMLLog.info("Smart Moving speed set to " + config.getSpeedPercent() + "%" + getPostfix(username)); - } - - private static String getPostfix(String username) - { - if(username == null) - return ""; - return " by user '" + username + "'"; - } - - public String[] writeToProperties() - { - return writeToProperties(null, null); - } - - public String[] writeToProperties(IEntityPlayerMP mp, String key) - { - if(key == null ? !config.enabled : key == SmartMovingProperties.Disabled) - return new String[] { config._globalConfig.getCurrentKey(), config._globalConfig.getValueString() }; - - Properties properties = new Properties(); - config.write(properties, key); - - String[] result = new String[properties.size() * 2]; - Iterator> keys = properties.entrySet().iterator(); - - String speedUserExponentKey = mp != null ? config._speedUserExponent.getCurrentKey() : null; - int i = 0; - while(keys.hasNext()) - { - Map.Entry entry = keys.next(); - String propertyKey = result[i++] = entry.getKey().toString(); - if(mp != null && propertyKey.equals(speedUserExponentKey)) - { - Integer userExponent = config._speedUsersExponents.value.get(mp.getUsername()); - if(userExponent != null) - entry.setValue(config._speedUserExponent.getValueString(userExponent)); - } - result[i++] = entry.getValue().toString(); - } - return result; - } - - public void changeSingleSpeed(IEntityPlayerMP player, int difference) - { - Integer exponent = getPlayerSpeedExponent(player); - if(exponent == null) - exponent = config._speedUserExponent.value; - - exponent += difference; - setPlayerSpeedExponent(player, exponent); - } - - public Integer getPlayerSpeedExponent(IEntityPlayerMP player) - { - return config._speedUsersExponents.value.get(player.getUsername()); - } - - public synchronized void setPlayerSpeedExponent(IEntityPlayerMP player, Integer exponent) - { - config._speedUsersExponents.value.put(player.getUsername(), exponent); - config.saveToOptionsFile(optionsPath); - } - - public String[] writeToProperties(IEntityPlayerMP player, boolean toggle) - { - String key = getPlayerConfigurationKey(player); - if(key == null || !config.hasKey(key)) - { - key = config.getCurrentKey(); - setPlayerConfigurationKey(player, key); - } - - if(toggle) - { - key = config.getNextKey(key); - setPlayerConfigurationKey(player, key); - } - - return writeToProperties(player, key); - } - - public String getPlayerConfigurationKey(IEntityPlayerMP player) - { - return _userConfigKeys.value.get(player.getUsername()); - } - - public synchronized void setPlayerConfigurationKey(IEntityPlayerMP player, String key) - { - _userConfigKeys.value.put(player.getUsername(), key); - config.saveToOptionsFile(optionsPath); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/playerapi/SmartMoving.java b/src/main/java/net/smart/moving/playerapi/SmartMoving.java deleted file mode 100644 index 7d064656..00000000 --- a/src/main/java/net/smart/moving/playerapi/SmartMoving.java +++ /dev/null @@ -1,47 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.playerapi; - -import net.minecraft.client.entity.*; -import net.minecraft.entity.player.*; -import net.smart.moving.*; - -public abstract class SmartMoving -{ - public static final String SPC_ID = "Single Player Commands"; - - public static void register() - { - SmartMovingPlayerBase.registerPlayerBase(); - SmartMovingServerPlayerBase.registerPlayerBase(); - } - - public static IEntityPlayerSP getPlayerBase(EntityPlayer entityPlayer) - { - if(entityPlayer instanceof EntityPlayerSP) - return SmartMovingPlayerBase.getPlayerBase((EntityPlayerSP)entityPlayer); - return null; - } - - public static IEntityPlayerMP getServerPlayerBase(EntityPlayer entityPlayer) - { - if(entityPlayer instanceof EntityPlayerMP) - return SmartMovingServerPlayerBase.getPlayerBase(entityPlayer); - return null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/playerapi/SmartMovingFactory.java b/src/main/java/net/smart/moving/playerapi/SmartMovingFactory.java deleted file mode 100644 index 85f7dfe3..00000000 --- a/src/main/java/net/smart/moving/playerapi/SmartMovingFactory.java +++ /dev/null @@ -1,45 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.playerapi; - -import net.minecraft.entity.player.*; - -import net.smart.moving.*; - -public class SmartMovingFactory extends net.smart.moving.SmartMovingFactory -{ - public static void initialize() - { - if(!isInitialized()) - new SmartMovingFactory(); - } - - @Override - protected net.smart.moving.SmartMoving doGetInstance(EntityPlayer entityPlayer) - { - net.smart.moving.SmartMoving moving = super.doGetInstance(entityPlayer); - if(moving != null) - return moving; - - IEntityPlayerSP playerBase = SmartMoving.getPlayerBase(entityPlayer); - if(playerBase != null) - return playerBase.getMoving(); - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/playerapi/SmartMovingPlayerBase.java b/src/main/java/net/smart/moving/playerapi/SmartMovingPlayerBase.java deleted file mode 100644 index bf2d2a3b..00000000 --- a/src/main/java/net/smart/moving/playerapi/SmartMovingPlayerBase.java +++ /dev/null @@ -1,283 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.playerapi; - -import api.player.client.*; - -import net.minecraft.block.material.*; -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.entity.player.EntityPlayer.*; -import net.minecraft.nbt.*; - -import net.smart.moving.*; - -public class SmartMovingPlayerBase extends ClientPlayerBase implements IEntityPlayerSP -{ - public static void registerPlayerBase() - { - ClientPlayerAPI.register(SmartMovingInfo.ModName, SmartMovingPlayerBase.class); - } - - public static SmartMovingPlayerBase getPlayerBase(EntityPlayerSP player) - { - return (SmartMovingPlayerBase)((IClientPlayerAPI)player).getClientPlayerBase(SmartMovingInfo.ModName); - } - - public SmartMovingPlayerBase(ClientPlayerAPI playerApi) - { - super(playerApi); - moving = new SmartMovingSelf(player, this); - } - - @Override - public void beforeMoveEntity(double d, double d1, double d2) - { - moving.beforeMoveEntity(d, d1, d2); - } - - @Override - public void afterMoveEntity(double d, double d1, double d2) - { - moving.afterMoveEntity(d, d1, d2); - } - - @Override - public void localMoveEntity(double d, double d1, double d2) - { - super.moveEntity(d, d1, d2); - } - - @Override - public void beforeSleepInBedAt(int i, int j, int k) - { - moving.beforeSleepInBedAt(i, j, k); - } - - @Override - public EnumStatus localSleepInBedAt(int i, int j, int k) - { - return super.sleepInBedAt(i, j, k); - } - - @Override - public float getBrightness(float f) - { - return moving.getBrightness(f); - } - - @Override - public float localGetBrightness(float f) - { - return super.getBrightness(f); - } - - @Override - public int getBrightnessForRender(float f) - { - return moving.getBrightnessForRender(f); - } - - @Override - public int localGetBrightnessForRender(float f) - { - return super.getBrightnessForRender(f); - } - - @Override - public boolean pushOutOfBlocks(double d, double d1, double d2) - { - return moving.pushOutOfBlocks(d, d1, d2); - } - - @Override - public void beforeOnUpdate() - { - moving.beforeOnUpdate(); - } - - @Override - public void afterOnUpdate() - { - moving.afterOnUpdate(); - } - - @Override - public void beforeOnLivingUpdate() - { - moving.beforeOnLivingUpdate(); - } - - @Override - public void afterOnLivingUpdate() - { - moving.afterOnLivingUpdate(); - } - - @Override - public boolean getSleepingField() - { - return playerAPI.getSleepingField(); - } - - @Override - public boolean getIsInWebField() - { - return playerAPI.getIsInWebField(); - } - - @Override - public void setIsInWebField(boolean newIsInWeb) - { - playerAPI.setIsInWebField(newIsInWeb); - } - - @Override - public boolean getIsJumpingField() - { - return playerAPI.getIsJumpingField(); - } - - @Override - public Minecraft getMcField() - { - return playerAPI.getMcField(); - } - - @Override - public void moveEntityWithHeading(float f, float f1) - { - moving.moveEntityWithHeading(f, f1); - } - - @Override - public boolean canTriggerWalking() - { - return moving.canTriggerWalking(); - } - - @Override - public boolean isOnLadder() - { - return moving.isOnLadderOrVine(); - } - - @Override - public SmartMovingSelf getMoving() - { - return moving; - } - - @Override - public void updateEntityActionState() - { - moving.updateEntityActionState(false); - } - - @Override - public void localUpdateEntityActionState() - { - super.updateEntityActionState(); - } - - @Override - public void setIsJumpingField(boolean flag) - { - playerAPI.setIsJumpingField(flag); - } - - @Override - public void setMoveForwardField(float f) - { - player.moveForward = f; - } - - @Override - public void setMoveStrafingField(float f) - { - player.moveStrafing = f; - } - - @Override - public boolean isInsideOfMaterial(Material material) - { - return moving.isInsideOfMaterial(material); - } - - @Override - public boolean localIsInsideOfMaterial(Material material) - { - return super.isInsideOfMaterial(material); - } - - @Override - public void writeEntityToNBT(NBTTagCompound nBTTagCompound) - { - moving.writeEntityToNBT(nBTTagCompound); - } - - @Override - public void localWriteEntityToNBT(NBTTagCompound nBTTagCompound) - { - super.writeEntityToNBT(nBTTagCompound); - } - - @Override - public boolean isSneaking() - { - return moving.isSneaking(); - } - - @Override - public boolean localIsSneaking() - { - return super.isSneaking(); - } - - @Override - public float getFOVMultiplier() - { - return moving.getFOVMultiplier(); - } - - @Override - public float localGetFOVMultiplier() - { - return playerAPI.localGetFOVMultiplier(); - } - - @Override - public void beforeSetPositionAndRotation(double d, double d1, double d2, float f, float f1) - { - moving.beforeSetPositionAndRotation(); - } - - @Override - public void beforeGetSleepTimer() - { - moving.beforeGetSleepTimer(); - } - - @Override - public void jump() - { - moving.jump(); - } - - public SmartMovingSelf moving; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/playerapi/SmartMovingSelf.java b/src/main/java/net/smart/moving/playerapi/SmartMovingSelf.java deleted file mode 100644 index ae9f4a40..00000000 --- a/src/main/java/net/smart/moving/playerapi/SmartMovingSelf.java +++ /dev/null @@ -1,75 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.playerapi; - -import java.lang.reflect.*; - -import api.player.client.*; - -import net.minecraft.client.entity.*; -import net.minecraft.entity.player.*; - -import net.smart.moving.config.*; -import net.smart.utilities.*; - -public class SmartMovingSelf extends net.smart.moving.SmartMovingSelf -{ - public SmartMovingSelf(EntityPlayer sp, SmartMovingPlayerBase playerBase) - { - super(sp, playerBase); - } - - @Override - public boolean doFlyingAnimation() - { - return SmartMovingOptions.hasSinglePlayerCommands && isSPCFlying(esp) || super.doFlyingAnimation(); - } - - public static boolean isSPCFlying(EntityPlayerSP entityPlayer) - { - if(!SmartMovingOptions.hasSinglePlayerCommands) - return false; - - ClientPlayerBase spcPlayerBase = ((IClientPlayerAPI)entityPlayer).getClientPlayerBase(SmartMoving.SPC_ID); - if(spcPlayerBase == null) - return false; - - if(playerHelperField == null) - playerHelperField = Reflect.GetField(spcPlayerBase.getClass(), new Name("ph"), false); - if(playerHelperField == null) - return false; - - Object playerHelper = Reflect.GetField(playerHelperField, spcPlayerBase); - if(playerHelper == null) - return false; - - if(flyingField == null) - flyingField = Reflect.GetField(playerHelper.getClass(), new Name("flying"), false); - if(flyingField == null) - return false; - - Object isFlying = Reflect.GetField(flyingField, playerHelper); - if(isFlying == null) - return false; - - return isFlying instanceof Boolean && (Boolean)isFlying; - } - - private static Field playerHelperField = null; - private static Field flyingField = null; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/playerapi/SmartMovingServerPlayerBase.java b/src/main/java/net/smart/moving/playerapi/SmartMovingServerPlayerBase.java deleted file mode 100644 index 489f9c52..00000000 --- a/src/main/java/net/smart/moving/playerapi/SmartMovingServerPlayerBase.java +++ /dev/null @@ -1,267 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.playerapi; - -import io.netty.buffer.*; - -import java.util.*; - -import cpw.mods.fml.common.network.internal.*; - -import api.player.server.*; - -import net.smart.moving.*; -import net.smart.utilities.*; -import net.minecraft.entity.*; -import net.minecraft.util.*; - -public class SmartMovingServerPlayerBase extends ServerPlayerBase implements IEntityPlayerMP -{ - public static void registerPlayerBase() - { - ServerPlayerAPI.register(SmartMovingInfo.ModName, SmartMovingServerPlayerBase.class); - } - - public static SmartMovingServerPlayerBase getPlayerBase(Object player) - { - return (SmartMovingServerPlayerBase)((IServerPlayerAPI)player).getServerPlayerBase(SmartMovingInfo.ModName); - } - - public SmartMovingServerPlayerBase(ServerPlayerAPI playerApi) - { - super(playerApi); - moving = new SmartMovingServer(this, false); - } - - @Override - public float getHeight() - { - return player.height; - } - - @Override - public double getMinY() - { - return player.boundingBox.minY; - } - - @Override - public void setMaxY(double maxY) - { - player.boundingBox.maxY = maxY; - } - - @Override - public void afterSetPosition(double d, double d1, double d2) - { - moving.afterSetPosition(d, d1, d2); - } - - @Override - public void beforeIsPlayerSleeping() - { - moving.beforeIsPlayerSleeping(); - } - - @Override - public void beforeOnUpdate() - { - moving.beforeOnUpdate(); - } - - @Override - public void afterOnUpdate() - { - moving.afterOnUpdate(); - } - - @Override - public void beforeOnLivingUpdate() - { - moving.beforeOnLivingUpdate(); - } - - @Override - public void afterOnLivingUpdate() - { - moving.afterOnLivingUpdate(); - } - - @Override - public float doGetHealth() - { - return player.getHealth(); - } - - @Override - public AxisAlignedBB getBox() - { - return player.boundingBox; - } - - @Override - public AxisAlignedBB expandBox(AxisAlignedBB box, double x, double y, double z) - { - return box.expand(x, y, z); - } - - @Override - public List getEntitiesExcludingPlayer(AxisAlignedBB box) - { - return player.worldObj.getEntitiesWithinAABBExcludingEntity(player, box); - } - - @Override - public boolean isDeadEntity(Entity entity) - { - return entity.isDead; - } - - @Override - public void onCollideWithPlayer(Entity entity) - { - entity.onCollideWithPlayer(player); - } - - @Override - public float getEyeHeight() - { - return player.height - 0.18F; - } - - @Override - public boolean isEntityInsideOpaqueBlock() - { - return moving.isEntityInsideOpaqueBlock(); - } - - @Override - public boolean localIsEntityInsideOpaqueBlock() - { - return super.isEntityInsideOpaqueBlock(); - } - - @Override - public void addExhaustion(float exhaustion) - { - moving.addExhaustion(exhaustion); - } - - @Override - public void localAddExhaustion(float exhaustion) - { - super.addExhaustion(exhaustion); - } - - @Override - public void addMovementStat(double x, double y, double z) - { - moving.addMovementStat(x, y, z); - } - - @Override - public void localAddMovementStat(double x, double y, double z) - { - super.addMovementStat(x, y, z); - } - - @Override - public void localPlaySound(String soundId, float volume, float pitch) - { - player.playSound(soundId, volume, pitch); - } - - @Override - public void beforeUpdatePotionEffects() - { - moving.afterAddMovingHungerBatch(); - } - - @Override - public void afterUpdatePotionEffects() - { - moving.beforeAddMovingHungerBatch(); - } - - @Override - public boolean isSneaking() - { - return moving.isSneaking(); - } - - @Override - public boolean localIsSneaking() - { - return playerAPI.localIsSneaking(); - } - - @Override - public void setHeight(float height) - { - player.height = height; - } - - @Override - public void sendPacket(byte[] data) - { - player.playerNetServerHandler.sendPacket(new FMLProxyPacket(Unpooled.wrappedBuffer(data), SmartMovingPacketStream.Id)); - } - - @Override - public String getUsername() - { - return player.getGameProfile().getName(); - } - - @Override - public void resetFallDistance() - { - player.fallDistance = 0; - player.motionY = 0.08; - } - - @Override - public void resetTicksForFloatKick() - { - Reflect.SetField(net.minecraft.network.NetHandlerPlayServer.class, player.playerNetServerHandler, SmartMovingInstall.NetServerHandler_ticksForFloatKick, 0); - } - - @Override - public void sendPacketToTrackedPlayers(FMLProxyPacket packet) - { - player.mcServer.worldServerForDimension(player.dimension).getEntityTracker().func_151247_a(player, packet); - } - - @Override - public SmartMovingServer getMoving() - { - return moving; - } - - @Override - public IEntityPlayerMP[] getAllPlayers() - { - List playerEntityList = player.mcServer.getConfigurationManager().playerEntityList; - IEntityPlayerMP[] result = new IEntityPlayerMP[playerEntityList.size()]; - for(int i=0; i. -// ================================================================== - -package net.smart.moving.render; - -public interface IModelPlayer -{ - SmartMovingModel getMovingModel(); - - void superAnimateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superApplyAnimationOffsets(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void superAnimateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/IRenderPlayer.java b/src/main/java/net/smart/moving/render/IRenderPlayer.java deleted file mode 100644 index f5abdc68..00000000 --- a/src/main/java/net/smart/moving/render/IRenderPlayer.java +++ /dev/null @@ -1,43 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -import net.minecraft.client.entity.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.*; - -public interface IRenderPlayer -{ - void superRenderRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks); - - void superRenderRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2); - - void superRenderRenderPlayerAt(AbstractClientPlayer entityplayer, double d, double d1, double d2); - - void superRenderRenderName(EntityLivingBase par1EntityPlayer, double par2, double par4, double par6); - - RenderManager getRenderManager(); - - IModelPlayer getPlayerModelBipedMain(); - - IModelPlayer getPlayerModelArmorChestplate(); - - IModelPlayer getPlayerModelArmor(); - - IModelPlayer[] getPlayerModels(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/ModelPlayer.java b/src/main/java/net/smart/moving/render/ModelPlayer.java deleted file mode 100644 index 77c84c8f..00000000 --- a/src/main/java/net/smart/moving/render/ModelPlayer.java +++ /dev/null @@ -1,168 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -public class ModelPlayer extends net.smart.render.ModelPlayer implements IModelPlayer -{ - private final SmartMovingModel model; - - public ModelPlayer(float f) - { - super(f); - - model = new SmartMovingModel(this, this); - } - - @Override - public SmartMovingModel getMovingModel() - { - return model; - } - - @Override - public void animateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateHeadRotation(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateSleeping(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateRiding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateLeftArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateRightArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateWorkingBody(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateWorkingArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateSneaking(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void animateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateHeadRotation(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateSleeping(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateRiding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateLeftArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateRightArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateWorkingBody(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateWorkingArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateSneaking(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superApplyAnimationOffsets(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.animateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/RenderPlayer.java b/src/main/java/net/smart/moving/render/RenderPlayer.java deleted file mode 100644 index c7f7a402..00000000 --- a/src/main/java/net/smart/moving/render/RenderPlayer.java +++ /dev/null @@ -1,121 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -import net.minecraft.client.entity.*; -import net.minecraft.client.model.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.*; - -public class RenderPlayer extends net.smart.render.RenderPlayer implements IRenderPlayer -{ - public RenderPlayer() - { - render = new SmartMovingRender(this); - } - - @Override - public net.smart.render.IModelPlayer createModel(ModelBiped existing, float f) - { - return new ModelPlayer(f); - } - - @Override - public void doRender(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - render.renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void superRenderRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - super.doRender(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - protected void rotateCorpse(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - render.rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void superRenderRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - super.rotateCorpse(entityplayer, totalTime, actualRotation, f2); - } - - @Override - protected void renderLivingAt(AbstractClientPlayer entityplayer, double d, double d1, double d2) - { - render.renderPlayerAt(entityplayer, d, d1, d2); - } - - @Override - public void superRenderRenderPlayerAt(AbstractClientPlayer entityplayer, double d, double d1, double d2) - { - super.renderLivingAt(entityplayer, d, d1, d2); - } - - @Override - protected void passSpecialRender(EntityLivingBase par1EntityLiving, double par2, double par4, double par6) - { - render.renderName(par1EntityLiving, par2, par4, par6); - } - - @Override - public void superRenderRenderName(EntityLivingBase par1EntityLiving, double par2, double par4, double par6) - { - super.passSpecialRender(par1EntityLiving, par2, par4, par6); - } - - @Override - public RenderManager getRenderManager() - { - return renderManager; - } - - @Override - public IModelPlayer getPlayerModelBipedMain() - { - return (ModelPlayer)super.getModelBipedMain(); - } - - @Override - public IModelPlayer getPlayerModelArmorChestplate() - { - return (ModelPlayer)super.getModelArmorChestplate(); - } - - @Override - public IModelPlayer getPlayerModelArmor() - { - return (ModelPlayer)super.getModelArmor(); - } - - @Override - public IModelPlayer[] getPlayerModels() - { - if(allIModelPlayers == null) - allIModelPlayers = new IModelPlayer[] { getPlayerModelBipedMain(), getPlayerModelArmorChestplate(), getPlayerModelArmor() }; - return allIModelPlayers; - } - - private IModelPlayer[] allIModelPlayers; - - private final SmartMovingRender render; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/SmartMovingModel.java b/src/main/java/net/smart/moving/render/SmartMovingModel.java deleted file mode 100644 index 4ec3ec82..00000000 --- a/src/main/java/net/smart/moving/render/SmartMovingModel.java +++ /dev/null @@ -1,798 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -import net.minecraft.block.*; -import net.minecraft.client.model.*; -import net.minecraft.util.*; -import net.smart.moving.*; -import net.smart.render.*; - -public class SmartMovingModel extends SmartRenderContext -{ - public IModelPlayer imp; - public ModelBiped mp; - public net.smart.render.SmartRenderModel md; - - public SmartMovingModel(net.smart.render.IModelPlayer md, IModelPlayer imp) - { - this.imp = imp; - this.md = md.getRenderModel(); - this.mp = this.md.mp; - - if(SmartMovingRender.CurrentMainModel != null) - { - isClimb = SmartMovingRender.CurrentMainModel.isClimb; - isClimbJump = SmartMovingRender.CurrentMainModel.isClimbJump; - handsClimbType = SmartMovingRender.CurrentMainModel.handsClimbType; - feetClimbType = SmartMovingRender.CurrentMainModel.feetClimbType; - isHandsVineClimbing = SmartMovingRender.CurrentMainModel.isHandsVineClimbing; - isFeetVineClimbing = SmartMovingRender.CurrentMainModel.isFeetVineClimbing; - isCeilingClimb = SmartMovingRender.CurrentMainModel.isCeilingClimb; - isSwim = SmartMovingRender.CurrentMainModel.isSwim; - isDive = SmartMovingRender.CurrentMainModel.isDive; - isCrawl = SmartMovingRender.CurrentMainModel.isCrawl; - isCrawlClimb = SmartMovingRender.CurrentMainModel.isCrawlClimb; - isJump = SmartMovingRender.CurrentMainModel.isJump; - isHeadJump = SmartMovingRender.CurrentMainModel.isHeadJump; - isSlide = SmartMovingRender.CurrentMainModel.isSlide; - isFlying = SmartMovingRender.CurrentMainModel.isFlying; - isLevitate = SmartMovingRender.CurrentMainModel.isLevitate; - isFalling = SmartMovingRender.CurrentMainModel.isFalling; - isGenericSneaking = SmartMovingRender.CurrentMainModel.isGenericSneaking; - isAngleJumping = SmartMovingRender.CurrentMainModel.isAngleJumping; - angleJumpType = SmartMovingRender.CurrentMainModel.angleJumpType; - isRopeSliding = SmartMovingRender.CurrentMainModel.isRopeSliding; - - currentHorizontalSpeedFlattened = SmartMovingRender.CurrentMainModel.currentHorizontalSpeedFlattened; - smallOverGroundHeight = SmartMovingRender.CurrentMainModel.smallOverGroundHeight; - overGroundBlock = SmartMovingRender.CurrentMainModel.overGroundBlock; - } - } - - @SuppressWarnings("unused") - private void setRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - final float FrequenceFactor = 0.6662F; - - isStandard = false; - - float currentCameraAngle = md.currentCameraAngle; - float currentHorizontalAngle = md.currentHorizontalAngle; - float currentVerticalAngle = md.currentVerticalAngle; - float forwardRotation = md.forwardRotation; - float currentVerticalSpeed = md.currentVerticalSpeed; - float totalVerticalDistance = md.totalVerticalDistance; - float totalDistance = md.totalDistance; - double horizontalDistance = md.horizontalDistance; - float currentSpeed = md.currentSpeed; - if(!Float.isNaN(currentHorizontalSpeedFlattened)) - currentHorizontalSpeed = currentHorizontalSpeedFlattened; - - ModelRotationRenderer bipedOuter = md.bipedOuter; - ModelRotationRenderer bipedTorso = md.bipedTorso; - ModelRotationRenderer bipedBody = md.bipedBody; - ModelRotationRenderer bipedBreast = md.bipedBreast; - ModelRotationRenderer bipedHead = md.bipedHead; - ModelRotationRenderer bipedRightShoulder = md.bipedRightShoulder; - ModelRotationRenderer bipedRightArm = md.bipedRightArm; - ModelRotationRenderer bipedLeftShoulder = md.bipedLeftShoulder; - ModelRotationRenderer bipedLeftArm = md.bipedLeftArm; - ModelRotationRenderer bipedPelvic = md.bipedPelvic; - ModelRotationRenderer bipedRightLeg = md.bipedRightLeg; - ModelRotationRenderer bipedLeftLeg = md.bipedLeftLeg; - - if(isRopeSliding) - { - float time = totalTime * 0.15F; - - bipedHead.rotateAngleZ = Between(-Sixteenth, Sixteenth, Normalize(currentCameraAngle - currentHorizontalAngle)); - bipedHead.rotateAngleX = Eighth; - bipedHead.rotationPointY = 2F; - - bipedOuter.fadeRotateAngleY = false; - bipedOuter.rotateAngleY = currentHorizontalAngle; - bipedTorso.rotateAngleX = Sixteenth + Sixtyfourth * MathHelper.cos(time); - - bipedLeftArm.rotateAngleX = bipedRightArm.rotateAngleX = Half - bipedTorso.rotateAngleX; - - bipedRightArm.rotateAngleZ = Sixteenth + Thirtytwoth; - bipedLeftArm.rotateAngleZ = -Sixteenth - Thirtytwoth; - - bipedRightArm.rotationPointY = bipedLeftArm.rotationPointY = -2F; - - bipedPelvic.rotateAngleX = bipedTorso.rotateAngleX; - - bipedLeftLeg.rotateAngleZ = -Thirtytwoth; - bipedRightLeg.rotateAngleZ = Thirtytwoth; - - bipedLeftLeg.rotateAngleX = Sixtyfourth * MathHelper.cos(time + Quarter); - bipedRightLeg.rotateAngleX = Sixtyfourth * MathHelper.cos(time - Quarter); - } - else if(isClimb || isCrawlClimb) - { - bipedOuter.rotateAngleY = forwardRotation / RadiantToAngle; - - bipedHead.rotateAngleY = 0.0F; - bipedHead.rotateAngleX = viewVerticalAngelOffset / RadiantToAngle; - - bipedLeftLeg.rotationOrder = ModelRotationRenderer.YZX; - bipedRightLeg.rotationOrder = ModelRotationRenderer.YZX; - - float handsFrequenceUpFactor, handsDistanceUpFactor, handsDistanceUpOffset, feetFrequenceUpFactor, feetDistanceUpFactor, feetDistanceUpOffset; - float handsFrequenceSideFactor, handsDistanceSideFactor, handsDistanceSideOffset, feetFrequenceSideFactor, feetDistanceSideFactor, feetDistanceSideOffset; - - int handsClimbType = this.handsClimbType; - if(isHandsVineClimbing && handsClimbType == HandsClimbing.MiddleGrab) - handsClimbType = HandsClimbing.UpGrab; - - float verticalSpeed = Math.min(0.5f, currentVerticalSpeed); - float horizontalSpeed = Math.min(0.5f, currentHorizontalSpeed); - - switch(handsClimbType) - { - case HandsClimbing.MiddleGrab: - handsFrequenceSideFactor = FrequenceFactor; - handsDistanceSideFactor = 1.0F; - handsDistanceSideOffset = 0.0F; - - handsFrequenceUpFactor = FrequenceFactor; - handsDistanceUpFactor = 2F; - handsDistanceUpOffset = -Quarter; - break; - case HandsClimbing.UpGrab: - handsFrequenceSideFactor = FrequenceFactor; - handsDistanceSideFactor = 1.0F; - handsDistanceSideOffset = 0.0F; - - handsFrequenceUpFactor = FrequenceFactor; - handsDistanceUpFactor = 2F; - handsDistanceUpOffset = -2.5F; - break; - default: - handsFrequenceSideFactor = FrequenceFactor; - handsDistanceSideFactor = 1.0F; - handsDistanceSideOffset = 0.0F; - - handsFrequenceUpFactor = FrequenceFactor; - handsDistanceUpFactor = 0F; - handsDistanceUpOffset = -0.5F; - break; - } - - switch(feetClimbType) - { - case HandsClimbing.UpGrab: - feetFrequenceUpFactor = FrequenceFactor; - feetDistanceUpFactor = 0.3F/verticalSpeed; - feetDistanceUpOffset = -0.3F; - - feetFrequenceSideFactor = FrequenceFactor; - feetDistanceSideFactor = 0.5F; - feetDistanceSideOffset = 0.0F; - break; - default: - feetFrequenceUpFactor = FrequenceFactor; - feetDistanceUpFactor = 0.0F; - feetDistanceUpOffset = 0.0F; - - feetFrequenceSideFactor = FrequenceFactor; - feetDistanceSideFactor = 0.0F; - feetDistanceSideOffset = 0.0F; - break; - } - - bipedRightArm.rotateAngleX = MathHelper.cos(totalVerticalDistance * handsFrequenceUpFactor + Half) * verticalSpeed * handsDistanceUpFactor + handsDistanceUpOffset; - bipedLeftArm.rotateAngleX = MathHelper.cos(totalVerticalDistance * handsFrequenceUpFactor) * verticalSpeed * handsDistanceUpFactor + handsDistanceUpOffset; - - bipedRightArm.rotateAngleY = MathHelper.cos(totalHorizontalDistance * handsFrequenceSideFactor + Quarter) * horizontalSpeed * handsDistanceSideFactor + handsDistanceSideOffset; - bipedLeftArm.rotateAngleY = MathHelper.cos(totalHorizontalDistance * handsFrequenceSideFactor) * horizontalSpeed * handsDistanceSideFactor + handsDistanceSideOffset; - - if(isHandsVineClimbing) - { - bipedLeftArm.rotateAngleY *= 1F + handsFrequenceSideFactor; - bipedRightArm.rotateAngleY *= 1F + handsFrequenceSideFactor; - - bipedLeftArm.rotateAngleY += Eighth; - bipedRightArm.rotateAngleY -= Eighth; - - setArmScales(Math.abs(MathHelper.cos(bipedRightArm.rotateAngleX)), Math.abs(MathHelper.cos(bipedLeftArm.rotateAngleX))); - } - - if(!isFeetVineClimbing) - { - bipedRightLeg.rotateAngleX = MathHelper.cos(totalVerticalDistance * feetFrequenceUpFactor) * feetDistanceUpFactor * verticalSpeed + feetDistanceUpOffset; - bipedLeftLeg.rotateAngleX = MathHelper.cos(totalVerticalDistance * feetFrequenceUpFactor + Half) * feetDistanceUpFactor * verticalSpeed + feetDistanceUpOffset; - } - - bipedRightLeg.rotateAngleZ = -(MathHelper.cos(totalHorizontalDistance * feetFrequenceSideFactor) - 1.0F) * horizontalSpeed * feetDistanceSideFactor + feetDistanceSideOffset; - bipedLeftLeg.rotateAngleZ = -(MathHelper.cos(totalHorizontalDistance * feetFrequenceSideFactor + Quarter) + 1.0F) * horizontalSpeed * feetDistanceSideFactor + feetDistanceSideOffset; - - if(isFeetVineClimbing) - { - float total = (MathHelper.cos(totalDistance + Half) + 1) * Thirtytwoth + Sixteenth; - bipedRightLeg.rotateAngleX = -total; - bipedLeftLeg.rotateAngleX = -total; - - float difference = Math.max(0, MathHelper.cos(totalDistance - Quarter)) * Sixtyfourth; - bipedLeftLeg.rotateAngleZ += -difference; - bipedRightLeg.rotateAngleZ += difference; - - setLegScales(Math.abs(MathHelper.cos(bipedRightLeg.rotateAngleX)), Math.abs(MathHelper.cos(bipedLeftLeg.rotateAngleX))); - } - - if(isCrawlClimb) - { - float height = smallOverGroundHeight + 0.25F; - float bodyLength = 0.7F; - float legLength = 0.55F; - - float bodyAngleX, legAngleX, legAngleZ; - if(height < bodyLength) - { - bodyAngleX = Math.max(0, (float)Math.acos(height / bodyLength)); - legAngleX = Quarter - bodyAngleX; - legAngleZ = Thirtytwoth; - } - else if(height < bodyLength + legLength) - { - bodyAngleX = 0F; - legAngleX = Math.max(0, (float)Math.acos((height - bodyLength) / legLength)); - legAngleZ = Thirtytwoth * (legAngleX / 1.537F); - } - else - { - bodyAngleX = 0F; - legAngleX = 0F; - legAngleZ = 0F; - } - - bipedTorso.rotateAngleX = bodyAngleX; - - bipedRightShoulder.rotateAngleX = -bodyAngleX; - bipedLeftShoulder.rotateAngleX = -bodyAngleX; - - bipedHead.rotateAngleX = -bodyAngleX; - - bipedRightLeg.rotateAngleX = legAngleX; - bipedLeftLeg.rotateAngleX = legAngleX; - - bipedRightLeg.rotateAngleZ = legAngleZ; - bipedLeftLeg.rotateAngleZ = -legAngleZ; - } - - if(handsClimbType == HandsClimbing.NoGrab && feetClimbType != FeetClimbing.NoStep) - { - bipedTorso.rotateAngleX = 0.5F; - bipedHead.rotateAngleX -= 0.5F; - bipedPelvic.rotateAngleX -= 0.5F; - - bipedTorso.rotationPointZ = -6.0F; - } - } - else if(isClimbJump) - { - bipedRightArm.rotateAngleX = Half + Sixteenth; - bipedLeftArm.rotateAngleX = Half + Sixteenth; - - bipedRightArm.rotateAngleZ = -Thirtytwoth; - bipedLeftArm.rotateAngleZ = Thirtytwoth; - } - else if(isCeilingClimb) - { - float distance = totalHorizontalDistance * 0.7F; - float walkFactor = Factor(currentHorizontalSpeed, 0F, 0.12951545F); - float standFactor = Factor(currentHorizontalSpeed, 0.12951545F, 0F); - float horizontalAngle = horizontalDistance < 0.015F ? currentCameraAngle : currentHorizontalAngle; - - bipedLeftArm.rotateAngleX = (MathHelper.cos(distance) * 0.52F + Half) * walkFactor + Half * standFactor; - bipedRightArm.rotateAngleX = (MathHelper.cos(distance + Half) * 0.52F - Half) * walkFactor - Half * standFactor; - - bipedLeftLeg.rotateAngleX = -MathHelper.cos(distance) * 0.12F * walkFactor; - bipedRightLeg.rotateAngleX = -MathHelper.cos(distance + Half) * 0.32F * walkFactor; - - float rotateY = MathHelper.cos(distance) * 0.44F * walkFactor; - bipedOuter.rotateAngleY = rotateY + horizontalAngle; - - bipedRightArm.rotateAngleY = bipedLeftArm.rotateAngleY = -rotateY; - bipedRightLeg.rotateAngleY = bipedLeftLeg.rotateAngleY = -rotateY; - - bipedHead.rotateAngleY = -rotateY; - } - else if(isSwim) - { - float distance = totalHorizontalDistance; - float walkFactor = Factor(currentHorizontalSpeed, 0.15679921F, 0.52264464F); - float sneakFactor = Math.min(Factor(currentHorizontalSpeed, 0, 0.15679921F),Factor(currentHorizontalSpeed, 0.52264464F, 0.15679921F)); - float standFactor = Factor(currentHorizontalSpeed, 0.15679921F, 0F); - float standSneakFactor = standFactor + sneakFactor; - float horizontalAngle = horizontalDistance < (isGenericSneaking ? 0.005 : 0.015F) ? currentCameraAngle : currentHorizontalAngle; - - bipedHead.rotationOrder = ModelRotationRenderer.YXZ; - bipedHead.rotateAngleY = MathHelper.cos(distance / 2.0F - Quarter) * walkFactor; - bipedHead.rotateAngleX = -Eighth * standSneakFactor; - bipedHead.rotationPointZ = -2F; - - bipedOuter.fadeRotateAngleX = true; - bipedOuter.rotateAngleX = Quarter - Sixteenth * standSneakFactor; - bipedOuter.rotateAngleY = horizontalAngle; - - bipedBreast.rotateAngleY = bipedBody.rotateAngleY = MathHelper.cos(distance / 2.0F - Quarter) * walkFactor; - - bipedRightArm.rotationOrder = ModelRotationRenderer.YZX; - bipedLeftArm.rotationOrder = ModelRotationRenderer.YZX; - - bipedRightArm.rotateAngleZ = Quarter + Eighth + MathHelper.cos(totalTime * 0.1F) * standSneakFactor * 0.8F; - bipedLeftArm.rotateAngleZ = -Quarter - Eighth - MathHelper.cos(totalTime * 0.1F) * standSneakFactor * 0.8F; - - bipedRightArm.rotateAngleX = ((distance * 0.5F) % Whole - Half) * walkFactor + Sixteenth * standSneakFactor; - bipedLeftArm.rotateAngleX = ((distance * 0.5F + Half) % Whole - Half) * walkFactor + Sixteenth * standSneakFactor; - - bipedRightLeg.rotateAngleX = MathHelper.cos(distance) * 0.52264464F * walkFactor; - bipedLeftLeg.rotateAngleX = MathHelper.cos(distance + Half) * 0.52264464F * walkFactor; - - float rotateFeetAngleZ = Sixteenth * standSneakFactor + MathHelper.cos(totalTime * 0.1F) * 0.4F * (standFactor - sneakFactor); - bipedRightLeg.rotateAngleZ = rotateFeetAngleZ; - bipedLeftLeg.rotateAngleZ = -rotateFeetAngleZ; - - if(scaleLegType != NoScaleStart) - setLegScales( - 1F + (MathHelper.cos(totalTime * 0.1F + Quarter) - 1F) * 0.15F * sneakFactor, - 1F + (MathHelper.cos(totalTime * 0.1F + Quarter) - 1F) * 0.15F * sneakFactor); - - if(scaleArmType != NoScaleStart) - setArmScales( - 1F + (MathHelper.cos(totalTime * 0.1F - Quarter) - 1F) * 0.15F * sneakFactor, - 1F + (MathHelper.cos(totalTime * 0.1F - Quarter) - 1F) * 0.15F * sneakFactor); - } - else if(isDive) - { - float distance = totalDistance * 0.7F; - float walkFactor = Factor(currentSpeed, 0F, 0.15679921F); - float standFactor = Factor(currentSpeed, 0.15679921F, 0F); - float horizontalAngle = totalDistance < (isGenericSneaking ? 0.005 : 0.015F) ? currentCameraAngle : currentHorizontalAngle; - - bipedHead.rotateAngleX = -Eighth; - bipedHead.rotationPointZ = -2F; - - bipedOuter.fadeRotateAngleX = true; - bipedOuter.rotateAngleX = isLevitate ? Quarter - Sixteenth : (isJump ? 0F : Quarter - currentVerticalAngle); - bipedOuter.rotateAngleY = horizontalAngle; - - bipedRightLeg.rotateAngleZ = (MathHelper.cos(distance) + 1F) * 0.52264464F * walkFactor + Sixteenth * standFactor; - bipedLeftLeg.rotateAngleZ = (MathHelper.cos(distance + Half) - 1F) * 0.52264464F * walkFactor - Sixteenth * standFactor; - - if(scaleLegType != NoScaleStart) - setLegScales( - 1F + (MathHelper.cos(distance - Quarter) - 1F) * 0.25F * walkFactor, - 1F + (MathHelper.cos(distance - Quarter) - 1F) * 0.25F * walkFactor); - - bipedRightArm.rotateAngleZ = (MathHelper.cos(distance + Half) * 0.52264464F * 2.5F + Quarter) * walkFactor + (Quarter + Eighth) * standFactor; - bipedLeftArm.rotateAngleZ = (MathHelper.cos(distance) * 0.52264464F * 2.5F - Quarter) * walkFactor - (Quarter + Eighth) * standFactor; - - if(scaleArmType != NoScaleStart) - setArmScales( - 1F + (MathHelper.cos(distance + Quarter) - 1F) * 0.15F * walkFactor, - 1F + (MathHelper.cos(distance + Quarter) - 1F) * 0.15F * walkFactor); - } - else if(isCrawl) - { - float distance = totalHorizontalDistance * 1.3F; - float walkFactor = Factor(currentHorizontalSpeedFlattened, 0F, 0.12951545F); - float standFactor = Factor(currentHorizontalSpeedFlattened, 0.12951545F, 0F); - - bipedHead.rotateAngleZ = -viewHorizontalAngelOffset / RadiantToAngle; - bipedHead.rotateAngleX = -Eighth; - bipedHead.rotationPointZ = -2F; - - bipedTorso.rotationOrder = ModelRotationRenderer.YZX; - bipedTorso.rotateAngleX = Quarter - Thirtytwoth; - bipedTorso.rotationPointY = 3F; - bipedTorso.rotateAngleZ = MathHelper.cos(distance + Quarter) * Sixtyfourth * walkFactor; - bipedBody.rotateAngleY = MathHelper.cos(distance + Half) * Sixtyfourth * walkFactor; - - bipedRightLeg.rotateAngleX = (MathHelper.cos(distance - Quarter) * Sixtyfourth + Thirtytwoth) * walkFactor + Thirtytwoth * standFactor; - bipedLeftLeg.rotateAngleX = (MathHelper.cos(distance - Half - Quarter) * Sixtyfourth + Thirtytwoth) * walkFactor + Thirtytwoth * standFactor; - - bipedRightLeg.rotateAngleZ = (MathHelper.cos(distance - Quarter) + 1F) * 0.25F * walkFactor + Thirtytwoth * standFactor; - bipedLeftLeg.rotateAngleZ = (MathHelper.cos(distance - Quarter) - 1F) * 0.25F * walkFactor - Thirtytwoth * standFactor; - - if(scaleLegType != NoScaleStart) - setLegScales( - 1F + (MathHelper.cos(distance + Quarter - Quarter) - 1F) * 0.25F * walkFactor, - 1F + (MathHelper.cos(distance - Quarter - Quarter) - 1F) * 0.25F * walkFactor); - - bipedRightArm.rotationOrder = ModelRotationRenderer.YZX; - bipedLeftArm.rotationOrder = ModelRotationRenderer.YZX; - - bipedRightArm.rotateAngleX = Half + Eighth; - bipedLeftArm.rotateAngleX = Half + Eighth; - - bipedRightArm.rotateAngleZ = ((MathHelper.cos(distance + Half)) * Sixtyfourth + Thirtytwoth)* walkFactor + Sixteenth * standFactor; - bipedLeftArm.rotateAngleZ = ((MathHelper.cos(distance + Half)) * Sixtyfourth - Thirtytwoth) * walkFactor - Sixteenth * standFactor; - - bipedRightArm.rotateAngleY = -Quarter; - bipedLeftArm.rotateAngleY = Quarter; - - if(scaleArmType != NoScaleStart) - setArmScales( - 1F + (MathHelper.cos(distance + Quarter) - 1F) * 0.15F * walkFactor, - 1F + (MathHelper.cos(distance - Quarter) - 1F) * 0.15F * walkFactor); - } - else if(isSlide) - { - float distance = totalHorizontalDistance * 0.7F; - float walkFactor = Factor(currentHorizontalSpeed, 0F, 1F) * 0.8F; - - bipedHead.rotateAngleZ = -viewHorizontalAngelOffset / RadiantToAngle; - bipedHead.rotateAngleX = -Eighth - Sixteenth; - bipedHead.rotationPointZ = -2F; - - bipedOuter.fadeRotateAngleY = false; - bipedOuter.rotateAngleY = currentHorizontalAngle; - bipedOuter.rotationPointY = 5F; - bipedOuter.rotateAngleX = Quarter; - - bipedBody.rotationOrder = ModelRotationRenderer.YXZ; - bipedBody.offsetY = -0.4F; - bipedBody.rotationPointY = +6.5F; - bipedBody.rotateAngleX = MathHelper.cos(distance - Eighth) * Sixtyfourth * walkFactor; - bipedBody.rotateAngleY = MathHelper.cos(distance + Eighth) * Sixtyfourth * walkFactor; - - bipedRightLeg.rotateAngleX = MathHelper.cos(distance + Half) * Sixtyfourth * walkFactor + Sixtyfourth; - bipedLeftLeg.rotateAngleX = MathHelper.cos(distance + Quarter) * Sixtyfourth * walkFactor + Sixtyfourth; - - bipedRightLeg.rotateAngleZ = Thirtytwoth; - bipedLeftLeg.rotateAngleZ = -Thirtytwoth; - - bipedRightArm.rotationOrder = ModelRotationRenderer.YZX; - bipedLeftArm.rotationOrder = ModelRotationRenderer.YZX; - - bipedRightArm.rotateAngleX = MathHelper.cos(distance + Quarter) * Sixtyfourth * walkFactor + Half - Sixtyfourth; - bipedLeftArm.rotateAngleX = MathHelper.cos(distance - Half) * Sixtyfourth * walkFactor + Half - Sixtyfourth; - - bipedRightArm.rotateAngleZ = Sixteenth; - bipedLeftArm.rotateAngleZ = -Sixteenth; - - bipedRightArm.rotateAngleY = -Quarter; - bipedLeftArm.rotateAngleY = Quarter; - } - else if(isFlying) - { - float distance = totalDistance * 0.08F; - float walkFactor = Factor(currentSpeed, 0F, 1); - float standFactor = Factor(currentSpeed, 1F, 0F); - float time = totalTime * 0.15F; - float verticalAngle = isJump ? Math.abs(currentVerticalAngle) : currentVerticalAngle; - float horizontalAngle = horizontalDistance < 0.05F ? currentCameraAngle : currentHorizontalAngle; - - bipedOuter.fadeRotateAngleX = true; - bipedOuter.rotateAngleX = (Quarter - verticalAngle) * walkFactor; - bipedOuter.rotateAngleY = horizontalAngle; - - bipedHead.rotateAngleX = -bipedOuter.rotateAngleX / 2F; - - bipedRightArm.rotationOrder = ModelRotationRenderer.XZY; - bipedLeftArm.rotationOrder = ModelRotationRenderer.XZY; - - bipedRightArm.rotateAngleY = (MathHelper.cos(time) * Sixteenth) * standFactor; - bipedLeftArm.rotateAngleY = (MathHelper.cos(time) * Sixteenth) * standFactor; - - bipedRightArm.rotateAngleZ = (MathHelper.cos(distance + Half) * Sixtyfourth + (Half - Sixteenth)) * walkFactor + Quarter * standFactor; - bipedLeftArm.rotateAngleZ = (MathHelper.cos(distance) * Sixtyfourth - (Half - Sixteenth)) * walkFactor - Quarter * standFactor; - - bipedRightLeg.rotateAngleX = MathHelper.cos(distance) * Sixtyfourth * walkFactor + MathHelper.cos(time + Half) * Sixtyfourth * standFactor; - bipedLeftLeg.rotateAngleX = MathHelper.cos(distance + Half) * Sixtyfourth * walkFactor + MathHelper.cos(time) * Sixtyfourth * standFactor; - - bipedRightLeg.rotateAngleZ = Sixtyfourth; - bipedLeftLeg.rotateAngleZ = -Sixtyfourth; - } - else if(isHeadJump) - { - bipedOuter.fadeRotateAngleX = true; - bipedOuter.rotateAngleX = (Quarter - currentVerticalAngle); - bipedOuter.rotateAngleY = currentHorizontalAngle; - - bipedHead.rotateAngleX = -bipedOuter.rotateAngleX / 2F; - - float bendFactor = Math.min(Factor(currentVerticalAngle, Quarter, 0), Factor(currentVerticalAngle, -Quarter, 0)); - bipedRightArm.rotateAngleX = bendFactor * -Eighth; - bipedLeftArm.rotateAngleX = bendFactor * -Eighth; - - bipedRightLeg.rotateAngleX = bendFactor * -Eighth; - bipedLeftLeg.rotateAngleX = bendFactor * -Eighth; - - float armFactorZ = Factor(currentVerticalAngle, Quarter, -Quarter); - if(overGroundBlock != null && overGroundBlock.getMaterial().isSolid()) - armFactorZ = Math.min(armFactorZ, smallOverGroundHeight / 5F); - - bipedRightArm.rotateAngleZ = Half - Sixteenth + armFactorZ * Eighth; - bipedLeftArm.rotateAngleZ = Sixteenth - Half - armFactorZ * Eighth; - - float legFactorZ = Factor(currentVerticalAngle, -Quarter, Quarter); - bipedRightLeg.rotateAngleZ = Sixtyfourth * legFactorZ; - bipedLeftLeg.rotateAngleZ = -Sixtyfourth * legFactorZ; - } - else if(isFalling) - { - float distance = totalDistance * 0.1F; - - bipedRightArm.rotationOrder = ModelRotationRenderer.XZY; - bipedLeftArm.rotationOrder = ModelRotationRenderer.XZY; - - bipedRightArm.rotateAngleY = (MathHelper.cos(distance + Quarter) * Eighth); - bipedLeftArm.rotateAngleY = (MathHelper.cos(distance + Quarter) * Eighth); - - bipedRightArm.rotateAngleZ = (MathHelper.cos(distance) * Eighth + Quarter); - bipedLeftArm.rotateAngleZ = (MathHelper.cos(distance) * Eighth - Quarter); - - bipedRightLeg.rotateAngleX = (MathHelper.cos(distance + Half + Quarter) * Sixteenth + Thirtytwoth); - bipedLeftLeg.rotateAngleX = (MathHelper.cos(distance + Quarter) * Sixteenth + Thirtytwoth); - - bipedRightLeg.rotateAngleZ = (MathHelper.cos(distance) * Sixteenth + Thirtytwoth); - bipedLeftLeg.rotateAngleZ = (MathHelper.cos(distance) * Sixteenth - Thirtytwoth); - } - else - isStandard = true; - } - - private boolean isWorking() - { - return mp.onGround > 0F; - } - - private void animateAngleJumping() - { - float angle = angleJumpType * Eighth; - md.bipedPelvic.rotateAngleY -= md.bipedOuter.rotateAngleY; - md.bipedPelvic.rotateAngleY += md.currentCameraAngle; - - float backness = 1F - Math.abs(angle - Half) / Quarter; - float leftness = -Math.min(angle - Half, 0F) / Quarter; - float rightness = Math.max(angle - Half, 0F) / Quarter; - - md.bipedLeftLeg.rotateAngleX = Thirtytwoth * (1F + rightness); - md.bipedRightLeg.rotateAngleX = Thirtytwoth * (1F + leftness); - md.bipedLeftLeg.rotateAngleY = -angle; - md.bipedRightLeg.rotateAngleY = -angle; - md.bipedLeftLeg.rotateAngleZ = Thirtytwoth * backness; - md.bipedRightLeg.rotateAngleZ = -Thirtytwoth * backness; - - md.bipedLeftLeg.rotationOrder = ModelRotationRenderer.ZXY; - md.bipedRightLeg.rotationOrder = ModelRotationRenderer.ZXY; - - md.bipedLeftArm.rotateAngleZ = -Sixteenth * rightness; - md.bipedRightArm.rotateAngleZ = Sixteenth * leftness; - - md.bipedLeftArm.rotateAngleX = -Eighth * backness; - md.bipedRightArm.rotateAngleX = -Eighth * backness; - } - - private void animateNonStandardWorking(float viewVerticalAngelOffset) - { - md.bipedRightShoulder.ignoreSuperRotation = true; - md.bipedRightShoulder.rotateAngleX = viewVerticalAngelOffset / RadiantToAngle; - md.bipedRightShoulder.rotateAngleY = md.workingAngle / RadiantToAngle; - md.bipedRightShoulder.rotateAngleZ = Half; - md.bipedRightShoulder.rotationOrder = ModelRotationRenderer.ZYX; - md.bipedRightArm.reset(); - } - - private void animateNonStandardBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - md.bipedRightShoulder.ignoreSuperRotation = true; - md.bipedRightShoulder.rotateAngleY = md.workingAngle / RadiantToAngle; - md.bipedRightShoulder.rotateAngleZ = Half; - md.bipedRightShoulder.rotationOrder = ModelRotationRenderer.ZYX; - - md.bipedLeftShoulder.ignoreSuperRotation = true; - md.bipedLeftShoulder.rotateAngleY = md.workingAngle / RadiantToAngle; - md.bipedLeftShoulder.rotateAngleZ = Half; - md.bipedLeftShoulder.rotationOrder = ModelRotationRenderer.ZYX; - - md.bipedRightArm.reset(); - md.bipedLeftArm.reset(); - - float headRotateAngleY = md.bipedHead.rotateAngleY; - float outerRotateAngleY = md.bipedOuter.rotateAngleY; - float headRotateAngleX = md.bipedHead.rotateAngleX; - - md.bipedHead.rotateAngleY = 0; - md.bipedOuter.rotateAngleY = 0; - md.bipedHead.rotateAngleX = 0; - - imp.superAnimateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - md.bipedHead.rotateAngleY = headRotateAngleY; - md.bipedOuter.rotateAngleY = outerRotateAngleY; - md.bipedHead.rotateAngleX = headRotateAngleX; - } - - public void animateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - setRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(isStandard) - imp.superAnimateHeadRotation(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateSleeping(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - if(isAngleJumping) - animateAngleJumping(); - else - imp.superAnimateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateRiding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateLeftArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateRightArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateWorkingBody(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - else if(isWorking()) - animateNonStandardWorking(viewVerticalAngelOffset); - } - - public void animateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard || isWorking()) - imp.superAnimateWorkingArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard && !isAngleJumping) - imp.superAnimateSneaking(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superApplyAnimationOffsets(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void animateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - if(isStandard) - imp.superAnimateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - else - animateNonStandardBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - private void setArmScales(float rightScale, float leftScale) - { - if(scaleArmType == Scale) - { - md.bipedRightArm.scaleY = rightScale; - md.bipedLeftArm.scaleY = leftScale; - } - else if(scaleArmType == NoScaleEnd) - { - md.bipedRightArm.offsetY -= (1F - rightScale) * 0.5F; - md.bipedLeftArm.offsetY -= (1F - leftScale) * 0.5F; - } - } - - private void setLegScales(float rightScale, float leftScale) - { - if(scaleLegType == Scale) - { - md.bipedRightLeg.scaleY = rightScale; - md.bipedLeftLeg.scaleY = leftScale; - } - else if(scaleLegType == NoScaleEnd) - { - md.bipedRightLeg.offsetY -= (1F - rightScale) * 0.5F; - md.bipedLeftLeg.offsetY -= (1F - leftScale) * 0.5F; - } - } - - private static float Factor(float x, float x0, float x1) - { - if(x0 > x1) - { - if(x <= x1) - return 1F; - if(x >= x0) - return 0F; - return (x0 - x) / (x0 - x1); - } - else - { - if(x >= x1) - return 1F; - if(x <= x0) - return 0F; - return (x - x0) / (x1 - x0); - } - } - - private static float Between(float min, float max, float value) - { - if(value < min) - return min; - if(value > max) - return max; - return value; - } - - private static float Normalize(float radiant) - { - while(radiant > Half) - radiant -= Whole; - while(radiant < -Half) - radiant += Whole; - return radiant; - } - - public boolean isStandard; - - public boolean isClimb; - public boolean isClimbJump; - public int feetClimbType; - public int handsClimbType; - public boolean isHandsVineClimbing; - public boolean isFeetVineClimbing; - public boolean isCeilingClimb; - - public boolean isSwim; - public boolean isDive; - public boolean isCrawl; - public boolean isCrawlClimb; - public boolean isJump; - public boolean isHeadJump; - public boolean isFlying; - public boolean isSlide; - public boolean isLevitate; - public boolean isFalling; - public boolean isGenericSneaking; - public boolean isAngleJumping; - public int angleJumpType; - public boolean isRopeSliding; - - public float currentHorizontalSpeedFlattened; - public float smallOverGroundHeight; - public Block overGroundBlock; - - public int scaleArmType; - public int scaleLegType; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/SmartMovingRender.java b/src/main/java/net/smart/moving/render/SmartMovingRender.java deleted file mode 100644 index bd82fb0b..00000000 --- a/src/main/java/net/smart/moving/render/SmartMovingRender.java +++ /dev/null @@ -1,337 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.block.*; -import net.minecraft.block.material.*; -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.client.gui.*; -import net.minecraft.client.gui.inventory.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; -import net.minecraft.util.*; - -import net.smart.moving.*; -import net.smart.render.statistics.*; - -public class SmartMovingRender extends SmartRenderContext -{ - public static SmartMovingModel CurrentMainModel; - - public IRenderPlayer irp; - - public SmartMovingRender(IRenderPlayer irp) - { - this.irp = irp; - - modelBipedMain = irp.getPlayerModelBipedMain().getMovingModel(); - SmartMovingModel modelArmorChestplate = irp.getPlayerModelArmorChestplate().getMovingModel(); - SmartMovingModel modelArmor = irp.getPlayerModelArmor().getMovingModel(); - - modelBipedMain.scaleArmType = Scale; - modelBipedMain.scaleLegType = Scale; - modelArmorChestplate.scaleArmType = NoScaleStart; - modelArmorChestplate.scaleLegType = NoScaleEnd; - modelArmor.scaleArmType = NoScaleStart; - modelArmor.scaleLegType = Scale; - } - - public void renderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - IModelPlayer[] modelPlayers = null; - SmartMoving moving = SmartMovingFactory.getInstance(entityplayer); - if(moving != null) - { - boolean isInventory = d == 0.0F && d1 == 0.0F && d2 == 0.0F && f == 0.0F && renderPartialTicks == 1.0F; - - boolean isClimb = moving.isClimbing && !moving.isCrawling && !moving.isCrawlClimbing && !moving.isClimbJumping; - boolean isClimbJump = moving.isClimbJumping; - int handsClimbType = moving.actualHandsClimbType; - int feetClimbType = moving.actualFeetClimbType; - boolean isHandsVineClimbing = moving.isHandsVineClimbing; - boolean isFeetVineClimbing = moving.isFeetVineClimbing; - boolean isCeilingClimb = moving.isCeilingClimbing; - boolean isSwim = moving.isSwimming && !moving.isDipping; - boolean isDive = moving.isDiving; - boolean isLevitate = moving.isLevitating; - boolean isCrawl = moving.isCrawling && !moving.isClimbing; - boolean isCrawlClimb = moving.isCrawlClimbing || (moving.isClimbing && moving.isCrawling); - boolean isJump = moving.isJumping(); - boolean isHeadJump = moving.isHeadJumping; - boolean isFlying = moving.doFlyingAnimation(); - boolean isSlide = moving.isSliding; - boolean isFalling = moving.doFallingAnimation(); - boolean isGenericSneaking = moving.isSlow; - boolean isAngleJumping = moving.isAngleJumping(); - int angleJumpType = moving.angleJumpType; - boolean isRopeSliding = moving.isRopeSliding; - - SmartStatistics statistics = SmartStatisticsFactory.getInstance(entityplayer); - float currentHorizontalSpeedFlattened = statistics != null ? statistics.getCurrentHorizontalSpeedFlattened(renderPartialTicks, -1) : Float.NaN; - float smallOverGroundHeight = isCrawlClimb || isHeadJump ? (float)moving.getOverGroundHeight(5D) : 0F; - Block overGroundBlock = isHeadJump && smallOverGroundHeight < 5F ? moving.getOverGroundBlockId(smallOverGroundHeight) : null; - - modelPlayers = irp.getPlayerModels(); - - for(int i = 0; i < modelPlayers.length; i++) - { - SmartMovingModel modelPlayer = modelPlayers[i].getMovingModel(); - modelPlayer.isClimb = isClimb; - modelPlayer.isClimbJump = isClimbJump; - modelPlayer.handsClimbType = handsClimbType; - modelPlayer.feetClimbType = feetClimbType; - modelPlayer.isHandsVineClimbing = isHandsVineClimbing; - modelPlayer.isFeetVineClimbing = isFeetVineClimbing; - modelPlayer.isCeilingClimb = isCeilingClimb; - modelPlayer.isSwim = isSwim; - modelPlayer.isDive = isDive; - modelPlayer.isCrawl = isCrawl; - modelPlayer.isCrawlClimb = isCrawlClimb; - modelPlayer.isJump = isJump; - modelPlayer.isHeadJump = isHeadJump; - modelPlayer.isSlide = isSlide; - modelPlayer.isFlying = isFlying; - modelPlayer.isLevitate = isLevitate; - modelPlayer.isFalling = isFalling; - modelPlayer.isGenericSneaking = isGenericSneaking; - modelPlayer.isAngleJumping = isAngleJumping; - modelPlayer.angleJumpType = angleJumpType; - modelPlayer.isRopeSliding = isRopeSliding; - - modelPlayer.currentHorizontalSpeedFlattened = currentHorizontalSpeedFlattened; - modelPlayer.smallOverGroundHeight = smallOverGroundHeight; - modelPlayer.overGroundBlock = overGroundBlock; - } - - if (!isInventory && entityplayer.isSneaking() && !(entityplayer instanceof EntityPlayerSP) && isCrawl) - d1 += 0.125D; - } - - CurrentMainModel = modelBipedMain; - irp.superRenderRenderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - CurrentMainModel = null; - - if (moving != null && moving.isLevitating && modelPlayers != null) - for(int i = 0; i < modelPlayers.length; i++) - modelPlayers[i].getMovingModel().md.currentHorizontalAngle = modelPlayers[i].getMovingModel().md.currentCameraAngle; - } - - public void rotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - SmartMoving moving = SmartMovingFactory.getInstance(entityplayer); - if(moving != null) - { - boolean isInventory = f2 == 1.0F && moving.isp != null && moving.isp.getMcField().currentScreen instanceof GuiInventory; - if(!isInventory) - { - float forwardRotation = entityplayer.prevRotationYaw + (entityplayer.rotationYaw - entityplayer.prevRotationYaw) * f2; - - if(moving.isClimbing || moving.isClimbCrawling || moving.isCrawlClimbing || moving.isFlying || moving.isSwimming || moving.isDiving || moving.isCeilingClimbing || moving.isHeadJumping || moving.isSliding || moving.isAngleJumping()) - entityplayer.renderYawOffset = forwardRotation; - } - } - irp.superRenderRotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - public void renderPlayerAt(AbstractClientPlayer entityplayer, double d, double d1, double d2) - { - if(entityplayer instanceof EntityOtherPlayerMP) - { - SmartMoving moving = SmartMovingFactory.getOtherSmartMoving(entityplayer.getEntityId()); - if(moving != null && moving.heightOffset != 0) - d1 += moving.heightOffset; - } - irp.superRenderRenderPlayerAt(entityplayer, d, d1, d2); - } - - public void renderName(EntityLivingBase entityPlayer, double d, double d1, double d2) - { - boolean changedIsSneaking = false, originalIsSneaking = false; - if(Minecraft.isGuiEnabled() && entityPlayer != irp.getRenderManager().livingPlayer) - { - SmartMoving moving = entityPlayer instanceof EntityPlayer ? SmartMovingFactory.getInstance((EntityPlayer)entityPlayer) : null; - if(moving != null) - { - originalIsSneaking = entityPlayer.isSneaking(); - boolean temporaryIsSneaking = originalIsSneaking; - if(moving.isCrawling && !moving.isClimbing) - temporaryIsSneaking = !Config._crawlNameTag.value; - else if(originalIsSneaking) - temporaryIsSneaking = !Config._sneakNameTag.value; - - changedIsSneaking = temporaryIsSneaking != originalIsSneaking; - if(changedIsSneaking) - entityPlayer.setSneaking(temporaryIsSneaking); - - if(moving.heightOffset == -1) - d1 -= 0.2F; - else if(originalIsSneaking && !temporaryIsSneaking) - d1 -= 0.05F; - } - } - - irp.superRenderRenderName(entityPlayer, d, d1, d2); - - if(changedIsSneaking) - entityPlayer.setSneaking(originalIsSneaking); - } - - public static void renderGuiIngame(Minecraft minecraft) - { - if (!Client.getNativeUserInterfaceDrawing()) - return; - - if(!GL11.glGetBoolean(GL11.GL_ALPHA_TEST)) - return; - - SmartMovingSelf moving = (SmartMovingSelf)SmartMovingFactory.getInstance(minecraft.thePlayer); - if(moving != null && Config.enabled && (Options._displayExhaustionBar.value || Options._displayJumpChargeBar.value)) - { - ScaledResolution scaledresolution = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight); - int width = scaledresolution.getScaledWidth(); - int height = scaledresolution.getScaledHeight(); - - if(minecraft.playerController.shouldDrawHUD()) - { - float maxExhaustion = Client.getMaximumExhaustion(); - float exhaustion = Math.min(moving.exhaustion, maxExhaustion); - boolean drawExhaustion = exhaustion > 0 && exhaustion <= maxExhaustion; - - float maxStillJumpCharge = Config._jumpChargeMaximum.value; - float stillJumpCharge = Math.min(moving.jumpCharge, maxStillJumpCharge); - - float maxRunJumpCharge = Config._headJumpChargeMaximum.value; - float runJumpCharge = Math.min(moving.headJumpCharge, maxRunJumpCharge); - - boolean drawJumpCharge = stillJumpCharge > 0 || runJumpCharge > 0; - float maxJumpCharge = stillJumpCharge > runJumpCharge ? maxStillJumpCharge : maxRunJumpCharge; - float jumpCharge = Math.max(stillJumpCharge, runJumpCharge); - - if(drawExhaustion || drawJumpCharge) - { - GL11.glPushAttrib(GL11.GL_TEXTURE_BIT); - minecraft.getTextureManager().bindTexture(new ResourceLocation("smartmoving", "gui/icons.png")); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - _minecraft = minecraft; - } - - if(drawExhaustion) - { - float maxExhaustionForAction = Math.min(moving.maxExhaustionForAction, maxExhaustion); - float maxExhaustionToStartAction = Math.min(moving.maxExhaustionToStartAction, maxExhaustion); - - float fitness = maxExhaustion - exhaustion; - float minFitnessForAction = Float.isNaN(maxExhaustionForAction) ? 0 : maxExhaustion - maxExhaustionForAction; - float minFitnessToStartAction = Float.isNaN(maxExhaustionToStartAction) ? 0 : maxExhaustion - maxExhaustionToStartAction; - - float maxFitnessDrawn = Math.max(Math.max(minFitnessToStartAction, fitness), minFitnessForAction); - - int halfs = (int)Math.floor(maxFitnessDrawn / maxExhaustion * 21F); - int fulls = halfs / 2; - int half = halfs % 2; - - int fitnessHalfs = (int)Math.floor(fitness / maxExhaustion * 21F); - int fitnessFulls = fitnessHalfs / 2; - int fitnessHalf = fitnessHalfs % 2; - - int minFitnessForActionHalfs = (int)Math.floor(minFitnessForAction / maxExhaustion * 21F); - int minFitnessForActionFulls = minFitnessForActionHalfs / 2; - int minFitnessForActionHalf = minFitnessForActionHalfs % 2; - - int minFitnessToStartActionHalfs = (int)Math.floor(minFitnessToStartAction / maxExhaustion * 21F); - int minFitnessToStartActionFulls = minFitnessToStartActionHalfs / 2; - - _jOffset = height - 39 - 10 - (minecraft.thePlayer.isInsideOfMaterial(Material.water) ? 10 : 0); - for(int i = 0; i < Math.min(fulls + half, 10); i++) - { - _iOffset = (width / 2 + 90) - (i + 1) * 8; - if(i < fitnessFulls) - { - if(i < minFitnessForActionFulls) - drawIcon(2, 2); - else if(i == minFitnessForActionFulls && minFitnessForActionHalf > 0) - drawIcon(3, 2); - else - drawIcon(0, 0); - } - else if(i == fitnessFulls && fitnessHalf > 0) - { - if(i < minFitnessForActionFulls) - drawIcon(1, 2); - else if(i == minFitnessForActionFulls && minFitnessForActionHalf > 0) - if(i < minFitnessToStartActionFulls) - drawIcon(3, 1); - else - drawIcon(4, 2); - else - if(i < minFitnessToStartActionFulls) - drawIcon(1, 1); - else - drawIcon(1, 0); - } - else - { - if(i < minFitnessForActionFulls) - drawIcon(0, 2); - else if(i == minFitnessForActionFulls && minFitnessForActionHalf > 0) - if(i < minFitnessToStartActionFulls) - drawIcon(2, 1); - else - drawIcon(5, 2); - else - if(i < minFitnessToStartActionFulls) - drawIcon(0, 1); - else - drawIcon(4, 1); - } - } - } - - if(drawJumpCharge) - { - boolean max = jumpCharge == maxJumpCharge; - int fulls = max ? 10 : (int)Math.ceil(((jumpCharge - 2) * 10D) / maxJumpCharge); - int half = max ? 0 : (int)Math.ceil((jumpCharge * 10D) / maxJumpCharge) - fulls; - - _jOffset = height - 39 - 10 - (minecraft.thePlayer.getTotalArmorValue() > 0 ? 10 : 0); - for(int i = 0; i < fulls + half; i++) - { - _iOffset = (width / 2 - 91) + i * 8; - drawIcon(i < fulls ? 2 : 3, 0); - } - } - - if(drawExhaustion || drawJumpCharge) - GL11.glPopAttrib(); - } - } - } - - private static void drawIcon(int x, int y) - { - _minecraft.ingameGUI.drawTexturedModalRect(_iOffset, _jOffset, x * 9, y * 9, 9, 9); - } - - public final SmartMovingModel modelBipedMain; - - private static int _iOffset, _jOffset; - private static Minecraft _minecraft; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/SmartRenderContext.java b/src/main/java/net/smart/moving/render/SmartRenderContext.java deleted file mode 100644 index 1f7677eb..00000000 --- a/src/main/java/net/smart/moving/render/SmartRenderContext.java +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render; - -import net.smart.moving.*; - -public abstract class SmartRenderContext extends SmartMovingContext -{ - public static final int Scale = 0; - public static final int NoScaleStart = 1; - public static final int NoScaleEnd = 2; -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/playerapi/SmartMoving.java b/src/main/java/net/smart/moving/render/playerapi/SmartMoving.java deleted file mode 100644 index 11aa03bc..00000000 --- a/src/main/java/net/smart/moving/render/playerapi/SmartMoving.java +++ /dev/null @@ -1,55 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render.playerapi; - -import api.player.model.*; -import api.player.render.*; - -import net.smart.moving.*; -import net.smart.render.playerapi.*; - -public abstract class SmartMoving -{ - public static final String ID = SmartMovingInfo.ModName; - - public static void register() - { - String[] inferiors = new String[] { SmartRender.ID }; - - RenderPlayerBaseSorting renderSorting = new RenderPlayerBaseSorting(); - renderSorting.setAfterLocalConstructingInferiors(inferiors); - renderSorting.setOverrideRenderPlayerInferiors(inferiors); - renderSorting.setOverrideRotatePlayerInferiors(inferiors); - renderSorting.setOverrideRenderPlayerSleepInferiors(inferiors); - RenderPlayerAPI.register(ID, SmartMovingRenderPlayerBase.class, renderSorting); - - ModelPlayerBaseSorting modelSorting = new ModelPlayerBaseSorting(); - modelSorting.setAfterLocalConstructingInferiors(inferiors); - ModelPlayerAPI.register(ID, SmartMovingModelPlayerBase.class, modelSorting); - } - - public static SmartMovingRenderPlayerBase getPlayerBase(net.minecraft.client.renderer.entity.RenderPlayer renderPlayer) - { - return (SmartMovingRenderPlayerBase)((IRenderPlayerAPI)renderPlayer).getRenderPlayerBase(ID); - } - - public static SmartMovingModelPlayerBase getPlayerBase(api.player.model.ModelPlayer modelPlayer) - { - return (SmartMovingModelPlayerBase)((IModelPlayerAPI)modelPlayer).getModelPlayerBase(ID); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/playerapi/SmartMovingModelPlayerBase.java b/src/main/java/net/smart/moving/render/playerapi/SmartMovingModelPlayerBase.java deleted file mode 100644 index 220efbe2..00000000 --- a/src/main/java/net/smart/moving/render/playerapi/SmartMovingModelPlayerBase.java +++ /dev/null @@ -1,182 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render.playerapi; - -import net.minecraft.client.model.*; - -import api.player.model.*; - -import net.smart.moving.render.*; -import net.smart.moving.render.IModelPlayer; -import net.smart.render.playerapi.*; - -public class SmartMovingModelPlayerBase extends ModelPlayerBase implements IModelPlayer -{ - private SmartMovingModel model; - - public SmartMovingModelPlayerBase(ModelPlayerAPI modelplayerapi) - { - super(modelplayerapi); - } - - @Override - public SmartMovingModel getMovingModel() - { - if(model == null) - model = new SmartMovingModel(SmartRender.getPlayerBase(modelPlayer), this); - return model; - } - - public void dynamicOverrideAnimateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateHeadRotation(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateSleeping(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateRiding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateLeftArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateRightArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateWorkingBody(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateWorkingArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateSneaking(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - public void dynamicOverrideAnimateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getMovingModel().animateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superAnimateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateHeadRotation", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateSleeping", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateArmSwinging", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateRiding", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateLeftArmItemHolding", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateRightArmItemHolding", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateWorkingBody", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateWorkingArms", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateSneaking", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superApplyAnimationOffsets(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateArms", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Override - public void superAnimateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.dynamic("animateBowAiming", new Object[] { totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @Deprecated public ModelRenderer getOuter() { return getMovingModel().md.bipedOuter; } - @Deprecated public ModelRenderer getTorso() { return getMovingModel().md.bipedTorso; } - @Deprecated public ModelRenderer getBody() { return getMovingModel().md.bipedBody; } - @Deprecated public ModelRenderer getBreast() { return getMovingModel().md.bipedBreast; } - @Deprecated public ModelRenderer getNeck() { return getMovingModel().md.bipedNeck; } - @Deprecated public ModelRenderer getHead() { return getMovingModel().md.bipedHead; } - @Deprecated public ModelRenderer getHeadwear() { return getMovingModel().md.bipedHeadwear; } - @Deprecated public ModelRenderer getRightShoulder() { return getMovingModel().md.bipedRightShoulder; } - @Deprecated public ModelRenderer getRightArm() { return getMovingModel().md.bipedRightArm; } - @Deprecated public ModelRenderer getLeftShoulder() { return getMovingModel().md.bipedLeftShoulder; } - @Deprecated public ModelRenderer getLeftArm() { return getMovingModel().md.bipedLeftArm; } - @Deprecated public ModelRenderer getPelvic() { return getMovingModel().md.bipedPelvic; } - @Deprecated public ModelRenderer getRightLeg() { return getMovingModel().md.bipedRightLeg; } - @Deprecated public ModelRenderer getLeftLeg() { return getMovingModel().md.bipedLeftLeg; } - @Deprecated public ModelRenderer getEars() { return getMovingModel().md.bipedEars; } - @Deprecated public ModelRenderer getCloak() { return getMovingModel().md.bipedCloak; } -} \ No newline at end of file diff --git a/src/main/java/net/smart/moving/render/playerapi/SmartMovingRenderPlayerBase.java b/src/main/java/net/smart/moving/render/playerapi/SmartMovingRenderPlayerBase.java deleted file mode 100644 index c62b291c..00000000 --- a/src/main/java/net/smart/moving/render/playerapi/SmartMovingRenderPlayerBase.java +++ /dev/null @@ -1,139 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.moving.render.playerapi; - -import net.minecraft.client.entity.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.*; - -import api.player.render.*; - -import net.smart.moving.render.*; -import net.smart.moving.render.IRenderPlayer; - -public class SmartMovingRenderPlayerBase extends RenderPlayerBase implements IRenderPlayer -{ - public SmartMovingRenderPlayerBase(RenderPlayerAPI renderPlayerAPI) - { - super(renderPlayerAPI); - } - - public SmartMovingRender getRenderModel() - { - if(render == null) - render = new SmartMovingRender(this); - return render; - } - - @Override - public void renderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - getRenderModel().renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void superRenderRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - super.renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void rotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - getRenderModel().rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void superRenderRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - super.rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void renderPlayerSleep(AbstractClientPlayer entityplayer, double d, double d1, double d2) - { - getRenderModel().renderPlayerAt(entityplayer, d, d1, d2); - } - - @Override - public void superRenderRenderPlayerAt(AbstractClientPlayer entityplayer, double d, double d1, double d2) - { - super.renderPlayerSleep(entityplayer, d, d1, d2); - } - - @Override - public void passSpecialRender(EntityLivingBase entityliving, double d, double d1, double d2) - { - getRenderModel().renderName(entityliving, d, d1, d2); - } - - @Override - public void superRenderRenderName(EntityLivingBase entityplayer, double d, double d1, double d2) - { - super.passSpecialRender(entityplayer, d, d1, d2); - } - - @Override - public RenderManager getRenderManager() - { - return renderPlayerAPI.getRenderManagerField(); - } - - public boolean isRenderedWithBodyTopAlwaysInAccelerateDirection() - { - SmartMovingRender render = getRenderModel(); - return render.modelBipedMain.isFlying || render.modelBipedMain.isSwim || render.modelBipedMain.isDive || render.modelBipedMain.isHeadJump; - } - - @Override - public IModelPlayer getPlayerModelArmor() - { - return SmartMoving.getPlayerBase((api.player.model.ModelPlayer)renderPlayerAPI.getModelArmorField()); - } - - @Override - public IModelPlayer getPlayerModelArmorChestplate() - { - return SmartMoving.getPlayerBase((api.player.model.ModelPlayer)renderPlayerAPI.getModelArmorChestplateField()); - } - - @Override - public IModelPlayer getPlayerModelBipedMain() - { - return SmartMoving.getPlayerBase((api.player.model.ModelPlayer)renderPlayerAPI.getModelBipedMainField()); - } - - @Override - public IModelPlayer[] getPlayerModels() - { - api.player.model.ModelPlayer[] modelPlayers = api.player.model.ModelPlayerAPI.getAllInstances(); - if(allModelPlayers != null && (allModelPlayers == modelPlayers || modelPlayers.length == 0 && allModelPlayers.length == 0)) - return allIModelPlayers; - - allModelPlayers = modelPlayers; - allIModelPlayers = new IModelPlayer[modelPlayers.length]; - for(int i=0; i. -// ================================================================== - -package net.smart.properties; - -import java.io.*; -import java.lang.reflect.*; -import java.util.*; - -import net.smart.utilities.*; - -public class Properties extends java.util.Properties -{ - private static final long serialVersionUID = 5319578641402091067L; - - private static int i = 0; - public static final int Boolean = i++; - public static final int Unmodified = i++; - public static final int Modified = i++; - public static final int Float = i++; - public static final int Positive = i++; - public static final int Negative = i++; - public static final int PositiveFactor = i++; - public static final int NegativeFactor = i++; - public static final int IncreasingFactor = i++; - public static final int DecreasingFactor = i++; - public static final int Integer = i++; - public static final int String = i++; - public static final int Strings = i++; - public static final int Operator = i++; - public static final int Constant = i++; - public static final int Key = i++; - public static final int StringMap = i++; - public static final int IntegerMap = i++; - - public final String version; - - public Properties() - { - version = null; - } - - public Properties(File file) - { - load(file); - version = getProperty("move.options.version"); - } - - public Properties(String version, File file) - { - load(file); - this.version = version; - } - - protected List> getProperties() - { - return getProperties(null); - } - - protected List> getProperties(Class type) - { - List> properties = new ArrayList>(); - if(type != null) - return addProperties(properties, type, false); - return addProperties(properties, getClass(), true); - } - - private List> addProperties(List> list, Class type, boolean base) - { - if(base && type.getSuperclass() != null) - addProperties(list, type.getSuperclass(), base); - - Field[] fields = type.getDeclaredFields(); - for(int i = 0; i < fields.length; i++) - { - fields[i].setAccessible(true); - Object value = Reflect.GetField(fields[i], this); - addProperties(list, value); - } - return list; - } - - private void addProperties(List> list, Object value) - { - if(value instanceof Property) - list.add((Property)value); - else if(value instanceof Collection) - { - Iterator iterator = ((Collection)value).iterator(); - while(iterator.hasNext()) - addProperties(list, iterator.next()); - } - } - - public void write(Properties properties) - { - write(properties, null); - } - - public void write(Properties properties, String key) - { - List> propertiesToWrite = getProperties(); - for(int i = 0; i < propertiesToWrite.size(); i++) - { - Property property = propertiesToWrite.get(i); - if(property.isPersistent()) - properties.put(property.getCurrentKey(), key == null ? property.getValueString() : property.getKeyValueString(key)); - } - } - - private boolean load(File file) - { - try - { - if(file.exists()) - load(new FileInputStream(file)); - return true; - } - catch (Exception e) - { - } - return false; - } - - public static int getBaseType(int type) - { - if(type == Properties.Boolean || type == Properties.Unmodified || type == Properties.Modified) - return Properties.Boolean; - if(type == Properties.Float || type == Properties.Positive || type == Properties.Negative || type == Properties.PositiveFactor || type == Properties.NegativeFactor || type == Properties.IncreasingFactor || type == Properties.DecreasingFactor) - return Properties.Float; - if(type == Properties.Integer) - return Properties.Integer; - if(type == Properties.Strings) - return Properties.Strings; - if(type == Properties.StringMap) - return Properties.StringMap; - if(type == Properties.IntegerMap) - return Properties.IntegerMap; - return Properties.String; - } - - public static String getBaseTypeName(int baseType) - { - if(baseType == Properties.Boolean) - return "boolean"; - if(baseType == Properties.Float) - return "floating point"; - if(baseType == Properties.Integer) - return "integer"; - return "string"; - } - - public static Object getDefaultValue(int type) - { - if(type == Boolean) - return false; - if(type == Unmodified) - return true; - if(type == Modified) - return false; - - if(type == Integer) - return 0; - - if(type == Float) - return 0F; - if(type == Positive) - return 0F; - if(type == Negative) - return 0F; - if(type == PositiveFactor) - return 1F; - if(type == NegativeFactor) - return 1F; - if(type == IncreasingFactor) - return 1F; - if(type == DecreasingFactor) - return 1F; - - if(type == String) - return ""; - if(type == Strings) - return new String[0]; - if(type == StringMap) - return new HashMap(); - if(type == IntegerMap) - return new HashMap(); - return null; - } - - public static Object getMinimumValue(int type) - { - if(type == Properties.Positive) - return 0F; - if(type == Properties.PositiveFactor) - return 0F; - if(type == Properties.IncreasingFactor) - return 1F; - if(type == Properties.DecreasingFactor) - return 0F; - return null; - } - - public static Object getMaximumValue(int type) - { - if(type == Properties.Negative) - return 0F; - if(type == Properties.NegativeFactor) - return 0F; - if(type == Properties.DecreasingFactor) - return 1F; - return null; - } - - public static Property Unmodified() - { - return Property(Unmodified); - } - - public static Property Unmodified(String key, String... versions) - { - return Unmodified().key(key, versions); - } - - public static Property Modified() - { - return Property(Modified); - } - - public static Property Modified(String key, String... versions) - { - return Modified().key(key, versions); - } - - public static Property Integer() - { - return Property(Integer); - } - - public static Property Integer(String key, String... versions) - { - return Integer().key(key, versions); - } - - public static Property Float() - { - return Property(Float); - } - - public static Property Float(String key, String... versions) - { - return Float().key(key, versions); - } - - public static Property Positive() - { - return Property(Positive); - } - - public static Property Positive(String key, String... versions) - { - return Positive().key(key, versions); - } - - public static Property Negative() - { - return Property(Negative); - } - - public static Property Negative(String key, String... versions) - { - return Negative().key(key, versions); - } - - public static Property PositiveFactor() - { - return Property(PositiveFactor); - } - - public static Property PositiveFactor(String key, String... versions) - { - return PositiveFactor().key(key, versions); - } - - public static Property NegativeFactor() - { - return Property(NegativeFactor); - } - - public static Property NegativeFactor(String key, String... versions) - { - return NegativeFactor().key(key, versions); - } - - public static Property IncreasingFactor() - { - return Property(IncreasingFactor); - } - - public static Property IncreasingFactor(String key, String... versions) - { - return IncreasingFactor().key(key, versions); - } - - public static Property DecreasingFactor() - { - return Property(DecreasingFactor); - } - - public static Property DecreasingFactor(String key, String... versions) - { - return DecreasingFactor().key(key, versions); - } - - public static Property String() - { - return Property(String); - } - - public static Property String(String key, String... versions) - { - return String().key(key, versions); - } - - public static Property Strings() - { - return Property(Strings); - } - - public static Property Strings(String key, String... versions) - { - return Strings().key(key, versions); - } - - public static Property> StringMap() - { - return Property(StringMap); - } - - public static Property> StringMap(String key, String... versions) - { - return StringMap().key(key, versions); - } - - public static Property> IntegerMap() - { - return Property(IntegerMap); - } - - public static Property> IntegerMap(String key, String... versions) - { - return IntegerMap().key(key, versions); - } - - private static Property Property(int type) - { - return new Property(type); - } - - public static Value Value(Boolean base) - { - return new Value(Boolean).put(base); - } - - public static Value Value(Float base) - { - return new Value(Float).put(base); - } - - public static Value Value(String base) - { - return new Value(String).put(base); - } - - protected static String[] concat(String left, String[] right) - { - return concat(new String[] { left }, right); - } - - protected static String[] concat(String[] left, String[] right) - { - String[] result = new String[left.length + right.length]; - int i = 0; - for(; i < left.length; i++) - result[i] = left[i]; - for(; i < result.length; i++) - result[i] = right[i - left.length]; - return result; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/properties/Property.java b/src/main/java/net/smart/properties/Property.java deleted file mode 100644 index 91ecf545..00000000 --- a/src/main/java/net/smart/properties/Property.java +++ /dev/null @@ -1,827 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.properties; - -import java.io.*; -import java.util.*; - -public class Property -{ - private static final int printWidth = 69; - private String comment; - private String[] header; - private int gap; - - private boolean explicitlyModified; - private boolean implicitlyModified; - private String aquiredString; - private boolean singular; - - private final int type; - private String currentVersion; - private Map versionSources; - private Map versionDefaults; - - private static int i = 0; - private static final int Is = i++; - private static final int And = i++; - private static final int Or = i++; - private static final int Not = i++; - private static final int Plus = i++; - private static final int EitherOr = i++; - private static final int Maximum = i++; - private static final int Minimum = i++; - private static final int ToKeyName = i++; - private static final int ToKeyCode = i++; - private static final int ToBlockConfig = i++; - - public T value; - private Value systemValue; - private Value aquiredValue; - - private Object minValue; - private Object maxValue; - - private Object local; - - private Object left; - private int operator; - private Object right; - - private List> depends = null; - - public Property(int type) - { - this.type = type; - } - - private Property(String key) - { - this(Properties.Key); - set(new Value(key)); - } - - private Property(Object left, int operator, Object right) - { - this(Properties.Operator); - this.left = left; - this.operator = operator; - this.right = right; - } - - private Property(Object local, int operator, Object left, Object right) - { - this(Properties.Operator); - this.local = local; - this.operator = operator; - this.left = left; - this.right = right; - } - - public void update(String key) - { - value = getKeyValue(key); - } - - public void setValue(T value) - { - this.value = value; - systemValue = new Value(value); - aquiredValue = new Value(value); - implicitlyModified = false; - explicitlyModified = false; - } - - public Property singular() - { - singular = true; - return this; - } - - public Property is(Object value) - { - return new Property(this, Is, value); - } - - public Property and(Object value) - { - return new Property(this, And, value); - } - - public Property or(Object value) - { - return new Property(this, Or, value); - } - - public Property andNot(Property value) - { - return and(value.not()); - } - - public Property not() - { - return new Property(this, Not, null); - } - - public Property plus(Object value) - { - return new Property(this, Plus, value); - } - - public Property eitherOr(Object either, Object or) - { - return new Property(this, EitherOr, either, or); - } - - public Property maximum(Object value) - { - return new Property(this, Maximum, value); - } - - public Property minimum(Object value) - { - return new Property(this, Minimum, value); - } - - public Property toKeyName() - { - return new Property(this, ToKeyName, null); - } - - public Property toKeyCode(Integer defaultValue) - { - return new Property(this, ToKeyCode, null).defaults(defaultValue); - } - - public Property>> toBlockConfig() - { - return new Property>>(this, ToBlockConfig, null); - } - - public Property depends(Property... conditions) - { - if(depends == null) - depends = new LinkedList>(); - - for(int i = 0; i < conditions.length; i++) - depends.add(conditions[i]); - - return this; - } - - public Property values(Object defaultValue, Object minValue, Object maxValue) - { - return defaults(defaultValue).range(minValue, maxValue); - } - - public Property up(Object defaultValue, Object minValue) - { - return defaults(defaultValue).min(minValue); - } - - public Property down(Object defaultValue, Object maxValue) - { - return defaults(defaultValue).max(maxValue); - } - - public Property range(Object minValue, Object maxValue) - { - return min(minValue).max(maxValue); - } - - public Property defaults(Object defaultValue, String... versions) - { - versionDefaults = addVersioned(versionDefaults, defaultValue, versions); - return this; - } - - public Property min(Object minValue) - { - this.minValue = minValue; - return this; - } - - public Property max(Object maxValue) - { - this.maxValue = maxValue; - return this; - } - - public Property key(String key, String... versions) - { - if(currentVersion == null) - if(versions != null && versions.length > 0) - currentVersion = versions[0]; - else - currentVersion = Current; - - return source(new Property(key), versions); - } - - public Property source(Object source, String... versions) - { - versionSources = addVersioned(versionSources, source, versions); - return this; - } - - public Property comment(String comment) - { - this.comment = comment; - return this; - } - - public Property section(String... header) - { - gap = 1; - this.header = header; - return this; - } - - public Property chapter(String... header) - { - gap = 2; - this.header = header; - return this; - } - - public Property book(String... header) - { - gap = 3; - this.header = header; - return this; - } - - public void reset() - { - explicitlyModified = false; - implicitlyModified = false; - - value = null; - systemValue = null; - aquiredValue = null; - - reset(minValue); - reset(maxValue); - - reset(left); - reset(right); - if(depends != null) - for(int i = 0; i < depends.size(); i++) - reset(depends.get(i)); - } - - private static void reset(Object value) - { - if(value instanceof Property) - ((Property)value).reset(); - } - - public boolean load(Properties... propertiesList) - { - if(systemValue != null) - return true; - - if(type == Properties.Constant) - return true; - - if(type == Properties.Operator) - { - if(operator == EitherOr) - { - if(getValue(left) == null || getValue(right) == null || getValue(local) == null) - return false; - } - - if(operator == Is || operator == And || operator == Or || operator == Plus || operator == Maximum || operator == Minimum) - { - if(getValue(left) == null || getValue(right) == null) - return false; - } - - if(operator == Not || operator == ToKeyName || operator == ToKeyCode || operator == ToBlockConfig) - { - if(getValue(left) == null) - return false; - } - - Object operatorValue = null; - if(operator == Is) - operatorValue = getValue(left).is(getValue(right)); - else if(operator == And) - operatorValue = getValue(left).and(getValue(right)); - else if(operator == Or) - operatorValue = getValue(left).or(getValue(right)); - else if(operator == Not) - operatorValue = getValue(left).not(); - else if(operator == Plus) - operatorValue = getValue(left).plus(getValue(right)); - else if(operator == EitherOr) - operatorValue = getValue(local).eitherOr(getValue(left), getValue(right)); - else if(operator == Maximum) - operatorValue = getValue(left).maximum(getValue(right)); - else if(operator == Minimum) - operatorValue = getValue(left).minimum(getValue(right)); - else if(operator == ToKeyName) - operatorValue = getValue(left).toKeyName(); - else if(operator == ToKeyCode) - operatorValue = getValue(left).toKeyCode(); - else if(operator == ToBlockConfig) - operatorValue = getValue(left).toBlockConfig(); - - if(operatorValue == null) - throw new RuntimeException("Unknown operator '" + operator + "' found"); - - return set(getValue(operatorValue)); - } - - if(propertiesList == null || versionSources == null) - return false; - - if(depends != null) - { - for(int i = 0; i < depends.size(); i++) - if(getValue(depends.get(i)) == null) - return false; - } - - Object minObject = getMinimumValue(); - Value minValue = getValue(minObject); - if(minObject != null && minValue == null) - return false; - - Object maxObject = getMaximumValue(); - Value maxValue = getValue(maxObject); - if(maxObject != null && maxValue == null) - return false; - - Value defaultValue = getValue(getDefaultValue()); - for(int i = 0; i < propertiesList.length; i++) - { - Properties properties = propertiesList[i]; - Object source = getVersionSource(properties.version); - if(source != null) - { - String key = getKey(source); - aquiredValue = key != null ? getPropertyValue(properties, key) : getValue(source); - if(aquiredValue != null) - { - Value initValue = aquiredValue.clone(); - if(depends != null) - for(int n = 0; n < depends.size(); n++) - initValue.withDependency(getValue(depends.get(n)), defaultValue); - - if(minObject != null) - initValue.withMinimum(minValue, defaultValue); - - if(maxObject != null) - initValue.withMaximum(maxValue, defaultValue); - - return set(initValue); - } - else if(key == null) - return false; - } - } - return set(defaultValue); - } - - private boolean set(Value initValue) - { - systemValue = initValue; - update(null); - return true; - } - - private static Map addVersioned(Map versioned, Object value, String... versions) - { - if(versioned == null) - versioned = new Hashtable(1); - - if(versions == null || versions.length == 0) - versions = CurrentArray; - - for(int i = 0; i < versions.length; i++) - versioned.put(versions[i], value); - return versioned; - } - - public T getKeyValue(String key) - { - T value = systemValue.get(key); - if(value == null) - value = getValue(getDefaultValue()).get(null); - if(value == null) - value = (T)Properties.getDefaultValue(type); - return value; - } - - private Value getValue(Object value) - { - if(value instanceof Property) - { - Property property = (Property)value; - property.load((Properties[])null); - return (Value)property.systemValue; - } - if(value instanceof Value) - return (Value)value; - return new Value((T)value); - } - - private Object getDefaultValue(String version) - { - Object defaultValue = null; - if(versionDefaults != null) - { - if(version != null) - defaultValue = versionDefaults.get(version); - if(defaultValue == null) - defaultValue = versionDefaults.get(Current); - } - if(defaultValue == null) - defaultValue = Properties.getDefaultValue(type); - return defaultValue; - } - - private Object getDefaultValue() - { - return getDefaultValue(Current); - } - - private Object getMinimumValue() - { - if(minValue != null) - return minValue; - return Properties.getMinimumValue(type); - } - - private Object getMaximumValue() - { - if(maxValue != null) - return maxValue; - return Properties.getMaximumValue(type); - } - - private Object getVersionSource(String version) - { - if(versionSources == null) - return null; - - Object source = null; - if(version != null) - source = versionSources.get(version); - if(source == null) - source = versionSources.get(Current); - return source; - } - - private Value getPropertyValue(Properties properties, String key) - { - String propertyString = properties.getProperty(key); - if(propertyString != null) - aquiredString = propertyString; - - String stringToParse = propertyString; - if(propertyString != null) - { - stringToParse = propertyString.trim(); - explicitlyModified = stringToParse.endsWith("!"); - if(explicitlyModified) - stringToParse = stringToParse.substring(0, stringToParse.length() - 1); - stringToParse = stringToParse.trim(); - } - - Value value = parsePropertyValue(stringToParse); - implicitlyModified = stringToParse != null && (value == null || !value.equals(getValue(getDefaultValue(properties.version)))); - if(!explicitlyModified && !implicitlyModified) - return getValue(getDefaultValue()); - return value; - } - - private Value parsePropertyValue(String stringToParse) - { - if(stringToParse != null) - return new Value(type).load(stringToParse, singular); - return null; - } - - public boolean print(PrintWriter printer, String[] sorted, String version, boolean comments) - { - if(!isPersistent() || systemValue == null) - return false; - - if(getVersionSource(version) == null) - return false; - - int gap = this.gap + (comment == null ? -1 : 1); - for(int i = 0; i < gap; i++) - printer.println(); - - if(header != null && header.length > 0) - printHeader(printer); - - if(comment != null && comments) - { - printer.print("# "); - printer.print(comment); - printer.println(); - } - - if(aquiredString == null) - { - printValue(printer, sorted, false); - return true; - } - - boolean error = false; - - Iterator unparsed = aquiredValue.getUnparsableStrings(); - while(unparsed != null && unparsed.hasNext()) - { - String unparsableString = unparsed.next(); - printErrorPrefix(printer); - printer.print("Could not interpret string \""); - printer.print(unparsableString); - printer.print("\" as "); - printer.print(Properties.getBaseTypeName(Properties.getBaseType(type))); - printer.print(" value, used "); - printer.print(!aquiredString.isEmpty() && aquiredValue.get(null) != null ? "local" : "system"); - printer.print(" default"); - printValuePostfix(printer, null); - printErrorPostfix(printer); - error = true; - } - - Object minObject = getMinimumValue(); - Value minValue = getValue(minObject); - - Object maxObject = getMaximumValue(); - Value maxValue = getValue(maxObject); - - Iterator keys = Value.GetAllKeys(systemValue); - while(keys.hasNext()) - { - String key = keys.next(); - - T parsedSingleValue = aquiredValue.getStored(key); - T aquiredSingleValue = aquiredValue.get(key); - T usedSingleValue = systemValue.getStored(key); - - if(parsedSingleValue == null) - if(aquiredSingleValue == null) - continue; - else if(aquiredSingleValue.equals(usedSingleValue)) - continue; - else - { - // local default value "aquiredSingleValue" invalid for specific key - } - else - { - if(parsedSingleValue.equals(usedSingleValue)) - continue; - // else - // local keyed value "parsedSingleValue" invalid - } - - if(Properties.getBaseType(type) == Properties.Boolean && depends != null && !depends.isEmpty()) - { - String dependKey = null; - for(int i = 0; i < depends.size(); i++) - { - Property depend = depends.get(i); - String currentDependKey = depend.getCurrentKey(); - if(currentDependKey != null && !depend.getKeyValue(key)) - { - dependKey = currentDependKey; - break; - } - } - - printWarnPrefix(printer); - printValuePrefix(printer, key); - printer.print("is ignored because "); - - if(dependKey != null) - { - printer.print("the "); - - if(key == Value.Null) - printer.print("default"); - else - printer.print("\"" + key + "\""); - - printer.print(" value of property \""); - printer.print(dependKey); - printer.print("\" is \"false\""); - } - else - printer.print("one of the restricting expressions evaluated to \"false\""); - - printWarnPostfix(printer); - error = true; - } - else - { - printErrorPrefix(printer); - printValuePrefix(printer, key); - printer.print("was out of range, used "); - - if(minValue != null && usedSingleValue.equals(minValue.get(key))) - printer.print("minimum"); - else if(maxValue != null && usedSingleValue.equals(maxValue.get(key))) - printer.print("maximum"); - else - printer.print("in-range"); - - printValuePostfix(printer, key); - printErrorPostfix(printer); - error = true; - } - } - - printValue(printer, sorted, error); - return true; - } - - private void printValue(PrintWriter printer, String[] sorted, boolean error) - { - printer.print(getCurrentKey()); - printer.print(":"); - - if(aquiredString != null && (error || explicitlyModified)) - printer.print(aquiredString); - else if(implicitlyModified && systemValue.equals(getValue(getDefaultValue()))) - { - printer.print(aquiredString); - printer.print("!"); - } - else - systemValue.print(printer, sorted); - } - - private void printHeader(PrintWriter printer) - { - String title = header[0]; - String body = header.length > 1 ? header[1] : null; - char separator = gap == 3 ? '=' : (gap == 2 ? '-' : ' '); - printSeparation(printer, separator, printWidth); - printer.print("# "); - printer.println(title); - if(body != null) - { - printSeparation(printer, '-', title.length()); - int lineWidth = printWidth - 2; - while(true) - { - printer.print("# "); - if(body.length() <= lineWidth) - { - printer.println(body); - break; - } - - int i; - for(i = lineWidth; i > 0; i--) - if(body.charAt(i) == ' ') - break; - - printer.println(body.substring(0, i)); - body = body.substring(i + 1); - } - } - printSeparation(printer, separator, printWidth); - printer.println(); - } - - private static void printSeparation(PrintWriter printer, char seperator, int length) - { - printer.print("# "); - for(int i = 0; i < length; i++) - printer.print(seperator); - printer.println(); - } - - private void printValuePrefix(PrintWriter printer, String key) - { - printer.print("Interpreted "); - - if(key != Value.Null) - { - printer.print("\""); - printer.print(key); - printer.print("\" "); - } - - printer.print("value \""); - printer.print(aquiredValue.get(key)); - printer.print("\" "); - } - - private void printValuePostfix(PrintWriter printer, String key) - { - printer.print(" value \""); - printer.print(aquiredString == null || aquiredString.isEmpty() ? getValue(getDefaultValue()) : getKeyValue(key)); - printer.print("\" instead"); - } - - private static void printErrorPrefix(PrintWriter printer) - { - printErrorPrefix(printer, false); - } - - private static void printWarnPrefix(PrintWriter printer) - { - printErrorPrefix(printer, true); - } - - private static void printErrorPrefix(PrintWriter printer, boolean warning) - { - printer.print("#"); - if(!warning) - printer.print("!!"); - printer.print("! "); - } - - private static void printErrorPostfix(PrintWriter printer) - { - printErrorPostfix(printer, false); - } - - private static void printWarnPostfix(PrintWriter printer) - { - printErrorPostfix(printer, true); - } - - private static void printErrorPostfix(PrintWriter printer, boolean warning) - { - printer.print(" !"); - if(!warning) - printer.print("!!"); - printer.println("#"); - } - - public boolean isPersistent() - { - return versionSources != null && versionSources.size() > 0; - } - - public String getCurrentKey() - { - if(isPersistent()) - return getKey(getVersionSource(currentVersion)); - return null; - } - - private static String getKey(Object candidate) - { - if(candidate instanceof Property) - { - Property property = (Property)candidate; - if(property.type == Properties.Key) - return (String)property.value; - } - return null; - } - - @Override - public String toString() - { - if(isPersistent()) - return getCurrentKey(); - return super.toString(); - } - - public String getKeyValueString(String key) - { - return getValueString(getKeyValue(key)); - } - - public String getValueString() - { - return getValueString(value); - } - - public String getValueString(T value) - { - return value != null ? Value.createDisplayString(value) : null; - } - - private static final String Current = ""; - private static final String[] CurrentArray = new String[] { Current }; -} \ No newline at end of file diff --git a/src/main/java/net/smart/properties/Value.java b/src/main/java/net/smart/properties/Value.java deleted file mode 100644 index 6b151a46..00000000 --- a/src/main/java/net/smart/properties/Value.java +++ /dev/null @@ -1,692 +0,0 @@ -// ================================================================== -// This file is part of Smart Moving. -// -// Smart Moving 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. -// -// Smart Moving 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 Smart Moving. If not, see . -// ================================================================== - -package net.smart.properties; - -import java.io.*; -import java.lang.reflect.*; -import java.util.*; - -import net.smart.utilities.*; - -public class Value -{ - private int type; - - private T value; - private Dictionary keyValues; - private List unparsableStrings; - - public Value(int type) - { - this.type = type; - } - - public Value(T value) - { - this.value = value; - } - - public Value(Value value) - { - type = value.type; - this.value = value.value; - if(value.keyValues != null) - { - keyValues = new Hashtable(); - Enumeration keys = value.keyValues.keys(); - while(keys.hasMoreElements()) - { - String key = keys.nextElement(); - keyValues.put(key, value.keyValues.get(key)); - } - } - } - - public Value put(T value) - { - return put(null, value); - } - - public T get(String key) - { - if(key != null && keyValues != null) - { - T value = keyValues.get(key); - if(value != null) - return value; - } - return value; - } - - public T getStored(String key) - { - if(key == null || key == Null) - return value; - if(keyValues != null) - return keyValues.get(key); - return null; - } - - private T get(String key, Value defaultValue) - { - T result = get(key); - if(result == null) - { - result = value; - if(result == null) - result = defaultValue.value; - } - return result; - } - - public Value put(String key, T value) - { - if(key == null || key == Null || key.isEmpty()) - this.value = value; - else - { - if(keyValues == null) - keyValues = new Hashtable(); - keyValues.put(key, value); - } - return this; - } - - public void withDependency(Value dependency, Value defaultValue) - { - Iterator iterator = GetAllKeys(this, dependency); - while(iterator.hasNext()) - { - String key = iterator.next(); - if(get(key, defaultValue).equals(true) && dependency.get(key).equals(false)) - put(key, (T)(Object)false); - } - } - - public void withMinimum(Value minimum, Value defaultValue) - { - Iterator iterator = GetAllKeys(this, minimum); - while(iterator.hasNext()) - { - String key = iterator.next(); - put(key, (T)(Object)Math.max((Float)get(key, defaultValue), (Float)minimum.get(key))); - } - } - - public void withMaximum(Value maximum, Value defaultValue) - { - Iterator iterator = GetAllKeys(this, maximum); - while(iterator.hasNext()) - { - String key = iterator.next(); - put(key, (T)(Object)Math.min((Float)get(key, defaultValue), (Float)maximum.get(key))); - } - } - - public Value is(Value right) - { - Value result = new Value(Properties.Boolean); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - T leftValue = get(key); - T rightValue = right.get(key); - result.put(key, leftValue == null && rightValue == null || leftValue != null && rightValue != null && leftValue.equals(rightValue)); - } - return result; - } - - public Value and(Value right) - { - Value result = new Value(Properties.Boolean); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, ((Boolean)get(key)) && ((Boolean)right.get(key))); - } - return result; - } - - public Value or(Value right) - { - Value result = new Value(Properties.Boolean); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, ((Boolean)get(key)) || ((Boolean)right.get(key))); - } - return result; - } - - public Value not() - { - Value result = new Value(Properties.Boolean); - Iterator iterator = GetAllKeys(this); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, !((Boolean)get(key))); - } - return result; - } - - public Value plus(Value right) - { - Value result = new Value(Properties.Float); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, ((Float)get(key)) + ((Float)right.get(key))); - } - return result; - } - - public Value eitherOr(Value left, Value right) - { - Value result = new Value(Properties.getBaseType(left.type)); - Iterator iterator = GetAllKeys(this, left, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, ((Boolean)get(key)) ? left.get(key) : right.get(key)); - } - return result; - } - - public Value maximum(Value right) - { - Value result = new Value(Properties.Float); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, Math.max((Float)get(key), (Float)right.get(key))); - } - return result; - } - - public Value minimum(Value right) - { - Value result = new Value(Properties.Float); - Iterator iterator = GetAllKeys(this, right); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, Math.min((Float)get(key), (Float)right.get(key))); - } - return result; - } - - public Value toKeyName() - { - Value result = new Value(Properties.String); - Iterator iterator = GetAllKeys(this); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, toKeyName((Integer)get(key))); - } - return result; - } - - public Value toKeyCode() - { - Value result = new Value(Properties.Integer); - Iterator iterator = GetAllKeys(this); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, toKeyCode((String)get(key))); - } - return result; - } - - public Value>> toBlockConfig() - { - Value>> result = new Value>>(Properties.Strings); - Iterator iterator = GetAllKeys(this); - while(iterator.hasNext()) - { - String key = iterator.next(); - result.put(key, toBlockConfig((String[])get(key))); - } - return result; - } - - @Override - public Value clone() - { - return new Value(this); - } - - public static Iterator GetAllKeys(Value... values) - { - return GetAllKeys(null, values); - } - - public static Iterator GetAllKeys(String[] sorted, Value... values) - { - _allkeys.clear(); - for(int i = 0; i < values.length; i++) - { - Value value = values[i]; - if(value.keyValues != null) - { - Enumeration keys = value.keyValues.keys(); - while(keys.hasMoreElements()) - _allkeys.add(keys.nextElement()); - } - } - Collections.sort(_allkeys); - _allkeys.add(0, Null); - - for(int i = 0, n = 1; sorted != null && i < sorted.length; i++) - { - String sort = sorted[i]; - if(sort == null || sort == Null) - continue; - - if(_allkeys.remove(sort)) - _allkeys.add(n++, sort); - } - - return _allkeys.iterator(); - } - - @Override - public boolean equals(Object other) - { - if(!(other instanceof Value)) - return false; - - Value otherValue = (Value)other; - if((value == null) != (otherValue.value == null)) - return false; - if(value != null && !valuesEqual(value, otherValue.value)) - return false; - if((keyValues == null ? 0 : keyValues.size()) != (otherValue.keyValues == null ? 0 : otherValue.keyValues.size())) - return false; - if(keyValues != null && keyValues.size() != 0) - { - Enumeration keys = keyValues.keys(); - while(keys.hasMoreElements()) - { - String key = keys.nextElement(); - T otherKeyValue = otherValue.keyValues.get(key); - if(otherKeyValue == null) - return false; - T keyValue = keyValues.get(key); - if(!valuesEqual(keyValue, otherKeyValue)) - return false; - } - } - return true; - } - - @Override - public int hashCode() - { - return value == null ? 0 : value.hashCode(); - } - - private boolean valuesEqual(T first, T second) - { - if(!(first instanceof Object[])) - return first.equals(second); - - Object[] firstArray = (Object[])first; - Object[] secondArray = (Object[])second; - - if(firstArray.length != secondArray.length) - return false; - - for(int i=0; i load(String content, boolean singular) - { - if(content == null || singular) - { - value = parsePropertyElement(content); - return this; - } - - String[] elements = content.split(";"); - for(int i = 0; i < elements.length; i++) - { - String element = elements[i]; - int seperatorIndex = element.indexOf(':'); - String key = null; - String keyValue = null; - if(seperatorIndex > 0) - { - key = element.substring(0, seperatorIndex); - keyValue = element.substring(seperatorIndex + 1); - } - else - keyValue = element; - - T value = parsePropertyElement(keyValue); - if(value != null) - put(key, value); - else - { - if (unparsableStrings == null) - unparsableStrings = new ArrayList(); - unparsableStrings.add(keyValue); - } - } - return this; - } - - public Iterator getUnparsableStrings() - { - if(unparsableStrings != null) - return unparsableStrings.iterator(); - return null; - } - - public void print(PrintWriter printer, String[] sorted) - { - boolean first = true; - Iterator keys = GetAllKeys(sorted, this); - while(keys.hasNext()) - { - String key = keys.next(); - if(key == Null && value == null) - continue; - - if(!first) - printer.print(";"); - else - first = false; - - if(key != Null) - { - printer.print(key); - printer.print(":"); - } - - printDisplayString(printer, get(key)); - } - } - - @Override - public String toString() - { - StringWriter result = new StringWriter(); - print(new PrintWriter(result), null); - return result.toString(); - } - - public static String createDisplayString(Object value) - { - if(value instanceof String[] || value instanceof Map) - { - StringWriter result = new StringWriter(); - printDisplayString(new PrintWriter(result), value); - return result.toString(); - } - - return getDisplayString(value); - } - - private static void printDisplayString(PrintWriter printer, Object value) - { - if(value instanceof String[]) - { - boolean first = true; - String[] values = (String[])value; - for(int i = 0; i < values.length; i++) - { - if(first) - first = false; - else - printer.print(","); - printer.print(getDisplayString(values[i])); - } - } - else if(value instanceof Map) - { - boolean first = true; - Map values = (Map)value; - List keys = new ArrayList(values.size()); - for(Object key : values.keySet()) - keys.add((String)key); - Collections.sort(keys); - for(int i = 0; i < keys.size(); i++) - { - if(first) - first = false; - else - printer.print(","); - String key = keys.get(i); - printer.print(getDisplayString(key)); - printer.print(","); - printer.print(getDisplayString(values.get(key))); - } - } - else - printer.print(getDisplayString(value)); - } - - private static String getDisplayString(Object value) - { - String result = value.toString(); - if(result.endsWith(".0")) - result = result.substring(0, result.length() - 2); - return result; - } - - private T parsePropertyElement(String stringToParse) - { - int baseType = Properties.getBaseType(type); - if(baseType == Properties.Boolean) - return (T)tryParseBoolean(stringToParse); - if(baseType == Properties.Float) - return (T)tryParseFloat(stringToParse); - if(baseType == Properties.Integer) - return (T)tryParseInteger(stringToParse); - if(baseType == Properties.Strings) - return (T)tryParseStrings(stringToParse); - if(baseType == Properties.StringMap) - return (T)tryParseStringMap(stringToParse); - if(baseType == Properties.IntegerMap) - return (T)tryParseIntegerMap(stringToParse); - if(baseType == Properties.String) - return (T)tryParseString(stringToParse); - return null; - } - - public static Boolean tryParseBoolean(String value) - { - try - { - if(value != null) - return value.equals("true") ? Boolean.TRUE : value.equals("false") ? Boolean.FALSE : null; - } - catch(Exception e) - { - } - return null; - } - - public static Float tryParseFloat(String value) - { - try - { - if(value != null) - return Float.parseFloat(value); - } - catch(Exception e) - { - } - return null; - } - - public static Integer tryParseInteger(String value) - { - try - { - if(value != null) - return Integer.parseInt(value); - } - catch(Exception e) - { - } - return null; - } - - public static String tryParseString(String value) - { - return value == null ? null : value; - } - - public static String[] tryParseStrings(String value) - { - return value == null ? null : (value.isEmpty() ? new String[0] : value.split(",")); - } - - public static Map tryParseStringMap(String value) - { - String[] keyValues = value.split(","); - Map result = new HashMap(); - for(int i=0; i tryParseIntegerMap(String value) - { - String[] keyValues = value.split(","); - Map result = new HashMap(); - for(int i=0; i e(T e) - { - return this.put("e", e); - } - - public Value m(T m) - { - return this.put("m", m); - } - - public Value h(T h) - { - return this.put("h", h); - } - - public Value c(T c) - { - return this.put("c", c); - } - - public Value a(T a) - { - return this.put("a", a); - } - - public final static String Null = "null"; - private final static List _allkeys = new LinkedList(); - - public final static Class keyboard = Reflect.LoadClass(Value.class, new Name("org.lwjgl.input.Keyboard"), false); - public final static Class mouse = Reflect.LoadClass(Value.class, new Name("org.lwjgl.input.Mouse"), false); - - public final static Method _getKeyName = keyboard != null ? Reflect.GetMethod(keyboard, new Name("getKeyName"), int.class) : null; - public final static Method _getKeyIndex = keyboard != null ? Reflect.GetMethod(keyboard, new Name("getKeyIndex"), String.class) : null; - - public final static Method _getButtonName = mouse != null ? Reflect.GetMethod(mouse, new Name("getButtonName"), int.class) : null; - public final static Method _getButtonIndex = mouse != null ? Reflect.GetMethod(mouse, new Name("getButtonIndex"), String.class) : null; - - public static String toKeyName(Integer keyCode) - { - if(keyCode == null) - return null; - - if(keyCode >= 0) - return (String)Reflect.Invoke(_getKeyName, null, keyCode); - - return (String)Reflect.Invoke(_getButtonName, null, keyCode + 100); - } - - private static Integer toKeyCode(String keyName) - { - if(keyName == null) - return null; - - keyName = keyName.toUpperCase(); - int keyCode = (Integer)Reflect.Invoke(_getKeyIndex, null, keyName); - if(keyCode > 0) - return keyCode; - - keyCode = (Integer)Reflect.Invoke(_getButtonIndex, null, keyName); - if(keyCode >= 0) - return keyCode - 100; - return null; - } - - private static Dictionary> toBlockConfig(String[] config) - { - if(config == null) - return null; - - Dictionary> result = new Hashtable>(); - for(int i=0; i 0) - { - Set metaDatas = new HashSet(); - - String blockName = elements[0]; - result.put(blockName, metaDatas); - - if (blockName.matches("[0-9]+")) - result.put(Integer.parseInt(blockName), metaDatas); - - for(int n=1; n. -// ================================================================== - -package net.smart.render; - -import net.minecraft.client.model.*; -import net.minecraft.entity.*; - -public interface IModelPlayer -{ - SmartRenderModel getRenderModel(); - - void initialize(ModelRenderer bipedBody, ModelRenderer bipedCloak, ModelRenderer bipedHead, ModelRenderer bipedEars, ModelRenderer bipedHeadwear, ModelRenderer bipedRightArm, ModelRenderer bipedLeftArm, ModelRenderer bipedRightLeg, ModelRenderer bipedLeftLeg); - - void superRender(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - - void superSetRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity); - - void superRenderCloak(float f); - - ModelRenderer getOuter(); - ModelRenderer getTorso(); - ModelRenderer getBody(); - ModelRenderer getBreast(); - ModelRenderer getNeck(); - ModelRenderer getHead(); - ModelRenderer getHeadwear(); - ModelRenderer getRightShoulder(); - ModelRenderer getRightArm(); - ModelRenderer getLeftShoulder(); - ModelRenderer getLeftArm(); - ModelRenderer getPelvic(); - ModelRenderer getRightLeg(); - ModelRenderer getLeftLeg(); - ModelRenderer getEars(); - ModelRenderer getCloak(); - - void animateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); - void animateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor); -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/IRenderPlayer.java b/src/main/java/net/smart/render/IRenderPlayer.java deleted file mode 100644 index 102eb0b2..00000000 --- a/src/main/java/net/smart/render/IRenderPlayer.java +++ /dev/null @@ -1,48 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import net.minecraft.client.entity.*; -import net.minecraft.client.model.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.player.*; - -public interface IRenderPlayer -{ - IModelPlayer createModel(ModelBiped existing, float f); - - void initialize(ModelBiped modelBipedMain, ModelBiped modelArmorChestplate, ModelBiped modelArmor, float shadowSize); - - void superRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks); - - void superDrawFirstPersonHand(EntityPlayer entityPlayer); - - void superRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2); - - void superRenderSpecials(AbstractClientPlayer entityplayer, float f); - - RenderManager getRenderManager(); - - ModelBiped getModelBipedMain(); - - ModelBiped getModelArmorChestplate(); - - ModelBiped getModelArmor(); - - IModelPlayer[] getRenderModels(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/ModelCapeRenderer.java b/src/main/java/net/smart/render/ModelCapeRenderer.java deleted file mode 100644 index 9f1d3afd..00000000 --- a/src/main/java/net/smart/render/ModelCapeRenderer.java +++ /dev/null @@ -1,90 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import net.minecraft.client.model.*; -import net.minecraft.entity.player.*; -import net.minecraft.util.*; - -import org.lwjgl.opengl.GL11; - -public class ModelCapeRenderer extends ModelSpecialRenderer -{ - public ModelCapeRenderer(ModelBase modelBase, int i, int j, ModelRotationRenderer baseRenderer, ModelRotationRenderer outerRenderer) - { - super(modelBase, i, j, baseRenderer); - outer = outerRenderer; - } - - public void beforeRender(EntityPlayer entityplayer, float factor) - { - this.entityplayer = entityplayer; - this.setFactor = factor; - - super.beforeRender(true); - } - - @Override - public void preTransform(float factor, boolean push) - { - super.preTransform(factor, push); - - double d = (entityplayer.field_71091_bM + (entityplayer.field_71094_bP - entityplayer.field_71091_bM) * setFactor) - (entityplayer.prevPosX + (entityplayer.posX - entityplayer.prevPosX) * setFactor); - double d1 = (entityplayer.field_71096_bN + (entityplayer.field_71095_bQ - entityplayer.field_71096_bN) * setFactor) - (entityplayer.prevPosY + (entityplayer.posY - entityplayer.prevPosY) * setFactor); - double d2 = (entityplayer.field_71097_bO + (entityplayer.field_71085_bR - entityplayer.field_71097_bO) * setFactor) - (entityplayer.prevPosZ + (entityplayer.posZ - entityplayer.prevPosZ) * setFactor); - float f1 = entityplayer.prevRenderYawOffset + (entityplayer.renderYawOffset - entityplayer.prevRenderYawOffset) * setFactor; - double d3 = MathHelper.sin((f1 * 3.141593F) / 180F); - double d4 = -MathHelper.cos((f1 * 3.141593F) / 180F); - float f2 = (float)d1 * 10F; - if(f2 < -6F) - { - f2 = -6F; - } - if(f2 > 32F) - { - f2 = 32F; - } - float f3 = (float)(d * d3 + d2 * d4) * 100F; - float f4 = (float)(d * d4 - d2 * d3) * 100F; - if(f3 < 0.0F) - { - f3 = 0.0F; - } - float f5 = entityplayer.prevCameraYaw + (entityplayer.cameraYaw - entityplayer.prevCameraYaw) * setFactor; - f2 += MathHelper.sin((entityplayer.prevDistanceWalkedModified + (entityplayer.distanceWalkedModified - entityplayer.prevDistanceWalkedModified) * setFactor) * 6F) * 32F * f5; - - float localAngle = 6F + f3 / 2.0F + f2; - float localAngleMax = Math.max(70.523F - outer.rotateAngleX * RadiantToAngle, 6F); - float realLocalAngle = Math.min(localAngle, localAngleMax); - - GL11.glRotatef(realLocalAngle, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(f4 / 2.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-f4 / 2.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); - } - - @Override - public boolean canBeRandomBoxSource() - { - return false; - } - - private final ModelRotationRenderer outer; - private EntityPlayer entityplayer; - private float setFactor; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/ModelEarsRenderer.java b/src/main/java/net/smart/render/ModelEarsRenderer.java deleted file mode 100644 index 657a3536..00000000 --- a/src/main/java/net/smart/render/ModelEarsRenderer.java +++ /dev/null @@ -1,61 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.model.*; - -public class ModelEarsRenderer extends ModelSpecialRenderer -{ - private int _i = 0; - - public ModelEarsRenderer(ModelBase modelBase, int i, int j, ModelRotationRenderer baseRenderer) - { - super(modelBase, i, j, baseRenderer); - } - - public void beforeRender() - { - super.beforeRender(true); - } - - @Override - public void doRender(float f, boolean useParentTransformations) - { - reset(); - super.doRender(f, useParentTransformations); - } - - @Override - public void preTransform(float factor, boolean push) - { - super.preTransform(factor, push); - - int i = _i++ % 2; - GL11.glTranslatef(0.375F * (i * 2 - 1), 0.0F, 0.0F); - GL11.glTranslatef(0.0F, -0.375F, 0.0F); - GL11.glScalef(1.333333F, 1.333333F, 1.333333F); - } - - @Override - public boolean canBeRandomBoxSource() - { - return false; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/ModelPlayer.java b/src/main/java/net/smart/render/ModelPlayer.java deleted file mode 100644 index 21d2c20f..00000000 --- a/src/main/java/net/smart/render/ModelPlayer.java +++ /dev/null @@ -1,180 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import java.util.*; - -import net.minecraft.client.model.*; -import net.minecraft.entity.*; - -public class ModelPlayer extends ModelBiped implements IModelPlayer -{ - private final SmartRenderModel model; - - public ModelPlayer(float f) - { - super(f); - - model = new SmartRenderModel(this, this, bipedBody, bipedCloak, bipedHead, bipedEars, bipedHeadwear, bipedRightArm, bipedLeftArm, bipedRightLeg, bipedLeftLeg); - } - - @Override - public void render(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.render(entity, totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superRender(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.render(entity, totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public SmartRenderModel getRenderModel() - { - return model; - } - - @Override - public void initialize(ModelRenderer bipedBody, ModelRenderer bipedCloak, ModelRenderer bipedHead, ModelRenderer bipedEars, ModelRenderer bipedHeadwear, ModelRenderer bipedRightArm, ModelRenderer bipedLeftArm, ModelRenderer bipedRightLeg, ModelRenderer bipedLeftLeg) - { - this.bipedBody = bipedBody; - this.bipedCloak = bipedCloak; - this.bipedHead = bipedHead; - this.bipedEars = bipedEars; - this.bipedHeadwear = bipedHeadwear; - this.bipedRightArm = bipedRightArm; - this.bipedLeftArm = bipedLeftArm; - this.bipedRightLeg = bipedRightLeg; - this.bipedLeftLeg = bipedLeftLeg; - } - - @Override - public void setRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity) - { - model.setRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor, entity); - } - - @Override - public void superSetRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity) - { - super.setRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor, entity); - } - - @Override - public void renderCloak(float f) - { - model.renderCloak(f); - } - - @Override - public void superRenderCloak(float f) - { - super.renderCloak(f); - } - - @Override - public ModelRenderer getRandomModelBox(Random random) - { - return model.getRandomBox(random); - } - - @Override public ModelRenderer getOuter() { return model.bipedOuter; } - @Override public ModelRenderer getTorso() { return model.bipedTorso; } - @Override public ModelRenderer getBody() { return model.bipedBody; } - @Override public ModelRenderer getBreast() { return model.bipedBreast; } - @Override public ModelRenderer getNeck() { return model.bipedNeck; } - @Override public ModelRenderer getHead() { return model.bipedHead; } - @Override public ModelRenderer getHeadwear() { return model.bipedHeadwear; } - @Override public ModelRenderer getRightShoulder() { return model.bipedRightShoulder; } - @Override public ModelRenderer getRightArm() { return model.bipedRightArm; } - @Override public ModelRenderer getLeftShoulder() { return model.bipedLeftShoulder; } - @Override public ModelRenderer getLeftArm() { return model.bipedLeftArm; } - @Override public ModelRenderer getPelvic() { return model.bipedPelvic; } - @Override public ModelRenderer getRightLeg() { return model.bipedRightLeg; } - @Override public ModelRenderer getLeftLeg() { return model.bipedLeftLeg; } - @Override public ModelRenderer getEars() { return model.bipedEars; } - @Override public ModelRenderer getCloak() { return model.bipedCloak; } - - @Override - public void animateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateHeadRotation(viewHorizontalAngelOffset, viewVerticalAngelOffset); - } - - @Override - public void animateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateSleeping(); - } - - @Override - public void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed); - } - - @Override - public void animateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateRiding(); - } - - @Override - public void animateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateLeftArmItemHolding(); - } - - @Override - public void animateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateRightArmItemHolding(); - } - - @Override - public void animateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateWorkingBody(); - } - - @Override - public void animateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateWorkingArms(); - } - - @Override - public void animateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateSneaking(); - } - - @Override - public void animateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateArms(totalTime); - } - - @Override - public void animateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - model.animateBowAiming(totalTime); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/ModelRotationRenderer.java b/src/main/java/net/smart/render/ModelRotationRenderer.java deleted file mode 100644 index a4a6f924..00000000 --- a/src/main/java/net/smart/render/ModelRotationRenderer.java +++ /dev/null @@ -1,369 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import org.lwjgl.BufferUtils; -import org.lwjgl.opengl.GL11; - -import java.lang.reflect.*; -import java.nio.FloatBuffer; - -import net.minecraft.client.model.*; -import net.smart.utilities.*; - -public class ModelRotationRenderer extends ModelRenderer -{ - protected final static float RadiantToAngle = SmartRenderUtilities.RadiantToAngle; - protected final static float Whole = SmartRenderUtilities.Whole; - protected final static float Half = SmartRenderUtilities.Half; - - public ModelRotationRenderer(ModelBase modelBase, int i, int j, ModelRotationRenderer baseRenderer) - { - super(modelBase, i, j); - rotationOrder = XYZ; - compiled = false; - - base = baseRenderer; - if(base != null) - base.addChild(this); - - scaleX = 1.0F; - scaleY = 1.0F; - scaleZ = 1.0F; - - fadeEnabled = false; - } - - @Override - public void render(float f) - { - if((!ignoreRender && !ignoreBase) || forceRender) - doRender(f, ignoreBase); - } - - public void renderIgnoreBase(float f) - { - if(ignoreBase) - doRender(f, false); - } - - public void doRender(float f, boolean useParentTransformations) - { - if(!preRender(f)) - return; - preTransforms(f, true, useParentTransformations); - GL11.glCallList(displayList); - if (childModels != null) - for (int i = 0; i < childModels.size(); i++) - ((ModelRenderer)childModels.get(i)).render(f); - postTransforms(f, true, useParentTransformations); - } - - public boolean preRender(float f) - { - if(isHidden) - return false; - - if(!showModel) - return false; - - if(!compiled) - UpdateCompiled(); - - if(!compiled) - { - Reflect.Invoke(_compileDisplayList, this, f); - UpdateDisplayList(); - compiled = true; - } - - return true; - } - - public void preTransforms(float f, boolean push, boolean useParentTransformations) - { - if(base != null && !ignoreBase && useParentTransformations) - base.preTransforms(f, push, true); - preTransform(f, push); - } - - public void preTransform(float f, boolean push) - { - if(rotateAngleX != 0.0F || rotateAngleY != 0.0F || rotateAngleZ != 0.0F || ignoreSuperRotation) - { - if(push) - GL11.glPushMatrix(); - - GL11.glTranslatef(rotationPointX * f, rotationPointY * f, rotationPointZ * f); - - if (ignoreSuperRotation) - { - buffer.rewind(); - GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, buffer); - buffer.get(array); - - GL11.glLoadIdentity(); - GL11.glTranslatef(array[12] / array[15], array[13] / array[15], array[14] / array[15]); - } - - rotate(rotationOrder, rotateAngleX, rotateAngleY, rotateAngleZ); - - GL11.glScalef(scaleX, scaleY, scaleZ); - GL11.glTranslatef(offsetX, offsetY, offsetZ); - } - else if(rotationPointX != 0.0F || rotationPointY != 0.0F || rotationPointZ != 0.0F || scaleX != 1.0F || scaleY != 1.0F || scaleZ != 1.0F || offsetX != 0.0F || offsetY != 0.0F || offsetZ != 0.0F) - { - GL11.glTranslatef(rotationPointX * f, rotationPointY * f, rotationPointZ * f); - GL11.glScalef(scaleX, scaleY, scaleZ); - GL11.glTranslatef(offsetX, offsetY, offsetZ); - } - } - - private static void rotate(int rotationOrder, float rotateAngleX, float rotateAngleY, float rotateAngleZ) - { - if((rotationOrder == ZXY) && rotateAngleY != 0.0F) - GL11.glRotatef(rotateAngleY * RadiantToAngle, 0.0F, 1.0F, 0.0F); - - if((rotationOrder == YXZ) && rotateAngleZ != 0.0F) - GL11.glRotatef(rotateAngleZ * RadiantToAngle, 0.0F, 0.0F, 1.0F); - - if((rotationOrder == YZX || rotationOrder == YXZ || rotationOrder == ZXY || rotationOrder == ZYX) && rotateAngleX != 0.0F) - GL11.glRotatef(rotateAngleX * RadiantToAngle, 1.0F, 0.0F, 0.0F); - - if((rotationOrder == XZY || rotationOrder == ZYX) && rotateAngleY != 0.0F) - GL11.glRotatef(rotateAngleY * RadiantToAngle, 0.0F, 1.0F, 0.0F); - - if((rotationOrder == XYZ || rotationOrder == XZY || rotationOrder == YZX || rotationOrder == ZXY || rotationOrder == ZYX ) && rotateAngleZ != 0.0F) - GL11.glRotatef(rotateAngleZ * RadiantToAngle, 0.0F, 0.0F, 1.0F); - - if((rotationOrder == XYZ || rotationOrder == YXZ || rotationOrder == YZX) && rotateAngleY != 0.0F) - GL11.glRotatef(rotateAngleY * RadiantToAngle, 0.0F, 1.0F, 0.0F); - - if((rotationOrder == XYZ || rotationOrder == XZY) && rotateAngleX != 0.0F) - GL11.glRotatef(rotateAngleX * RadiantToAngle, 1.0F, 0.0F, 0.0F); - } - - public void postTransform(float f, boolean pop) - { - if(rotateAngleX != 0.0F || rotateAngleY != 0.0F || rotateAngleZ != 0.0F || ignoreSuperRotation) - { - if(pop) - GL11.glPopMatrix(); - } - else if(rotationPointX != 0.0F || rotationPointY != 0.0F || rotationPointZ != 0.0F || scaleX != 1.0F || scaleY != 1.0F || scaleZ != 1.0F || offsetX != 0.0F || offsetY != 0.0F || offsetZ != 0.0F) - { - GL11.glTranslatef(-offsetX, -offsetY, -offsetZ); - GL11.glScalef(1F / scaleX, 1F / scaleY, 1F / scaleZ); - GL11.glTranslatef(-rotationPointX * f, -rotationPointY * f, -rotationPointZ * f); - } - } - - public void postTransforms(float f, boolean pop, boolean useParentTransformations) - { - postTransform(f, pop); - if(base != null && !ignoreBase && useParentTransformations) - base.postTransforms(f, pop, true); - } - - public void reset() - { - rotationOrder = XYZ; - - scaleX = 1.0F; - scaleY = 1.0F; - scaleZ = 1.0F; - - rotationPointX = 0F; - rotationPointY = 0F; - rotationPointZ = 0F; - - rotateAngleX = 0F; - rotateAngleY = 0F; - rotateAngleZ = 0F; - - ignoreBase = false; - ignoreSuperRotation = false; - forceRender = false; - - offsetX = 0; - offsetY = 0; - offsetZ = 0; - - fadeOffsetX = false; - fadeOffsetY = false; - fadeOffsetZ = false; - fadeRotateAngleX = false; - fadeRotateAngleY = false; - fadeRotateAngleZ = false; - fadeRotationPointX = false; - fadeRotationPointY = false; - fadeRotationPointZ = false; - - previous = null; - } - - @Override - public void renderWithRotation(float f) - { - boolean update = !compiled; - super.renderWithRotation(f); - if(update) - UpdateLocals(); - } - - @Override - public void postRender(float f) - { - boolean update = !compiled; - if(!preRender(f)) - return; - if(update) - UpdateLocals(); - preTransforms(f, false, true); - } - - private void UpdateLocals() - { - UpdateCompiled(); - if(compiled) - UpdateDisplayList(); - } - - private void UpdateCompiled() - { - compiled = (Boolean)Reflect.GetField(_compiled, this); - } - - private void UpdateDisplayList() - { - displayList = (Integer)Reflect.GetField(_displayList, this); - } - - private static Field _compiled = Reflect.GetField(ModelRenderer.class, SmartRenderInstall.ModelRenderer_compiled); - private static Method _compileDisplayList = Reflect.GetMethod(ModelRenderer.class, SmartRenderInstall.ModelRenderer_compileDisplayList, float.class); - private static Field _displayList = Reflect.GetField(ModelRenderer.class, SmartRenderInstall.ModelRenderer_displayList); - - protected ModelRotationRenderer base; - - public boolean ignoreRender; - public boolean forceRender; - - public boolean compiled; - public int displayList; - public int rotationOrder; - - public float scaleX; - public float scaleY; - public float scaleZ; - - public boolean ignoreBase; - public boolean ignoreSuperRotation; - - public static int XYZ = 0; - public static int XZY = 1; - public static int YXZ = 2; - public static int YZX = 3; - public static int ZXY = 4; - public static int ZYX = 5; - - public boolean fadeEnabled; - - public boolean fadeOffsetX; - public boolean fadeOffsetY; - public boolean fadeOffsetZ; - public boolean fadeRotateAngleX; - public boolean fadeRotateAngleY; - public boolean fadeRotateAngleZ; - public boolean fadeRotationPointX; - public boolean fadeRotationPointY; - public boolean fadeRotationPointZ; - - public RendererData previous; - - public void fadeStore(float totalTime) - { - if(previous != null) - { - previous.offsetX = offsetX; - previous.offsetY = offsetY; - previous.offsetZ = offsetZ; - previous.rotateAngleX = rotateAngleX; - previous.rotateAngleY = rotateAngleY; - previous.rotateAngleZ = rotateAngleZ; - previous.rotationPointX = rotationPointX; - previous.rotationPointY = rotationPointY; - previous.rotationPointZ = rotationPointZ; - previous.totalTime = totalTime; - } - } - - public void fadeIntermediate(float totalTime) - { - if(previous != null && totalTime - previous.totalTime <= 2F) - { - offsetX = GetIntermediatePosition(previous.offsetX, offsetX, fadeOffsetX, previous.totalTime, totalTime); - offsetY = GetIntermediatePosition(previous.offsetY, offsetY, fadeOffsetY, previous.totalTime, totalTime); - offsetZ = GetIntermediatePosition(previous.offsetZ, offsetZ, fadeOffsetZ, previous.totalTime, totalTime); - - rotateAngleX = GetIntermediateAngle(previous.rotateAngleX, rotateAngleX, fadeRotateAngleX, previous.totalTime, totalTime); - rotateAngleY = GetIntermediateAngle(previous.rotateAngleY, rotateAngleY, fadeRotateAngleY, previous.totalTime, totalTime); - rotateAngleZ = GetIntermediateAngle(previous.rotateAngleZ, rotateAngleZ, fadeRotateAngleZ, previous.totalTime, totalTime); - - rotationPointX = GetIntermediatePosition(previous.rotationPointX, rotationPointX, fadeRotationPointX, previous.totalTime, totalTime); - rotationPointY = GetIntermediatePosition(previous.rotationPointY, rotationPointY, fadeRotationPointY, previous.totalTime, totalTime); - rotationPointZ = GetIntermediatePosition(previous.rotationPointZ, rotationPointZ, fadeRotationPointZ, previous.totalTime, totalTime); - } - } - - @SuppressWarnings("static-method") - public boolean canBeRandomBoxSource() - { - return true; - } - - private static float GetIntermediatePosition(float prevPosition, float shouldPosition, boolean fade, float lastTotalTime, float totalTime) - { - if(!fade || shouldPosition == prevPosition) - return shouldPosition; - - return prevPosition + (shouldPosition - prevPosition) * (totalTime - lastTotalTime) * 0.2F; - } - - private static float GetIntermediateAngle(float prevAngle, float shouldAngle, boolean fade, float lastTotalTime, float totalTime) - { - if(!fade || shouldAngle == prevAngle) - return shouldAngle; - - while(prevAngle >= Whole) prevAngle -= Whole; - while(prevAngle < 0F) prevAngle += Whole; - - while(shouldAngle >= Whole) shouldAngle -= Whole; - while(shouldAngle < 0F) shouldAngle += Whole; - - if(shouldAngle > prevAngle && (shouldAngle - prevAngle) > Half) - prevAngle += Whole; - - if(shouldAngle < prevAngle && (prevAngle - shouldAngle) > Half) - shouldAngle += Whole; - - return prevAngle + (shouldAngle - prevAngle) * (totalTime - lastTotalTime) * 0.2F; - } - - private static FloatBuffer buffer = BufferUtils.createFloatBuffer(16); - private static float[] array = new float[16]; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/ModelSpecialRenderer.java b/src/main/java/net/smart/render/ModelSpecialRenderer.java deleted file mode 100644 index c87640e3..00000000 --- a/src/main/java/net/smart/render/ModelSpecialRenderer.java +++ /dev/null @@ -1,56 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.model.*; - -public class ModelSpecialRenderer extends ModelRotationRenderer -{ - public boolean doPopPush; - - public ModelSpecialRenderer(ModelBase modelBase, int i, int j, ModelRotationRenderer baseRenderer) - { - super(modelBase, i, j, baseRenderer); - ignoreRender = true; - } - - public void beforeRender(boolean popPush) - { - doPopPush = popPush; - ignoreRender = false; - } - - @Override - public void doRender(float f, boolean useParentTransformations) - { - if(doPopPush) - { - GL11.glPopMatrix(); - GL11.glPushMatrix(); - } - super.doRender(f, true); - } - - public void afterRender() - { - ignoreRender = true; - doPopPush = false; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/RenderPlayer.java b/src/main/java/net/smart/render/RenderPlayer.java deleted file mode 100644 index c04ee12c..00000000 --- a/src/main/java/net/smart/render/RenderPlayer.java +++ /dev/null @@ -1,157 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.client.model.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; - -public class RenderPlayer extends net.minecraft.client.renderer.entity.RenderPlayer implements IRenderPlayer -{ - public RenderPlayer() - { - render = new SmartRenderRender(this); - } - - @Override - public IModelPlayer createModel(ModelBiped existing, float f) - { - return new ModelPlayer(f); - } - - @Override - public void initialize(ModelBiped modelBipedMain, ModelBiped modelArmorChestplate, ModelBiped modelArmor, float shadowSize) - { - this.mainModel = modelBipedMain; - this.shadowSize = shadowSize; - - this.modelBipedMain = modelBipedMain; - this.modelArmorChestplate = modelArmorChestplate; - this.modelArmor = modelArmor; - } - - @Override - public void doRender(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - render.renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void superRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - super.doRender(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void renderFirstPersonArm(EntityPlayer entityPlayer) - { - render.drawFirstPersonHand(entityPlayer); - } - - @Override - public void superDrawFirstPersonHand(EntityPlayer entityPlayer) - { - super.renderFirstPersonArm(entityPlayer); - } - - @Override - protected void rotateCorpse(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - render.rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void superRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - super.rotateCorpse(entityplayer, totalTime, actualRotation, f2); - } - - @Override - protected void preRenderCallback(AbstractClientPlayer entityplayer, float f) - { - render.renderSpecials(entityplayer, f); - } - - @Override - public void superRenderSpecials(AbstractClientPlayer entityplayer, float f) - { - super.preRenderCallback(entityplayer, f); - } - - @Override - protected float handleRotationFloat(EntityLivingBase entityliving, float f) - { - render.beforeHandleRotationFloat(entityliving, f); - float result = super.handleRotationFloat(entityliving, f); - render.afterHandleRotationFloat(entityliving, f); - return result; - } - - @Override - public RenderManager getRenderManager() - { - return renderManager; - } - - @Override - public ModelBiped getModelBipedMain() - { - return (ModelBiped)mainModel; - } - - @Override - public ModelBiped getModelArmorChestplate() - { - return modelArmorChestplate; - } - - @Override - public ModelBiped getModelArmor() - { - return modelArmor; - } - - public IModelPlayer getRenderModelBipedMain() - { - return (ModelPlayer)getModelBipedMain(); - } - - public IModelPlayer getRenderModelArmorChestplate() - { - return (ModelPlayer)getModelArmorChestplate(); - } - - public IModelPlayer getRenderModelArmor() - { - return (ModelPlayer)getModelArmor(); - } - - @Override - public IModelPlayer[] getRenderModels() - { - if(allIModelPlayers == null) - allIModelPlayers = new IModelPlayer[] { getRenderModelBipedMain(), getRenderModelArmorChestplate(), getRenderModelArmor() }; - return allIModelPlayers; - } - - private IModelPlayer[] allIModelPlayers; - - private final SmartRenderRender render; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/RendererData.java b/src/main/java/net/smart/render/RendererData.java deleted file mode 100644 index bcc8decd..00000000 --- a/src/main/java/net/smart/render/RendererData.java +++ /dev/null @@ -1,32 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -public class RendererData -{ - public float offsetX; - public float offsetY; - public float offsetZ; - public float rotateAngleX; - public float rotateAngleY; - public float rotateAngleZ; - public float rotationPointX; - public float rotationPointY; - public float rotationPointZ; - public float totalTime = Float.MIN_VALUE; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderContext.java b/src/main/java/net/smart/render/SmartRenderContext.java deleted file mode 100644 index 18dc8f9d..00000000 --- a/src/main/java/net/smart/render/SmartRenderContext.java +++ /dev/null @@ -1,48 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import cpw.mods.fml.client.registry.RenderingRegistry; - -import net.minecraft.client.entity.*; -import net.minecraft.client.renderer.entity.*; - -public abstract class SmartRenderContext extends SmartRenderUtilities -{ - public static void registerRenderers() - { - registerRenderers(net.smart.render.RenderPlayer.class); - } - - public static void registerRenderers(Class type) - { - Render render; - try - { - render = (Render)type.newInstance(); - } - catch (Exception e) - { - return; - } - - RenderingRegistry.registerEntityRenderingHandler(EntityPlayerSP.class, render); - RenderingRegistry.registerEntityRenderingHandler(EntityOtherPlayerMP.class, render); - render.setRenderManager(RenderManager.instance); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderInfo.java b/src/main/java/net/smart/render/SmartRenderInfo.java deleted file mode 100644 index f8dd760a..00000000 --- a/src/main/java/net/smart/render/SmartRenderInfo.java +++ /dev/null @@ -1,29 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import cpw.mods.fml.common.*; - -public class SmartRenderInfo -{ - private static final Mod Mod = SmartRenderMod.class.getAnnotation(Mod.class); - - public static final String ModId = Mod.modid(); - public static final String ModName = Mod.name(); - public static final String ModVersion = Mod.version(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderInstall.java b/src/main/java/net/smart/render/SmartRenderInstall.java deleted file mode 100644 index 388c1be9..00000000 --- a/src/main/java/net/smart/render/SmartRenderInstall.java +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import net.smart.utilities.*; - -public class SmartRenderInstall -{ - public final static Name ModelRenderer_compiled = new Name("compiled", "field_78812_q", "t"); - public final static Name ModelRenderer_compileDisplayList = new Name("compileDisplayList", "func_78788_d", "d"); - public final static Name ModelRenderer_displayList = new Name("displayList", "field_78811_r", "u"); -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderMod.java b/src/main/java/net/smart/render/SmartRenderMod.java deleted file mode 100644 index cfda0d2d..00000000 --- a/src/main/java/net/smart/render/SmartRenderMod.java +++ /dev/null @@ -1,74 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import java.lang.reflect.*; - -import cpw.mods.fml.common.*; -import cpw.mods.fml.common.Mod.*; -import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.eventhandler.*; -import cpw.mods.fml.common.gameevent.TickEvent.*; -import net.smart.render.statistics.*; -import net.smart.utilities.*; - -@Mod(modid = "SmartRender", name = "Smart Render", version = "2.1", dependencies = "required-after:PlayerAPI@[1.3,)") -public class SmartRenderMod -{ - private static boolean addRenderer = true; - - private boolean hasRenderer = false; - - public static void doNotAddRenderer() - { - addRenderer = false; - } - - @EventHandler - @SuppressWarnings("unused") - public void init(FMLInitializationEvent event) - { - if(!FMLCommonHandler.instance().getSide().isClient()) - return; - - hasRenderer = Loader.isModLoaded("RenderPlayerAPI"); - - net.smart.render.statistics.playerapi.SmartStatistics.register(); - - if(hasRenderer) - { - Class type = Reflect.LoadClass(SmartRenderMod.class, new Name("net.smart.render.playerapi.SmartRender"), true); - Method method = Reflect.GetMethod(type, new Name("register")); - Reflect.Invoke(method, null); - } - - if(!hasRenderer && addRenderer) - SmartRenderContext.registerRenderers(null); - - net.smart.render.statistics.playerapi.SmartStatisticsFactory.initialize(); - - FMLCommonHandler.instance().bus().register(this); - } - - @SubscribeEvent - @SuppressWarnings({ "static-method", "unused" }) - public void tickStart(ClientTickEvent event) - { - SmartStatisticsContext.onTickInGame(); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderModel.java b/src/main/java/net/smart/render/SmartRenderModel.java deleted file mode 100644 index 9cfeb189..00000000 --- a/src/main/java/net/smart/render/SmartRenderModel.java +++ /dev/null @@ -1,470 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import java.util.*; - -import net.minecraft.client.model.*; -import net.minecraft.entity.*; -import net.minecraft.entity.passive.*; -import net.minecraft.util.*; - -public class SmartRenderModel extends SmartRenderContext -{ - public IModelPlayer imp; - public ModelBiped mp; - - public SmartRenderModel(ModelBiped mp, IModelPlayer imp, ModelRenderer originalBipedBody, ModelRenderer originalBipedCloak, ModelRenderer originalBipedHead, ModelRenderer originalBipedEars, ModelRenderer originalBipedHeadwear, ModelRenderer originalBipedRightArm, ModelRenderer originalBipedLeftArm, ModelRenderer originalBipedRightLeg, ModelRenderer originalBipedLeftLeg) - { - this.imp = imp; - this.mp = mp; - - mp.boxList.clear(); - - bipedOuter = create(-1, -1, null); - bipedOuter.setRotationPoint(0.0F, 0.0F, 0.0F); - bipedOuter.fadeEnabled = true; - - bipedTorso = create(16, 16, bipedOuter); - bipedTorso.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedBody = create(16, 16, bipedTorso, originalBipedBody); - bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedBreast = create(-1, -1, bipedTorso); - bipedBreast.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedNeck = create(-1, -1, bipedBreast); - bipedNeck.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedCloak = new ModelCapeRenderer(mp, 0, 0, bipedBreast, bipedOuter); - copy(bipedCloak, originalBipedCloak); - bipedCloak.setRotationPoint(0.0F, 0.0F, 2.0F); - - bipedHead = create(0, 0, bipedNeck, originalBipedHead); - bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedEars = new ModelEarsRenderer(mp, 24, 0, bipedHead); - copy(bipedCloak, originalBipedEars); - bipedEars.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedHeadwear = create(32, 0, bipedHead, originalBipedHeadwear); - bipedHeadwear.setRotationPoint(0.0F, 0.0F, 0.0F); - - bipedRightShoulder = create(40, 16, bipedBreast); - bipedRightShoulder.setRotationPoint(-5F, 2.0F, 0.0F); - - bipedRightArm = create(40, 16, bipedRightShoulder, originalBipedRightArm); - - bipedLeftShoulder = create(-1, -1, bipedBreast); - bipedLeftShoulder.mirror = true; - bipedLeftShoulder.setRotationPoint(5F, 2.0F, 0.0F); - - bipedLeftArm = create(40, 16, bipedLeftShoulder, originalBipedLeftArm); - - bipedPelvic = create(-1, -1, bipedTorso); - bipedPelvic.setRotationPoint(0.0F, 12.0F, 0.0F); - - bipedRightLeg = create(0, 16, bipedPelvic, originalBipedRightLeg); - bipedRightLeg.setRotationPoint(-2F, 0.0F, 0.0F); - - bipedLeftLeg = create(0, 16, bipedPelvic, originalBipedLeftLeg); - bipedLeftLeg.setRotationPoint(2.0F, 0.0F, 0.0F); - - imp.initialize(bipedBody, bipedCloak, bipedHead, bipedEars, bipedHeadwear, bipedRightArm, bipedLeftArm, bipedRightLeg, bipedLeftLeg); - - if(SmartRenderRender.CurrentMainModel != null) - { - isInventory = SmartRenderRender.CurrentMainModel.isInventory; - - totalVerticalDistance = SmartRenderRender.CurrentMainModel.totalVerticalDistance; - currentVerticalSpeed = SmartRenderRender.CurrentMainModel.currentVerticalSpeed; - totalDistance = SmartRenderRender.CurrentMainModel.totalDistance; - currentSpeed = SmartRenderRender.CurrentMainModel.currentSpeed; - - distance = SmartRenderRender.CurrentMainModel.distance; - verticalDistance = SmartRenderRender.CurrentMainModel.verticalDistance; - horizontalDistance = SmartRenderRender.CurrentMainModel.horizontalDistance; - currentCameraAngle = SmartRenderRender.CurrentMainModel.currentCameraAngle; - currentVerticalAngle = SmartRenderRender.CurrentMainModel.currentVerticalAngle; - currentHorizontalAngle = SmartRenderRender.CurrentMainModel.currentHorizontalAngle; - prevOuterRenderData = SmartRenderRender.CurrentMainModel.prevOuterRenderData; - isSleeping = SmartRenderRender.CurrentMainModel.isSleeping; - - actualRotation = SmartRenderRender.CurrentMainModel.actualRotation; - forwardRotation = SmartRenderRender.CurrentMainModel.forwardRotation; - workingAngle = SmartRenderRender.CurrentMainModel.workingAngle; - } - } - - private ModelRotationRenderer create(int i, int j, ModelRotationRenderer base) - { - return new ModelRotationRenderer(mp, i, j, base); - } - - private ModelRotationRenderer create(int i, int j, ModelRotationRenderer base, ModelRenderer original) - { - ModelRotationRenderer local = create(i, j, base); - copy(local, original); - return local; - } - - private static void copy(ModelRotationRenderer local, ModelRenderer original) - { - if(original.childModels != null) - for(Object childModel : original.childModels) - local.addChild((ModelRenderer)childModel); - if(original.cubeList != null) - for(Object cube : original.cubeList) - local.cubeList.add(cube); - local.mirror = original.mirror; - local.isHidden = original.isHidden; - local.showModel = original.showModel; - } - - public void render(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - bipedBody.ignoreRender = bipedHead.ignoreRender = bipedHeadwear.ignoreRender = bipedRightArm.ignoreRender = bipedLeftArm.ignoreRender = bipedRightLeg.ignoreRender = bipedLeftLeg.ignoreRender = true; - imp.superRender(entity, totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - bipedBody.ignoreRender = bipedHead.ignoreRender = bipedHeadwear.ignoreRender = bipedRightArm.ignoreRender = bipedLeftArm.ignoreRender = bipedRightLeg.ignoreRender = bipedLeftLeg.ignoreRender = false; - - bipedOuter.render(factor); - - bipedOuter.renderIgnoreBase(factor); - bipedTorso.renderIgnoreBase(factor); - bipedBody.renderIgnoreBase(factor); - bipedBreast.renderIgnoreBase(factor); - bipedNeck.renderIgnoreBase(factor); - bipedHead.renderIgnoreBase(factor); - bipedHeadwear.renderIgnoreBase(factor); - bipedRightShoulder.renderIgnoreBase(factor); - bipedRightArm.renderIgnoreBase(factor); - bipedLeftShoulder.renderIgnoreBase(factor); - bipedLeftArm.renderIgnoreBase(factor); - bipedPelvic.renderIgnoreBase(factor); - bipedRightLeg.renderIgnoreBase(factor); - bipedLeftLeg.renderIgnoreBase(factor); - } - - public void setRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity) - { - reset(); - - if(firstPerson || isInventory) - { - bipedBody.ignoreBase = true; - bipedHead.ignoreBase = true; - bipedHeadwear.ignoreBase = true; - bipedEars.ignoreBase = true; - bipedCloak.ignoreBase = true; - bipedRightArm.ignoreBase = true; - bipedLeftArm.ignoreBase = true; - bipedRightLeg.ignoreBase = true; - bipedLeftLeg.ignoreBase = true; - - bipedBody.forceRender = firstPerson; - bipedHead.forceRender = firstPerson; - bipedHeadwear.forceRender = firstPerson; - bipedEars.forceRender = firstPerson; - bipedCloak.forceRender = firstPerson; - bipedRightArm.forceRender = firstPerson; - bipedLeftArm.forceRender = firstPerson; - bipedRightLeg.forceRender = firstPerson; - bipedLeftLeg.forceRender = firstPerson; - - bipedRightArm.setRotationPoint(-5F, 2.0F, 0.0F); - bipedLeftArm.setRotationPoint(5F, 2.0F, 0.0F); - bipedRightLeg.setRotationPoint(-2F, 12F, 0.0F); - bipedLeftLeg.setRotationPoint(2.0F, 12F, 0.0F); - - imp.superSetRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor, entity); - return; - } - - if(isSleeping) - { - prevOuterRenderData.rotateAngleX = 0; - prevOuterRenderData.rotateAngleY = 0; - prevOuterRenderData.rotateAngleZ = 0; - } - - bipedOuter.previous = prevOuterRenderData; - - bipedOuter.rotateAngleY = actualRotation / RadiantToAngle; - bipedOuter.fadeRotateAngleY = !(entity.ridingEntity instanceof EntityPig); - - imp.animateHeadRotation(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(isSleeping) - imp.animateSleeping(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - imp.animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(mp.isRiding) - imp.animateRiding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(mp.heldItemLeft != 0) - imp.animateLeftArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(mp.heldItemRight != 0) - imp.animateRightArmItemHolding(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(mp.onGround > -9990F) - { - imp.animateWorkingBody(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - imp.animateWorkingArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - if(mp.isSneak) - imp.animateSneaking(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - imp.animateArms(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(mp.aimedBow) - imp.animateBowAiming(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - - if(bipedOuter.previous != null && !bipedOuter.fadeRotateAngleX) - bipedOuter.previous.rotateAngleX = bipedOuter.rotateAngleX; - - if(bipedOuter.previous != null && !bipedOuter.fadeRotateAngleY) - bipedOuter.previous.rotateAngleY = bipedOuter.rotateAngleY; - - bipedOuter.fadeIntermediate(totalTime); - bipedOuter.fadeStore(totalTime); - - bipedCloak.ignoreBase = false; - bipedCloak.rotateAngleX = Sixtyfourth; - } - - public void animateHeadRotation(float viewHorizontalAngelOffset, float viewVerticalAngelOffset) - { - bipedNeck.ignoreBase = true; - bipedHead.rotateAngleY = (actualRotation + viewHorizontalAngelOffset) / RadiantToAngle; - bipedHead.rotateAngleX = viewVerticalAngelOffset / RadiantToAngle; - } - - public void animateSleeping() - { - bipedNeck.ignoreBase = false; - bipedHead.rotateAngleY = 0F; - bipedHead.rotateAngleX = Eighth; - bipedTorso.rotationPointZ = -17F; - } - - public void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed) - { - bipedRightArm.rotateAngleX = MathHelper.cos(totalHorizontalDistance * 0.6662F + Half) * 2.0F * currentHorizontalSpeed * 0.5F; - bipedLeftArm.rotateAngleX = MathHelper.cos(totalHorizontalDistance * 0.6662F) * 2.0F * currentHorizontalSpeed * 0.5F; - - bipedRightLeg.rotateAngleX = MathHelper.cos(totalHorizontalDistance * 0.6662F) * 1.4F * currentHorizontalSpeed; - bipedLeftLeg.rotateAngleX = MathHelper.cos(totalHorizontalDistance * 0.6662F + Half) * 1.4F * currentHorizontalSpeed; - } - - public void animateRiding() - { - bipedRightArm.rotateAngleX += -0.6283185F; - bipedLeftArm.rotateAngleX += -0.6283185F; - bipedRightLeg.rotateAngleX = -1.256637F; - bipedLeftLeg.rotateAngleX = -1.256637F; - bipedRightLeg.rotateAngleY = 0.3141593F; - bipedLeftLeg.rotateAngleY = -0.3141593F; - } - - public void animateLeftArmItemHolding() - { - bipedLeftArm.rotateAngleX = bipedLeftArm.rotateAngleX * 0.5F - 0.3141593F * mp.heldItemLeft; - } - - public void animateRightArmItemHolding() - { - bipedRightArm.rotateAngleX = bipedRightArm.rotateAngleX * 0.5F - 0.3141593F * mp.heldItemRight; - } - - public void animateWorkingBody() - { - float angle = MathHelper.sin(MathHelper.sqrt_float(mp.onGround) * Whole) * 0.2F; - bipedBreast.rotateAngleY = bipedBody.rotateAngleY += angle; - bipedBreast.rotationOrder = bipedBody.rotationOrder = ModelRotationRenderer.YXZ; - bipedLeftArm.rotateAngleX += angle; - } - - public void animateWorkingArms() - { - float f6 = 1.0F - mp.onGround; - f6 = 1.0F - f6 * f6 * f6; - float f7 = MathHelper.sin(f6 * Half); - float f8 = MathHelper.sin(mp.onGround * Half) * -(bipedHead.rotateAngleX - 0.7F) * 0.75F; - bipedRightArm.rotateAngleX -= f7 * 1.2D + f8; - bipedRightArm.rotateAngleY += MathHelper.sin(MathHelper.sqrt_float(mp.onGround) * Whole) * 0.4F; - bipedRightArm.rotateAngleZ -= MathHelper.sin(mp.onGround * Half) * 0.4F; - } - - public void animateSneaking() - { - bipedTorso.rotateAngleX += 0.5F; - bipedRightLeg.rotateAngleX += -0.5F; - bipedLeftLeg.rotateAngleX += -0.5F; - bipedRightArm.rotateAngleX += -0.1F; - bipedLeftArm.rotateAngleX += -0.1F; - - bipedPelvic.offsetY = -0.137F; - bipedPelvic.offsetZ = -0.051F; - - bipedBreast.offsetY = -0.014F; - bipedBreast.offsetZ = -0.057F; - - bipedNeck.offsetY = 0.0621F; - } - - public void animateArms(float totalTime) - { - bipedRightArm.rotateAngleZ += MathHelper.cos(totalTime * 0.09F) * 0.05F + 0.05F; - bipedLeftArm.rotateAngleZ -= MathHelper.cos(totalTime * 0.09F) * 0.05F + 0.05F; - bipedRightArm.rotateAngleX += MathHelper.sin(totalTime * 0.067F) * 0.05F; - bipedLeftArm.rotateAngleX -= MathHelper.sin(totalTime * 0.067F) * 0.05F; - } - - public void animateBowAiming(float totalTime) - { - bipedRightArm.rotateAngleZ = 0.0F; - bipedLeftArm.rotateAngleZ = 0.0F; - bipedRightArm.rotateAngleY = -0.1F + bipedHead.rotateAngleY - bipedOuter.rotateAngleY; - bipedLeftArm.rotateAngleY = 0.1F + bipedHead.rotateAngleY + 0.4F - bipedOuter.rotateAngleY; - bipedRightArm.rotateAngleX = -1.570796F + bipedHead.rotateAngleX; - bipedLeftArm.rotateAngleX = -1.570796F + bipedHead.rotateAngleX; - bipedRightArm.rotateAngleZ += MathHelper.cos(totalTime * 0.09F) * 0.05F + 0.05F; - bipedLeftArm.rotateAngleZ -= MathHelper.cos(totalTime * 0.09F) * 0.05F + 0.05F; - bipedRightArm.rotateAngleX += MathHelper.sin(totalTime * 0.067F) * 0.05F; - bipedLeftArm.rotateAngleX -= MathHelper.sin(totalTime * 0.067F) * 0.05F; - } - - public void reset() - { - bipedOuter.reset(); - bipedTorso.reset(); - bipedBody.reset(); - bipedBreast.reset(); - bipedNeck.reset(); - bipedHead.reset(); - bipedHeadwear.reset(); - bipedEars.reset(); - bipedCloak.reset(); - bipedRightShoulder.reset(); - bipedRightArm.reset(); - bipedLeftShoulder.reset(); - bipedLeftArm.reset(); - bipedPelvic.reset(); - bipedRightLeg.reset(); - bipedLeftLeg.reset(); - - bipedRightShoulder.setRotationPoint(-5F, 2.0F, 0.0F); - bipedLeftShoulder.setRotationPoint(5F, 2.0F, 0.0F); - bipedPelvic.setRotationPoint(0.0F, 12.0F, 0.0F); - bipedRightLeg.setRotationPoint(-2F, 0.0F, 0.0F); - bipedLeftLeg.setRotationPoint(2.0F, 0.0F, 0.0F); - bipedCloak.setRotationPoint(0.0F, 0.0F, 2.0F); - } - - public void renderCloak(float f) - { - attemptToCallRenderCape = true; - if(!disabled) - imp.superRenderCloak(f); - } - - public ModelRenderer getRandomBox(Random par1Random) - { - List boxList = mp.boxList; - int size = boxList.size(); - int renderersWithBoxes = 0; - - for(int i=0; i 0 && (!(renderer instanceof ModelRotationRenderer) || ((ModelRotationRenderer)renderer).canBeRandomBoxSource()); - } - - public boolean isInventory; - - public int scaleArmType; - public int scaleLegType; - - public float totalVerticalDistance; - public float currentVerticalSpeed; - public float totalDistance; - public float currentSpeed; - - public double distance; - public double verticalDistance; - public double horizontalDistance; - public float currentCameraAngle; - public float currentVerticalAngle; - public float currentHorizontalAngle; - - public float actualRotation; - public float forwardRotation; - public float workingAngle; - - public ModelRotationRenderer bipedOuter; - public ModelRotationRenderer bipedTorso; - public ModelRotationRenderer bipedBody; - public ModelRotationRenderer bipedBreast; - public ModelRotationRenderer bipedNeck; - public ModelRotationRenderer bipedHead; - public ModelRotationRenderer bipedHeadwear; - public ModelRotationRenderer bipedRightShoulder; - public ModelRotationRenderer bipedRightArm; - public ModelRotationRenderer bipedLeftShoulder; - public ModelRotationRenderer bipedLeftArm; - public ModelRotationRenderer bipedPelvic; - public ModelRotationRenderer bipedRightLeg; - public ModelRotationRenderer bipedLeftLeg; - public ModelEarsRenderer bipedEars; - public ModelCapeRenderer bipedCloak; - - - public boolean disabled; - public boolean attemptToCallRenderCape; - public RendererData prevOuterRenderData; - public boolean isSleeping; - public boolean firstPerson; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderRender.java b/src/main/java/net/smart/render/SmartRenderRender.java deleted file mode 100644 index 30485974..00000000 --- a/src/main/java/net/smart/render/SmartRenderRender.java +++ /dev/null @@ -1,228 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -import java.util.*; - -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.client.gui.inventory.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; -import net.smart.render.statistics.*; - -public class SmartRenderRender extends SmartRenderContext -{ - public static SmartRenderModel CurrentMainModel; - - public IRenderPlayer irp; - - public SmartRenderRender(IRenderPlayer irp) - { - this.irp = irp; - - modelBipedMain = irp.createModel(irp.getModelBipedMain(), 0.0F).getRenderModel(); - SmartRenderModel modelArmorChestplate = irp.createModel(irp.getModelArmorChestplate(), 1.0F).getRenderModel(); - SmartRenderModel modelArmor = irp.createModel(irp.getModelArmor(), 0.5F).getRenderModel(); - - irp.initialize(modelBipedMain.mp, modelArmorChestplate.mp, modelArmor.mp, 0.5F); - } - - public void renderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - SmartStatistics statistics = SmartStatisticsFactory.getInstance(entityplayer); - if(statistics != null) - { - boolean isInventory = d == 0.0F && d1 == 0.0F && d2 == 0.0F && f == 0.0F && renderPartialTicks == 1.0F; - boolean isSleeping = entityplayer.isPlayerSleeping(); - - float totalVerticalDistance = statistics.getTotalVerticalDistance(renderPartialTicks); - float currentVerticalSpeed = statistics.getCurrentVerticalSpeed(renderPartialTicks); - float totalDistance = statistics.getTotalDistance(renderPartialTicks); - float currentSpeed = statistics.getCurrentSpeed(renderPartialTicks); - - double distance = 0; - double verticalDistance = 0; - double horizontalDistance = 0; - float currentCameraAngle = 0; - float currentVerticalAngle = 0; - float currentHorizontalAngle = 0; - - if (!isInventory) - { - double xDiff = entityplayer.posX - entityplayer.prevPosX; - double yDiff = entityplayer.posY - entityplayer.prevPosY; - double zDiff = entityplayer.posZ - entityplayer.prevPosZ; - - verticalDistance = Math.abs(yDiff); - horizontalDistance = Math.sqrt(xDiff * xDiff + zDiff * zDiff); - distance = Math.sqrt(horizontalDistance * horizontalDistance + verticalDistance * verticalDistance); - - currentCameraAngle = entityplayer.rotationYaw / RadiantToAngle; - currentVerticalAngle = (float)Math.atan(yDiff / horizontalDistance); - if(Float.isNaN(currentVerticalAngle)) - currentVerticalAngle = Quarter; - - currentHorizontalAngle = (float)-Math.atan(xDiff / zDiff); - if (Float.isNaN(currentHorizontalAngle)) - if(Float.isNaN(statistics.prevHorizontalAngle)) - currentHorizontalAngle = currentCameraAngle; - else - currentHorizontalAngle = statistics.prevHorizontalAngle; - else if (zDiff < 0) - currentHorizontalAngle += Half; - - statistics.prevHorizontalAngle = currentHorizontalAngle; - } - - IModelPlayer[] modelPlayers = irp.getRenderModels(); - - for(int i = 0; i < modelPlayers.length; i++) - { - SmartRenderModel modelPlayer = modelPlayers[i].getRenderModel(); - - modelPlayer.isInventory = isInventory; - - modelPlayer.totalVerticalDistance = totalVerticalDistance; - modelPlayer.currentVerticalSpeed = currentVerticalSpeed; - modelPlayer.totalDistance = totalDistance; - modelPlayer.currentSpeed = currentSpeed; - - modelPlayer.distance = distance; - modelPlayer.verticalDistance = verticalDistance; - modelPlayer.horizontalDistance = horizontalDistance; - modelPlayer.currentCameraAngle = currentCameraAngle; - modelPlayer.currentVerticalAngle = currentVerticalAngle; - modelPlayer.currentHorizontalAngle = currentHorizontalAngle; - modelPlayer.prevOuterRenderData = getPreviousRendererData(entityplayer); - modelPlayer.isSleeping = isSleeping; - } - } - - CurrentMainModel = modelBipedMain; - irp.superRenderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - CurrentMainModel = null; - } - - public void drawFirstPersonHand(EntityPlayer entityPlayer) - { - modelBipedMain.firstPerson = true; - irp.superDrawFirstPersonHand(entityPlayer); - modelBipedMain.firstPerson = false; - } - - public void rotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - boolean isLocal = entityplayer instanceof EntityPlayerSP; - boolean isInventory = f2 == 1.0F && isLocal && Minecraft.getMinecraft().currentScreen instanceof GuiInventory; - if(!isInventory) - { - float forwardRotation = entityplayer.prevRotationYaw + (entityplayer.rotationYaw - entityplayer.prevRotationYaw) * f2; - - if(entityplayer.isPlayerSleeping()) - { - actualRotation = 0; - forwardRotation = 0; - } - - float workingAngle; - Minecraft minecraft = Minecraft.getMinecraft(); - if(!isLocal) - { - workingAngle = -entityplayer.rotationYaw; - workingAngle += minecraft.renderViewEntity.rotationYaw; - } - else - workingAngle = actualRotation - getPreviousRendererData(entityplayer).rotateAngleY * RadiantToAngle; - - if(minecraft.gameSettings.thirdPersonView == 2 && !minecraft.renderViewEntity.isPlayerSleeping()) - workingAngle += 180F; - - IModelPlayer[] modelPlayers = irp.getRenderModels(); - - for(int i = 0; i < modelPlayers.length; i++) - { - SmartRenderModel modelPlayer = modelPlayers[i].getRenderModel(); - - modelPlayer.actualRotation = actualRotation; - modelPlayer.forwardRotation = forwardRotation; - modelPlayer.workingAngle = workingAngle; - } - - actualRotation = 0; - } - - irp.superRotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - public void renderSpecials(AbstractClientPlayer entityplayer, float f) - { - modelBipedMain.bipedEars.beforeRender(); - modelBipedMain.bipedCloak.beforeRender(entityplayer, f); - irp.superRenderSpecials(entityplayer, f); - modelBipedMain.bipedCloak.afterRender(); - modelBipedMain.bipedEars.afterRender(); - } - - @SuppressWarnings({ "static-method", "unused" }) - public void beforeHandleRotationFloat(EntityLivingBase entityliving, float f) - { - if(entityliving instanceof EntityPlayer) - { - SmartStatistics statistics = SmartStatisticsFactory.getInstance((EntityPlayer)entityliving); - if (statistics != null) - entityliving.ticksExisted += statistics.ticksRiding; - } - } - - @SuppressWarnings({ "static-method", "unused" }) - public void afterHandleRotationFloat(EntityLivingBase entityliving, float f) - { - if(entityliving instanceof EntityPlayer) - { - SmartStatistics statistics = SmartStatisticsFactory.getInstance((EntityPlayer)entityliving); - if (statistics != null) - entityliving.ticksExisted -= statistics.ticksRiding; - } - } - - public static RendererData getPreviousRendererData(EntityPlayer entityplayer) - { - if(++previousRendererDataAccessCounter > 1000) - { - List players = Minecraft.getMinecraft().theWorld.playerEntities; - - Iterator iterator = previousRendererData.keySet().iterator(); - while(iterator.hasNext()) - if(!players.contains(iterator.next())) - iterator.remove(); - - previousRendererDataAccessCounter = 0; - } - - RendererData result = previousRendererData.get(entityplayer); - if(result == null) - previousRendererData.put(entityplayer, result = new RendererData()); - return result; - } - - private static Map previousRendererData = new HashMap(); - private static int previousRendererDataAccessCounter = 0; - - public final SmartRenderModel modelBipedMain; -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/SmartRenderUtilities.java b/src/main/java/net/smart/render/SmartRenderUtilities.java deleted file mode 100644 index 46612354..00000000 --- a/src/main/java/net/smart/render/SmartRenderUtilities.java +++ /dev/null @@ -1,109 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render; - -public abstract class SmartRenderUtilities -{ - public static final float Whole = (float)Math.PI * 2F; - public static final float Half = (float)Math.PI; - public static final float Quarter = Half / 2F; - public static final float Eighth = Quarter / 2F; - public static final float Sixteenth = Eighth / 2F; - public static final float Thirtytwoth = Sixteenth / 2F; - public static final float Sixtyfourth = Thirtytwoth / 2F; - - public static final float RadiantToAngle = 360F / Whole; - - public static float getHorizontalCollisionangle(boolean isCollidedPositiveX, boolean isCollidedNegativeX, boolean isCollidedPositiveZ, boolean isCollidedNegativeZ) - { - if(isCollidedPositiveX) - if(isCollidedNegativeX) - if(isCollidedPositiveZ) - if(isCollidedNegativeZ) - ; - else - return 90F; - else - if(isCollidedNegativeZ) - return 270F; - else - ; - else - if(isCollidedPositiveZ) - if(isCollidedNegativeZ) - return 0F; - else - return 45F; - else - if(isCollidedNegativeZ) - return 315F; - else - return 0F; - else - if(isCollidedNegativeX) - if(isCollidedPositiveZ) - if(isCollidedNegativeZ) - return 180F; - else - return 135F; - else - if(isCollidedNegativeZ) - return 225F; - else - return 180F; - else - if(isCollidedPositiveZ) - if(isCollidedNegativeZ) - ; - else - return 90F; - else - if(isCollidedNegativeZ) - return 270F; - else - ; - - return Float.NaN; - } - - public static float getAngle(double x, double y) - { - if(x == 0) - { - if(y == 0) - return Float.NaN; - if(y < 0) - return 270; - return 90; - } - - if(y == 0) - { - if(x < 0) - return 180; - return 0; - } - - float angle = (float)Math.atan(y / x) * RadiantToAngle; - if(x < 0) - return 180F + angle; - if(y < 0 && x > 0) - return 360F + angle; - return angle; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/playerapi/SmartRender.java b/src/main/java/net/smart/render/playerapi/SmartRender.java deleted file mode 100644 index fcc72419..00000000 --- a/src/main/java/net/smart/render/playerapi/SmartRender.java +++ /dev/null @@ -1,44 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.playerapi; - -import api.player.model.*; -import api.player.render.*; - -import net.smart.render.*; - -public abstract class SmartRender -{ - public static final String ID = SmartRenderInfo.ModName; - - public static void register() - { - RenderPlayerAPI.register(ID, SmartRenderRenderPlayerBase.class); - ModelPlayerAPI.register(ID, SmartRenderModelPlayerBase.class); - } - - public static SmartRenderRenderPlayerBase getPlayerBase(net.minecraft.client.renderer.entity.RenderPlayer renderPlayer) - { - return (SmartRenderRenderPlayerBase)((IRenderPlayerAPI)renderPlayer).getRenderPlayerBase(ID); - } - - public static SmartRenderModelPlayerBase getPlayerBase(api.player.model.ModelPlayer renderPlayer) - { - return (SmartRenderModelPlayerBase)((IModelPlayerAPI)renderPlayer).getModelPlayerBase(ID); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/playerapi/SmartRenderModelPlayerBase.java b/src/main/java/net/smart/render/playerapi/SmartRenderModelPlayerBase.java deleted file mode 100644 index db033f8f..00000000 --- a/src/main/java/net/smart/render/playerapi/SmartRenderModelPlayerBase.java +++ /dev/null @@ -1,249 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.playerapi; - -import java.util.*; - -import net.minecraft.client.model.*; -import net.minecraft.entity.*; -import api.player.model.*; -import net.smart.render.*; -import net.smart.render.IModelPlayer; - -public class SmartRenderModelPlayerBase extends ModelPlayerBase implements IModelPlayer -{ - private SmartRenderModel model; - - public SmartRenderModelPlayerBase(ModelPlayerAPI modelplayerapi) - { - super(modelplayerapi); - } - - @Override - public SmartRenderModel getRenderModel() - { - if(model == null) - model = new SmartRenderModel(modelPlayer, this, modelPlayer.bipedBody, modelPlayer.bipedCloak, modelPlayer.bipedHead, modelPlayer.bipedEars, modelPlayer.bipedHeadwear, modelPlayer.bipedRightArm, modelPlayer.bipedLeftArm, modelPlayer.bipedRightLeg, modelPlayer.bipedLeftLeg); - return model; - } - - @Override - public void render(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().render(entity, totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void superRender(Entity entity, float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - super.render(entity, totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor); - } - - @Override - public void initialize(ModelRenderer bipedBody, ModelRenderer bipedCloak, ModelRenderer bipedHead, ModelRenderer bipedEars, ModelRenderer bipedHeadwear, ModelRenderer bipedRightArm, ModelRenderer bipedLeftArm, ModelRenderer bipedRightLeg, ModelRenderer bipedLeftLeg) - { - modelPlayer.bipedBody = bipedBody; - modelPlayer.bipedCloak = bipedCloak; - modelPlayer.bipedHead = bipedHead; - modelPlayer.bipedEars = bipedEars; - modelPlayer.bipedHeadwear = bipedHeadwear; - modelPlayer.bipedRightArm = bipedRightArm; - modelPlayer.bipedLeftArm = bipedLeftArm; - modelPlayer.bipedRightLeg = bipedRightLeg; - modelPlayer.bipedLeftLeg = bipedLeftLeg; - } - - @Override - public void setRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity) - { - getRenderModel().setRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor, entity); - } - - @Override - public void superSetRotationAngles(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor, Entity entity) - { - super.setRotationAngles(totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor, entity); - } - - @Override - public void renderCloak(float f) - { - getRenderModel().renderCloak(f); - } - - @Override - public void superRenderCloak(float factor) - { - super.renderCloak(factor); - } - - @Override - public ModelRenderer getRandomModelBox(Random random) - { - return getRenderModel().getRandomBox(random); - } - - @Override public ModelRenderer getOuter() { return getRenderModel().bipedOuter; } - @Override public ModelRenderer getTorso() { return getRenderModel().bipedTorso; } - @Override public ModelRenderer getBody() { return getRenderModel().bipedBody; } - @Override public ModelRenderer getBreast() { return getRenderModel().bipedBreast; } - @Override public ModelRenderer getNeck() { return getRenderModel().bipedNeck; } - @Override public ModelRenderer getHead() { return getRenderModel().bipedHead; } - @Override public ModelRenderer getHeadwear() { return getRenderModel().bipedHeadwear; } - @Override public ModelRenderer getRightShoulder() { return getRenderModel().bipedRightShoulder; } - @Override public ModelRenderer getRightArm() { return getRenderModel().bipedRightArm; } - @Override public ModelRenderer getLeftShoulder() { return getRenderModel().bipedLeftShoulder; } - @Override public ModelRenderer getLeftArm() { return getRenderModel().bipedLeftArm; } - @Override public ModelRenderer getPelvic() { return getRenderModel().bipedPelvic; } - @Override public ModelRenderer getRightLeg() { return getRenderModel().bipedRightLeg; } - @Override public ModelRenderer getLeftLeg() { return getRenderModel().bipedLeftLeg; } - @Override public ModelRenderer getEars() { return getRenderModel().bipedEars; } - @Override public ModelRenderer getCloak() { return getRenderModel().bipedCloak; } - - @Override - public void animateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateHeadRotation", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateHeadRotation(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateHeadRotation(viewHorizontalAngelOffset, viewVerticalAngelOffset); - } - - @Override - public void animateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateSleeping", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateSleeping(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateSleeping(); - } - - @Override - public void animateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateArmSwinging", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateArmSwinging(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateArmSwinging(totalHorizontalDistance, currentHorizontalSpeed); - } - - @Override - public void animateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateRiding", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateRiding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateRiding(); - } - - @Override - public void animateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateLeftArmItemHolding", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateLeftArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateLeftArmItemHolding(); - } - - @Override - public void animateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateRightArmItemHolding", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateRightArmItemHolding(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateRightArmItemHolding(); - } - - @Override - public void animateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateWorkingBody", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateWorkingBody(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateWorkingBody(); - } - - @Override - public void animateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateWorkingArms", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateWorkingArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateWorkingArms(); - } - - @Override - public void animateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateSneaking", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateSneaking(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateSneaking(); - } - - @Override - public void animateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateArms", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateArms(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateArms(totalTime); - } - - @Override - public void animateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - modelPlayerAPI.dynamic("animateBowAiming", new Object[]{ totalHorizontalDistance, currentHorizontalSpeed, totalTime, viewHorizontalAngelOffset, viewVerticalAngelOffset, factor }); - } - - @SuppressWarnings("unused") - public void dynamicVirtualAnimateBowAiming(float totalHorizontalDistance, float currentHorizontalSpeed, float totalTime, float viewHorizontalAngelOffset, float viewVerticalAngelOffset, float factor) - { - getRenderModel().animateBowAiming(totalTime); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/playerapi/SmartRenderRenderPlayerBase.java b/src/main/java/net/smart/render/playerapi/SmartRenderRenderPlayerBase.java deleted file mode 100644 index febd3cc8..00000000 --- a/src/main/java/net/smart/render/playerapi/SmartRenderRenderPlayerBase.java +++ /dev/null @@ -1,163 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.playerapi; - -import net.minecraft.client.entity.*; -import net.minecraft.client.model.*; -import net.minecraft.client.renderer.entity.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; - -import api.player.render.*; - -import net.smart.render.*; -import net.smart.render.IRenderPlayer; - -public class SmartRenderRenderPlayerBase extends RenderPlayerBase implements IRenderPlayer -{ - public SmartRenderRenderPlayerBase(RenderPlayerAPI renderPlayerAPI) - { - super(renderPlayerAPI); - } - - public SmartRenderRender getRenderRender() - { - if (render == null) - render = new SmartRenderRender(this); - return render; - } - - @Override - public IModelPlayer createModel(ModelBiped existing, float f) - { - return SmartRender.getPlayerBase((api.player.model.ModelPlayer)existing); - } - - @Override - public void initialize(ModelBiped modelBipedMain, ModelBiped modelArmorChestplate, ModelBiped modelArmor, float shadowSize) - { - renderPlayerAPI.setMainModelField(modelBipedMain); - renderPlayerAPI.setShadowSizeField(0.5F); - - renderPlayerAPI.setModelBipedMainField(modelBipedMain); - renderPlayerAPI.setModelArmorChestplateField(modelArmorChestplate); - renderPlayerAPI.setModelArmorField(modelArmor); - } - - @Override - public void renderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - getRenderRender().renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void superRenderPlayer(AbstractClientPlayer entityplayer, double d, double d1, double d2, float f, float renderPartialTicks) - { - super.renderPlayer(entityplayer, d, d1, d2, f, renderPartialTicks); - } - - @Override - public void renderFirstPersonArm(EntityPlayer entityPlayer) - { - getRenderRender().drawFirstPersonHand(entityPlayer); - } - - @Override - public void superDrawFirstPersonHand(EntityPlayer entityPlayer) - { - super.renderFirstPersonArm(entityPlayer); - } - - @Override - public void rotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - getRenderRender().rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void superRotatePlayer(AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) - { - super.rotatePlayer(entityplayer, totalTime, actualRotation, f2); - } - - @Override - public void renderSpecials(AbstractClientPlayer entityplayer, float f) - { - getRenderRender().renderSpecials(entityplayer, f); - } - - @Override - public void superRenderSpecials(AbstractClientPlayer entityplayer, float f) - { - super.renderSpecials(entityplayer, f); - } - - @Override - public void beforeHandleRotationFloat(EntityLivingBase entityliving, float f) - { - getRenderRender().beforeHandleRotationFloat(entityliving, f); - } - - @Override - public void afterHandleRotationFloat(EntityLivingBase entityliving, float f) - { - getRenderRender().afterHandleRotationFloat(entityliving, f); - } - - @Override - public RenderManager getRenderManager() - { - return renderPlayerAPI.getRenderManagerField(); - } - - @Override - public ModelBiped getModelBipedMain() - { - return renderPlayerAPI.getModelBipedMainField(); - } - - @Override - public ModelBiped getModelArmorChestplate() - { - return renderPlayerAPI.getModelArmorChestplateField(); - } - - @Override - public ModelBiped getModelArmor() - { - return renderPlayerAPI.getModelArmorField(); - } - - @Override - public IModelPlayer[] getRenderModels() - { - api.player.model.ModelPlayer[] modelPlayers = api.player.model.ModelPlayerAPI.getAllInstances(); - if(allModelPlayers != null && (allModelPlayers == modelPlayers || modelPlayers.length == 0 && allModelPlayers.length == 0)) - return allIModelPlayers; - - allModelPlayers = modelPlayers; - allIModelPlayers = new IModelPlayer[modelPlayers.length]; - for(int i=0; i. -// ================================================================== - -package net.smart.render.statistics; - -public interface IEntityPlayerSP -{ - SmartStatistics getStatistics(); -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/SmartStatistics.java b/src/main/java/net/smart/render/statistics/SmartStatistics.java deleted file mode 100644 index 176ce59c..00000000 --- a/src/main/java/net/smart/render/statistics/SmartStatistics.java +++ /dev/null @@ -1,198 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics; - -import net.minecraft.entity.player.*; -import net.minecraft.util.*; - -public class SmartStatistics extends SmartStatisticsContext -{ - private final EntityPlayer sp; - - private float tickDistance; - - public int ticksRiding; - public float prevHorizontalAngle = Float.NaN; - - private final static SmartStatisticsDatas dummy = new SmartStatisticsDatas(); - private final SmartStatisticsDatas[] datas = new SmartStatisticsDatas[10]; - private int currentDataIndex = -1; - - public SmartStatistics(EntityPlayer sp) - { - this.sp = sp; - } - - public void calculateAllStats(boolean remote) - { - double diffX = sp.posX - sp.prevPosX; - double diffY = sp.posY - sp.prevPosY; - double diffZ = sp.posZ - sp.prevPosZ; - - SmartStatisticsDatas previous = get(); - - currentDataIndex++; - if(currentDataIndex >= datas.length) - currentDataIndex = 0; - - SmartStatisticsDatas data = datas[currentDataIndex]; - if(data == null) - data = datas[currentDataIndex] = new SmartStatisticsDatas(); - data.initialize(previous); - - data.horizontal.calcualte(MathHelper.sqrt_double(diffX * diffX + diffZ * diffZ)); - data.vertical.calcualte((float)Math.abs(diffY)); - tickDistance = data.all.calcualte(MathHelper.sqrt_double(diffX * diffX + diffY * diffY + diffZ * diffZ)); - - if(calculateHorizontalStats && !remote) - data.horizontal.apply(sp); - } - - public void calculateRiddenStats() - { - ticksRiding++; - } - - public float getHorizontalPrevLegYaw() { return sp.prevLimbSwingAmount; } - public float getHorizontalLegYaw() { return sp.limbSwingAmount; } - public float getHorizontalTotal() { return sp.limbSwing; } - - public float getVerticalPrevLegYaw() { return datas[currentDataIndex].vertical.prevLegYaw; } - public float getVerticalLegYaw() { return datas[currentDataIndex].vertical.legYaw; } - public float getVerticalTotal() { return datas[currentDataIndex].vertical.total; } - - public float getAllPrevLegYaw() { return datas[currentDataIndex].all.prevLegYaw; } - public float getAllLegYaw() { return datas[currentDataIndex].all.legYaw; } - public float getAllTotal() { return datas[currentDataIndex].all.total; } - - public float getTickDistance() { return tickDistance; } - - public float getTotalHorizontalDistance(float renderPartialTicks) - { - return get(renderPartialTicks).getTotalHorizontalDistance(); - } - - public float getTotalVerticalDistance(float renderPartialTicks) - { - return get(renderPartialTicks).getTotalVerticalDistance(); - } - - public float getTotalDistance(float renderPartialTicks) - { - return get(renderPartialTicks).getTotalDistance(); - } - - public float getCurrentHorizontalSpeed(float renderPartialTicks) - { - return get(renderPartialTicks).getCurrentHorizontalSpeed(); - } - - public float getCurrentVerticalSpeed(float renderPartialTicks) - { - return get(renderPartialTicks).getCurrentVerticalSpeed(); - } - - public float getCurrentSpeed(float renderPartialTicks) - { - return get(renderPartialTicks).getCurrentSpeed(); - } - - private SmartStatisticsDatas get() - { - return currentDataIndex == -1 ? dummy : datas[currentDataIndex]; - } - - private SmartStatisticsDatas get(float renderPartialTicks) - { - SmartStatisticsDatas data = get(); - data.setReady(renderPartialTicks); - return data; - } - - public float getCurrentHorizontalSpeedFlattened(float renderPartialTicks, int strength) - { - strength = Math.min(strength, datas.length); - if(strength<0) - strength = datas.length; - - get(renderPartialTicks); - float sum = 0; - int count = 0; - for(int i=0, dataIndex=currentDataIndex; i. -// ================================================================== - -package net.smart.render.statistics; - -import net.minecraft.client.*; - -public abstract class SmartStatisticsContext -{ - protected static boolean calculateHorizontalStats = false; - - public static void setCalculateHorizontalStats(boolean flag) - { - calculateHorizontalStats = flag; - } - - public static void onTickInGame() - { - Minecraft minecraft = Minecraft.getMinecraft(); - - if(minecraft.theWorld != null && minecraft.theWorld.isRemote) - SmartStatisticsFactory.handleMultiPlayerTick(minecraft); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/SmartStatisticsData.java b/src/main/java/net/smart/render/statistics/SmartStatisticsData.java deleted file mode 100644 index de0df49c..00000000 --- a/src/main/java/net/smart/render/statistics/SmartStatisticsData.java +++ /dev/null @@ -1,61 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics; - -import net.minecraft.entity.player.*; - -public class SmartStatisticsData -{ - public float prevLegYaw; - public float legYaw; - public float total; - - public float getCurrentSpeed(float renderPartialTicks) - { - return Math.min(1.0F, prevLegYaw + (legYaw - prevLegYaw) * renderPartialTicks); - } - - public float getTotalDistance(float renderPartialTicks) - { - return total - legYaw * (1.0F - renderPartialTicks); - } - - public void initialize(SmartStatisticsData previous) - { - prevLegYaw = previous.legYaw; - legYaw = previous.legYaw; - total = previous.total; - } - - public float calcualte(float distance) - { - distance = distance * 4F; - - legYaw += (distance - legYaw) * 0.4F; - total += legYaw; - - return distance; - } - - public void apply(EntityPlayer sp) - { - sp.prevLimbSwingAmount = prevLegYaw; - sp.limbSwingAmount = legYaw; - sp.limbSwing = total; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/SmartStatisticsDatas.java b/src/main/java/net/smart/render/statistics/SmartStatisticsDatas.java deleted file mode 100644 index 58be8d97..00000000 --- a/src/main/java/net/smart/render/statistics/SmartStatisticsDatas.java +++ /dev/null @@ -1,76 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics; - -public class SmartStatisticsDatas -{ - public final SmartStatisticsData horizontal = new SmartStatisticsData(); - public final SmartStatisticsData vertical = new SmartStatisticsData(); - public final SmartStatisticsData all = new SmartStatisticsData(); - - private float renderPartialTicks; - - public float getTotalHorizontalDistance() - { - return horizontal.getTotalDistance(renderPartialTicks); - } - - public float getTotalVerticalDistance() - { - return vertical.getTotalDistance(renderPartialTicks); - } - - public float getTotalDistance() - { - return all.getTotalDistance(renderPartialTicks); - } - - public float getCurrentHorizontalSpeed() - { - return horizontal.getCurrentSpeed(renderPartialTicks); - } - - public float getCurrentVerticalSpeed() - { - return vertical.getCurrentSpeed(renderPartialTicks); - } - - public float getCurrentSpeed() - { - return all.getCurrentSpeed(renderPartialTicks); - } - - public void setReady(float renderPartialTicks) - { - this.renderPartialTicks = renderPartialTicks; - } - - public boolean isReady() - { - return !Float.isNaN(renderPartialTicks); - } - - public void initialize(SmartStatisticsDatas previous) - { - renderPartialTicks = Float.NaN; - - horizontal.initialize(previous.horizontal); - vertical.initialize(previous.vertical); - all.initialize(previous.all); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/SmartStatisticsFactory.java b/src/main/java/net/smart/render/statistics/SmartStatisticsFactory.java deleted file mode 100644 index ee374818..00000000 --- a/src/main/java/net/smart/render/statistics/SmartStatisticsFactory.java +++ /dev/null @@ -1,143 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics; - -import java.util.*; - -import net.minecraft.client.*; -import net.minecraft.client.entity.*; -import net.minecraft.entity.*; -import net.minecraft.entity.player.*; - -public class SmartStatisticsFactory -{ - private static SmartStatisticsFactory factory; - - private Hashtable otherStatistics; - - public SmartStatisticsFactory() - { - if(factory != null) - throw new RuntimeException("FATAL: Can only create one instance of type 'StatisticsFactory'"); - factory = this; - } - - protected static boolean isInitialized() - { - return factory != null; - } - - public static void initialize() - { - if(!isInitialized()) - new SmartStatisticsFactory(); - } - - public static void handleMultiPlayerTick(Minecraft minecraft) - { - factory.doHandleMultiPlayerTick(minecraft); - } - - public static SmartStatistics getInstance(EntityPlayer entityPlayer) - { - return factory.doGetInstance(entityPlayer); - } - - public static SmartStatisticsOther getOtherStatistics(int entityId) - { - return factory.doGetOtherStatistics(entityId); - } - - public static SmartStatisticsOther getOtherStatistics(EntityOtherPlayerMP entity) - { - return factory.doGetOtherStatistics(entity); - } - - protected void doHandleMultiPlayerTick(Minecraft minecraft) - { - Iterator others = minecraft.theWorld.playerEntities.iterator(); - while(others.hasNext()) - { - Entity player = (Entity)others.next(); - if(player instanceof EntityOtherPlayerMP) - { - EntityOtherPlayerMP otherPlayer = (EntityOtherPlayerMP)player; - SmartStatisticsOther statistics = doGetOtherStatistics(otherPlayer); - statistics.calculateAllStats(true); - statistics.foundAlive = true; - } - } - - if(otherStatistics == null || otherStatistics.isEmpty()) - return; - - Iterator entityIds = otherStatistics.keySet().iterator(); - while(entityIds.hasNext()) - { - Integer entityId = entityIds.next(); - SmartStatisticsOther statistics = otherStatistics.get(entityId); - if(statistics.foundAlive) - statistics.foundAlive = false; - else - entityIds.remove(); - } - } - - protected SmartStatistics doGetInstance(EntityPlayer entityPlayer) - { - if(entityPlayer instanceof EntityOtherPlayerMP) - return doGetOtherStatistics(entityPlayer.getEntityId()); - else if(entityPlayer instanceof IEntityPlayerSP) - return ((IEntityPlayerSP)entityPlayer).getStatistics(); - return null; - } - - protected SmartStatisticsOther doGetOtherStatistics(int entityId) - { - SmartStatisticsOther statistics = tryGetOtherStatistics(entityId); - if(statistics == null) - { - Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(entityId); - if(entity != null && entity instanceof EntityOtherPlayerMP) - statistics = addOtherStatistics((EntityOtherPlayerMP)entity); - } - return statistics; - } - - protected SmartStatisticsOther doGetOtherStatistics(EntityOtherPlayerMP entity) - { - SmartStatisticsOther statistics = tryGetOtherStatistics(entity.getEntityId()); - if(statistics == null) - statistics = addOtherStatistics(entity); - return statistics; - } - - protected final SmartStatisticsOther tryGetOtherStatistics(int entityId) - { - if(otherStatistics == null) - otherStatistics = new Hashtable(); - return otherStatistics.get(entityId); - } - - protected final SmartStatisticsOther addOtherStatistics(EntityOtherPlayerMP entity) - { - SmartStatisticsOther statistics = new SmartStatisticsOther(entity); - otherStatistics.put(entity.getEntityId(), statistics); - return statistics; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/SmartStatisticsOther.java b/src/main/java/net/smart/render/statistics/SmartStatisticsOther.java deleted file mode 100644 index a90e10be..00000000 --- a/src/main/java/net/smart/render/statistics/SmartStatisticsOther.java +++ /dev/null @@ -1,30 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics; - -import net.minecraft.client.entity.*; - -public class SmartStatisticsOther extends SmartStatistics -{ - public boolean foundAlive; - - public SmartStatisticsOther(EntityOtherPlayerMP sp) - { - super(sp); - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/playerapi/SmartStatistics.java b/src/main/java/net/smart/render/statistics/playerapi/SmartStatistics.java deleted file mode 100644 index 959d8408..00000000 --- a/src/main/java/net/smart/render/statistics/playerapi/SmartStatistics.java +++ /dev/null @@ -1,43 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics.playerapi; - -import net.minecraft.client.entity.*; -import net.minecraft.entity.player.*; - -import api.player.client.*; - -import net.smart.render.*; -import net.smart.render.statistics.*; - -public abstract class SmartStatistics -{ - public final static String ID = SmartRenderInfo.ModName; - - public static void register() - { - ClientPlayerAPI.register(ID, SmartStatisticsPlayerBase.class); - } - - public static IEntityPlayerSP getPlayerBase(EntityPlayer entityPlayer) - { - if(entityPlayer instanceof EntityPlayerSP) - return (SmartStatisticsPlayerBase)((IClientPlayerAPI)entityPlayer).getClientPlayerBase(ID); - return null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsFactory.java b/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsFactory.java deleted file mode 100644 index 5c4fbb6c..00000000 --- a/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsFactory.java +++ /dev/null @@ -1,45 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics.playerapi; - -import net.minecraft.entity.player.*; - -import net.smart.render.statistics.*; - -public class SmartStatisticsFactory extends net.smart.render.statistics.SmartStatisticsFactory -{ - public static void initialize() - { - if(!isInitialized()) - new SmartStatisticsFactory(); - } - - @Override - protected net.smart.render.statistics.SmartStatistics doGetInstance(EntityPlayer entityPlayer) - { - net.smart.render.statistics.SmartStatistics statistics = super.doGetInstance(entityPlayer); - if(statistics != null) - return statistics; - - IEntityPlayerSP playerBase = SmartStatistics.getPlayerBase(entityPlayer); - if(playerBase != null) - return playerBase.getStatistics(); - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsPlayerBase.java b/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsPlayerBase.java deleted file mode 100644 index 068001cd..00000000 --- a/src/main/java/net/smart/render/statistics/playerapi/SmartStatisticsPlayerBase.java +++ /dev/null @@ -1,51 +0,0 @@ -// ================================================================== -// This file is part of Smart Render. -// -// Smart Render 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. -// -// Smart Render 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 Smart Render. If not, see . -// ================================================================== - -package net.smart.render.statistics.playerapi; - -import api.player.client.*; - -import net.smart.render.statistics.*; - -public class SmartStatisticsPlayerBase extends ClientPlayerBase implements IEntityPlayerSP -{ - public SmartStatisticsPlayerBase(ClientPlayerAPI playerApi) - { - super(playerApi); - statistics = new net.smart.render.statistics.SmartStatistics(player); - } - - @Override - public void afterMoveEntityWithHeading(float f, float f1) - { - statistics.calculateAllStats(false); - } - - @Override - public void afterUpdateRidden() - { - statistics.calculateRiddenStats(); - } - - @Override - public net.smart.render.statistics.SmartStatistics getStatistics() - { - return statistics; - } - - public net.smart.render.statistics.SmartStatistics statistics; -} \ No newline at end of file diff --git a/src/main/java/net/smart/utilities/Name.java b/src/main/java/net/smart/utilities/Name.java deleted file mode 100644 index 39b67bd8..00000000 --- a/src/main/java/net/smart/utilities/Name.java +++ /dev/null @@ -1,43 +0,0 @@ -// ================================================================== -// This file is part of Smart Render and Smart Moving. -// -// Smart Render and Smart Moving is free software: you can -// redistribute it and/or modify it under the terms of the GNU General -// Public Licenses published by the Free Software Foundation, either -// version 3 of the License, or (at your option) any later version. -// -// Smart Render and Smart Moving 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 Smart Render and Smart Moving. If not, see -// . -// ================================================================== - -package net.smart.utilities; - -public class Name -{ - public final String obfuscated; - public final String forgefuscated; - public final String deobfuscated; - - public Name(String name) - { - this(name, null); - } - - public Name(String deobfuscatedName, String obfuscatedName) - { - this(deobfuscatedName, null, obfuscatedName); - } - - public Name(String deobfuscatedName, String forgefuscatedName, String obfuscatedName) - { - deobfuscated = deobfuscatedName; - forgefuscated = forgefuscatedName; - obfuscated = obfuscatedName; - } -} \ No newline at end of file diff --git a/src/main/java/net/smart/utilities/Reflect.java b/src/main/java/net/smart/utilities/Reflect.java deleted file mode 100644 index 92a374dc..00000000 --- a/src/main/java/net/smart/utilities/Reflect.java +++ /dev/null @@ -1,295 +0,0 @@ -// ================================================================== -// This file is part of Smart Render and Smart Moving. -// -// Smart Render and Smart Moving is free software: you can -// redistribute it and/or modify it under the terms of the GNU General -// Public Licenses published by the Free Software Foundation, either -// version 3 of the License, or (at your option) any later version. -// -// Smart Render and Smart Moving 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 Smart Render and Smart Moving. If not, see -// . -// ================================================================== - -package net.smart.utilities; - -import java.lang.reflect.*; - -public class Reflect -{ - public static Object NewInstance(Class base, Name name) - { - try - { - return LoadClass(base, name, true).getConstructor().newInstance(); - } - catch (Exception e) - { - throw new RuntimeException(name.deobfuscated, e); - } - } - - public static boolean CheckClasses(Class base, Name... names) - { - for(int i=0; i LoadClass(Class base, Name name, boolean throwException) - { - ClassLoader loader = base.getClassLoader(); - - if(name.obfuscated != null) - try - { - return loader.loadClass(name.obfuscated); - } - catch (ClassNotFoundException cnfe) - { - } - - try - { - return loader.loadClass(name.deobfuscated); - } - catch (ClassNotFoundException cnfe) - { - if(throwException) - throw new RuntimeException(cnfe); - return null; - } - } - - public static void SetField(Field field, Object object, Object value) - { - try - { - field.set(object, value); - } - catch (IllegalAccessException e) - { - throw new RuntimeException(e); - } - } - - public static Object GetField(Field field, Object object) - { - try - { - return field.get(object); - } - catch (IllegalAccessException e) - { - throw new RuntimeException(e); - } - } - - public static void SetField(Class theClass, Object object, Name name, Object value) - { - try - { - GetField(theClass, name).set(object, value); - } - catch (IllegalAccessException e) - { - throw new RuntimeException(e); - } - } - - public static Object GetField(Class theClass, Object object, Name name) - { - try - { - return GetField(theClass, name).get(object); - } - catch (IllegalAccessException e) - { - throw new RuntimeException(e); - } - } - - public static Field GetField(Class theClass, Name name) - { - return GetField(theClass, name, true); - } - - public static Field GetField(Class theClass, Name name, boolean throwException) - { - if(theClass == null && !throwException) - return null; - - Field field = null; - try - { - field = GetRawField(theClass, name); - field.setAccessible(true); - } - catch (NoSuchFieldException oe) - { - if(throwException) - throw new RuntimeException(GetFieldMessage(theClass, name), oe); - } - return field; - } - - private static String GetFieldMessage(Class theClass, Name name) - { - Field[] fields = theClass.getDeclaredFields(); - StringBuffer message = GetMessage(theClass, name, "field"); - for(int i = 0; i < fields.length; i++) - AppendField(message, fields[i]); - return message.toString(); - } - - private static Field GetRawField(Class theClass, Name name) throws NoSuchFieldException - { - if(name.obfuscated != null) - try - { - return theClass.getDeclaredField(name.obfuscated); - } - catch (NoSuchFieldException oe) - { - } - - if(name.forgefuscated != null) - try - { - return theClass.getDeclaredField(name.forgefuscated); - } - catch (NoSuchFieldException oe) - { - } - - return theClass.getDeclaredField(name.deobfuscated); - } - - public static Method GetMethod(Class theClass, Name name, Class... paramArrayOfClass) - { - return GetMethod(theClass, name, true, paramArrayOfClass); - } - - public static Method GetMethod(Class theClass, Name name, boolean throwException, Class... paramArrayOfClass) - { - if(theClass == null && !throwException) - return null; - - Method method = null; - try - { - method = GetRawMethod(theClass, name, paramArrayOfClass); - method.setAccessible(true); - } - catch (NoSuchMethodException oe) - { - if(throwException) - throw new RuntimeException(GetMethodMessage(theClass, name), oe); - } - return method; - } - - private static String GetMethodMessage(Class theClass, Name name) - { - Method[] methods = theClass.getDeclaredMethods(); - StringBuffer message = GetMessage(theClass, name, "method"); - for(int i = 0; i < methods.length; i++) - AppendMethod(message, methods[i]); - return message.toString(); - } - - private static Method GetRawMethod(Class theClass, Name name, Class... paramArrayOfClass) throws NoSuchMethodException - { - if(name.obfuscated != null) - try - { - return theClass.getDeclaredMethod(name.obfuscated, paramArrayOfClass); - } - catch (NoSuchMethodException oe) - { - } - - if(name.forgefuscated != null) - try - { - return theClass.getDeclaredMethod(name.forgefuscated, paramArrayOfClass); - } - catch (NoSuchMethodException oe) - { - } - - return theClass.getDeclaredMethod(name.deobfuscated, paramArrayOfClass); - } - - public static Object Invoke(Method method, Object paramObject, Object... paramArrayOfObject) - { - try - { - return method.invoke(paramObject, paramArrayOfObject); - } - catch (Exception e) - { - throw new RuntimeException(method.getName(), e); - } - } - - private static StringBuffer GetMessage(Class theClass, Name name, String elementName) - { - StringBuffer message = new StringBuffer() - .append("Can not find ") - .append(elementName) - .append(" \"") - .append(name.deobfuscated) - .append("\""); - - if(name.obfuscated != null) - message - .append(" (ofuscated \"") - .append(name.obfuscated) - .append("\")"); - - message - .append(" in class \"") - .append(theClass.getName()) - .append("\".\nExisting ") - .append(elementName) - .append("s are:"); - - return message; - } - - private static void AppendMethod(StringBuffer message, Method method) - { - message - .append("\n\t\t") - .append(method.getReturnType().getName()) - .append(" ") - .append(method.getName()) - .append("("); - - Class[] types = method.getParameterTypes(); - for(int i=0; i