Added Stone door and its creative only dimensional door Dungeon Door that will create a dungeon upon placement.
Removed Jungle_riddle_fixed from dungeon pool due to malfunctioning json. -Fixed gateways appearing on oceans.
This commit is contained in:
parent
5134a673ee
commit
468a720f3f
15 changed files with 195 additions and 20 deletions
|
@ -2,10 +2,44 @@ package org.dimdev.dimdoors.datagen;
|
|||
|
||||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockStateDefinitionProvider;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.data.client.*;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
|
||||
import static net.minecraft.data.client.BlockStateModelGenerator.createBlockStateWithTwoModelAndRandomInversion;
|
||||
import static net.minecraft.data.client.BlockStateModelGenerator.createDoorBlockState;
|
||||
|
||||
public class DatagenInitializer implements DataGeneratorEntrypoint {
|
||||
@Override
|
||||
public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) {
|
||||
dataGenerator.addProvider(new FabricBlockStateDefinitionProvider(dataGenerator) {
|
||||
|
||||
@Override
|
||||
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
|
||||
registerDoor(blockStateModelGenerator, ModBlocks.STONE_DOOR, Blocks.STONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateItemModels(ItemModelGenerator itemModelGenerator) {
|
||||
}
|
||||
|
||||
public void registerDoor(BlockStateModelGenerator generator, Block doorBlock, Block base) {
|
||||
TextureMap textureMap = TextureMap.all(base);
|
||||
Identifier identifier = Models.DOOR_BOTTOM.upload(doorBlock, textureMap, generator.modelCollector);
|
||||
Identifier identifier2 = Models.DOOR_BOTTOM_RH.upload(doorBlock, textureMap, generator.modelCollector);
|
||||
Identifier identifier3 = Models.DOOR_TOP.upload(doorBlock, textureMap, generator.modelCollector);
|
||||
Identifier identifier4 = Models.DOOR_TOP_RH.upload(doorBlock, textureMap, generator.modelCollector);
|
||||
generator.registerItemModel(doorBlock.asItem());
|
||||
generator.blockStateCollector.accept(createDoorBlockState(doorBlock, identifier, identifier2, identifier3, identifier4));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
dataGenerator.addProvider(new FabricRecipeProvider(dataGenerator));
|
||||
dataGenerator.addProvider(new AdvancementProvider(dataGenerator));
|
||||
dataGenerator.addProvider(new LootTableProvider(dataGenerator));
|
||||
|
|
|
@ -149,7 +149,7 @@ public final class ModConfig implements ConfigData {
|
|||
@RequiresRestart
|
||||
@Tooltip public double clusterGenChance = 20000;
|
||||
@RequiresRestart
|
||||
@Tooltip public int gatewayGenChance = 500;
|
||||
@Tooltip public int gatewayGenChance = 200;
|
||||
@RequiresRestart
|
||||
@Tooltip public List<String> clusterDimBlacklist = new LinkedList<>();
|
||||
@RequiresRestart
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.dimdev.dimdoors.block;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.dimdev.dimdoors.block.door.DimensionalDoorBlock;
|
||||
import org.dimdev.dimdoors.block.door.DimensionalTrapdoorBlock;
|
||||
import org.dimdev.dimdoors.block.door.data.DoorData;
|
||||
import org.dimdev.dimdoors.block.door.data.DoorDataReader;
|
||||
|
@ -35,20 +36,21 @@ public final class ModBlocks {
|
|||
@RegistryEntry("gold_door")
|
||||
public static final Block GOLD_DOOR = register(new DoorBlock(FabricBlockSettings.of(Material.METAL, MapColor.GOLD).strength(5.0F).requiresTool().nonOpaque()));
|
||||
|
||||
@RegistryEntry("stone_door")
|
||||
public static final Block STONE_DOOR = register(new DoorBlock(FabricBlockSettings.of(Material.METAL, MapColor.OAK_TAN).strength(5.0F).requiresTool().nonOpaque()));
|
||||
|
||||
@RegistryEntry("quartz_door")
|
||||
public static final Block QUARTZ_DOOR = register(new DoorBlock(FabricBlockSettings.of(Material.STONE, MapColor.OFF_WHITE).strength(5.0F).requiresTool().nonOpaque()));
|
||||
|
||||
@RegistryEntry("wood_dimensional_trapdoor")
|
||||
public static final Block OAK_DIMENSIONAL_TRAPDOOR = register(new DimensionalTrapdoorBlock(FabricBlockSettings.copyOf(Blocks.OAK_TRAPDOOR).luminance(state -> 10)));
|
||||
|
||||
|
||||
@RegistryEntry("dimensional_portal")
|
||||
public static final Block DIMENSIONAL_PORTAL = register(new DimensionalPortalBlock(FabricBlockSettings.of(Material.AIR).collidable(false).strength(-1.0F, 3600000.0F).nonOpaque().dropsNothing().luminance(10)));
|
||||
|
||||
@RegistryEntry("detached_rift")
|
||||
public static final Block DETACHED_RIFT = register(new DetachedRiftBlock(FabricBlockSettings.of(Material.AIR).strength(-1.0F, 3600000.0F).noCollision().nonOpaque()));
|
||||
|
||||
|
||||
@RegistryEntry("white_fabric")
|
||||
public static final Block WHITE_FABRIC = registerFabric(DyeColor.WHITE);
|
||||
|
||||
|
|
|
@ -116,6 +116,21 @@ public class DoorDataReader {
|
|||
), new RiftDataList(Util.make(new LinkedList<>(), list -> list.add(new Pair<>(new RiftDataList.OptRiftData(Optional.of(new UnstableTarget()), Optional.of(LinkProperties.builder().linksRemaining(1).groups(IntStream.of(0, 1).boxed().collect(Collectors.toSet())).build())).toJson(new JsonObject()), AlwaysTrueCondition.INSTANCE)))
|
||||
), true);
|
||||
|
||||
public static final DoorData DEFAULT_DUNGEON_DOOR = new DoorData(
|
||||
"dimdoors:dungeon_door",
|
||||
new DoorData.UnbakedItemSettings(
|
||||
"dimdoors:stone_door",
|
||||
OptionalInt.of(1),
|
||||
OptionalInt.empty(),
|
||||
Optional.of(Rarity.UNCOMMON),
|
||||
TriState.FALSE
|
||||
),
|
||||
new DoorData.UnbakedBlockSettings(
|
||||
"dimdoors:stone_door",
|
||||
OptionalInt.empty()
|
||||
), new RiftDataList(Util.make(new LinkedList<>(), list -> list.add(new Pair<>(new RiftDataList.OptRiftData(Optional.of(DefaultDungeonDestinations.getShallowerDungeonDestination()), Optional.of(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES)).toJson(new JsonObject()), AlwaysTrueCondition.INSTANCE)))
|
||||
), true);
|
||||
|
||||
public static void read() {
|
||||
Path doorDir = DimensionalDoorsInitializer.getConfigRoot().resolve("doors");
|
||||
|
||||
|
@ -175,6 +190,7 @@ public class DoorDataReader {
|
|||
writeDefault(root.resolve("gold_dimensional_door.json"), DEFAULT_GOLD_DIMENSIONAL_DOOR);
|
||||
writeDefault(root.resolve("oak_dimensional_door.json"), DEFAULT_OAK_DIMENSIONAL_DOOR);
|
||||
writeDefault(root.resolve("quartz_dimensional_door.json"), DEFAULT_QUARTZ_DIMENSIONAL_DOOR);
|
||||
writeDefault(root.resolve("dungeon_door.json"), DEFAULT_DUNGEON_DOOR);
|
||||
// writeDefault(root.resolve("unstable_dimensional_door.json"), DEFAULT_UNSTABLE_DIMENSIONAL_DOOR);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@ public final class ModItems {
|
|||
@RegistryEntry("gold_door")
|
||||
public static final Item GOLD_DOOR = create(ModBlocks.GOLD_DOOR);
|
||||
|
||||
@RegistryEntry("stone_door")
|
||||
public static final Item STONE_DOOR = create(ModBlocks.STONE_DOOR);
|
||||
|
||||
@RegistryEntry("wood_dimensional_trapdoor")
|
||||
public static final Item OAK_DIMENSIONAL_TRAPDOOR = create(new DimensionalTrapdoorItem(
|
||||
ModBlocks.OAK_DIMENSIONAL_TRAPDOOR,
|
||||
|
|
|
@ -77,7 +77,8 @@ public final class ModFeatures {
|
|||
return biome.getCategory() != Category.NONE &&
|
||||
biome.getCategory() != Category.THEEND &&
|
||||
biome.getCategory() != Category.DESERT &&
|
||||
biome.getCategory() != Category.NETHER;
|
||||
biome.getCategory() != Category.NETHER &&
|
||||
biome.getCategory() != Category.OCEAN;
|
||||
},
|
||||
GenerationStep.Feature.SURFACE_STRUCTURES,
|
||||
TWO_PILLARS_PLACED_FEATURE.getKey().get()
|
||||
|
|
124
src/main/resources/assets/dimdoors/blockstates/dungeon_door.json
Normal file
124
src/main/resources/assets/dimdoors/blockstates/dungeon_door.json
Normal file
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=lower,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom"
|
||||
},
|
||||
"facing=east,half=lower,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=lower,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge"
|
||||
},
|
||||
"facing=east,half=lower,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=upper,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top"
|
||||
},
|
||||
"facing=east,half=upper,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=upper,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge"
|
||||
},
|
||||
"facing=east,half=upper,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=lower,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=lower,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge"
|
||||
},
|
||||
"facing=north,half=lower,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=lower,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=upper,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=upper,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge"
|
||||
},
|
||||
"facing=north,half=upper,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=upper,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=lower,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=lower,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=lower,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=lower,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom"
|
||||
},
|
||||
"facing=south,half=upper,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=upper,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=upper,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=upper,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top"
|
||||
},
|
||||
"facing=west,half=lower,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=lower,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=lower,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_bottom_hinge",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=lower,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_bottom",
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=upper,hinge=left,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=upper,hinge=left,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=upper,hinge=right,open=false": {
|
||||
"model": "dimdoors:block/stone_door_top_hinge",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=upper,hinge=right,open=true": {
|
||||
"model": "dimdoors:block/stone_door_top",
|
||||
"y": 90
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,6 +10,8 @@
|
|||
"block.dimdoors.unstable_dimensional_door": "Unstable Dimensional Door",
|
||||
"block.dimdoors.oak_dimensional_door": "Oak Dimensional Door",
|
||||
"block.dimdoors.wood_dimensional_trapdoor": "Oak Dimensional Trapdoor",
|
||||
"block.dimdoors.stone_door": "Stone Door",
|
||||
"block.dimdoors.dungeon_door": "Dungeon Door",
|
||||
"block.dimdoors.dimensional_portal": "Dimensional Portal",
|
||||
"block.dimdoors.black_fabric": "Fabric of Reality",
|
||||
"block.dimdoors.white_fabric": "Altered Fabric",
|
||||
|
@ -95,6 +97,10 @@
|
|||
"block.dimdoors.iron_dimensional_door.info1": "to activate that rift or place",
|
||||
"block.dimdoors.iron_dimensional_door.info2": "anywhere else to create a",
|
||||
"block.dimdoors.iron_dimensional_door.info3": "pocket dimension.",
|
||||
"block.dimdoors.dungeon_door.info0": "Place on the block under a rift",
|
||||
"block.dimdoors.dungeon_door.info1": "to activate that rift or place",
|
||||
"block.dimdoors.dungeon_door.info2": "anywhere else to create a",
|
||||
"block.dimdoors.dungeon_door.info3": "dungeon.",
|
||||
"block.dimdoors.gold_dimensional_door.info0": "Similar to a Dimensional Door",
|
||||
"block.dimdoors.gold_dimensional_door.info1": "but shinier",
|
||||
"block.dimdoors.quartz_dimensional_door.info": "Creates a pathway to your personal pocket.",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "dimdoors:item/stone_door"
|
||||
}
|
BIN
src/main/resources/assets/dimdoors/textures/item/img.png
Normal file
BIN
src/main/resources/assets/dimdoors/textures/item/img.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
src/main/resources/assets/dimdoors/textures/item/img_1.png
Normal file
BIN
src/main/resources/assets/dimdoors/textures/item/img_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
src/main/resources/assets/dimdoors/textures/item/img_2.png
Normal file
BIN
src/main/resources/assets/dimdoors/textures/item/img_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
src/main/resources/assets/dimdoors/textures/item/stone_door.png
Normal file
BIN
src/main/resources/assets/dimdoors/textures/item/stone_door.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
|
@ -25,3 +25,5 @@ accessible method net/minecraft/world/biome/Biome getCategory ()Lnet/minecraft/w
|
|||
accessible field net/minecraft/block/Block LOGGER Lorg/slf4j/Logger;
|
||||
|
||||
accessible method net/minecraft/world/gen/feature/OrePlacedFeatures modifiersWithCount (ILnet/minecraft/world/gen/placementmodifier/PlacementModifier;)Ljava/util/List;
|
||||
|
||||
accessible class net/minecraft/data/client/BlockStateModelGenerator$BlockTexturePool
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"type": "dimdoors:schematic",
|
||||
"builder": {
|
||||
"type": "dimdoors:lazy_gen_pocket"
|
||||
},
|
||||
"modifiers": [
|
||||
{
|
||||
"type": "dimdoors:rift_data",
|
||||
"ids": [
|
||||
0
|
||||
],
|
||||
"rift_data": "dimdoors:rift_data/pocket_entrance"
|
||||
}
|
||||
],
|
||||
"id": "dungeon/jungle_riddle_fixed"
|
||||
}
|
Loading…
Reference in a new issue