mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 18:03:42 +01:00
fix obfuscation reflection helper calls
This commit is contained in:
parent
9e4198fa79
commit
d53e89887a
6 changed files with 9 additions and 9 deletions
|
@ -81,19 +81,19 @@ public abstract class MovedProjectileDispenserBehaviour extends MovedDefaultDisp
|
|||
}
|
||||
|
||||
private static Method getProjectileEntityLookup() {
|
||||
Method getProjectileEntity = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "getProjectile", World.class, IPosition.class, ItemStack.class); // getProjectile
|
||||
Method getProjectileEntity = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "func_82499_a", World.class, IPosition.class, ItemStack.class); // getProjectile
|
||||
getProjectileEntity.setAccessible(true);
|
||||
return getProjectileEntity;
|
||||
}
|
||||
|
||||
private static Method getProjectileInaccuracyLookup() {
|
||||
Method getProjectileInaccuracy = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "getUncertainty"); // getUncertainty
|
||||
Method getProjectileInaccuracy = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "func_82498_a"); // getUncertainty
|
||||
getProjectileInaccuracy.setAccessible(true);
|
||||
return getProjectileInaccuracy;
|
||||
}
|
||||
|
||||
private static Method getProjectileVelocityLookup() {
|
||||
Method getProjectileVelocity = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "getPower"); // getPower
|
||||
Method getProjectileVelocity = ObfuscationReflectionHelper.findMethod(ProjectileDispenseBehavior.class, "func_82500_b"); // getPower
|
||||
getProjectileVelocity.setAccessible(true);
|
||||
return getProjectileVelocity;
|
||||
}
|
||||
|
|
|
@ -91,11 +91,11 @@ public class BlazeBurnerBlockItem extends BlockItem {
|
|||
|
||||
AbstractSpawner spawner = ((MobSpawnerTileEntity) te).getSpawner();
|
||||
List<WeightedSpawnerEntity> possibleSpawns =
|
||||
ObfuscationReflectionHelper.getPrivateValue(AbstractSpawner.class, spawner, "spawnPotentials"); // spawnPotentials
|
||||
ObfuscationReflectionHelper.getPrivateValue(AbstractSpawner.class, spawner, "field_98285_e");
|
||||
if (possibleSpawns.isEmpty()) {
|
||||
possibleSpawns = new ArrayList<>();
|
||||
possibleSpawns
|
||||
.add(ObfuscationReflectionHelper.getPrivateValue(AbstractSpawner.class, spawner, "nextSpawnData")); // nextSpawnData
|
||||
.add(ObfuscationReflectionHelper.getPrivateValue(AbstractSpawner.class, spawner, "field_98282_f"));
|
||||
}
|
||||
|
||||
ResourceLocation blazeId = EntityType.BLAZE.getRegistryName();
|
||||
|
|
|
@ -29,7 +29,7 @@ public class DivingBootsItem extends CopperArmorItem {
|
|||
return;
|
||||
|
||||
Vector3d motion = entity.getDeltaMovement();
|
||||
Boolean isJumping = ObfuscationReflectionHelper.getPrivateValue(LivingEntity.class, entity, "jumping"); // jumping
|
||||
Boolean isJumping = ObfuscationReflectionHelper.getPrivateValue(LivingEntity.class, entity, "field_70703_bu"); // jumping
|
||||
entity.onGround |= entity.verticalCollision;
|
||||
|
||||
if (isJumping && entity.onGround) {
|
||||
|
|
|
@ -95,7 +95,7 @@ public class BlueprintItem extends Item {
|
|||
|
||||
private static ItemStack convertIngredientToFilter(Ingredient ingredient) {
|
||||
Ingredient.IItemList[] acceptedItems =
|
||||
ObfuscationReflectionHelper.getPrivateValue(Ingredient.class, ingredient, "values"); // values
|
||||
ObfuscationReflectionHelper.getPrivateValue(Ingredient.class, ingredient, "field_199807_b"); // values
|
||||
if (acceptedItems == null || acceptedItems.length > 18)
|
||||
return ItemStack.EMPTY;
|
||||
if (acceptedItems.length == 0)
|
||||
|
|
|
@ -36,7 +36,7 @@ public class FlySpeedCommand {
|
|||
private static int sendFlySpeedUpdate(CommandContext<CommandSource> ctx, ServerPlayerEntity player, float speed) {
|
||||
SPlayerAbilitiesPacket packet = new SPlayerAbilitiesPacket(player.abilities);
|
||||
// packet.setFlySpeed(speed);
|
||||
ObfuscationReflectionHelper.setPrivateValue(SPlayerAbilitiesPacket.class, packet, speed, "flyingSpeed"); // flyingSpeed
|
||||
ObfuscationReflectionHelper.setPrivateValue(SPlayerAbilitiesPacket.class, packet, speed, "field_149116_e"); // flyingSpeed
|
||||
player.connection.send(packet);
|
||||
|
||||
ctx.getSource()
|
||||
|
|
|
@ -137,6 +137,6 @@ public class WrappedServerWorld extends ServerWorld {
|
|||
}
|
||||
|
||||
private static SaveFormat.LevelSave getLevelSaveFromWorld(World world) {
|
||||
return ObfuscationReflectionHelper.getPrivateValue(MinecraftServer.class, world.getServer(), "storageSource"); // storageSource
|
||||
return ObfuscationReflectionHelper.getPrivateValue(MinecraftServer.class, world.getServer(), "field_71310_m"); // storageSource
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue