mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-01 21:17:45 -05:00
Migrate to transitive access wideners (#146)
* Migrate to transitive access wideners * Fix invalid AW * Bump minor version, changes to gradle buildscript Co-authored-by: Max <maxh2709@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
loom {
|
||||
accessWidener = file("src/main/resources/architectury.accessWidener")
|
||||
accessWidener = file("src/main/resources/architectury-common.accessWidener")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -15,11 +15,6 @@ architectury {
|
||||
common()
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenCommon(MavenPublication) {
|
||||
|
||||
@@ -22,15 +22,20 @@ package me.shedaniel.architectury.hooks;
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public final class EntityHooks {
|
||||
private EntityHooks() {
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
/**
|
||||
* @deprecated Use the field directly.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static String getEncodeId(Entity entity) {
|
||||
throw new AssertionError();
|
||||
return entity.getEncodeId();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -23,6 +23,7 @@ import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public final class ExplosionHooks {
|
||||
@@ -34,19 +35,31 @@ public final class ExplosionHooks {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the field directly.
|
||||
*/
|
||||
@Nullable
|
||||
@ExpectPlatform
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static Entity getSource(Explosion explosion) {
|
||||
throw new AssertionError();
|
||||
return explosion.source;
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
/**
|
||||
* @deprecated Use the field directly.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static float getRadius(Explosion explosion) {
|
||||
throw new AssertionError();
|
||||
return explosion.radius;
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
/**
|
||||
* @deprecated Use the field directly.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static void setRadius(Explosion explosion, float radius) {
|
||||
throw new AssertionError();
|
||||
explosion.radius = radius;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,17 @@
|
||||
package me.shedaniel.architectury.hooks;
|
||||
|
||||
import net.minecraft.world.level.storage.LevelResource;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
public class LevelResourceHooks {
|
||||
private LevelResourceHooks() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the constructor directly.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static LevelResource create(String id) {
|
||||
return new LevelResource(id);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ package me.shedaniel.architectury.hooks;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public final class PlayerHooks {
|
||||
private PlayerHooks() {
|
||||
@@ -31,8 +33,12 @@ public final class PlayerHooks {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
/**
|
||||
* @deprecated Use the method directly.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static void closeContainer(Player player) {
|
||||
throw new AssertionError();
|
||||
player.closeContainer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
accessWidener v1 named
|
||||
accessWidener v2 named
|
||||
accessible method net/minecraft/world/level/block/state/BlockBehaviour$Properties <init> (Lnet/minecraft/world/level/material/Material;Ljava/util/function/Function;)V
|
||||
accessible field net/minecraft/world/level/biome/Biome climateSettings Lnet/minecraft/world/level/biome/Biome$ClimateSettings;
|
||||
accessible field net/minecraft/world/level/biome/Biome depth F
|
||||
@@ -39,13 +39,19 @@ accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientAddi
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientAdditionsSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects backgroundMusic Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects backgroundMusic Ljava/util/Optional;
|
||||
accessible method net/minecraft/world/level/storage/LevelResource <init> (Ljava/lang/String;)V
|
||||
accessible field net/minecraft/world/item/AxeItem STRIPABLES Ljava/util/Map;
|
||||
transitive-accessible method net/minecraft/world/entity/Entity getEncodeId ()Ljava/lang/String;
|
||||
transitive-accessible method net/minecraft/world/level/storage/LevelResource <init> (Ljava/lang/String;)V
|
||||
transitive-accessible field net/minecraft/world/item/AxeItem STRIPABLES Ljava/util/Map;
|
||||
mutable field net/minecraft/world/item/AxeItem STRIPABLES Ljava/util/Map;
|
||||
accessible field net/minecraft/world/item/ShovelItem FLATTENABLES Ljava/util/Map;
|
||||
mutable field net/minecraft/world/item/ShovelItem FLATTENABLES Ljava/util/Map;
|
||||
accessible field net/minecraft/world/item/HoeItem TILLABLES Ljava/util/Map;
|
||||
mutable field net/minecraft/world/item/HoeItem TILLABLES Ljava/util/Map;
|
||||
transitive-accessible field net/minecraft/world/level/Explosion source Lnet/minecraft/world/entity/Entity;
|
||||
transitive-mutable field net/minecraft/world/level/Explosion source Lnet/minecraft/world/entity/Entity;
|
||||
transitive-accessible field net/minecraft/world/level/Explosion radius F
|
||||
transitive-mutable field net/minecraft/world/level/Explosion radius F
|
||||
transitive-accessible method net/minecraft/world/entity/player/Player closeContainer ()V
|
||||
|
||||
accessible field net/minecraft/world/item/trading/MerchantOffer baseCostA Lnet/minecraft/world/item/ItemStack;
|
||||
mutable field net/minecraft/world/item/trading/MerchantOffer baseCostA Lnet/minecraft/world/item/ItemStack;
|
||||
3
common/src/main/resources/architectury.common.json
Normal file
3
common/src/main/resources/architectury.common.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"accessWidener": "architectury-common.accessWidener"
|
||||
}
|
||||
Reference in New Issue
Block a user