1.18
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.8-SNAPSHOT'
|
id 'fabric-loom' version '0.10-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_16
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_16
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/versions.html
|
# check these on https://fabricmc.net/versions.html
|
||||||
minecraft_version=1.17.1
|
minecraft_version=1.18
|
||||||
yarn_mappings=1.17.1+build.63
|
yarn_mappings=1.18+build.1
|
||||||
loader_version=0.12.5
|
loader_version=0.12.7
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.17.1.6
|
mod_version = 1.18.0
|
||||||
maven_group = de.jottyfan.minecraft
|
maven_group = de.jottyfan.minecraft
|
||||||
archives_base_name = quickiefabric
|
archives_base_name = quickiefabric
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.42.1+1.17
|
fabric_version=0.43.1+1.18
|
||||||
|
|||||||
@@ -82,12 +82,11 @@ public class ItemHoarderBlockEntity extends LootableContainerBlockEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NbtCompound writeNbt(NbtCompound nbt) {
|
public void writeNbt(NbtCompound nbt) {
|
||||||
super.writeNbt(nbt);
|
super.writeNbt(nbt);
|
||||||
if (!this.serializeLootTable(nbt)) {
|
if (!this.serializeLootTable(nbt)) {
|
||||||
Inventories.writeNbt(nbt, this.stacks);
|
Inventories.writeNbt(nbt, this.stacks);
|
||||||
}
|
}
|
||||||
return nbt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -41,18 +41,19 @@ import net.minecraft.loot.entry.ItemEntry;
|
|||||||
import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
|
import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
|
||||||
import net.minecraft.screen.ScreenHandlerType;
|
import net.minecraft.screen.ScreenHandlerType;
|
||||||
import net.minecraft.structure.rule.BlockMatchRuleTest;
|
import net.minecraft.structure.rule.BlockMatchRuleTest;
|
||||||
|
import net.minecraft.structure.rule.TagMatchRuleTest;
|
||||||
|
import net.minecraft.tag.BlockTags;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.registry.BuiltinRegistries;
|
import net.minecraft.util.registry.BuiltinRegistries;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import net.minecraft.util.registry.RegistryKey;
|
import net.minecraft.util.registry.RegistryKey;
|
||||||
import net.minecraft.world.gen.YOffset;
|
import net.minecraft.world.gen.decorator.CountPlacementModifier;
|
||||||
import net.minecraft.world.gen.decorator.Decorator;
|
import net.minecraft.world.gen.decorator.SquarePlacementModifier;
|
||||||
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
import net.minecraft.world.gen.feature.Feature;
|
import net.minecraft.world.gen.feature.Feature;
|
||||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||||
import net.minecraft.world.gen.heightprovider.UniformHeightProvider;
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -68,39 +69,45 @@ public class RegistryManager {
|
|||||||
public static final ScreenHandlerType<BackpackScreenHandler> BACKPACK_SCREEN_HANDLER = ScreenHandlerRegistry
|
public static final ScreenHandlerType<BackpackScreenHandler> BACKPACK_SCREEN_HANDLER = ScreenHandlerRegistry
|
||||||
.registerExtended(RegistryManager.BACKPACK_IDENTIFIER, BackpackScreenHandler::new);
|
.registerExtended(RegistryManager.BACKPACK_IDENTIFIER, BackpackScreenHandler::new);
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_ORENETHERSULPHOR = Feature.ORE
|
public static final PlacedFeature FEATURE_ORENETHERSULPHOR = Feature.ORE
|
||||||
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_NETHER,
|
.configure(new OreFeatureConfig(new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD),
|
||||||
QuickieBlocks.ORE_NETHER_SULPHOR.getDefaultState(), 24))
|
QuickieBlocks.ORE_NETHER_SULPHOR.getDefaultState(), 24))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(0)))).spreadHorizontally().repeat(10));
|
.withPlacement(new SquarePlacementModifier());
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(0)))).spreadHorizontally().repeat(10));
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_ORESALPETER = Feature.ORE
|
public static final PlacedFeature FEATURE_ORESALPETER = Feature.ORE
|
||||||
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
.configure(new OreFeatureConfig(new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD),
|
||||||
QuickieBlocks.ORE_SALPETER.getDefaultState(), 12))
|
QuickieBlocks.ORE_SALPETER.getDefaultState(), 12))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeat(10);
|
.withPlacement(CountPlacementModifier.of(10));
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeat(10);
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_ORESULPHOR = Feature.ORE
|
public static final PlacedFeature FEATURE_ORESULPHOR = Feature.ORE
|
||||||
.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
.configure(new OreFeatureConfig(new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD),
|
||||||
QuickieBlocks.ORE_SULPHOR.getDefaultState(), 16))
|
QuickieBlocks.ORE_SULPHOR.getDefaultState(), 16))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeat(7);
|
.withPlacement(CountPlacementModifier.of(7));
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeat(7);
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_DIRTSALPETER = Feature.ORE
|
public static final PlacedFeature FEATURE_DIRTSALPETER = Feature.ORE
|
||||||
.configure(
|
.configure(
|
||||||
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.DIRT), QuickieBlocks.DIRT_SALPETER.getDefaultState(), 3))
|
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.DIRT), QuickieBlocks.DIRT_SALPETER.getDefaultState(), 3))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
.withPlacement(CountPlacementModifier.of(4));
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_SANDSALPETER = Feature.ORE
|
public static final PlacedFeature FEATURE_SANDSALPETER = Feature.ORE
|
||||||
.configure(
|
.configure(
|
||||||
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.SAND), QuickieBlocks.SAND_SALPETER.getDefaultState(), 3))
|
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.SAND), QuickieBlocks.SAND_SALPETER.getDefaultState(), 3))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
.withPlacement(CountPlacementModifier.of(4));
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
||||||
|
|
||||||
public static final ConfiguredFeature<?, ?> FEATURE_ORESANDSALPETER = Feature.ORE
|
public static final PlacedFeature FEATURE_ORESANDSALPETER = Feature.ORE
|
||||||
.configure(new OreFeatureConfig(new BlockMatchRuleTest(Blocks.SANDSTONE),
|
.configure(new OreFeatureConfig(new BlockMatchRuleTest(Blocks.SANDSTONE),
|
||||||
QuickieBlocks.ORE_SAND_SALPETER.getDefaultState(), 3))
|
QuickieBlocks.ORE_SAND_SALPETER.getDefaultState(), 3))
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
.withPlacement(CountPlacementModifier.of(4));
|
||||||
|
// .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.belowTop(64))))).spreadHorizontally().repeatRandomly(4);
|
||||||
|
|
||||||
public static final List<ConfiguredFeature<?, ?>> FEATURE_QUICKIE_ORES = Arrays.asList(FEATURE_ORESALPETER,
|
public static final List<PlacedFeature> FEATURE_QUICKIE_ORES = Arrays.asList(FEATURE_ORESALPETER,
|
||||||
FEATURE_ORESULPHOR, FEATURE_DIRTSALPETER, FEATURE_SANDSALPETER, FEATURE_ORESANDSALPETER);
|
FEATURE_ORESULPHOR, FEATURE_DIRTSALPETER, FEATURE_SANDSALPETER, FEATURE_ORESANDSALPETER);
|
||||||
public static final List<ConfiguredFeature<?, ?>> FEATURE_QUICKIE_NETHERORES = Arrays
|
public static final List<PlacedFeature> FEATURE_QUICKIE_NETHERORES = Arrays
|
||||||
.asList(FEATURE_ORENETHERSULPHOR);
|
.asList(FEATURE_ORENETHERSULPHOR);
|
||||||
|
|
||||||
public static final ItemGroup QUICKIEFABRIC_GROUP = FabricItemGroupBuilder
|
public static final ItemGroup QUICKIEFABRIC_GROUP = FabricItemGroupBuilder
|
||||||
@@ -278,9 +285,9 @@ public class RegistryManager {
|
|||||||
* @param name the name for the identifier
|
* @param name the name for the identifier
|
||||||
* @param feature the feature
|
* @param feature the feature
|
||||||
*/
|
*/
|
||||||
private static final void registerFeature(String name, ConfiguredFeature<?, ?> feature) {
|
private static final void registerFeature(String name, PlacedFeature feature) {
|
||||||
RegistryKey<ConfiguredFeature<?, ?>> identifier = RegistryKey.of(Registry.CONFIGURED_FEATURE_KEY, new Identifier(QUICKIEFABRIC, name));
|
RegistryKey<ConfiguredFeature<?, ?>> identifier = RegistryKey.of(Registry.CONFIGURED_FEATURE_KEY, new Identifier(QUICKIEFABRIC, name));
|
||||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, identifier.getValue(), feature);
|
Registry.register(BuiltinRegistries.PLACED_FEATURE, identifier.getValue(), feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
||||||
import net.minecraft.world.biome.GenerationSettings;
|
import net.minecraft.world.biome.GenerationSettings;
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
|
||||||
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
|
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -21,14 +21,14 @@ public class FeatureConfigMixin {
|
|||||||
|
|
||||||
@Inject(at = @At("TAIL"), method = "addMineables(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V")
|
@Inject(at = @At("TAIL"), method = "addMineables(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V")
|
||||||
private static void addMineables(GenerationSettings.Builder builder, CallbackInfo ci) {
|
private static void addMineables(GenerationSettings.Builder builder, CallbackInfo ci) {
|
||||||
for (ConfiguredFeature<?, ?> configuredFeature : RegistryManager.FEATURE_QUICKIE_ORES) {
|
for (PlacedFeature configuredFeature : RegistryManager.FEATURE_QUICKIE_ORES) {
|
||||||
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, configuredFeature);
|
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, configuredFeature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(at = @At("TAIL"), method = "addNetherMineables(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V")
|
@Inject(at = @At("TAIL"), method = "addNetherMineables(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V")
|
||||||
private static void addNetherMineables(GenerationSettings.Builder builder, CallbackInfo ci) {
|
private static void addNetherMineables(GenerationSettings.Builder builder, CallbackInfo ci) {
|
||||||
for (ConfiguredFeature<?, ?> configuredFeature : RegistryManager.FEATURE_QUICKIE_NETHERORES) {
|
for (PlacedFeature configuredFeature : RegistryManager.FEATURE_QUICKIE_NETHERORES) {
|
||||||
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, configuredFeature);
|
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, configuredFeature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
"quickiefabric.mixins.json"
|
"quickiefabric.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.11.3",
|
"fabricloader": ">=0.12.7",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.17.x",
|
"minecraft": "1.18",
|
||||||
"java": ">=16"
|
"java": ">=17"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"flamingo": "*"
|
"flamingo": "*"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "de.jottyfan.minecraft.quickiefabric.mixin",
|
"package": "de.jottyfan.minecraft.quickiefabric.mixin",
|
||||||
"compatibilityLevel": "JAVA_16",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"FeatureConfigMixin",
|
"FeatureConfigMixin",
|
||||||
"BlockBreakMixin"
|
"BlockBreakMixin"
|
||||||
|
|||||||
Reference in New Issue
Block a user