WIP Fix Robot
This commit is contained in:
@@ -38,6 +38,11 @@ public final class RobotTerminalScreen extends ContainerScreen<RobotTerminalCont
|
||||
terminalWidget.renderBackground(matrixStack, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLabels(final MatrixStack p_230451_1_, final int p_230451_2_, final int p_230451_3_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(final MatrixStack matrixStack, final int mouseX, final int mouseY, final float partialTicks) {
|
||||
terminalWidget.setEnergyInfo(menu.getEnergy(), menu.getEnergyCapacity(), menu.getEnergyConsumption());
|
||||
|
||||
@@ -366,9 +366,9 @@ public final class RobotEntity extends Entity implements Robot {
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
final EntityDataManager dataManager = getEntityData();
|
||||
dataManager.set(TARGET_POSITION, BlockPos.ZERO);
|
||||
dataManager.set(TARGET_DIRECTION, Direction.NORTH);
|
||||
dataManager.set(SELECTED_SLOT, (byte) 0);
|
||||
dataManager.define(TARGET_POSITION, BlockPos.ZERO);
|
||||
dataManager.define(TARGET_DIRECTION, Direction.NORTH);
|
||||
dataManager.define(SELECTED_SLOT, (byte) 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class RobotItem extends ModItem {
|
||||
}
|
||||
|
||||
final RobotEntity robot = Entities.ROBOT.get().create(context.getLevel());
|
||||
robot.moveTo(position.x, position.y - robot.getEyeHeight() * 0.5f, position.z,
|
||||
robot.moveTo(position.x, position.y - robot.getBbHeight() * 0.5f, position.z,
|
||||
Direction.fromYRot(context.getRotation()).getOpposite().toYRot(), 0);
|
||||
if (!world.noCollision(robot)) {
|
||||
return super.useOn(context);
|
||||
|
||||
Reference in New Issue
Block a user