mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 15:03:03 +00:00
Fixed the Kindle lens not being able to close nether portals.
This commit is contained in:
1 parent
8969fcf3a6
commit
cc648f2372
2 files changed
+14
-11
No files matched your search
@@ -25,24 +25,27 @@ import vazkii.botania.common.block.tile.TileIncensePlate;
|
||||
public class LensFire extends Lens {
|
||||
|
||||
@Override
|
||||
public boolean collideBurst(IManaBurst burst, EntityThrowable entity, RayTraceResult pos, boolean isManaBlock, boolean dead, ItemStack stack) {
|
||||
public boolean collideBurst(IManaBurst burst, EntityThrowable entity, RayTraceResult rtr, boolean isManaBlock, boolean dead, ItemStack stack) {
|
||||
BlockPos coords = burst.getBurstSourceBlockPos();
|
||||
if(!entity.worldObj.isRemote && pos.getBlockPos() != null && !coords.equals(pos.getBlockPos()) && !burst.isFake() && !isManaBlock) {
|
||||
EnumFacing dir = pos.sideHit;
|
||||
BlockPos pos = rtr.getBlockPos();
|
||||
if(!entity.worldObj.isRemote && pos != null && !coords.equals(pos) && !burst.isFake() && !isManaBlock) {
|
||||
EnumFacing dir = rtr.sideHit;
|
||||
|
||||
BlockPos pos_ = pos.getBlockPos().offset(dir);
|
||||
BlockPos offPos = pos.offset(dir);
|
||||
|
||||
Block blockAt = entity.worldObj.getBlockState(pos.getBlockPos()).getBlock();
|
||||
Block blockAt_ = entity.worldObj.getBlockState(pos_).getBlock();
|
||||
Block blockAt = entity.worldObj.getBlockState(pos).getBlock();
|
||||
Block blockAtOffset = entity.worldObj.getBlockState(offPos).getBlock();
|
||||
|
||||
if(blockAt == Blocks.PORTAL)
|
||||
entity.worldObj.setBlockState(pos.getBlockPos(), Blocks.AIR.getDefaultState());
|
||||
entity.worldObj.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||
if(blockAtOffset == Blocks.PORTAL)
|
||||
entity.worldObj.setBlockState(offPos, Blocks.AIR.getDefaultState());
|
||||
else if(blockAt == ModBlocks.incensePlate) {
|
||||
TileIncensePlate plate = (TileIncensePlate) entity.worldObj.getTileEntity(pos.getBlockPos());
|
||||
TileIncensePlate plate = (TileIncensePlate) entity.worldObj.getTileEntity(pos);
|
||||
plate.ignite();
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(plate);
|
||||
} else if(blockAt_.isAir(entity.worldObj.getBlockState(pos_), entity.worldObj, pos_))
|
||||
entity.worldObj.setBlockState(pos_, Blocks.FIRE.getDefaultState());
|
||||
} else if(blockAtOffset.isAir(entity.worldObj.getBlockState(offPos), entity.worldObj, offPos))
|
||||
entity.worldObj.setBlockState(offPos, Blocks.FIRE.getDefaultState());
|
||||
}
|
||||
|
||||
return dead;
|
||||
|
||||
@@ -2170,7 +2170,7 @@ botania.page.lens28=The &1Influence Lens&0 allows the &4Mana Burst&0 to have inf
|
||||
botania.page.lens29=Influence Lens
|
||||
botania.page.lens30=The &1Weight Lens&0 carries a strong burden on the &4Mana Burst&0, making any block hit by it, if there doesn't happen to be a block below it, fall, similarly to how &1Sand&0 and &1Gravel&0 do.
|
||||
botania.page.lens31=Weight Lens
|
||||
botania.page.lens32=The &1Kindle Lens&0 is infused with a burning spark, when it hits a block it'll set it on fire. It has the ability to both ignite and close &1Nether Portals&0. It doesn't seem to set any living beings on fire, though.
|
||||
botania.page.lens32=The &1Kindle Lens&0 is infused with a burning spark, when it hits a block it'll set it on fire. It doesn't seem to set any living beings on fire, though.<br>It has the ability to both ignite and close &1Nether Portals&0, but to close them it needs to be aimed at the frame, lest the burst it carries end up going through the portal.
|
||||
botania.page.lens33=Kindle Lens
|
||||
botania.page.lens34=The &1Force Lens&0 acts as a &1Piston&0, when it hits a block that a piston can move, it'll do just so.
|
||||
botania.page.lens35=Force Lens
|
||||
|
||||
Reference in new issue
Block a user