Woodcutter Tweaks and polish
This commit is contained in:
parent
9fa50e037d
commit
406814ee84
2 changed files with 28 additions and 3 deletions
|
|
@ -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
|
// 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) => {
|
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();
|
event.cancel();
|
||||||
|
|
||||||
const player = event.getEntity();
|
|
||||||
const playerEntity = player.minecraftPlayer;
|
|
||||||
playerEntity.func_226284_e_(true); // setSneaking
|
playerEntity.func_226284_e_(true); // setSneaking
|
||||||
|
|
||||||
const portableWoodcutter = Item.of("corail_woodcutter:acacia_woodcutter");
|
const portableWoodcutter = Item.of("corail_woodcutter:acacia_woodcutter");
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,25 @@ onEvent("recipes", (event) => {
|
||||||
B: "#harmeng:saw_blade",
|
B: "#harmeng:saw_blade",
|
||||||
P: "#minecraft:planks",
|
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",
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue