Compare commits
4 Commits
291d46b4e6
...
main
Author | SHA1 | Date | |
---|---|---|---|
771745b6b3 | |||
5f6a5389e1 | |||
71b835b66e | |||
6ca6b35be4 |
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.9-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ dependencies {
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@ -4,9 +4,9 @@ org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21.4
|
||||
yarn_mappings=1.21.4+build.4
|
||||
loader_version=0.16.9
|
||||
minecraft_version=1.21.6
|
||||
yarn_mappings=1.21.6+build.1
|
||||
loader_version=0.16.14
|
||||
|
||||
# Mod Properties
|
||||
mod_version=0.0.1
|
||||
@ -14,4 +14,4 @@ maven_group=de.jottyfan.gta.gdp
|
||||
archives_base_name=gtagdp
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.114.0+1.21.4
|
||||
fabric_version=0.128.0+1.21.6
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -1,12 +1,12 @@
|
||||
package de.jottyfan.gta.gdp;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import de.jottyfan.gta.gdp.block.ModBlocks;
|
||||
import de.jottyfan.gta.gdp.item.ModItems;
|
||||
import de.jottyfan.gta.gdp.world.gen.ModOreGeneration;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -21,5 +21,6 @@ public class GTAGDP implements ModInitializer {
|
||||
public void onInitialize() {
|
||||
ModItems.registerModItems();
|
||||
ModBlocks.registerModBlocks();
|
||||
ModOreGeneration.generateOres();
|
||||
}
|
||||
}
|
@ -26,6 +26,8 @@ public class ModBlocks {
|
||||
.luminance(state -> state.get(RubyBlock.ACTIVATED) ? 15 : 0));
|
||||
public static final Block RUBY_ORE = registerBlock(Identifier.of(GTAGDP.MOD_ID, "ruby_ore"),
|
||||
AbstractBlock.Settings.create().strength(3f).requiresTool());
|
||||
public static final Block RUBY_DEEPSLATE_ORE = registerBlock(Identifier.of(GTAGDP.MOD_ID, "ruby_deepslate_ore"),
|
||||
AbstractBlock.Settings.create().strength(3f).requiresTool());
|
||||
|
||||
private static Block registerRubyBlock(Identifier identifier, Block.Settings settings) {
|
||||
Block block = new RubyBlock(settings.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||
@ -50,6 +52,7 @@ public class ModBlocks {
|
||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(entries -> {
|
||||
entries.add(RUBY_BLOCK);
|
||||
entries.add(RUBY_ORE);
|
||||
entries.add(RUBY_DEEPSLATE_ORE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package de.jottyfan.gta.gdp.world;
|
||||
|
||||
import de.jottyfan.gta.gdp.GTAGDP;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
|
||||
/**
|
||||
* @author jotty
|
||||
*/
|
||||
public class ModConfiguredFeatures {
|
||||
|
||||
public static final RegistryKey<ConfiguredFeature<?, ?>> RUBY_ORE_CF = registerKey("ruby_ore_cf");
|
||||
|
||||
public static RegistryKey<ConfiguredFeature<?, ?>> registerKey(String name) {
|
||||
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(GTAGDP.MOD_ID, name));
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package de.jottyfan.gta.gdp.world;
|
||||
|
||||
import de.jottyfan.gta.gdp.GTAGDP;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
|
||||
/**
|
||||
* @author jotty
|
||||
*/
|
||||
public class ModPlacedFeatures {
|
||||
|
||||
public static final RegistryKey<PlacedFeature> RUBY_ORE_PF = registerKey("ruby_ore_pf");
|
||||
|
||||
public static RegistryKey<PlacedFeature> registerKey(String name) {
|
||||
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(GTAGDP.MOD_ID, name));
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.gta.gdp.world.gen;
|
||||
|
||||
import de.jottyfan.gta.gdp.world.ModPlacedFeatures;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
|
||||
/**
|
||||
* @author jotty
|
||||
*/
|
||||
public class ModOreGeneration {
|
||||
public static void generateOres() {
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES,
|
||||
ModPlacedFeatures.RUBY_ORE_PF);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "gtagdp:block/ruby_deepslate_ore"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "gtagdp:block/ruby_deepslate_ore"
|
||||
}
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
"item.gtagdp.rubyball": "Rubinball",
|
||||
|
||||
"block.gtagdp.ruby_block": "Rubinblock",
|
||||
"block.gtagdp.ruby_ore": "Rubinerz"
|
||||
"block.gtagdp.ruby_ore": "Rubinerz",
|
||||
"block.gtagdp.ruby_deepslate_ore": "Rubinerzklumpen"
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
"item.gtagdp.rubyball": "Ruby ball",
|
||||
|
||||
"block.gtagdp.ruby_block": "Ruby block",
|
||||
"block.gtagdp.ruby_ore": "Ruby ore"
|
||||
"block.gtagdp.ruby_ore": "Ruby ore",
|
||||
"block.gtagdp.ruby_deepslate_ore": "Ruby ore lump"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "gtagdp:block/ruby_deepslate_ore"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "gtagdp:block/ruby_deepslate_ore"
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "gtagdp:ruby_ore"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 20,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "gtagdp:ruby_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": {
|
||||
"Name": "gtagdp:ruby_deepslate_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "gtagdp:ruby_ore_cf",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 16
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:trapezoid",
|
||||
"max_inclusive": {
|
||||
"absolute": 80
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -80
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"gtagdp:ruby_block",
|
||||
"gtagdp:ruby_ore"
|
||||
"gtagdp:ruby_ore",
|
||||
"gtagdp:ruby_deepslate_ore"
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"gtagdp:ruby_block",
|
||||
"gtagdp:ruby_ore"
|
||||
"gtagdp:ruby_ore",
|
||||
"gtagdp:ruby_deepslate_ore"
|
||||
]
|
||||
}
|
@ -26,8 +26,8 @@
|
||||
"gtagdp.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": "~1.21.4",
|
||||
"fabricloader": ">=0.16.14",
|
||||
"minecraft": "~1.21.6",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
|
Reference in New Issue
Block a user