mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Merge branch 'dev' into animation-events
# Conflicts: # src/api
This commit is contained in:
commit
978db5bb69
3 files changed
+25
-3
No files matched your search
+1
-1
Submodule src/api updated: fc17b0f596...0fe49c8b92.
@@ -7,6 +7,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -40,7 +41,7 @@ public class BlockScripted extends BlockContainer {
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
TileScripted tile = (TileScripted) world.getTileEntity(x, y, z);
|
||||
if (tile != null && tile.isPassible)
|
||||
if (tile != null && tile.isPassible && (tile.blockModel == null || tile.blockModel == Blocks.air))
|
||||
return AABB_EMPTY;
|
||||
return AABB.getOffsetBoundingBox(x,y,z);
|
||||
}
|
||||
@@ -53,6 +54,13 @@ public class BlockScripted extends BlockContainer {
|
||||
return AABB.getOffsetBoundingBox(x,y,z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBlocksMovement(IBlockAccess worldIn, int x, int y, int z)
|
||||
{
|
||||
TileScripted tile = (TileScripted) worldIn.getTileEntity(x, y, z);
|
||||
return tile != null && tile.isPassible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote)
|
||||
|
||||
@@ -81,12 +81,24 @@ public class BlockScriptedWrapper extends ScriptBlock implements IBlockScripted{
|
||||
|
||||
@Override
|
||||
public void setIsPassible(boolean bo){
|
||||
setIsPassable(bo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsPassible(){
|
||||
return getIsPassable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsPassable(boolean bo){
|
||||
tile.isPassible = bo;
|
||||
tile.needsClientUpdate = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsPassible(){
|
||||
public boolean getIsPassable(){
|
||||
if(tile == null)
|
||||
return false;
|
||||
return tile.isPassible;
|
||||
}
|
||||
|
||||
@@ -97,6 +109,8 @@ public class BlockScriptedWrapper extends ScriptBlock implements IBlockScripted{
|
||||
|
||||
@Override
|
||||
public int getLight(){
|
||||
if(tile == null)
|
||||
return 0;
|
||||
return tile.lightValue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user