Made Rifts Check Block Hardness

Made rifts check block hardness while replacing blocks so that we can
avoid destroying strong or indestructible blocks from other mods.
Updated references throughout the code to use a function in BlockRift
for this purpose.
This commit is contained in:
SenseiKiwi
2013-08-03 06:12:56 -04:00
parent 84872acb97
commit 3d04e9b9cc
5 changed files with 92 additions and 86 deletions

View File

@@ -58,16 +58,15 @@ public class EventHookContainer
{
for (LinkData link:dimHelper.instance.getDimData(world.provider.dimensionId).getLinksInDim())
{
if(linkCount>100) //TODO: Wtf? wouldn't this cause some links to not load on servers with several links? Not sure what's going on here. ~SenseiKiwi
{
break;
}
linkCount++;
int blocktoReplace = world.getBlockId(link.locXCoord, link.locYCoord, link.locZCoord);
if (!mod_pocketDim.blocksImmuneToRift.contains(blocktoReplace))
if (!mod_pocketDim.blockRift.isBlockImmune(world, link.locXCoord, link.locYCoord, link.locZCoord))
{
dimHelper.getWorld(link.locDimID).setBlock(link.locXCoord, link.locYCoord, link.locZCoord, properties.RiftBlockID);
}
linkCount++;
if (linkCount >= 100)
{
break;
}
}
}
catch(Exception e)