Skip to content

Commit

Permalink
Merge branch 'v10' of https://github.com/mekanism/Mekanism into v10
Browse files Browse the repository at this point in the history
* 'v10' of https://github.com/mekanism/Mekanism:
  Update state_holder.png
  Updated Generators Sun Icons
  Fix merge conflicts
  Fix read/write location mismatch for retrogen
  Update Wood Gasification to atleast for logs and dust return coal dust (#6241)
  • Loading branch information
aidancbrady committed Jul 1, 2020
2 parents 4d34d4b + 222117b commit 81ce07d
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 47 deletions.
1 change: 1 addition & 0 deletions src/api/java/mekanism/api/NBTConstants.java
Expand Up @@ -5,6 +5,7 @@ public final class NBTConstants {
//Ones that also are used for interacting with forge/vanilla
public static final String BASE = "Base";
public static final String BLOCK_ENTITY_TAG = "BlockEntityTag";
public static final String CHUNK_DATA_LEVEL = "Level";
public static final String ENTITY_TAG = "EntityTag";
public static final String ID = "id";
public static final String X = "x";
Expand Down
@@ -1,21 +1,22 @@
{
"type": "mekanism:reaction",
"itemInput": {
"amount": 8,
"ingredient": {
"tag": "forge:dusts/wood"
}
},
"fluidInput": {
"amount": 20,
"amount": 25,
"tag": "minecraft:water"
},
"gasInput": {
"amount": 20,
"amount": 25,
"gas": "mekanism:oxygen"
},
"duration": 30,
"duration": 37,
"gasOutput": {
"gas": "mekanism:hydrogen",
"amount": 20
"amount": 25
}
}
@@ -1,21 +1,25 @@
{
"type": "mekanism:reaction",
"itemInput": {
"amount": 4,
"ingredient": {
"tag": "minecraft:logs"
}
},
"fluidInput": {
"amount": 100,
"amount": 400,
"tag": "minecraft:water"
},
"gasInput": {
"amount": 100,
"amount": 400,
"gas": "mekanism:oxygen"
},
"duration": 150,
"duration": 600,
"itemOutput": {
"item": "mekanism:dust_charcoal"
},
"gasOutput": {
"gas": "mekanism:hydrogen",
"amount": 100
"amount": 400
}
}
@@ -1,21 +1,25 @@
{
"type": "mekanism:reaction",
"itemInput": {
"amount": 20,
"ingredient": {
"tag": "minecraft:planks"
}
},
"fluidInput": {
"amount": 20,
"amount": 400,
"tag": "minecraft:water"
},
"gasInput": {
"amount": 20,
"amount": 400,
"gas": "mekanism:oxygen"
},
"duration": 30,
"duration": 600,
"itemOutput": {
"item": "mekanism:dust_charcoal"
},
"gasOutput": {
"gas": "mekanism:hydrogen",
"amount": 20
"amount": 400
}
}
@@ -1,21 +1,22 @@
{
"type": "mekanism:reaction",
"itemInput": {
"amount": 3,
"ingredient": {
"tag": "forge:rods/wooden"
}
},
"fluidInput": {
"amount": 4,
"amount": 10,
"tag": "minecraft:water"
},
"gasInput": {
"amount": 4,
"amount": 10,
"gas": "mekanism:oxygen"
},
"duration": 6,
"duration": 15,
"gasOutput": {
"gas": "mekanism:hydrogen",
"amount": 4
"amount": 10
}
}
@@ -0,0 +1,21 @@
{
"type": "mekanism:reaction",
"itemInput": {
"ingredient": {
"tag": "minecraft:wooden_stairs"
}
},
"fluidInput": {
"amount": 15,
"tag": "minecraft:water"
},
"gasInput": {
"amount": 15,
"gas": "mekanism:oxygen"
},
"duration": 22,
"gasOutput": {
"gas": "mekanism:hydrogen",
"amount": 15
}
}
Expand Up @@ -21,12 +21,13 @@ class PressurizedReactionRecipeProvider implements ISubRecipeProvider {
@Override
public void addRecipes(Consumer<IFinishedRecipe> consumer) {
String basePath = "reaction/";
addCoalGasificationRecipes(consumer, basePath + "coal_gasification/");
addWoodGasificationRecipes(consumer, basePath + "wood_gasification/");
addSubstrateRecipes(consumer, basePath + "substrate/");
}

private void addWoodGasificationRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {
//Blocks coal
private void addCoalGasificationRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {
//Blocks
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.createMulti(
ItemStackIngredient.from(Tags.Items.STORAGE_BLOCKS_COAL),
Expand All @@ -47,7 +48,7 @@ private void addWoodGasificationRecipes(Consumer<IFinishedRecipe> consumer, Stri
MekanismItems.SULFUR_DUST.getItemStack(),
MekanismGases.HYDROGEN.getStack(100)
).build(consumer, Mekanism.rl(basePath + "coals"));
//Dusts coal
//Dusts
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.createMulti(
ItemStackIngredient.from(MekanismTags.Items.DUSTS_COAL),
Expand All @@ -58,47 +59,61 @@ private void addWoodGasificationRecipes(Consumer<IFinishedRecipe> consumer, Stri
100,
MekanismItems.SULFUR_DUST.getItemStack(),
MekanismGases.HYDROGEN.getStack(100)
).build(consumer, Mekanism.rl(basePath + "dusts_coal"));
//Dusts wood
).build(consumer, Mekanism.rl(basePath + "dusts_coals"));

}

private void addWoodGasificationRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {
//Dusts, each worth a 32th of a log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(MekanismTags.Items.DUSTS_WOOD),
FluidStackIngredient.from(FluidTags.WATER, 20),
GasStackIngredient.from(MekanismGases.OXYGEN, 20),
30,
MekanismGases.HYDROGEN.getStack(20)
ItemStackIngredient.from(MekanismTags.Items.DUSTS_WOOD, 8),
FluidStackIngredient.from(FluidTags.WATER, 25),
GasStackIngredient.from(MekanismGases.OXYGEN, 25),
37,
MekanismGases.HYDROGEN.getStack(25)
).build(consumer, Mekanism.rl(basePath + "dusts_wood"));
//Logs
//Logs, each worth one log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(ItemTags.LOGS),
FluidStackIngredient.from(FluidTags.WATER, 100),
GasStackIngredient.from(MekanismGases.OXYGEN, 100),
150,
MekanismGases.HYDROGEN.getStack(100)
ItemStackIngredient.from(ItemTags.LOGS, 4),
FluidStackIngredient.from(FluidTags.WATER, 400),
GasStackIngredient.from(MekanismGases.OXYGEN, 400),
600,
MekanismItems.CHARCOAL_DUST.getItemStack(),
MekanismGases.HYDROGEN.getStack(400)
).build(consumer, Mekanism.rl(basePath + "logs"));
//Planks
//Planks, each worth a 5th of a log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(ItemTags.PLANKS),
FluidStackIngredient.from(FluidTags.WATER, 20),
GasStackIngredient.from(MekanismGases.OXYGEN, 20),
30,
MekanismGases.HYDROGEN.getStack(20)
ItemStackIngredient.from(ItemTags.PLANKS, 20),
FluidStackIngredient.from(FluidTags.WATER, 400),
GasStackIngredient.from(MekanismGases.OXYGEN, 400),
600,
MekanismItems.CHARCOAL_DUST.getItemStack(),
MekanismGases.HYDROGEN.getStack(400)
).build(consumer, Mekanism.rl(basePath + "planks"));
//Rods wooden
//Rods, each worth a 30th of a log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(Tags.Items.RODS_WOODEN),
FluidStackIngredient.from(FluidTags.WATER, 4),
GasStackIngredient.from(MekanismGases.OXYGEN, 4),
6,
MekanismGases.HYDROGEN.getStack(4)
ItemStackIngredient.from(Tags.Items.RODS_WOODEN, 3),
FluidStackIngredient.from(FluidTags.WATER, 10),
GasStackIngredient.from(MekanismGases.OXYGEN, 10),
15,
MekanismGases.HYDROGEN.getStack(10)
).build(consumer, Mekanism.rl(basePath + "rods_wooden"));
//Slabs wooden
//Slabs, each worth a 10th of a log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(ItemTags.WOODEN_SLABS),
FluidStackIngredient.from(FluidTags.WATER, 10),
GasStackIngredient.from(MekanismGases.OXYGEN, 10),
15,
MekanismGases.HYDROGEN.getStack(10)
).build(consumer, Mekanism.rl(basePath + "slabs_wooden"));
).build(consumer, Mekanism.rl(basePath + "wooden_slabs"));
//Stairs, each worth a 6⅔th of a log.
PressurizedReactionRecipeBuilder.reaction(
ItemStackIngredient.from(ItemTags.WOODEN_STAIRS),
FluidStackIngredient.from(FluidTags.WATER, 15),
GasStackIngredient.from(MekanismGases.OXYGEN, 15),
22,
MekanismGases.HYDROGEN.getStack(15)
).build(consumer, Mekanism.rl(basePath + "wooden_stairs"));
}

private void addSubstrateRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {
Expand Down
Binary file modified src/generators/resources/assets/mekanismgenerators/gui/no_sun.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/main/java/mekanism/common/Mekanism.java
Expand Up @@ -74,6 +74,7 @@
import mekanism.common.registries.MekanismTileEntityTypes;
import mekanism.common.tags.MekanismTagManager;
import mekanism.common.world.GenHandler;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.resources.IFutureReloadListener;
import net.minecraft.resources.IReloadableResourceManager;
import net.minecraft.resources.SimpleReloadableResourceManager;
Expand Down Expand Up @@ -371,7 +372,10 @@ private void onLiquidTransferred(FluidTransferEvent event) {

private void chunkSave(ChunkDataEvent.Save event) {
if (event.getWorld() != null && !event.getWorld().isRemote()) {
event.getData().putInt(NBTConstants.WORLD_GEN_VERSION, MekanismConfig.world.userGenVersion.get());
//Note: ChunkDataLoad uses the level tag, but chunk save uses the parent compound
// we need to get the level compound so that we read the correct value
CompoundNBT levelTag = event.getData().getCompound(NBTConstants.CHUNK_DATA_LEVEL);
levelTag.putInt(NBTConstants.WORLD_GEN_VERSION, MekanismConfig.world.userGenVersion.get());
}
}

Expand Down

0 comments on commit 81ce07d

Please sign in to comment.