1.21.3 (#29)
* Add 1.21.3 * Update registry manager get() calls to getOrThrow() * Update BlocksDataGenerator * Update EnchantmentsDataGenerator * Update EntitiesDataGenerator * Update ItemsDataGenerator * Update RecipeDataGenerator * Update EmptyRenderBlockView * Fix Recipe Generator & add Sound Generator * Move to proper directory * Remove extra spaces * Enable all features --------- Co-authored-by: Romain Beaumont <romain.rom1@gmail.com> Co-authored-by: GroobleDierne <grooble.dierne@gmail.com> Co-authored-by: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com>
This commit is contained in:
co-authored by
Romain Beaumont
GroobleDierne
AlexProgrammerDE
parent
e40ba85ab9
commit
e05f38fcc2
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* SoulFire
|
||||
* Copyright (C) 2024 AlexProgrammerDE
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package dev.u9g.minecraftdatagenerator.mixin;
|
||||
|
||||
import net.minecraft.resource.DataPackSettings;
|
||||
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mixin(DataPackSettings.class)
|
||||
public class DataPackSettingsMixin {
|
||||
@Inject(method = "getEnabled", at = @At("HEAD"), cancellable = true)
|
||||
public void getEnabled(CallbackInfoReturnable<List<String>> cir) {
|
||||
cir.setReturnValue(FeatureFlags.FEATURE_MANAGER.toId(FeatureFlags.FEATURE_MANAGER.getFeatureSet()).stream().map(Identifier::getPath).toList());
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
"package": "dev.u9g.minecraftdatagenerator.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"DataPackSettingsMixin",
|
||||
"EULAMixin",
|
||||
"ReadyMixin"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user