Skip to content

Commit

Permalink
Adjusted entity check for Auto/Self trap and SelfWeb
Browse files Browse the repository at this point in the history
  • Loading branch information
IUDevman committed Oct 29, 2020
1 parent b5d7327 commit 337b311
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.BlockObsidian;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -191,7 +189,7 @@ else if (trapType.getValue().equalsIgnoreCase("Air")){
}

for (Entity entity : mc.world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(targetPos))){
if (entity instanceof EntityItem || entity instanceof EntityXPOrb){
if (entity instanceof EntityPlayer){
tryPlacing = false;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.BlockObsidian;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.CPacketEntityAction;
Expand Down Expand Up @@ -236,7 +235,7 @@ else if (trapType.getValue().equalsIgnoreCase("No Step")){
}

for (Entity entity : mc.world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(targetPos))){
if (entity instanceof EntityItem || entity instanceof EntityXPOrb){
if (entity instanceof EntityPlayer){
tryPlacing = false;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
import com.gamesense.client.module.ModuleManager;
import com.gamesense.client.module.modules.gui.ColorMain;
import net.minecraft.block.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.CPacketEntityAction;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;

Expand Down Expand Up @@ -185,13 +181,6 @@ public void onUpdate(){
tryPlacing = false;
}

for (Entity entity : mc.world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(targetPos))){
if (entity instanceof EntityItem || entity instanceof EntityXPOrb){
tryPlacing = false;
break;
}
}

if (tryPlacing && placeBlock(targetPos)){
blocksPlaced++;
}
Expand Down

0 comments on commit 337b311

Please sign in to comment.