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
|
||||
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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue