This commit is contained in:
gnembon committed 2020-05-20 10:31:06 -03:00
1 parent abd5f178be
commit b51078e427
5 files changed
+20 -20

No files matched your search

@@ -60,10 +60,10 @@ public class SpawnHelperMixin
{
return world.doesNotCollide(bb);
}
int minX = MathHelper.floor(bb.x1);
int minY = MathHelper.floor(bb.y1);
int minZ = MathHelper.floor(bb.z1);
int maxY = MathHelper.ceil(bb.y2)-1;
int minX = MathHelper.floor(bb.minX);
int minY = MathHelper.floor(bb.minY);
int minZ = MathHelper.floor(bb.minZ);
int maxY = MathHelper.ceil(bb.maxY)-1;
BlockPos.Mutable blockpos = new BlockPos.Mutable();
if (bb.getXLength() <= 1) // small mobs
{
@@ -86,8 +86,8 @@ public class SpawnHelperMixin
return true;
}
// this code is only applied for mobs larger than 1 block in footprint
int maxX = MathHelper.ceil(bb.x2)-1;
int maxZ = MathHelper.ceil(bb.z2)-1;
int maxX = MathHelper.ceil(bb.maxX)-1;
int maxZ = MathHelper.ceil(bb.maxZ)-1;
for (int y = minY; y <= maxY; y++)
for (int x = minX; x <= maxX; x++)
for (int z = minZ; z <= maxZ; z++)
@@ -107,7 +107,7 @@ public abstract class WorldChunk_movableTEMixin implements WorldChunkInterface
if (!this.world.isClient)
{
if (!(oldBlock instanceof PistonExtensionBlock))//this is a movableTE special case, if condition wasn't there it would remove the blockentity that was carried for some reason
oldBlockState.onBlockRemoved(this.world, blockPos_1, newBlockState, boolean_1);//this kills it
oldBlockState.onStateReplaced(this.world, blockPos_1, newBlockState, boolean_1);//this kills it
}
else if (oldBlock != newBlock && oldBlock instanceof BlockEntityProvider)
{
+10 -10
View File
@@ -131,20 +131,20 @@ public class BlockInfo
put(Material.PLANT , "plant" );
put(Material.UNDERWATER_PLANT, "water_plant" );
put(Material.REPLACEABLE_PLANT, "vine" );
put(Material.SEAGRASS , "sea_grass" );
put(Material.REPLACEABLE_UNDERWATER_PLANT , "sea_grass" );
put(Material.WATER , "water" );
put(Material.BUBBLE_COLUMN , "bubble_column");
put(Material.LAVA , "lava" );
put(Material.SNOW , "snow_layer" );
put(Material.SNOW_LAYER , "snow_layer" );
put(Material.FIRE , "fire" );
put(Material.PART , "redstone_bits");
put(Material.SUPPORTED , "redstone_bits");
put(Material.COBWEB , "cobweb" );
put(Material.REDSTONE_LAMP , "redstone_lamp");
put(Material.CLAY , "clay" );
put(Material.EARTH , "dirt" );
put(Material.ORGANIC , "grass" );
put(Material.PACKED_ICE , "packed_ice" );
put(Material.SAND , "sand" );
put(Material.ORGANIC_PRODUCT , "clay" );
put(Material.SOIL , "dirt" );
put(Material.SOLID_ORGANIC , "grass" );
put(Material.DENSE_ICE , "packed_ice" );
put(Material.AGGREGATE , "sand" );
put(Material.SPONGE , "sponge" );
put(Material.SHULKER_BOX , "shulker" );
put(Material.WOOD , "wood" );
@@ -160,11 +160,11 @@ public class BlockInfo
put(Material.STONE , "stone" );
put(Material.METAL , "metal" );
put(Material.SNOW_BLOCK , "snow" );
put(Material.ANVIL , "anvil" );
put(Material.REPAIR_STATION , "anvil" );
put(Material.BARRIER , "barrier" );
put(Material.PISTON , "piston" );
put(Material.UNUSED_PLANT , "coral" );
put(Material.PUMPKIN , "gourd" );
put(Material.GOURD , "gourd" );
put(Material.EGG , "dragon_egg" );
put(Material.CAKE , "cake" );
}};
+1 -1
View File
@@ -107,7 +107,7 @@ public class MobAI
{
if (!e.isOnGround() && !e.isInsideWaterOrBubbleColumn() && !e.isInLava()) return;
float m = e.world.getBlockState(e.getBlockPos()).getBlock().getJumpVelocityMultiplier();
float g = e.world.getBlockState(new BlockPos(e.getX(), e.getBoundingBox().y1 - 0.5000001D, e.getZ())).getBlock().getJumpVelocityMultiplier();
float g = e.world.getBlockState(new BlockPos(e.getX(), e.getBoundingBox().minY - 0.5000001D, e.getZ())).getBlock().getJumpVelocityMultiplier();
float jumpVelocityMultiplier = (double) m == 1.0D ? g : m;
float jumpStrength = (0.42F * jumpVelocityMultiplier);
Vec3d vec3d = e.getVelocity();