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:
shedaniel
2021-12-08 22:13:12 +08:00
parent 7d745d612c
commit 7857615bfc
23 changed files with 78 additions and 152 deletions

View File

@@ -21,17 +21,12 @@ configurations {
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentForge.extendsFrom common
dev
}
artifacts {
dev(jar)
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.forge_version}"
common(project(path: ":common", configuration: "dev")) { transitive false }
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false }
}
@@ -45,6 +40,7 @@ processResources {
shadowJar {
exclude "fabric.mod.json"
exclude "architectury-common.accessWidener"
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"

View File

@@ -1,28 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021 architectury
*
* This program 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.hooks.level.entity.forge;
import net.minecraft.world.entity.Entity;
public class EntityHooksImpl {
public static String getEncodeId(Entity entity) {
return entity.getEncodeId();
}
}

View File

@@ -26,8 +26,4 @@ public class PlayerHooksImpl {
public static boolean isFake(Player playerEntity) {
return playerEntity instanceof FakePlayer;
}
public static void closeContainer(Player playerEntity) {
playerEntity.closeContainer();
}
}

View File

@@ -19,7 +19,6 @@
package dev.architectury.hooks.level.forge;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Explosion;
import net.minecraft.world.phys.Vec3;
@@ -27,16 +26,4 @@ public class ExplosionHooksImpl {
public static Vec3 getPosition(Explosion explosion) {
return explosion.getPosition();
}
public static Entity getSource(Explosion explosion) {
return explosion.getExploder();
}
public static float getRadius(Explosion explosion) {
return explosion.radius;
}
public static void setRadius(Explosion explosion, float v) {
explosion.radius = v;
}
}