Jump to content

getRenderViewEntity | 1.7.10


BurankuBlank

Recommended Posts

Hey, I'm quite new to this whole modding thing and currently I am porting a mod from 1.8.9 to 1.7.10 ( is porting still the term when going backwards xD )

 

BUT there is a problem there are about 7 stupid errors and they are all getRenderViewEntity since this is a 1.8 thing and not 1.7.10 

Is there any way I can fix this?

 

{ I'm not sure how much of the code I should post sorry }

 

private void getMouseOver(final float p_78473_1_) {
        if (Minecraft.getMinecraft().getRenderViewEntity() != null && Minecraft.getMinecraft().theWorld != null) {
            Minecraft.getMinecraft().pointedEntity = null;
            final double d0 = ReachMod.randReach;
            this.moving = Minecraft.getMinecraft().getRenderViewEntity().rayTrace(d0, p_78473_1_);
            double d2 = d0;
            final Vec3 vec3 = Minecraft.getMinecraft().getRenderViewEntity().getPositionEyes(p_78473_1_);
            if (this.moving != null) {
                d2 = this.moving.hitVec.distanceTo(vec3);
            }
            final Vec3 vec4 = Minecraft.getMinecraft().getRenderViewEntity().getLook(p_78473_1_);
            final Vec3 vec5 = vec3.addVector(vec4.xCoord * d0, vec4.yCoord * d0, vec4.zCoord * d0);
            this.pointedEntity = null;
            Vec3 vec6 = null;
            final float f1 = 1.0f;
            final List list = Minecraft.getMinecraft().theWorld.getEntitiesWithinAABBExcludingEntity(Minecraft.getMinecraft().getRenderViewEntity(), Minecraft.getMinecraft().getRenderViewEntity().getEntityBoundingBox().addCoord(vec4.xCoord * d0, vec4.yCoord * d0, vec4.zCoord * d0).expand((double)f1, (double)f1, (double)f1));
            double d3 = d2;
            for (int i = 0; i < list.size(); ++i) {
                final Entity entity = (Entity) list.get(i);
                if (entity.canBeCollidedWith()) {
                    final float f2 = 0.13f;
                    final AxisAlignedBB axisalignedbb = entity.getBoundingBox().expand((double)f2, (double)f2, (double)f2);
                    final MovingObjectPosition movingobjectposition = axisalignedbb.calculateIntercept(vec3, vec5);
                    if (axisalignedbb.isVecInside(vec3)) {
                        if (0.0 < d3 || d3 == 0.0) {
                            this.pointedEntity = entity;
                            vec6 = ((movingobjectposition == null) ? vec3 : movingobjectposition.hitVec);
                            d3 = 0.0;

 

Edited by BurankuBlank
Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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