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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user