Posted April 2, 20232 yr Bolt = error package com.example.bedrockbridging.com.example; import net.minecraft.world.level.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber public class BedrockBridgingMethod { private static final int TICKS_PER_BLOCK = 2; private int buildTicksLeft = 0; private BlockPos buildPos = null; } @SubscribeEvent public static void onPlayerTick(TickEvent.PlayerTickEvent event) { if (event.phase != TickEvent.Phase.START || event.player.isSneaking()) { return; } PlayerEntity player = event.player; BedrockBridgingMethod instance = BedrockBridgingMethod.getInstance(); if (instance.buildTicksLeft > 0) { instance.buildTicksLeft--; return; } if (instance.buildPos != null) { BlockState state = player.world.getBlockState(instance.buildPos); if (state.getBlock() == Blocks.AIR) { playerControllerClickBlock(player, instance.buildPos); } instance.buildTicksLeft = TICKS_PER_BLOCK; instance.buildPos = instance.buildPos.offset(player.getHorizontalFacing()); } else { instance.buildPos = player.getPosition().offset(player.getHorizontalFacing()); }
April 4, 20232 yr That doesn't answer the question what are the errors, but my guess is that the classes, fields, and method names are all incorrect since they changed when mojmaps was made the 'default' mapping set. As such, you need to change all the names to reflect this (e.g. 'PlayerEntity' -> 'Player'). Looking at what you've shown, you can easily use your IDE to find what the changed names are.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.