mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Work on flame vector calculation - still need to get it to catch blocks and entities on fire properly
This commit is contained in:
1 parent
497997d0e4
commit
87f92326f9
2 files changed
+207
-20
No files matched your search
@@ -5,6 +5,8 @@ import io.netty.buffer.ByteBuf;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -165,10 +167,28 @@ public class Coord4D
|
||||
return getFromSide(side, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a new Coord4D translated to the defined offsets of the side by the defined amount.
|
||||
* @param side - side to translate this Coord4D to
|
||||
* @param amount - how far to translate this Coord4D
|
||||
* @return translated Coord4D
|
||||
*/
|
||||
public Coord4D getFromSide(ForgeDirection side, int amount)
|
||||
{
|
||||
return new Coord4D(xCoord+(side.offsetX*amount), yCoord+(side.offsetY*amount), zCoord+(side.offsetZ*amount), dimensionId);
|
||||
}
|
||||
|
||||
public ItemStack getStack(IBlockAccess world)
|
||||
{
|
||||
Block block = getBlock(world);
|
||||
|
||||
if(block == null || block == Blocks.air)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(block, 1, getMetadata(world));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new Coord4D from a defined TileEntity's xCoord, yCoord and zCoord values.
|
||||
|
||||
Reference in new issue
Block a user