From bca73403d8548f6ef74b523f3bc800deaf583ee7 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 21 Jan 2021 21:09:32 +0800 Subject: [PATCH] Add LevelResourceHooks --- .../hooks/LevelResourceHooks.java | 30 +++++++++++++++++++ .../main/resources/architectury.accessWidener | 3 +- .../resources/META-INF/accesstransformer.cfg | 3 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 common/src/main/java/me/shedaniel/architectury/hooks/LevelResourceHooks.java diff --git a/common/src/main/java/me/shedaniel/architectury/hooks/LevelResourceHooks.java b/common/src/main/java/me/shedaniel/architectury/hooks/LevelResourceHooks.java new file mode 100644 index 00000000..3eb08748 --- /dev/null +++ b/common/src/main/java/me/shedaniel/architectury/hooks/LevelResourceHooks.java @@ -0,0 +1,30 @@ +/* + * This file is part of architectury. + * Copyright (C) 2020, 2021 shedaniel + * + * 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 me.shedaniel.architectury.hooks; + +import net.minecraft.world.level.storage.LevelResource; + +public class LevelResourceHooks { + private LevelResourceHooks() {} + + public static LevelResource create(String id) { + return new LevelResource(id); + } +} diff --git a/common/src/main/resources/architectury.accessWidener b/common/src/main/resources/architectury.accessWidener index d67323f8..80026d51 100644 --- a/common/src/main/resources/architectury.accessWidener +++ b/common/src/main/resources/architectury.accessWidener @@ -38,4 +38,5 @@ mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientMoodSet accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientAdditionsSettings Ljava/util/Optional; 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; \ No newline at end of file +mutable field net/minecraft/world/level/biome/BiomeSpecialEffects backgroundMusic Ljava/util/Optional; +accessible method net/minecraft/world/level/storage/LevelResource (Ljava/lang/String;)V \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/accesstransformer.cfg b/forge/src/main/resources/META-INF/accesstransformer.cfg index 12dffb11..d9108c0c 100644 --- a/forge/src/main/resources/META-INF/accesstransformer.cfg +++ b/forge/src/main/resources/META-INF/accesstransformer.cfg @@ -31,4 +31,5 @@ public-f net.minecraft.world.biome.BiomeAmbience field_235212_i_ # music public-f net.minecraft.world.biome.BiomeAmbience field_242523_e # skyColor public-f net.minecraft.world.biome.BiomeAmbience field_242524_f # foliageColor public-f net.minecraft.world.biome.BiomeAmbience field_242525_g # grassColor -public-f net.minecraft.world.biome.BiomeAmbience field_242526_h # grassColorModifier \ No newline at end of file +public-f net.minecraft.world.biome.BiomeAmbience field_242526_h # grassColorModifier +public net.minecraft.world.storage.FolderName (Ljava/lang/String;)V \ No newline at end of file