Skip to content

Commit

Permalink
Update to 1.16.2
Browse files Browse the repository at this point in the history
Refactor ore gen for 1.16.2
  • Loading branch information
Motschen committed Aug 12, 2020
1 parent ba1010e commit cb17179
Show file tree
Hide file tree
Showing 46 changed files with 59 additions and 710 deletions.
11 changes: 5 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16-pre6
yarn_mappings=1.16-pre6+build.1
loader_version=0.8.7+build.201
minecraft_version=1.16.2
yarn_mappings=1.16.2+build.6
loader_version=0.9.1+build.205

# Mod Properties
mod_version = 1.0.3
mod_version = 1.0.4
maven_group = eu.midnightdust.motschen
archives_base_name = dishes

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.12.2+build.362-1.16
patchouli_version=1.16-fabric-SNAPSHOT
fabric_version=0.17.2+build.396-1.16
26 changes: 1 addition & 25 deletions src/main/java/eu/midnightdust/motschen/dishes/DishesMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

import java.util.Locale;

public class DishesMain implements ModInitializer {
public static final String MOD_ID = "dishes";

Expand Down Expand Up @@ -105,28 +103,6 @@ public void onInitialize() {

LootModifier.init();
Flags.init();
eu.midnightdust.motschen.dishes.world.SaltOre.initBiomeFeatures();
}
public enum Ores implements ItemConvertible {
SaltOre(4, 20, 40, 120);

public final String name;
public final int veinSize;
public final int veinsPerChunk;
public final int minY;
public final int maxY;

Ores(int veinSize, int veinsPerChunk, int minY, int maxY) {
name = this.toString().toLowerCase(Locale.ROOT);
this.veinSize = veinSize;
this.veinsPerChunk = veinsPerChunk;
this.minY = minY;
this.maxY = maxY;
}

@Override
public Item asItem() {
return SaltOre.asItem();
}
OreFeatures.init();
}
}
17 changes: 17 additions & 0 deletions src/main/java/eu/midnightdust/motschen/dishes/OreFeatures.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package eu.midnightdust.motschen.dishes;

import net.minecraft.util.Identifier;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;

public class OreFeatures {
public static final ConfiguredFeature<?, ?> SALT_ORE_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, DishesMain.SaltOre.getDefaultState(), 4)).method_30377(120).spreadHorizontally().repeat(20);

public static void init() {
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(DishesMain.MOD_ID, "salt_ore"), SALT_ORE_FEATURE);

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package eu.midnightdust.motschen.dishes.mixin;

import eu.midnightdust.motschen.dishes.OreFeatures;
import net.minecraft.world.biome.GenerationSettings.Builder;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
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.CallbackInfo;

@Mixin(DefaultBiomeFeatures.class)
public class DefaultBiomeFeaturesMixin {
@Inject(at = @At("RETURN"), method = "addDefaultOres")
private static void addDefaultOres(Builder builder, CallbackInfo info) {
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, OreFeatures.SALT_ORE_FEATURE);
}
}
41 changes: 0 additions & 41 deletions src/main/java/eu/midnightdust/motschen/dishes/world/SaltOre.java

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/resources/assets/dishes/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"item.dishes.lettucebush":"生菜丛",
"item.dishes.lettuceseed":"生菜种子",
"item.dishes.potato_slice":"土豆片",
"item.dishes.raw_fries":"生薯条",
"item.dishes.raw_fries":"薯条",
"item.dishes.fries":"薯条",
"item.dishes.salami":"萨拉米香肠",
"item.dishes.cheese_roll":"芝士卷",
"item.dishes.cheese_roll":"芝士派",
"item.dishes.cheese_slice":"芝士片",
"item.dishes.knife":"",
"block.dishes.plate":"盘子",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cb17179

Please sign in to comment.