Ex Deorum 1.12 (Completed)
This commit is contained in:
parent
2678b2893c
commit
1c5c08c557
|
|
@ -1,6 +1,11 @@
|
|||
## Ex Deorum 1.12
|
||||
- Added Wood Chippings, obtained by hammering logs. Usable as compost or as a crafting material for Sponges.
|
||||
- Added some more KubeJS functions. Check out the [new documentation](https://exdeorum.readthedocs.io/en/latest) for Ex Deorum.
|
||||
- Added options to the config to disable void generation in the Nether and End dimensions when using the Void World preset.
|
||||
- Added recipe for Pointed Dripstone from hammering Dripstone.
|
||||
- Fixed dupe bug with fluid mixing recipes
|
||||
- Fixed bug where every fluid would appear as lava in a barrel
|
||||
- Fixed minor bug with JEI heat sources not showing all usages of a block
|
||||
|
||||
## Ex Deorum 1.11
|
||||
- Added support for NuclearCraft: Neoteric - Boron, Thorium, Lithium, and Magnesium ores
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.20.1 2023-12-27T21:44:18.5767591 ModKit Language: en_us for mod 'exdeorum'
|
||||
fa2402f02d915c4e06246efb4e86afbeb49fa718 assets/exdeorum/lang/en_us.json
|
||||
// 1.20.1 2023-12-31T14:34:20.2470503 ModKit Language: en_us for mod 'exdeorum'
|
||||
9889f8490849977914579142b0e2de1d19ecd6f9 assets/exdeorum/lang/en_us.json
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// 1.20.1 2023-12-29T14:57:29.393698 Recipes
|
||||
// 1.20.1 2024-01-01T15:35:52.3392677 Recipes
|
||||
e37b64428f17e304e91539ac0513456d7ce40cd1 data/exdeorum/advancements/recipes/building_blocks/sponge.json
|
||||
5ad481a0c376c1a1785a5d3b992064d0ec0bf3b0 data/exdeorum/advancements/recipes/food/end_cake.json
|
||||
25dd027e844a72b03c95dbe5e3c3dd8c738ceb00 data/exdeorum/advancements/recipes/misc/acacia_barrel.json
|
||||
376be94a64c9ca97a9ea2346547b6e617f13a815 data/exdeorum/advancements/recipes/misc/acacia_crucible.json
|
||||
|
|
@ -161,6 +162,7 @@ f17f12ac67e700f7838cb3bab740ec254bbfe13c data/exdeorum/recipes/barrel_compost/tw
|
|||
653a42a46a6bd977a2eddea7336df4beabbbeecf data/exdeorum/recipes/barrel_compost/vine.json
|
||||
c4ecb4272c220282de403852031b3ca92651d91c data/exdeorum/recipes/barrel_compost/weeping_vines.json
|
||||
5677e23fdc74130523d602ebf9e557f659af57c5 data/exdeorum/recipes/barrel_compost/wheat.json
|
||||
b9a34df74ce0ee9c4247a9a64784c851eb1de58c data/exdeorum/recipes/barrel_compost/wood_chippings.json
|
||||
d08b7a270dff3f7bb45338798227a69d775e7c32 data/exdeorum/recipes/barrel_fluid_mixing/blackstone.json
|
||||
1a87de0d21b9677fda38f7a520cbffbdc41d8532 data/exdeorum/recipes/barrel_fluid_mixing/netherrack.json
|
||||
8b42ca284eaea721e8e7589e5fb0b16ccbe66ee5 data/exdeorum/recipes/barrel_fluid_mixing/obsidian.json
|
||||
|
|
@ -249,12 +251,14 @@ df7f23b00f23a5ac255345801ac88850877a2e88 data/exdeorum/recipes/hammer/fire_coral
|
|||
113507c073fc77439cb7d3c56a96d61ca70b6c9d data/exdeorum/recipes/hammer/gravel.json
|
||||
808203624a792fcd4a0289975d82b3bff34af90e data/exdeorum/recipes/hammer/horn_coral.json
|
||||
5ebb5a4dfa54230abcd4cdb5af34b2b296c7eb23 data/exdeorum/recipes/hammer/horn_coral_fan.json
|
||||
58d46cc4ad8fc320659e118d2796151ff2d5597f data/exdeorum/recipes/hammer/pointed_dripstone.json
|
||||
19c00defa531bfbaa11f19403ff9d1694a9cd04a data/exdeorum/recipes/hammer/prismarine.json
|
||||
fdc243a5cfb1e84220cf6c41f46f454b3aff8b87 data/exdeorum/recipes/hammer/red_sand.json
|
||||
b592554bc00ab20d8affdfd1627406858ac10797 data/exdeorum/recipes/hammer/sand.json
|
||||
0e879c5bcf28023efdcd257d3e12e7153bd0bef7 data/exdeorum/recipes/hammer/stone_pebbles.json
|
||||
3bf60837b935bd09248a84fd8f22968fc244ea46 data/exdeorum/recipes/hammer/tube_coral.json
|
||||
f9654d25e05276b2bce6445e2cf7c1f2d9170124 data/exdeorum/recipes/hammer/tube_coral_fan.json
|
||||
f6b16e8168c798bc433e19edf5ede3a7703865f5 data/exdeorum/recipes/hammer/wood_chippings.json
|
||||
89bc76bd0dd2350b25ac8981f3597e0119dff939 data/exdeorum/recipes/hellbark_barrel.json
|
||||
4c3b4daf2bed2d4ee662e2e80f4547b3f0b2a271 data/exdeorum/recipes/hellbark_crucible.json
|
||||
2995ec75979bfb8b0415b8a1da7db7001b9ae433 data/exdeorum/recipes/hellbark_sieve.json
|
||||
|
|
@ -1170,6 +1174,7 @@ fe809175ad8570b7338b3aff029c040ca0fe5095 data/exdeorum/recipes/sieve/soul_sand/s
|
|||
9ab74f344d31bf2bde6ce9c2aad2d739e7b5f234 data/exdeorum/recipes/skyroot_barrel.json
|
||||
8e724e34a3107b459a0f6be31c2acd7e9782be97 data/exdeorum/recipes/skyroot_crucible.json
|
||||
80b9df7f6ed4c5fb23f5d79cdd7dfbd1a79253e7 data/exdeorum/recipes/skyroot_sieve.json
|
||||
afdb75127a9ece3ba346b78155877b35135cc9f8 data/exdeorum/recipes/sponge.json
|
||||
5fada017bfccd7c672986d436e390ed5799b185a data/exdeorum/recipes/spruce_barrel.json
|
||||
3a2654f08af2014451533d7168c29ed866c0788f data/exdeorum/recipes/spruce_crucible.json
|
||||
b4531ee1e1478da1145f099271cff9a9c2069c46 data/exdeorum/recipes/spruce_sieve.json
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2023-12-27T21:44:18.578794 ModKit Item Models for mod 'exdeorum'
|
||||
// 1.20.1 2023-12-31T14:34:20.2490508 ModKit Item Models for mod 'exdeorum'
|
||||
4ba3bb2c6174ac3728a4b85e34681f118ec8eb34 assets/exdeorum/models/item/acacia_barrel.json
|
||||
c03ce41f7c071498fcbd5f5225e91dcb2f365fbb assets/exdeorum/models/item/acacia_crucible.json
|
||||
3b4f1d45c0d9c4cd1d9a5cdf6ddc8d2c9791bca5 assets/exdeorum/models/item/acacia_sieve.json
|
||||
|
|
@ -168,4 +168,5 @@ e4df47baeb322b38fe7b58ef1b9ea675424be7c3 assets/exdeorum/models/item/willow_siev
|
|||
c72e7359dd4934c756c49350682ac667fffe009b assets/exdeorum/models/item/witch_water_bucket.json
|
||||
7089629f8033bd4e52780fe88437aa684f4ee0a9 assets/exdeorum/models/item/wooden_hammer.json
|
||||
d6c652c6828ed14e33c4e948afc1c9a29f977853 assets/exdeorum/models/item/wooden_watering_can.json
|
||||
595baa9d8d249479f3d3847a6c5ba1485d0edbbe assets/exdeorum/models/item/wood_chippings.json
|
||||
b2118d142d87e5956865096bd2dc16b3f533e783 assets/exdeorum/models/item/zinc_ore_chunk.json
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@
|
|||
"item.exdeorum.warped_nylium_spores": "Warped Nylium Spores",
|
||||
"item.exdeorum.watering_can_fluid_display": ": %s / %s",
|
||||
"item.exdeorum.witch_water_bucket": "Witch Water Bucket",
|
||||
"item.exdeorum.wood_chippings": "Wood Chippings",
|
||||
"item.exdeorum.wooden_hammer": "Wooden Hammer",
|
||||
"item.exdeorum.wooden_watering_can": "Wooden Watering Can",
|
||||
"item.exdeorum.zinc_ore_chunk": "Zinc Ore Chunk",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "exdeorum:item/wood_chippings"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_item": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"exdeorum:wood_chippings"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "exdeorum:sponge"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_item",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"exdeorum:sponge"
|
||||
]
|
||||
},
|
||||
"sends_telemetry_event": true
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "exdeorum:barrel_compost",
|
||||
"ingredient": {
|
||||
"item": "exdeorum:wood_chippings"
|
||||
},
|
||||
"volume": 125
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"type": "exdeorum:hammer",
|
||||
"ingredient": {
|
||||
"item": "minecraft:dripstone_block"
|
||||
},
|
||||
"result": "minecraft:pointed_dripstone",
|
||||
"result_amount": {
|
||||
"type": "minecraft:uniform",
|
||||
"max": 4.0,
|
||||
"min": 2.0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"type": "exdeorum:hammer",
|
||||
"ingredient": {
|
||||
"tag": "minecraft:logs"
|
||||
},
|
||||
"result": "exdeorum:wood_chippings",
|
||||
"result_amount": {
|
||||
"type": "minecraft:uniform",
|
||||
"max": 8.0,
|
||||
"min": 3.0
|
||||
}
|
||||
}
|
||||
24
src/generated/resources/data/exdeorum/recipes/sponge.json
Normal file
24
src/generated/resources/data/exdeorum/recipes/sponge.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "building",
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "exdeorum:wood_chippings"
|
||||
},
|
||||
"S": {
|
||||
"item": "minecraft:slime_block"
|
||||
},
|
||||
"W": {
|
||||
"tag": "minecraft:wool"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"WCW",
|
||||
"CSC",
|
||||
"WCW"
|
||||
],
|
||||
"result": {
|
||||
"item": "minecraft:sponge"
|
||||
},
|
||||
"show_notification": true
|
||||
}
|
||||
|
|
@ -21,7 +21,6 @@ package thedarkcolour.exdeorum.blockentity;
|
|||
import it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
|
@ -46,33 +45,44 @@ public class LavaCrucibleBlockEntity extends AbstractCrucibleBlockEntity {
|
|||
public static void putDefaultHeatValues() {
|
||||
HEAT_REGISTRY.clear();
|
||||
|
||||
putAllStates(Blocks.TORCH, 1);
|
||||
putAllStates(Blocks.WALL_TORCH, 1);
|
||||
putAllStates(Blocks.LANTERN, 1);
|
||||
putAllStates(Blocks.SOUL_TORCH, 2);
|
||||
putAllStates(Blocks.SOUL_WALL_TORCH, 2);
|
||||
putAllStates(Blocks.SOUL_LANTERN, 2);
|
||||
putAllStates(Blocks.LAVA, 3);
|
||||
putAllStates(Blocks.FIRE, 5);
|
||||
putAllStates(Blocks.SOUL_FIRE, 5);
|
||||
putDefaults(HEAT_REGISTRY);
|
||||
|
||||
putStates(Blocks.CAMPFIRE, 2, state -> state.getValue(CampfireBlock.LIT));
|
||||
putStates(Blocks.SOUL_CAMPFIRE, 2, state -> state.getValue(CampfireBlock.LIT));
|
||||
for (var entry : KUBEJS_HEAT_VALUES.object2IntEntrySet()) {
|
||||
if (entry.getIntValue() <= 0) {
|
||||
HEAT_REGISTRY.removeInt(entry.getKey());
|
||||
} else {
|
||||
HEAT_REGISTRY.put(entry.getKey(), entry.getIntValue());
|
||||
}
|
||||
}
|
||||
|
||||
HEAT_REGISTRY.putAll(KUBEJS_HEAT_VALUES);
|
||||
KUBEJS_HEAT_VALUES.clear();
|
||||
}
|
||||
|
||||
public static void putAllStates(Block block, int heat) {
|
||||
public static void putDefaults(Object2IntMap<BlockState> heatMap) {
|
||||
putAllStates(Blocks.TORCH, 1, heatMap);
|
||||
putAllStates(Blocks.WALL_TORCH, 1, heatMap);
|
||||
putAllStates(Blocks.LANTERN, 1, heatMap);
|
||||
putAllStates(Blocks.SOUL_TORCH, 2, heatMap);
|
||||
putAllStates(Blocks.SOUL_WALL_TORCH, 2, heatMap);
|
||||
putAllStates(Blocks.SOUL_LANTERN, 2, heatMap);
|
||||
putAllStates(Blocks.LAVA, 3, heatMap);
|
||||
putAllStates(Blocks.FIRE, 5, heatMap);
|
||||
putAllStates(Blocks.SOUL_FIRE, 5, heatMap);
|
||||
|
||||
putStates(Blocks.CAMPFIRE, 2, state -> state.getValue(CampfireBlock.LIT), heatMap);
|
||||
putStates(Blocks.SOUL_CAMPFIRE, 2, state -> state.getValue(CampfireBlock.LIT), heatMap);
|
||||
}
|
||||
|
||||
public static void putAllStates(Block block, int heat, Object2IntMap<BlockState> heatMap) {
|
||||
for (var state : block.getStateDefinition().getPossibleStates()) {
|
||||
HEAT_REGISTRY.put(state, heat);
|
||||
heatMap.put(state, heat);
|
||||
}
|
||||
}
|
||||
|
||||
public static void putStates(Block block, int heat, Predicate<BlockState> predicate) {
|
||||
public static void putStates(Block block, int heat, Predicate<BlockState> predicate, Object2IntMap<BlockState> heatMap) {
|
||||
for (var state : block.getStateDefinition().getPossibleStates()) {
|
||||
if (predicate.test(state)) {
|
||||
HEAT_REGISTRY.put(state, heat);
|
||||
heatMap.put(state, heat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,12 @@ class CrucibleHeatSourcesCategory implements IRecipeCategory<CrucibleHeatSourceR
|
|||
if (recipe.ingredientType() != null) {
|
||||
ingredientManager.createTypedIngredient(recipe.ingredientType(), recipe.ingredient()).ifPresent(ingredient -> {
|
||||
if (Minecraft.getInstance().screen instanceof IRecipesGui recipesGui) {
|
||||
recipesGui.show(focusFactory.createFocus(input.getValue() == InputConstants.MOUSE_BUTTON_LEFT ? RecipeIngredientRole.OUTPUT : RecipeIngredientRole.INPUT, ingredient));
|
||||
if (input.getValue() == InputConstants.MOUSE_BUTTON_LEFT) {
|
||||
recipesGui.show(focusFactory.createFocus(RecipeIngredientRole.OUTPUT, ingredient));
|
||||
} else {
|
||||
// INPUT + CATALYST
|
||||
recipesGui.show(List.of(focusFactory.createFocus(RecipeIngredientRole.CATALYST, ingredient), focusFactory.createFocus(RecipeIngredientRole.INPUT, ingredient)));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,13 +18,31 @@
|
|||
|
||||
package thedarkcolour.exdeorum.compat.kubejs;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import dev.latvian.mods.kubejs.recipe.RecipesEventJS;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
import net.minecraft.commands.arguments.blocks.BlockStateParser;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import thedarkcolour.exdeorum.ExDeorum;
|
||||
import thedarkcolour.exdeorum.blockentity.LavaCrucibleBlockEntity;
|
||||
import thedarkcolour.exdeorum.registry.ERecipeTypes;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class ExDeorumKubeJsBindings {
|
||||
public void setCrucibleHeatValue(BlockState state, int value) {
|
||||
LavaCrucibleBlockEntity.KUBEJS_HEAT_VALUES.put(state, value);
|
||||
public void setCrucibleHeatValue(Block block, int value) {
|
||||
setCrucibleHeatValueForBlock(block, value);
|
||||
}
|
||||
|
||||
// This method previously accepted a BlockState, which made it impossible to call through KubeJS.
|
||||
public void setCrucibleHeatValueForState(String stateString, int value) {
|
||||
try {
|
||||
LavaCrucibleBlockEntity.KUBEJS_HEAT_VALUES.put(BlockStateParser.parseForBlock(BuiltInRegistries.BLOCK.asLookup(), stateString, false).blockState(), value);
|
||||
} catch (CommandSyntaxException exception) {
|
||||
// Throw a more appropriate exception.
|
||||
throw new IllegalArgumentException("Failed to parse BlockState string \"" + stateString + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
public void setCrucibleHeatValueForBlock(Block block, int value) {
|
||||
|
|
@ -32,4 +50,19 @@ class ExDeorumKubeJsBindings {
|
|||
LavaCrucibleBlockEntity.KUBEJS_HEAT_VALUES.put(state, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeDefaultSieveRecipes(RecipesEventJS recipesEvent) {
|
||||
recipesEvent.remove(r -> {
|
||||
return r.kjs$getType().equals(ERecipeTypes.SIEVE.getId()) && r.kjs$getOrCreateId().getNamespace().equals(ExDeorum.ID);
|
||||
});
|
||||
}
|
||||
|
||||
// not the most elegant solution, but if it works, it works
|
||||
public void removeDefaultHeatSources() {
|
||||
var map = new Object2IntOpenHashMap<BlockState>();
|
||||
LavaCrucibleBlockEntity.putDefaults(map);
|
||||
for (var key : map.keySet()) {
|
||||
LavaCrucibleBlockEntity.KUBEJS_HEAT_VALUES.put(key, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class EConfig {
|
|||
}
|
||||
}
|
||||
|
||||
// Needed because common configs load before Tags
|
||||
// Needed because these configs are needed before Tags are loaded
|
||||
public static class Common {
|
||||
public final ConfigValue<String> preferredAluminumOre;
|
||||
public final ConfigValue<String> preferredCobaltOre;
|
||||
|
|
@ -73,6 +73,9 @@ public class EConfig {
|
|||
public final ConfigValue<String> preferredLithiumOre;
|
||||
public final ConfigValue<String> preferredBoronOre;
|
||||
|
||||
public final BooleanValue voidNetherGeneration;
|
||||
public final BooleanValue voidEndGeneration;
|
||||
|
||||
public Common(ForgeConfigSpec.Builder builder) {
|
||||
// Preferred items
|
||||
builder.comment("Common configuration for Ex Deorum").push("common");
|
||||
|
|
@ -97,7 +100,16 @@ public class EConfig {
|
|||
this.preferredLithiumOre = preferredOreConfig(builder, "lithium_ore", airId);
|
||||
this.preferredBoronOre = preferredOreConfig(builder, "boron_ore", airId);
|
||||
|
||||
builder.pop(2);
|
||||
builder.pop();
|
||||
|
||||
this.voidNetherGeneration = builder
|
||||
.comment("If the Void World type is selected, whether the Nether world generation is overridden to a void world. Changes take effect after reopening the world.")
|
||||
.define("void_nether_generation", true);
|
||||
this.voidEndGeneration = builder
|
||||
.comment("If the Void World type is selected, whether the End world generation is overridden to a void world. Changes take effect after reopening the world.")
|
||||
.define("void_end_generation", true);
|
||||
|
||||
builder.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ public class Recipes {
|
|||
|
||||
hammerRecipe(writer, "stone_pebbles", ingredient(Items.STONE, Items.STONE_BRICKS, Items.CHISELED_STONE_BRICKS, Items.CRACKED_STONE_BRICKS), EItems.STONE_PEBBLE.get(), new UniformGenerator(ConstantValue.exactly(1), ConstantValue.exactly(6)));
|
||||
hammerRecipe(writer, "basalt", ingredient(Items.POLISHED_BASALT, Items.SMOOTH_BASALT), Items.BASALT);
|
||||
hammerRecipe(writer, "wood_chippings", ingredient(BlockTags.LOGS), EItems.WOOD_CHIPPINGS.get(), new UniformGenerator(ConstantValue.exactly(3), ConstantValue.exactly(8)));
|
||||
hammerRecipe(writer, "wood_chippings", ingredient(ItemTags.LOGS), EItems.WOOD_CHIPPINGS.get(), new UniformGenerator(ConstantValue.exactly(3), ConstantValue.exactly(8)));
|
||||
|
||||
hammerRecipe(writer, "tube_coral", ingredient(Items.TUBE_CORAL_BLOCK), Items.TUBE_CORAL);
|
||||
hammerRecipe(writer, "brain_coral", ingredient(Items.BRAIN_CORAL_BLOCK), Items.BRAIN_CORAL);
|
||||
|
|
@ -449,6 +449,7 @@ public class Recipes {
|
|||
hammerRecipe(writer, "horn_coral_fan", ingredient(Items.HORN_CORAL), Items.HORN_CORAL_FAN);
|
||||
|
||||
hammerRecipe(writer, "prismarine", ingredient(Items.PRISMARINE, Items.PRISMARINE_BRICKS, Items.DARK_PRISMARINE), Items.PRISMARINE_SHARD, between(1, 4));
|
||||
hammerRecipe(writer, "pointed_dripstone", ingredient(Items.DRIPSTONE_BLOCK), Items.POINTED_DRIPSTONE, between(2, 4));
|
||||
}
|
||||
|
||||
private static void hammerRecipe(Consumer<FinishedRecipe> writer, String name, Ingredient block, ItemLike result) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package thedarkcolour.exdeorum.event;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
// necessary to avoid EventBus loading LocalPlayer through its ASM transformations
|
||||
class ClientsideCode {
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
package thedarkcolour.exdeorum.event;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
|
|
@ -31,11 +29,9 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.util.Unit;
|
||||
import net.minecraft.world.SimpleContainer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
|
|
@ -67,11 +63,8 @@ import thedarkcolour.exdeorum.config.EConfig;
|
|||
import thedarkcolour.exdeorum.item.WateringCanItem;
|
||||
import thedarkcolour.exdeorum.network.NetworkHandler;
|
||||
import thedarkcolour.exdeorum.recipe.RecipeUtil;
|
||||
import thedarkcolour.exdeorum.recipe.barrel.BarrelCompostRecipe;
|
||||
import thedarkcolour.exdeorum.recipe.sieve.SieveRecipe;
|
||||
import thedarkcolour.exdeorum.registry.EFluids;
|
||||
import thedarkcolour.exdeorum.registry.EItems;
|
||||
import thedarkcolour.exdeorum.registry.ERecipeTypes;
|
||||
import thedarkcolour.exdeorum.tag.EBiomeTags;
|
||||
import thedarkcolour.exdeorum.voidworld.VoidChunkGenerator;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,12 +43,10 @@ public abstract class RandomResultItem extends Item {
|
|||
var stack = player.getItemInHand(hand);
|
||||
|
||||
if (!level.isClientSide) {
|
||||
var consumed = false;
|
||||
var possibilities = getPossibilities();
|
||||
|
||||
if (!player.getAbilities().instabuild) {
|
||||
stack.shrink(1);
|
||||
consumed = true;
|
||||
}
|
||||
var newItem = new ItemStack(Util.getRandom(possibilities, level.random));
|
||||
player.getInventory().placeItemBackInInventory(newItem);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import net.minecraftforge.registries.DeferredRegister;
|
|||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import thedarkcolour.exdeorum.ExDeorum;
|
||||
import thedarkcolour.exdeorum.block.EBlock;
|
||||
import thedarkcolour.exdeorum.blockentity.BarrelBlockEntity;
|
||||
import thedarkcolour.exdeorum.blockentity.InfestedLeavesBlockEntity;
|
||||
import thedarkcolour.exdeorum.blockentity.LavaCrucibleBlockEntity;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
package thedarkcolour.exdeorum.registry;
|
||||
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
|
@ -33,8 +32,6 @@ import net.minecraftforge.registries.RegistryObject;
|
|||
import thedarkcolour.exdeorum.ExDeorum;
|
||||
import thedarkcolour.exdeorum.block.*;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static net.minecraft.world.level.block.state.BlockBehaviour.Properties.copy;
|
||||
import static net.minecraft.world.level.block.state.BlockBehaviour.Properties.of;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
package thedarkcolour.exdeorum.registry;
|
||||
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
|
|
@ -29,16 +28,14 @@ import net.minecraftforge.registries.RegistryObject;
|
|||
import thedarkcolour.exdeorum.ExDeorum;
|
||||
import thedarkcolour.exdeorum.data.TranslationKeys;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class ECreativeTabs {
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ExDeorum.ID);
|
||||
|
||||
public static final RegistryObject<CreativeModeTab> MAIN = register("main", ECreativeTabs::mainTab);
|
||||
|
||||
private static RegistryObject<CreativeModeTab> register(String id, Consumer<CreativeModeTab.Builder> create) {
|
||||
return CREATIVE_TABS.register(id, () -> Util.make(new CreativeModeTab.Builder(CreativeModeTab.Row.TOP, 0), create).build());
|
||||
}
|
||||
public static final RegistryObject<CreativeModeTab> MAIN = CREATIVE_TABS.register("main", () -> {
|
||||
var builder = new CreativeModeTab.Builder(CreativeModeTab.Row.TOP, 0);
|
||||
ECreativeTabs.mainTab(builder);
|
||||
return builder.build();
|
||||
});
|
||||
|
||||
private static void mainTab(CreativeModeTab.Builder builder) {
|
||||
builder.icon(() -> new ItemStack(EItems.CROOK.get()));
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ public class EItems {
|
|||
output.accept(WARPED_NYLIUM_SPORES.get());
|
||||
output.accept(CRIMSON_NYLIUM_SPORES.get());
|
||||
output.accept(SCULK_CORE.get());
|
||||
output.accept(WITCH_WATER_BUCKET.get());
|
||||
output.accept(WOOD_CHIPPINGS.get());
|
||||
output.accept(PORCELAIN_CLAY_BALL.get());
|
||||
output.accept(UNFIRED_PORCELAIN_BUCKET.get());
|
||||
output.accept(PORCELAIN_BUCKET.get());
|
||||
|
|
@ -489,5 +489,6 @@ public class EItems {
|
|||
output.accept(PORCELAIN_LAVA_BUCKET.get());
|
||||
output.accept(PORCELAIN_MILK_BUCKET.get());
|
||||
output.accept(PORCELAIN_WITCH_WATER_BUCKET.get());
|
||||
output.accept(WITCH_WATER_BUCKET.get());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import net.minecraft.core.HolderLookup;
|
|||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.WorldGenRegion;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.LevelHeightAccessor;
|
||||
|
|
@ -46,6 +47,7 @@ import net.minecraft.world.level.levelgen.RandomState;
|
|||
import net.minecraft.world.level.levelgen.blending.Blender;
|
||||
import net.minecraft.world.level.levelgen.structure.StructureSet;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
|
||||
import thedarkcolour.exdeorum.config.EConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
@ -63,11 +65,13 @@ public class VoidChunkGenerator extends NoiseBasedChunkGenerator {
|
|||
});
|
||||
private final Holder<NoiseGeneratorSettings> settings;
|
||||
private final TagKey<StructureSet> allowedStructureSets;
|
||||
private final boolean generateNormal;
|
||||
|
||||
public VoidChunkGenerator(BiomeSource biomeSource, Holder<NoiseGeneratorSettings> settings, TagKey<StructureSet> allowedStructureSets) {
|
||||
super(biomeSource, settings);
|
||||
this.settings = settings;
|
||||
this.allowedStructureSets = allowedStructureSets;
|
||||
this.generateNormal = (settings.is(new ResourceLocation("minecraft:end")) && !EConfig.COMMON.voidEndGeneration.get()) || (settings.is(new ResourceLocation("minecraft:nether")) && !EConfig.COMMON.voidNetherGeneration.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -77,51 +81,75 @@ public class VoidChunkGenerator extends NoiseBasedChunkGenerator {
|
|||
|
||||
@Override
|
||||
public void applyCarvers(WorldGenRegion pLevel, long pSeed, RandomState pRandom, BiomeManager pBiomeManager, StructureManager pStructureManager, ChunkAccess pChunk, GenerationStep.Carving pStep) {
|
||||
if (generateNormal) {
|
||||
super.applyCarvers(pLevel, pSeed, pRandom, pBiomeManager, pStructureManager, pChunk, pStep);
|
||||
}
|
||||
}
|
||||
|
||||
// Filter structures
|
||||
@Override
|
||||
public ChunkGeneratorStructureState createState(HolderLookup<StructureSet> lookup, RandomState pRandomState, long pSeed) {
|
||||
return super.createState(new FilteredLookup(lookup, allowedStructureSets), pRandomState, pSeed);
|
||||
return generateNormal ? super.createState(lookup, pRandomState, pSeed) : super.createState(new FilteredLookup(lookup, allowedStructureSets), pRandomState, pSeed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildSurface(WorldGenRegion pLevel, StructureManager pStructureManager, RandomState pRandom, ChunkAccess pChunk) {
|
||||
if (generateNormal) {
|
||||
super.buildSurface(pLevel, pStructureManager, pRandom, pChunk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnOriginalMobs(WorldGenRegion pLevel) {
|
||||
if (generateNormal) {
|
||||
super.spawnOriginalMobs(pLevel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<ChunkAccess> fillFromNoise(Executor pExecutor, Blender pBlender, RandomState pRandom, StructureManager pStructureManager, ChunkAccess chunk) {
|
||||
return CompletableFuture.completedFuture(chunk);
|
||||
if (generateNormal) {
|
||||
return super.fillFromNoise(pExecutor, pBlender, pRandom, pStructureManager, chunk);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBaseHeight(int pX, int pZ, Heightmap.Types pType, LevelHeightAccessor pLevel, RandomState pRandom) {
|
||||
return getMinY();
|
||||
if (generateNormal) {
|
||||
return super.getBaseHeight(pX, pZ, pType, pLevel, pRandom);
|
||||
} else {
|
||||
return getMinY();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NoiseColumn getBaseColumn(int pX, int pZ, LevelHeightAccessor pHeight, RandomState pRandom) {
|
||||
return new NoiseColumn(0, new BlockState[0]);
|
||||
if (generateNormal) {
|
||||
return super.getBaseColumn(pX, pZ, pHeight, pRandom);
|
||||
} else {
|
||||
return new NoiseColumn(0, new BlockState[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDebugScreenInfo(List<String> pInfo, RandomState pRandom, BlockPos pPos) {
|
||||
if (generateNormal) {
|
||||
super.addDebugScreenInfo(pInfo, pRandom, pPos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createReferences(WorldGenLevel level, StructureManager pStructureManager, ChunkAccess pChunk) {
|
||||
if (hasStructures(level.registryAccess())) {
|
||||
if (generateNormal || hasStructures(level.registryAccess())) {
|
||||
super.createReferences(level, pStructureManager, pChunk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createStructures(RegistryAccess registries, ChunkGeneratorStructureState pStructureState, StructureManager pStructureManager, ChunkAccess pChunk, StructureTemplateManager pStructureTemplateManager) {
|
||||
if (hasStructures(registries)) {
|
||||
if (generateNormal || hasStructures(registries)) {
|
||||
super.createStructures(registries, pStructureState, pStructureManager, pChunk, pStructureTemplateManager);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 319 B |
Loading…
Reference in New Issue
Block a user