Skip to content

Commit

Permalink
Merge pull request #192 from CannoliCatfish/1.2.X
Browse files Browse the repository at this point in the history
Critical multiplayer bug fix, evap tower "boiler" JEI, various advanc…
  • Loading branch information
CannoliCatfish authored May 21, 2021
2 parents e6350c5 + b4377fd commit 395a3b1
Show file tree
Hide file tree
Showing 24 changed files with 316 additions and 12 deletions.
10 changes: 1 addition & 9 deletions src/main/java/com/cannolicatfish/rankine/ProjectRankine.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
import com.cannolicatfish.rankine.util.colors.SGVDItemColor;
import com.cannolicatfish.rankine.util.colors.TemplateItemColor;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.block.WoodType;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.merchant.villager.VillagerProfession;
import net.minecraft.fluid.Fluid;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemModelsProperties;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.potion.Effect;
import net.minecraft.potion.Potion;
Expand Down Expand Up @@ -121,13 +119,7 @@ private void CommonSetup(final FMLCommonSetupEvent event)

private void ClientSetup(FMLClientSetupEvent event) {
LOGGER.debug("Rankine: \"ClientSetup Event\" Starting...");
event.enqueueWork(() ->
ItemModelsProperties.registerProperty(RankineItems.SHULKER_GAS_VACUUM.get(),
new ResourceLocation(ProjectRankine.MODID, "gas_held"), (stack, world, living) ->
stack.getTag() != null && !stack.getTag().getString("gas").isEmpty() ? 1.0F : 0.0F));
WoodType.register(WoodType.create("cedar"));
WoodType.register(WoodType.create("white_birch"));
WoodType.register(WoodType.create("yellow_birch"));
event.enqueueWork(ClientProxy::registerItemProperties);
LOGGER.info("Rankine: \"ClientSetup\" Event Complete!");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.cannolicatfish.rankine.init;

import com.cannolicatfish.rankine.ProjectRankine;
import com.cannolicatfish.rankine.blocks.alloyfurnace.AlloyFurnaceScreen;
import com.cannolicatfish.rankine.blocks.crucible.CrucibleScreen;
import com.cannolicatfish.rankine.blocks.evaporationtower.EvaporationTowerScreen;
Expand All @@ -16,6 +17,8 @@
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemModelsProperties;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;

import java.util.Arrays;
Expand All @@ -42,6 +45,11 @@ public static void addTranslucent(List<Block> blockList) {
}
}

public static void registerItemProperties() {
ItemModelsProperties.registerProperty(RankineItems.SHULKER_GAS_VACUUM.get(),
new ResourceLocation(ProjectRankine.MODID, "gas_held"), (stack, world, living) ->
stack.getTag() != null && !stack.getTag().getString("gas").isEmpty() ? 1.0F : 0.0F);
}
@Override
public void init() {
ScreenManager.registerFactory(RankineBlocks.ALLOY_FURNACE_CONTAINER, AlloyFurnaceScreen::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ public static List<IEvaporationRecipe> getEvaporationRecipes()
recipes.add(evaporationRecipe("groundwater_evaporation", RankineItems.BIOME_INDICATOR_GENERIC.get(), EvaporationTowerTile.returnGroundwaterCollection()));
recipes.add(evaporationRecipe("ocean_evaporation", RankineItems.BIOME_INDICATOR_OCEAN.get(), EvaporationTowerTile.returnOceanCollection()));
recipes.add(evaporationRecipe("river_evaporation", RankineItems.BIOME_INDICATOR_RIVER.get(), EvaporationTowerTile.returnRiverCollection()));
recipes.add(evaporationRecipeSimple("latex", RankineItems.LATEX_BUCKET.get(), RankineItems.DRY_RUBBER.get()));
recipes.add(evaporationRecipeSimple("resin", RankineItems.RESIN_BUCKET.get(), RankineItems.AMBER.get()));
recipes.add(evaporationRecipeSimple("sap", RankineItems.SAP_BUCKET.get(), Items.SUGAR));
recipes.add(evaporationRecipeSimple("maple_sap", RankineItems.MAPLE_SAP_BUCKET.get(), RankineItems.MAPLE_SYRUP.get()));
return recipes;
}

Expand Down Expand Up @@ -479,7 +483,13 @@ public static IEvaporationRecipe evaporationRecipe(String registry, Item input,
Ingredient.fromStacks(new ItemStack(input)),weights);
}


public static IEvaporationRecipe evaporationRecipeSimple(String registry, Item input, Item col)
{
List<ItemStack> output = Collections.singletonList(new ItemStack(col));
List<Float> weights = Collections.singletonList(1f);
return new IEvaporationRecipe(new ResourceLocation(ProjectRankine.MODID,registry),output,
Ingredient.fromStacks(new ItemStack(input)),weights);
}

public static List<PeriodicTableUtils.Element> getElements(String c)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ issueTrackerURL="http://my.issue.tracker/" #optional
# The modid of the mod
modId="rankine" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="1.2.1" #mandatory
version="1.2.2" #mandatory
# A display name for the mod
displayName="Project Rankine" #mandatory
# A URL to query for updates for this mod. See the JSON update specification <here>
Expand Down
14 changes: 13 additions & 1 deletion src/main/resources/assets/rankine/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2428,8 +2428,18 @@
"rankine.advancements.story.find_ironstone.description": "Find ironstone under the sands of a desert or mesa",
"rankine.advancements.story.make_cast_iron_alloy.title": "Cooking Time",
"rankine.advancements.story.make_cast_iron_alloy.description": "Make cast iron alloy by using a form of carbon and pig iron",
"rankine.advancements.story.make_tree_tap.title": "Flowing Phloem",
"rankine.advancements.story.make_tree_tap.description": "Make a tree tap to begin extracting liquids from trees",
"rankine.advancements.story.make_bandage.title": "Quick Healing",
"rankine.advancements.story.make_bandage.description": "Heal some minor damage with a bandage",
"rankine.advancements.story.make_trampoline.title": "Boing!",
"rankine.advancements.story.make_trampoline.description": "Make a trampoline to launch high into the air",
"rankine.advancements.story.make_herbicide.title": "Weedkiller",
"rankine.advancements.story.make_herbicide.description": "Produce herbicide from juglone to clear patches of grass and other plants",
"rankine.advancements.story.make_piston_crusher.title": "Automatic Labor",
"rankine.advancements.story.make_piston_crusher.description": "Make a piston crusher to automate crushing",
"rankine.advancements.story.make_pulp.title": "Crushed to a Pulp",
"rankine.advancements.story.make_pulp.description": "Make pulp from crushed logs",
"rankine.advancements.story.make_quartz.title": "Overworld Quartz",
"rankine.advancements.story.make_quartz.description": "Find or make quartz by crushing stones",
"rankine.advancements.story.make_glass_cutter.title": "Transparent Carving",
Expand Down Expand Up @@ -2475,7 +2485,7 @@
"rankine.advancements.story.make_gyratory_crusher.title": "Pressing Issue",
"rankine.advancements.story.make_gyratory_crusher.description": "Make a Gyratory Crusher to automate crushing further",
"rankine.advancements.story.make_rankine_box.title": "Atomic Dissonance",
"rankine.advancements.story.make_rankine_box.description": "Make a Rankine Box to transmute the elements",
"rankine.advancements.story.make_rankine_box.description": "Make a Rankine Box to transmute elements",
"rankine.advancements.story.make_laser_quarry.title": "Excavation Invigoration",
"rankine.advancements.story.make_laser_quarry.description": "Construct a Laser Quarry to mine out large chunks of the world",
"rankine.advancements.story.make_thorium_arrow.title": "Sounds of Thunder",
Expand Down Expand Up @@ -2506,6 +2516,8 @@
"rankine.advancements.challenges.pewter_enchant.description": "Make a Pewter Sword with an Enchantability greater than or equal to 14",
"rankine.advancements.challenges.colored_gold_netherite.title": "Gold Standard",
"rankine.advancements.challenges.colored_gold_netherite.description": "Make a Colored Gold tool using Netherite instead of Gold",
"rankine.advancements.challenges.make_pancake_breakfast.title": "Fulfilling",
"rankine.advancements.challenges.make_pancake_breakfast.description": "Make a Pancake Breakfast",
"rankine.advancements.challenges.find_meteoric_materials.title": "Stellar Performance",
"rankine.advancements.challenges.find_meteoric_materials.description": "Find all the forms of meteoric iron"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rankine:granite_bricks_slab",
"rankine:andesite_bricks_slab",
"rankine:diorite_bricks_slab",
"rankine:basalt_bricks_slab",
"rankine:gray_granite_bricks_slab",
"rankine:granodiorite_bricks_slab",
"rankine:hornblende_andesite_bricks_slab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rankine:granite_bricks_stairs",
"rankine:andesite_bricks_stairs",
"rankine:diorite_bricks_stairs",
"rankine:basalt_bricks_stairs",
"rankine:gray_granite_bricks_stairs",
"rankine:granodiorite_bricks_stairs",
"rankine:hornblende_andesite_bricks_stairs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"replace": false,
"values": [
"rankine:granite_bricks_vertical_slab",
"rankine:diorite_bricks_vertical_slab",
"rankine:andesite_bricks_vertical_slab",
"rankine:basalt_bricks_vertical_slab",
"rankine:gray_granite_bricks_vertical_slab",
"rankine:granodiorite_bricks_vertical_slab",
"rankine:hornblende_andesite_bricks_vertical_slab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rankine:granite_bricks_slab",
"rankine:andesite_bricks_slab",
"rankine:diorite_bricks_slab",
"rankine:basalt_bricks_slab",
"rankine:gray_granite_bricks_slab",
"rankine:granodiorite_bricks_slab",
"rankine:hornblende_andesite_bricks_slab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rankine:granite_bricks_stairs",
"rankine:andesite_bricks_stairs",
"rankine:diorite_bricks_stairs",
"rankine:basalt_bricks_stairs",
"rankine:gray_granite_bricks_stairs",
"rankine:granodiorite_bricks_stairs",
"rankine:hornblende_andesite_bricks_stairs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"replace": false,
"values": [
"rankine:granite_bricks_vertical_slab",
"rankine:diorite_bricks_vertical_slab",
"rankine:andesite_bricks_vertical_slab",
"rankine:basalt_bricks_vertical_slab",
"rankine:gray_granite_bricks_vertical_slab",
"rankine:granodiorite_bricks_vertical_slab",
"rankine:hornblende_andesite_bricks_vertical_slab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rankine:granite_bricks",
"rankine:andesite_bricks",
"rankine:diorite_bricks",
"rankine:basalt_bricks",
"rankine:gray_granite_bricks",
"rankine:granodiorite_bricks",
"rankine:hornblende_andesite_bricks",
Expand All @@ -17,6 +18,9 @@
"rankine:red_porphyry_bricks",
"rankine:purple_porphyry_bricks",
"rankine:peridotite_bricks",
"rankine:comendite_bricks",
"rankine:troctolite_bricks",
"rankine:pegmatite_bricks",
"rankine:kimberlite_bricks",
"rankine:komatiite_bricks",
"rankine:pumice_bricks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rankine:granite_bricks",
"rankine:andesite_bricks",
"rankine:diorite_bricks",
"rankine:basalt_bricks",
"rankine:gray_granite_bricks",
"rankine:granodiorite_bricks",
"rankine:hornblende_andesite_bricks",
Expand All @@ -17,6 +18,9 @@
"rankine:red_porphyry_bricks",
"rankine:purple_porphyry_bricks",
"rankine:peridotite_bricks",
"rankine:comendite_bricks",
"rankine:troctolite_bricks",
"rankine:pegmatite_bricks",
"rankine:kimberlite_bricks",
"rankine:komatiite_bricks",
"rankine:pumice_bricks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "rankine:challenges/rankine_challenges",
"display": {
"icon": {
"item": "rankine:pancake_breakfast"
},
"title": {
"translate": "rankine.advancements.challenges.make_pancake_breakfast.title"
},
"description": {
"translate": "rankine.advancements.challenges.make_pancake_breakfast.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"rankine:pancake_breakfast": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "rankine:pancake_breakfast"
}
]
}
}
},
"requirements": [
[
"rankine:pancake_breakfast"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "rankine:story/make_tree_tap",
"display": {
"icon": {
"item": "rankine:bandage"
},
"title": {
"translate": "rankine.advancements.story.make_bandage.title"
},
"description": {
"translate": "rankine.advancements.story.make_bandage.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"criteria": {
"bandage": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "rankine:bandage"
}
]
}
}
},
"requirements": [
[
"bandage"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "rankine:story/make_tree_tap",
"display": {
"icon": {
"item": "rankine:herbicide"
},
"title": {
"translate": "rankine.advancements.story.make_herbicide.title"
},
"description": {
"translate": "rankine.advancements.story.make_herbicide.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"criteria": {
"herbicide": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "rankine:herbicide"
}
]
}
}
},
"requirements": [
[
"herbicide"
]
]
}
35 changes: 35 additions & 0 deletions src/main/resources/data/rankine/advancements/story/make_pulp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "rankine:story/make_piston_crusher",
"display": {
"icon": {
"item": "rankine:pulp"
},
"title": {
"translate": "rankine.advancements.story.make_pulp.title"
},
"description": {
"translate": "rankine.advancements.story.make_pulp.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"criteria": {
"pulp": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "rankine:pulp"
}
]
}
}
},
"requirements": [
[
"pulp"
]
]
}
Loading

0 comments on commit 395a3b1

Please sign in to comment.