本文整理汇总了Java中codechicken.lib.raytracer.IndexedCuboid6类的典型用法代码示例。如果您正苦于以下问题:Java IndexedCuboid6类的具体用法?Java IndexedCuboid6怎么用?Java IndexedCuboid6使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IndexedCuboid6类属于codechicken.lib.raytracer包,在下文中一共展示了IndexedCuboid6类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIndexedCuboids
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public List<IndexedCuboid6> getIndexedCuboids() {
List<IndexedCuboid6> cuboids = new ArrayList<>();
cuboids.add(new IndexedCuboid6(0, new Cuboid6(1 / 16D, 0, 1 / 16D, 15 / 16D, 14 / 16D, 15 / 16D)));
// Remove other boxes if the chest has lid open.
if (getRadianLidAngle(0) < 0) {
return cuboids;
}
// DyeButtons.
for (int button = 0; button < 3; button++) {
EnderDyeButton ebutton = TileEnderChest.buttons[button].copy();
ebutton.rotate(0, 0.5625, 0.0625, 1, 0, 0, 0);
ebutton.rotateMeta(rotation);
cuboids.add(new IndexedCuboid6(button + 1, new Cuboid6(ebutton.getMin(), ebutton.getMax())));
}
//Lock Button.
cuboids.add(new IndexedCuboid6(4, new Cuboid6(new EnderKnobSlot(rotation).getSelectionBB())));
return cuboids;
}
示例2: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public Iterable<IndexedCuboid6> getSubParts()
{
Set<IndexedCuboid6> subParts = new HashSet<IndexedCuboid6>();
if(tile() != null)
{
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
int ord = side.ordinal();
byte connections = getAllCurrentConnections();
if(connectionMapContainsSide(connections, side) || side == testingSide)
{
subParts.add(getTransmitterType().getSize() == Size.SMALL ? smallSides[ord] : largeSides[ord]);
}
}
}
subParts.add(getTransmitterType().getSize() == Size.SMALL ? smallSides[6] : largeSides[6]);
return subParts;
}
示例3: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public Iterable<IndexedCuboid6> getSubParts() {
List<IndexedCuboid6> l = new ArrayList<IndexedCuboid6>();
Vec3dCube c1 = new Vec3dCube(0, 0, 0, 2 / 16D, 2 / 16D, 1);
Vec3dCube c2 = new Vec3dCube(0, 2 / 16D, 0, 2 / 16D, 14 / 16D, 2 / 16D);
Vec3dCube c3 = new Vec3dCube(0, 14 / 16D, 0, 2 / 16D, 1, 1);
for (int i = 0; i < 4; i++) {
l.add(new IndexedCuboid6(0, new Cuboid6(c1.clone().rotate(0, i * 90, 0, Vec3d.center).toAABB())));
l.add(new IndexedCuboid6(0, new Cuboid6(c2.clone().rotate(0, i * 90, 0, Vec3d.center).toAABB())));
l.add(new IndexedCuboid6(0, new Cuboid6(c3.clone().rotate(0, i * 90, 0, Vec3d.center).toAABB())));
}
if (getWorld() != null && (!getWorld().isRemote || !Config.click_through_frames))
if (is2D())
l.add(new IndexedCuboid6(0, new Cuboid6(0, 0, 0, 1, 1, 1).expand(-0.001)));
else
l.add(new IndexedCuboid6(0, new Cuboid6(1 / 16D, 1 / 16D, 1 / 16D, 15 / 16D, 15 / 16D, 15 / 16D)));
return l;
}
示例4: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
public Iterable<IndexedCuboid6> getSubParts() {
final ArrayList<IndexedCuboid6> boxes = new ArrayList<IndexedCuboid6>();
this.overEthereal = true;
for (final Cuboid6 cuboid6 : this.getCollisionBoxes()) {
boxes.add(new IndexedCuboid6((Object)0, cuboid6));
}
this.overEthereal = false;
return boxes;
}
示例5: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public Iterable<IndexedCuboid6> getSubParts() {
final ArrayList<IndexedCuboid6> boxes = new ArrayList<IndexedCuboid6>();
this.overEthereal = true;
for (final Cuboid6 cuboid6 : this.getCollisionBoxes()) {
boxes.add(new IndexedCuboid6((Object)0, cuboid6));
}
this.overEthereal = false;
return boxes;
}
示例6: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public Iterable<IndexedCuboid6> getSubParts() {
final IndexedCuboid6 box = new IndexedCuboid6((Object)0, new Cuboid6(0.5, 0.5, 0.5, 0.5, 0.5, 0.5));
this.overEthereal = true;
for (final Cuboid6 cuboid6 : this.getCollisionBoxes()) {
box.enclose((Cuboid6)new IndexedCuboid6((Object)0, cuboid6));
}
this.overEthereal = false;
box.max.y = 1.0;
return Arrays.asList(box);
}
示例7: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
public final HashSet<IndexedCuboid6> getSubParts() {
final HashSet<IndexedCuboid6> boxes = new HashSet<IndexedCuboid6>();
for (final Box bounds : ((BlockTransferPipe)this.getBlock()).getWorldModel((IBlockAccess)this.getWorld(), this.x(), this.y(), this.z())) {
boxes.add(new IndexedCuboid6((Object)0, new Cuboid6((double)bounds.minX, (double)bounds.minY, (double)bounds.minZ, (double)bounds.maxX, (double)bounds.maxY, (double)bounds.maxZ)));
}
return boxes;
}
示例8: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
public final HashSet<IndexedCuboid6> getSubParts() {
final HashSet<IndexedCuboid6> boxes = new HashSet<IndexedCuboid6>();
for (final Box bounds : ((BlockTransferNode)this.getBlock()).getWorldModel((IBlockAccess)this.getWorld(), this.x(), this.y(), this.z())) {
boxes.add(new IndexedCuboid6((Object)0, new Cuboid6((double)bounds.minX, (double)bounds.minY, (double)bounds.minZ, (double)bounds.maxX, (double)bounds.maxY, (double)bounds.maxZ)));
}
return boxes;
}
示例9: getIndexedCuboids
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public List<IndexedCuboid6> getIndexedCuboids() {
ArrayList<IndexedCuboid6> cuboids = new ArrayList<>();
cuboids.add(new IndexedCuboid6(0, new Cuboid6(0.15, 0, 0.15, 0.85, 0.916, 0.85)));
for (int i = 0; i < 4; i++) {
cuboids.add(new IndexedCuboid6(i + 1, selectionBoxes[i].copy().apply(Rotation.quarterRotations[rotation ^ 2].at(center))));
}
return cuboids;
}
示例10: addTraceableCuboids
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
public void addTraceableCuboids(List<IndexedCuboid6> cuboids) {
Cuboid6 base = new Cuboid6(3 / 16D, 0, 3 / 16D, 13 / 16D, 2 / 16D, 13 / 16D);
for (int i = 0; i < 6; i++) {
Attachment a = attachments[i];
if (a != null) {
cuboids.add(new IndexedCuboid6(i, transformPart(base, i)));
cuboids.add(new IndexedCuboid6(i + 6, transformPart(new Cuboid6(6 / 16D, 0, 6 / 16D, 10 / 16D, a.a_insertpos * 2 / 16D + 1 / 16D, 10 / 16D), i)));
}
}
}
示例11: getIndexedCuboids
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public List<IndexedCuboid6> getIndexedCuboids() {
LinkedList<IndexedCuboid6> parts = new LinkedList<>();
parts.add(new IndexedCuboid6(0, new Cuboid6(0, 0, 0, 1, 0.005, 1)));
for (int i = 0; i < 9; i++) {
Cuboid6 box = new Cuboid6(1 / 16D, 0, 1 / 16D, 5 / 16D, 0.01, 5 / 16D).apply(new Translation((i % 3) * 5 / 16D, 0, (i / 3) * 5 / 16D).with(Rotation.quarterRotations[rotation].at(center)));
parts.add(new IndexedCuboid6(i + 1, box));
}
return parts;
}
示例12: getParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
public List<IndexedCuboid6> getParts(World world, BlockPos pos) {
TileTranslocator tile = (TileTranslocator) world.getTileEntity(pos);
if (tile == null) {
return null;
}
List<IndexedCuboid6> cuboids = new LinkedList<>();
tile.addTraceableCuboids(cuboids);
return cuboids;
}
示例13: addCollisionBoxToList
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean bool) {
ICuboidProvider provider = (ICuboidProvider) world.getTileEntity(pos);
if (provider != null) {
for (IndexedCuboid6 cb : provider.getIndexedCuboids()) {
AxisAlignedBB aabb = cb.aabb();
if (aabb.intersectsWith(entityBox)) {
collidingBoxes.add(aabb);
}
}
}
}
示例14: getSubParts
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Override
public Iterable<IndexedCuboid6> getSubParts() {
List<IndexedCuboid6> cubes = new ArrayList<IndexedCuboid6>();
List<AxisAlignedBB> aabbs = getPart().getSelectionBoxes();
if (aabbs == null) return cubes;
for (AxisAlignedBB aabb : aabbs)
cubes.add(new IndexedCuboid6(0, new Cuboid6(aabb)));
return cubes;
}
示例15: getSelectedCuboid
import codechicken.lib.raytracer.IndexedCuboid6; //导入依赖的package包/类
@Optional.Method(modid = Dependencies.FMP)
public static final AxisAlignedBB getSelectedCuboid(MovingObjectPosition mop, EntityPlayer player, ForgeDirection face,
Iterable<IndexedCuboid6> boxes, boolean unused) {
List<Cuboid6> cuboids = new ArrayList<Cuboid6>();
for (IndexedCuboid6 c : boxes)
cuboids.add(c);
return getSelectedCuboid(mop, player, face, cuboids);
}