Woodcutter Tweaks and polish

This commit is contained in:
oitsjustjose 2022-01-16 01:32:48 -06:00
commit 406814ee84
2 changed files with 28 additions and 3 deletions

View file

@ -38,11 +38,15 @@ onEvent("player.inventory.opened", (event) => {
// Prevents ever placing the acacia woodcutter. Causes item to desync out of your inv so the next event fixes that
onEvent("block.right_click", (event) => {
if (event.getItem() === "corail_woodcutter:acacia_woodcutter") {
const player = event.getEntity();
const playerEntity = player.minecraftPlayer;
if (event.getItem() === "corail_woodcutter:oak_woodcutter") {
if (playerEntity.func_225608_bj_() || player.isCrouching()) {
event.cancel();
}
} else if (event.getItem() === "corail_woodcutter:acacia_woodcutter") {
event.cancel();
const player = event.getEntity();
const playerEntity = player.minecraftPlayer;
playerEntity.func_226284_e_(true); // setSneaking
const portableWoodcutter = Item.of("corail_woodcutter:acacia_woodcutter");

View file

@ -28,4 +28,25 @@ onEvent("recipes", (event) => {
B: "#harmeng:saw_blade",
P: "#minecraft:planks",
});
event.custom({
type: "portable_stonecutter:anvil_flattening",
ingredients: [
{
tag: "minecraft:wooden_pressure_plates",
},
{
item: "minecraft:redstone",
},
{
item: "minecraft:redstone",
},
{
item: "corail_woodcutter:oak_woodcutter",
},
],
output: {
item: "corail_woodcutter:acacia_woodcutter",
},
});
});