Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: only flowing milk turns to white powder #614

Merged
merged 8 commits into from
Oct 22, 2024
8 changes: 8 additions & 0 deletions kubejs/assets/emi/recipe/additions/milk_flowing_milk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "emi:info",
"stacks": [
"fluid:minecraft:milk",
"fluid:ptdye:flowing_milk"
],
"text": "fluid.ptdye.milk.info"
}
3 changes: 2 additions & 1 deletion kubejs/assets/ptdye/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
"tag.item.wares.agreements": "Agreements",
"tag.item.wares.cardboard_box_blacklisted": "Blacklisted Cardboard Boxes",
"tag.item.wares.delivery_boxes": "Delivery Boxes",
"fluid.ptdye.milk.info": "Milk, the ultimate lifeblood of the universe, is a versatile fluid that can be used to fuel rockets, create matter and sate the thirsty. _Can be acquired by milking Betsy_",

"ptdye.lang.EOF": "Ignore! This is here so you don't have to keep adding ',' to previous lines adding additional changes to git"
}
}
2 changes: 1 addition & 1 deletion kubejs/client_scripts/tooltips/critical.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ addTooltip(
);
addTooltip(
"white_concrete_powder",
"Seems that the _milk_ here, flowing or source, can be purified with _pure daisy_ to make _white powder_"
"Flowing milk can be purified with _pure daisy_ to make _white powder_"
);
addTooltip(
"lava_bucket",
Expand Down
2 changes: 1 addition & 1 deletion kubejs/server_scripts/base/debugtools.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Priority: 1
// priority: 1
ServerEvents.commandRegistry((event) => {
const {
commands: Commands,
Expand Down
3 changes: 1 addition & 2 deletions kubejs/server_scripts/base/features/deadPlanet.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ addCompacting('dirt %75',['4x stick','2x #forge:sand'])
addMixing('white_dye %75',['16x snowball', '10mb kubejs:fermented_goop'])
addPurify('orange_concrete_powder', 'lava', 15)
addPurify('blue_concrete_powder', 'water', 15)
addPurify('white_concrete_powder', 'milk', 15)
addPurify('yellow_concrete_powder', 'create:honey', 15)
addPurify('brown_concrete_powder', 'create:chocolate', 15)
addPurify('green_concrete_powder', 'kubejs:organic_mass', 15)
Expand All @@ -25,4 +24,4 @@ addDripping('grass', 'dead_bush')

removeRecipe({ id: 'supplementaries:soap' })
addMixing('6x supplementaries:soap', ['4x #forge:dusts/ash', '#forge:meat/fat', '1000mb water'])
addMixing('6x supplementaries:soap', ['8x #forge:dusts/ash', '250mb createdieselgenerators:plant_oil', '750mb water'])
addMixing('6x supplementaries:soap', ['8x #forge:dusts/ash', '250mb createdieselgenerators:plant_oil', '750mb water'])
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
// addPurify('white_concrete_powder', 'milk', 15)
addPurify('white_concrete_powder', 'ptdye:flowing_milk', 15)
ServerEvents.tags("fluid", (event) => {event.add("ptdye:flowing_milk", ["minecraft:flowing_milk"]);});
ServerEvents.tags("block", (event) => {event.add("ptdye:milk", ["minecraft:milk"]);});
modpackRecipes.push({//special hack to only work on flowing milk
type: "botania:pure_daisy",
hidden: true,
time: 15,
input: {
type: "tag_excluding",
tag: "ptdye:milk",
exclude: [
{
type: "state",
name: "minecraft:milk",
properties: {
level: "0",
},
},
],
},
output: {
name: "minecraft:white_concrete_powder",
},
});

ItemEvents.entityInteracted("minecraft:bucket", (event) => {
if (event.getTarget().getType() == "minecraft:cow") {
let currentTime = event.getTarget().level.getTime();
Expand All @@ -17,5 +43,5 @@ ItemEvents.entityInteracted("minecraft:bucket", (event) => {
event.getTarget().persistentData.put("lastMilked", currentTime);
}
}
});
});

4 changes: 3 additions & 1 deletion kubejs/server_scripts/base/trading/backwardsCompatEngine.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Priority: 100
// priority: 100

global.revision = 1;
function isFirstLogin() {
console.log("existing_world_compat_engine: " + Utils.server.persistentData.getBoolean("existing_world_compat_engine"));
console.log("existing_world: " + Utils.server.persistentData.getBoolean("existing_world"));
return !(
Utils.server.persistentData.getBoolean("existing_world_compat_engine") ||
Utils.server.persistentData.getBoolean("existing_world")
Expand Down
9 changes: 9 additions & 0 deletions kubejs/startup_scripts/custom_fluids/milk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//fake flowing milk

StartupEvents.registry("fluid", (event) => {
event
.create("ptdye:flowing_milk")
.thinTexture(0xE7E7E7)
.noBucket()
.bucketColor(0xE7E7E7);
});
2 changes: 1 addition & 1 deletion kubejs/startup_scripts/global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Priority: 10000
// priority: 10000
const IS_CLIENT_ENVIRONMENT = Platform.isClientEnvironment()

global.colors = ['white', 'orange', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'light_gray', 'cyan', 'purple', 'magenta', 'blue', 'brown', 'green', 'red', 'black']
Expand Down