-
Posts
72 -
Joined
-
Last visited
Everything posted by Pingubro
-
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
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. -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
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 -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
so expanding everything by one every area is cleared but it seems like the mob list is filled with entities that stand in a one smaller radius then the BB is. But nevermind it is working kind of. So thank you all -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
/** * 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? -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
I had a better idea testing with Shulkers The List always has a size of 16 and when all Shulkers are removed within this list it looks like this. http://imgur.com/a/UHcdY EDIT: Cant insert the image directly in the post sry -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
I debbuged and I still dont know what is going on sadly. I even copied the getEntitiesWithinAABB method to debug it when it only gets called by my class. Is there a way to disable MobMovement to place an entity on everyblock? -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
It is still not damaging all Entities in my room for testing purposes. Thanks for updating my method it is much clearer now. Can there be to much Entities for the Method? -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
Ohh sorry It is supposed to get a 5x5 Area and 2 high BB in front of my block. It takes the facing and the coordinates to calculate the BB. It basically determines the coordinates of the two corners and puts them together -
[1.11.2] Update block when something changes on the server side?
Pingubro replied to Kander16's topic in Modder Support
Have you tried this: world.setBlockState(BlockPos, IProperty, int); -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
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. -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
I went through my code step by step and cant find the issue. When I throw items in each corner it only gets one. But when they are centered it gets all Items and it also damages the Entities. -
Safer method then world.getEntitiesWithinAABB?
Pingubro replied to Pingubro's topic in Modder Support
Here is my code: https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/tileentity/TileMobGrinder.java#L37-L47 EDIT: Removed the synchronized again -
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.
-
[1.11.2] Models for block variants won't load?
Pingubro replied to iWasHere's topic in Modder Support
You have an error log for us or the concrete error -
Full link to your repository pls. There are maybe many Projects called aurora
-
Egit if you use Eclipse VCS if you use IntelliJ
-
You dont upload zip files. You upload whole sourcepaths und class files. We can view them then. Just install Git or GitHub and use Egit(Eclipse) or VCS(IntelliJ) to maintain the files uptodate
-
Yes we all want this... Just use GitHub it has only benefits for you and especially us when we try to help.
-
Ok solved, thank you guys
-
Ahh ok, when I implement the IStateMapper what things are important to know about this? Do I need to handle everything in my class?
-
Also the model files in the blockstate and in the model folder do not have the same names
-
Updated Code and project structure pls
-
Now there is mybe a typo in the file name of your blockstate. Always give updated code and/or updated project structure with it.
-
Basically only set the registryName in the Enum. Also in the screen there is a typo "arourablock"
-
Basically dont use capital letters and the UnlocalizedName and RegistryName should be the same