Jump to content

Pingubro

Members
  • Posts

    72
  • Joined

  • Last visited

Posts posted by Pingubro

  1. So the corner points need to look like this:

    I have tested this again with shulkers but i wanted to be sure about this. I tested this by replacing the Fences with Shulkers and placed them in the middle the fence Shulkers didnt get moved but the ones inside.

    The new Method after you guys helped me: https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/util/FluxedUtil.java#L36-L47

    P.S. in my local file I mentioned Draco18s aswell.

     

  2. public static AxisAlignedBB getWorkingArea(BlockPos pos, EnumFacing face, int radius) {
            int divide = radius/2;
    
            EnumFacing right = face.rotateY();
            BlockPos rightNear = pos.offset(right, divide + 1);
            BlockPos leftFar = pos.offset(face, radius + 1).offset(right, -divide).up(2);
    
            return new AxisAlignedBB(rightNear, leftFar);
        }

    I tried this now but it is still not working.

    It looks like this -> 

    Two of the rest are on the east side two on the south side

  3. /**
         * Thanks to @diesieben07
         * @param pos
         * @param face
         * @return
         */
        public static AxisAlignedBB getWorkingArea(BlockPos pos, EnumFacing face, int radius) {
            int divide;
            if(radius % 2 != 0){
                divide = (radius - 1)/2;
            }else{
                divide = radius / 2;
            }
            EnumFacing right = face.rotateY();
            BlockPos rightNear = pos.offset(face).offset(right, divide);
            BlockPos leftFar = pos.offset(face, radius).offset(right, -divide).up(2);
            return new AxisAlignedBB(rightNear, leftFar);
        }

    I thought about this but which parameter should I expand? And even if I find the rigth one will it fix all the shapes?

  4.  public static AxisAlignedBB getWorkingArea(BlockPos pos, EnumFacing face){
            int x = pos.getX();
            int y = pos.getY();
            int z = pos.getZ();
            BlockPos cornerFront;
            BlockPos cornerBack;
            switch (face) {
                case NORTH:
                    cornerFront = new BlockPos(x - 2, y, z - 5);
                    cornerBack = new BlockPos(x + 2, y + 2, z - 1);
                    break;
                case SOUTH:
                    cornerFront = new BlockPos(x + 2, y, z + 5);
                    cornerBack = new BlockPos(x - 2, y + 2, z + 1);
                    break;
                case WEST:
                    cornerFront = new BlockPos(x - 5, y, z + 2);
                    cornerBack = new BlockPos(x - 1, y + 2, z - 2);
                    break;
                case EAST:
                    cornerFront = new BlockPos(x + 5, y, z - 2);
                    cornerBack = new BlockPos(x + 1, y + 2, z + 2);
                    break;
                default:
                    cornerFront = new BlockPos(x, y, z);
                    cornerBack = new BlockPos(x, y + 2, z);
                    break;
            }
    
            return new AxisAlignedBB(cornerFront, cornerBack);
        }

    Only return a BB for a 5x2x5 Quad. 
    I also tried spamming Zombies in a 3x3 area. Not all Zombies are dammaged the max i saw was about 8 or so.

  5. Hello,

    as the title says I am currently using 

    world.getEntitiesWithinAABB

    but it doesnt seem to get all Entities in the BB. So I printed my BB and checked all the corners nothing was wrong here.

    In my code I harm all the Entitys instanceof EntityLivingBase with Generic damage. But not all Entities are harmed. Is this because I am damaging

    them to fast or is it because not all Entities are getted by this Method because the printed List doesnt seem to be the full List of Entities in the BB.

    I also tried to synchronize the part were I am getting the List no luck.

  6. 12 minutes ago, Draco18s said:

    Also:

    blocks.png

    Why does the "registry" name have capital letters in it?

    Why isn't your unlocalized name based off the registry name?

    someBlock.setUnlocalizedName(someBlock.getRegistryName());

    Basically only set the registryName in the Enum.

    Also in the screen there is a typo "arourablock"

×
×
  • Create New...

Important Information

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