Solid static
This commit is contained in:
parent
ab45af4d63
commit
a8d0dffadc
9 changed files with 53 additions and 0 deletions
|
@ -16,6 +16,7 @@ import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.MapColor;
|
import net.minecraft.block.MapColor;
|
||||||
import net.minecraft.block.Material;
|
import net.minecraft.block.Material;
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
import net.minecraft.util.DyeColor;
|
import net.minecraft.util.DyeColor;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
|
@ -154,6 +155,9 @@ public final class ModBlocks {
|
||||||
@RegistryEntry("marking_plate")
|
@RegistryEntry("marking_plate")
|
||||||
public static final Block MARKING_PLATE = register(new MarkingPlateBlock(FabricBlockSettings.of(Material.METAL, DyeColor.BLACK).nonOpaque()));
|
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) {
|
private static Block register(Block block) {
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,6 +297,9 @@ public final class ModItems {
|
||||||
@RegistryEntry("eternal_fluid_bucket")
|
@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)));
|
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) {
|
private static Item create(Block block) {
|
||||||
return create(new BlockItem(block, (new Item.Settings()).group(DIMENSIONAL_DOORS)));
|
return create(new BlockItem(block, (new Item.Settings()).group(DIMENSIONAL_DOORS)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,10 @@ public final class ModBiomes {
|
||||||
GenerationStep.Feature.SURFACE_STRUCTURES,
|
GenerationStep.Feature.SURFACE_STRUCTURES,
|
||||||
ModFeatures.LIMBO_GATEWAY_CONFIGURED_FEATURE
|
ModFeatures.LIMBO_GATEWAY_CONFIGURED_FEATURE
|
||||||
)
|
)
|
||||||
|
.feature(
|
||||||
|
GenerationStep.Feature.UNDERGROUND_ORES,
|
||||||
|
ModFeatures.SOLID_STATIC_ORE
|
||||||
|
)
|
||||||
.surfaceBuilder(
|
.surfaceBuilder(
|
||||||
SurfaceBuilder.DEFAULT.withConfig(
|
SurfaceBuilder.DEFAULT.withConfig(
|
||||||
new TernarySurfaceConfig(
|
new TernarySurfaceConfig(
|
||||||
|
|
|
@ -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.SchematicV2GatewayFeatureConfig;
|
||||||
import org.dimdev.dimdoors.world.feature.gateway.schematic.TwoPillarsV2Gateway;
|
import org.dimdev.dimdoors.world.feature.gateway.schematic.TwoPillarsV2Gateway;
|
||||||
|
|
||||||
|
import net.minecraft.structure.rule.BlockMatchRuleTest;
|
||||||
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;
|
||||||
|
@ -26,12 +27,14 @@ import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
||||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||||
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.SingleStateFeatureConfig;
|
import net.minecraft.world.gen.feature.SingleStateFeatureConfig;
|
||||||
|
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
// IMPORTANT NOTE
|
// IMPORTANT NOTE
|
||||||
// Do not remove deprecated stuff
|
// Do not remove deprecated stuff
|
||||||
|
@SuppressWarnings("DeprecatedIsStillUsed")
|
||||||
public final class ModFeatures {
|
public final class ModFeatures {
|
||||||
public static final Feature<SchematicV2GatewayFeatureConfig> SCHEMATIC_GATEWAY_FEATURE = new SchematicV2GatewayFeature(SchematicV2GatewayFeatureConfig.CODEC);
|
public static final Feature<SchematicV2GatewayFeatureConfig> SCHEMATIC_GATEWAY_FEATURE = new SchematicV2GatewayFeature(SchematicV2GatewayFeatureConfig.CODEC);
|
||||||
public static final Feature<DefaultFeatureConfig> LIMBO_GATEWAY_FEATURE = Registry.register(Registry.FEATURE, new Identifier("dimdoors", "limbo_gateway"), new LimboGatewayFeature());
|
public static final Feature<DefaultFeatureConfig> 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<?, ?> SANDSTONE_PILLARS_FEATURE;
|
||||||
public static final ConfiguredFeature<?, ?> TWO_PILLARS_FEATURE;
|
public static final ConfiguredFeature<?, ?> TWO_PILLARS_FEATURE;
|
||||||
public static final ConfiguredFeature<?, ?> LIMBO_GATEWAY_CONFIGURED_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)));
|
@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() {
|
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));
|
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));
|
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));
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "dimdoors:blocks/solid_static"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "dimdoors:block/solid_static"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frametime": 4,
|
||||||
|
"interpolate": true
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue