From a8d0dffadc5c0bec7cbc6676f2d91229903895bd Mon Sep 17 00:00:00 2001 From: SD Date: Thu, 25 Mar 2021 15:00:35 +0530 Subject: [PATCH] Solid static --- .../org/dimdev/dimdoors/block/ModBlocks.java | 4 ++++ .../org/dimdev/dimdoors/item/ModItems.java | 3 +++ .../org/dimdev/dimdoors/world/ModBiomes.java | 4 ++++ .../dimdoors/world/feature/ModFeatures.java | 5 ++++ .../dimdoors/blockstates/solid_static.json | 22 ++++++++++++++++++ .../dimdoors/models/block/solid_static.json | 6 +++++ .../dimdoors/models/item/solid_static.json | 3 +++ .../dimdoors/textures/block/solid_static.png | Bin 0 -> 1333 bytes .../block/solid_static.png.mcmeta.txt | 6 +++++ 9 files changed, 53 insertions(+) create mode 100644 src/main/resources/assets/dimdoors/blockstates/solid_static.json create mode 100644 src/main/resources/assets/dimdoors/models/block/solid_static.json create mode 100644 src/main/resources/assets/dimdoors/models/item/solid_static.json create mode 100644 src/main/resources/assets/dimdoors/textures/block/solid_static.png create mode 100644 src/main/resources/assets/dimdoors/textures/block/solid_static.png.mcmeta.txt diff --git a/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java b/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java index e1906e9b..70522c77 100644 --- a/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java +++ b/src/main/java/org/dimdev/dimdoors/block/ModBlocks.java @@ -16,6 +16,7 @@ import net.minecraft.block.Blocks; import net.minecraft.block.MapColor; import net.minecraft.block.Material; import net.minecraft.client.render.RenderLayer; +import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.DyeColor; import net.minecraft.util.registry.Registry; @@ -154,6 +155,9 @@ public final class ModBlocks { @RegistryEntry("marking_plate") public static final Block MARKING_PLATE = register(new MarkingPlateBlock(FabricBlockSettings.of(Material.METAL, DyeColor.BLACK).nonOpaque())); + @RegistryEntry("solid_static") + public static final Block SOLID_STATIC = register(new Block(FabricBlockSettings.of(Material.STONE).strength(7, 25).breakByTool(FabricToolTags.PICKAXES, 3).breakByHand(false).sounds(BlockSoundGroup.SAND))); + private static Block register(Block block) { return block; } diff --git a/src/main/java/org/dimdev/dimdoors/item/ModItems.java b/src/main/java/org/dimdev/dimdoors/item/ModItems.java index 21a6f408..362effc5 100644 --- a/src/main/java/org/dimdev/dimdoors/item/ModItems.java +++ b/src/main/java/org/dimdev/dimdoors/item/ModItems.java @@ -297,6 +297,9 @@ public final class ModItems { @RegistryEntry("eternal_fluid_bucket") public static final Item ETERNAL_FLUID_BUCKET = create(new BucketItem(ModFluids.ETERNAL_FLUID, new Item.Settings().group(DIMENSIONAL_DOORS).recipeRemainder(Items.BUCKET).maxCount(1))); + @RegistryEntry("solid_static") + public static final Item SOLID_STATIC = create(ModBlocks.SOLID_STATIC); + private static Item create(Block block) { return create(new BlockItem(block, (new Item.Settings()).group(DIMENSIONAL_DOORS))); } diff --git a/src/main/java/org/dimdev/dimdoors/world/ModBiomes.java b/src/main/java/org/dimdev/dimdoors/world/ModBiomes.java index 6d5218cd..0d00d35e 100644 --- a/src/main/java/org/dimdev/dimdoors/world/ModBiomes.java +++ b/src/main/java/org/dimdev/dimdoors/world/ModBiomes.java @@ -103,6 +103,10 @@ public final class ModBiomes { GenerationStep.Feature.SURFACE_STRUCTURES, ModFeatures.LIMBO_GATEWAY_CONFIGURED_FEATURE ) + .feature( + GenerationStep.Feature.UNDERGROUND_ORES, + ModFeatures.SOLID_STATIC_ORE + ) .surfaceBuilder( SurfaceBuilder.DEFAULT.withConfig( new TernarySurfaceConfig( diff --git a/src/main/java/org/dimdev/dimdoors/world/feature/ModFeatures.java b/src/main/java/org/dimdev/dimdoors/world/feature/ModFeatures.java index 305c9f22..82c38ef2 100644 --- a/src/main/java/org/dimdev/dimdoors/world/feature/ModFeatures.java +++ b/src/main/java/org/dimdev/dimdoors/world/feature/ModFeatures.java @@ -15,6 +15,7 @@ import org.dimdev.dimdoors.world.feature.gateway.schematic.SchematicV2GatewayFea import org.dimdev.dimdoors.world.feature.gateway.schematic.SchematicV2GatewayFeatureConfig; import org.dimdev.dimdoors.world.feature.gateway.schematic.TwoPillarsV2Gateway; +import net.minecraft.structure.rule.BlockMatchRuleTest; import net.minecraft.util.Identifier; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; @@ -26,12 +27,14 @@ import net.minecraft.world.gen.feature.ConfiguredFeature; import net.minecraft.world.gen.feature.ConfiguredFeatures; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.OreFeatureConfig; import net.minecraft.world.gen.feature.SingleStateFeatureConfig; import net.fabricmc.loader.api.FabricLoader; // IMPORTANT NOTE // Do not remove deprecated stuff +@SuppressWarnings("DeprecatedIsStillUsed") public final class ModFeatures { public static final Feature SCHEMATIC_GATEWAY_FEATURE = new SchematicV2GatewayFeature(SchematicV2GatewayFeatureConfig.CODEC); public static final Feature LIMBO_GATEWAY_FEATURE = Registry.register(Registry.FEATURE, new Identifier("dimdoors", "limbo_gateway"), new LimboGatewayFeature()); @@ -41,6 +44,7 @@ public final class ModFeatures { public static final ConfiguredFeature SANDSTONE_PILLARS_FEATURE; public static final ConfiguredFeature TWO_PILLARS_FEATURE; public static final ConfiguredFeature LIMBO_GATEWAY_CONFIGURED_FEATURE; + public static final ConfiguredFeature SOLID_STATIC_ORE; @Deprecated public static final ConfiguredFeature ETERNAL_FLUID_LAKE = Feature.LAKE.configure(new SingleStateFeatureConfig(ModBlocks.ETERNAL_FLUID.getDefaultState())).decorate(ETERNAL_FLUID_LAKE_DECORATOR.configure(new ChanceDecoratorConfig(20))); public static void init() { @@ -76,5 +80,6 @@ public final class ModFeatures { SANDSTONE_PILLARS_FEATURE = SCHEMATIC_GATEWAY_FEATURE.configure(new SchematicV2GatewayFeatureConfig(SchematicV2Gateway.ID_SCHEMATIC_MAP.inverse().get(SANDSTONE_PILLARS_GATEWAY))).decorate(ConfiguredFeatures.Decorators.SQUARE_TOP_SOLID_HEIGHTMAP.applyChance(gatewayChance)); TWO_PILLARS_FEATURE = SCHEMATIC_GATEWAY_FEATURE.configure(new SchematicV2GatewayFeatureConfig(SchematicV2Gateway.ID_SCHEMATIC_MAP.inverse().get(TWO_PILLARS_GATEWAY))).decorate(ConfiguredFeatures.Decorators.SQUARE_TOP_SOLID_HEIGHTMAP.applyChance(gatewayChance)); LIMBO_GATEWAY_CONFIGURED_FEATURE = LIMBO_GATEWAY_FEATURE.configure(DefaultFeatureConfig.INSTANCE).decorate(ConfiguredFeatures.Decorators.SQUARE_TOP_SOLID_HEIGHTMAP.applyChance(gatewayChance)); + SOLID_STATIC_ORE = Feature.ORE.configure(new OreFeatureConfig(new BlockMatchRuleTest(ModBlocks.UNRAVELLED_FABRIC), ModBlocks.SOLID_STATIC.getDefaultState(), 4)); } } diff --git a/src/main/resources/assets/dimdoors/blockstates/solid_static.json b/src/main/resources/assets/dimdoors/blockstates/solid_static.json new file mode 100644 index 00000000..9f4f29a7 --- /dev/null +++ b/src/main/resources/assets/dimdoors/blockstates/solid_static.json @@ -0,0 +1,22 @@ +{ + "variants": { + "normal": [ + { "model": "dimdoors:solid_static" }, + { "model": "dimdoors:solid_static", "x": 90 }, + { "model": "dimdoors:solid_static", "x": 180 }, + { "model": "dimdoors:solid_static", "x": 270 }, + { "model": "dimdoors:solid_static", "y": 90 }, + { "model": "dimdoors:solid_static", "y": 90, "x": 90 }, + { "model": "dimdoors:solid_static", "y": 90, "x": 180 }, + { "model": "dimdoors:solid_static", "y": 90, "x": 270 }, + { "model": "dimdoors:solid_static", "y": 180 }, + { "model": "dimdoors:solid_static", "y": 180, "x": 90 }, + { "model": "dimdoors:solid_static", "y": 180, "x": 180 }, + { "model": "dimdoors:solid_static", "y": 180, "x": 270 }, + { "model": "dimdoors:solid_static", "y": 270 }, + { "model": "dimdoors:solid_static", "y": 270, "x": 90 }, + { "model": "dimdoors:solid_static", "y": 270, "x": 180 }, + { "model": "dimdoors:solid_static", "y": 270, "x": 270 } + ] + } +} diff --git a/src/main/resources/assets/dimdoors/models/block/solid_static.json b/src/main/resources/assets/dimdoors/models/block/solid_static.json new file mode 100644 index 00000000..03fe6dfa --- /dev/null +++ b/src/main/resources/assets/dimdoors/models/block/solid_static.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "dimdoors:blocks/solid_static" + } +} diff --git a/src/main/resources/assets/dimdoors/models/item/solid_static.json b/src/main/resources/assets/dimdoors/models/item/solid_static.json new file mode 100644 index 00000000..471a32ee --- /dev/null +++ b/src/main/resources/assets/dimdoors/models/item/solid_static.json @@ -0,0 +1,3 @@ +{ + "parent": "dimdoors:block/solid_static" +} diff --git a/src/main/resources/assets/dimdoors/textures/block/solid_static.png b/src/main/resources/assets/dimdoors/textures/block/solid_static.png new file mode 100644 index 0000000000000000000000000000000000000000..8354f3576ca418e6daf458af5bd0b79ff34dc1bd GIT binary patch literal 1333 zcmV-51Px#1ZP1_K>z@;j|==^1poj532;bRa{vGjVE_ORVF9Q=r)dBH1j9+}}f*TXNzne3j;vuAa}vXv?MSZ={MOd>MN zGeL$eJ<(U=U7j|}KJcu_1ea%}my75@giJ8_Q`sjzWpf`qGHf!@V-37CFiX7CAZ_RC zJr&|}4V<5JmgVK8uGua7Kto3E>~xdWJCSy>EtM^q>$dyj3kr6g02LT4W zFYnD~Mzh(DbJ7ACTV-<%(s?QK2G_gp{XS2$EGhE@+fzW{PFaof#~VrTOj(5>-S%dJ zclpU#SiY5;VJ5(S%Ke%8b9VWO*1Q}hSGYs!T)sR7mF4RIC_Co?B6-%#k}{`{I}v)x zc86EEwE)sF+XC}A3nwGND_h__Y0h4ghlU?5D6&`4`WCVR@edy(^eO1}Zpv-6dO*33wG+8!%7$pn`#Ymnuh%6IuZ3oW`J zdCGuvb1Tcp12H>NHUhIKr}1bZ>jwq{L$^u#@>Zrb;5_v9xew^q`}SZHl;g9HrW4H= zHi2skHXle%RMGOOUhGm%iA0-1bvkVu$kA&me*fCn5itIM3LoP5gP zuQEJ>?2bE;AOuf-BFlzuvZh~lVk(ij&WB|4N&{Z-*mxr7V+9G>R9*JO z>^*1yuHW7Z&A9Q{&JPT4Bhhs7)2MG}0jJvc4XjE1MndVCTOjE#-%L0$qt^`m-Xc3( zFItW+TlPT)LoS>WZ66p8oR~eJAbtdJgEVrqDwg{|&Zkln*gm`y8*tXVtbu3ufY6y_ zsQ_T)!N}$^aCs-TiZaN&P?!N(9XLxqb$L9YH8IQ@vOuSc-6>S?ykdYgD&$e`hU9Cu=aGE)InZKrW5 z&(NHO%SCL#2r{7-yjOaAmfl`0L~oV23>;gK6C)i7sCk?PcM_UI$^^-_(|9r#T7uDn z3q)fmh<4s>C0~xS8-i91cG4|pL4xK0(7Da=PINwLjTyu@2Ad-{OOqpe>LaV^k&QK= rEC(f~TyWj?aus}$t^$94e7*b!qSODnz_brH00000NkvXXu0mjfz0hD; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/dimdoors/textures/block/solid_static.png.mcmeta.txt b/src/main/resources/assets/dimdoors/textures/block/solid_static.png.mcmeta.txt new file mode 100644 index 00000000..66628493 --- /dev/null +++ b/src/main/resources/assets/dimdoors/textures/block/solid_static.png.mcmeta.txt @@ -0,0 +1,6 @@ +{ + "animation": { + "frametime": 4, + "interpolate": true + } +}