Jump to content

Recommended Posts

Posted (edited)

I want to know if I'm barking up the wrong tree? If I am, please help me find a better alternative, or if I'm right, help me with finding the solution. TY

 

 

package net.mcreator.aliveagain;

import net.minecraft.util.math.RayTraceResult;
import net.minecraft.entity.Entity;

@Elementsaliveagain.ModElement.Tag
public class MCreatorDeadSlabTopBlockIsPlacedBy extends Elementsaliveagain.ModElement {
    public MCreatorDeadSlabTopBlockIsPlacedBy(Elementsaliveagain instance) {
        super(instance, 95);
    }

    public static void executeProcedure(java.util.HashMap<String, Object> dependencies) {
        if (dependencies.get("entity") == null) {
            System.err.println("Failed to load dependency entity for procedure MCreatorDeadSlabTopBlockIsPlacedBy!");
            return;
        }
        Entity entity = (Entity) dependencies.get("entity");
        System.out.println((entity.world.rayTraceBlocks(entity.getPositionEyes(1f),
                entity.getPositionEyes(1f).addVector(entity.getLook(1f).x * 100, entity.getLook(1f).y * 100, entity.getLook(1f).z * 100), false,
                false, true)));
    }
}
/*.getBlockPos().getY()*/

Console:

*Cutting to the chase*

HitResult{type=BLOCK, blockpos=BlockPos{x=197, y=5, z=446}, f=north, pos=(197.62231148178964, 5.405041827533119, 446.0), entity=null}

Edited by slenered
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.