yeah whatever this is
@ -34,6 +34,7 @@ public class CraneSplitter extends BlockDummyable implements IConveyorBelt, IEnt
|
||||
@SideOnly(Side.CLIENT) public IIcon iconRight;
|
||||
@SideOnly(Side.CLIENT) public IIcon iconBelt;
|
||||
@SideOnly(Side.CLIENT) public IIcon iconInner;
|
||||
@SideOnly(Side.CLIENT) public IIcon iconInnerSide;
|
||||
|
||||
public CraneSplitter() {
|
||||
super(Material.iron);
|
||||
@ -68,6 +69,7 @@ public class CraneSplitter extends BlockDummyable implements IConveyorBelt, IEnt
|
||||
this.iconRight = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_right");
|
||||
this.iconBelt = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_belt");
|
||||
this.iconInner = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_inner");
|
||||
this.iconInnerSide = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_inner_side");
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@ -61,15 +61,15 @@ public class RenderSplitter implements ISimpleBlockRenderingHandler {
|
||||
private static void drawSplitter(Tessellator tessellator, Block block, boolean isLeft, float rotation, boolean shadeNormals) {
|
||||
CraneSplitter splitter = (CraneSplitter) block;
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Top", isLeft ? splitter.iconTopLeft : splitter.iconTopRight, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Bottom", isLeft ? splitter.iconFrontRight : splitter.iconFrontLeft , tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Bottom", isLeft ? splitter.iconTopRight : splitter.iconTopLeft , tessellator, rotation, shadeNormals);
|
||||
if(isLeft) ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Left", splitter.iconLeft, tessellator, rotation, shadeNormals);
|
||||
if(!isLeft) ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Right", splitter.iconRight, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Back", isLeft ? splitter.iconBackLeft : splitter.iconBackRight, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Front", isLeft ? splitter.iconFrontLeft : splitter.iconFrontRight, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "Inner", splitter.iconInner, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerLeft", splitter.iconInner, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerRight", splitter.iconInner, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerTop", splitter.iconInner, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerLeft", splitter.iconInnerSide, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerRight", splitter.iconInnerSide, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerTop", splitter.iconInnerSide, tessellator, rotation, shadeNormals);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.splitter, "InnerBottom", splitter.iconBelt, tessellator, rotation, shadeNormals);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.network;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.network.CraneInserter;
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
@ -14,6 +15,7 @@ import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -83,27 +85,46 @@ public class TileEntityCraneGrabber extends TileEntityMachineBase implements IGU
|
||||
access = CraneInserter.masquerade(sided, dir.ordinal());
|
||||
}
|
||||
|
||||
List<EntityMovingItem> items = worldObj.getEntitiesWithinAABB(EntityMovingItem.class, AxisAlignedBB.getBoundingBox(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, xCoord + dir.offsetX + 1, yCoord + dir.offsetY + 1, zCoord + dir.offsetZ + 1));
|
||||
|
||||
for(EntityMovingItem item : items) {
|
||||
ItemStack stack = item.getItemStack();
|
||||
boolean match = this.matchesFilter(stack);
|
||||
if(this.isWhitelist && !match || !this.isWhitelist && match) continue;
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
ItemStack copy = stack.copy();
|
||||
int toAdd = Math.min(stack.stackSize, amount);
|
||||
copy.stackSize = toAdd;
|
||||
ItemStack ret = CraneInserter.addToInventory((IInventory) te, access, copy.copy(), dir.ordinal());
|
||||
int didAdd = toAdd - (ret != null ? ret.stackSize : 0);
|
||||
stack.stackSize -= didAdd;
|
||||
|
||||
if(stack.stackSize <= 0) {
|
||||
item.setDead();
|
||||
/*
|
||||
* due to this really primitive way of just offsetting the AABB instead of contracting it, there's a wacky
|
||||
* edge-case where it's possible to feed the grabber by inserting items from the side if there's a triple
|
||||
* lane conveyor in front of the grabbing end. this is such a non-issue that i'm not going to bother trying
|
||||
* to fuck with the AABB further, since that's just a major headache for no practical benefit
|
||||
*/
|
||||
double reach = 1D;
|
||||
if(this.getBlockMetadata() > 1) { //ignore if pointing up or down
|
||||
Block b = worldObj.getBlock(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ);
|
||||
if(b == ModBlocks.conveyor_double) reach = 0.5D;
|
||||
if(b == ModBlocks.conveyor_triple) reach = 0.33D;
|
||||
}
|
||||
|
||||
double x = xCoord + dir.offsetX * reach;
|
||||
double y = yCoord + dir.offsetY * reach;
|
||||
double z = zCoord + dir.offsetZ * reach;
|
||||
List<EntityMovingItem> items = worldObj.getEntitiesWithinAABB(EntityMovingItem.class, AxisAlignedBB.getBoundingBox(x + 0.1875D, y + 0.1875D, z + 0.1875D, x + 0.8125D, y + 0.8125D, z + 0.8125D));
|
||||
|
||||
amount -= didAdd;
|
||||
if(amount <= 0) {
|
||||
break;
|
||||
for(EntityMovingItem item : items) {
|
||||
ItemStack stack = item.getItemStack();
|
||||
boolean match = this.matchesFilter(stack);
|
||||
if(this.isWhitelist && !match || !this.isWhitelist && match) continue;
|
||||
|
||||
ItemStack copy = stack.copy();
|
||||
int toAdd = Math.min(stack.stackSize, amount);
|
||||
copy.stackSize = toAdd;
|
||||
ItemStack ret = CraneInserter.addToInventory((IInventory) te, access, copy, dir.ordinal());
|
||||
int didAdd = toAdd - (ret != null ? ret.stackSize : 0);
|
||||
stack.stackSize -= didAdd;
|
||||
|
||||
if(stack.stackSize <= 0) {
|
||||
item.setDead();
|
||||
}
|
||||
|
||||
amount -= didAdd;
|
||||
if(amount <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3578,7 +3578,6 @@ tile.conveyor.name=Förderband
|
||||
tile.conveyor_chute.name=Förderschütte
|
||||
tile.conveyor_double.name=Zweispuriges Förderband
|
||||
tile.conveyor_lift.name=Kettenaufzug
|
||||
tile.conveyor_splitter.name=Förderband-Teiler
|
||||
tile.conveyor_triple.name=Dreispuriges Förderband
|
||||
tile.corium_block.name=Corium
|
||||
tile.crane_boxer.name=Förderband-Verpacker
|
||||
@ -3586,6 +3585,7 @@ tile.crane_extractor.name=Förderband-Auswerfer
|
||||
tile.crane_grabber.name=Förderband-Greifer
|
||||
tile.crane_inserter.name=Förderband-Einsetzer
|
||||
tile.crane_router.name=Förderband-Sortierer
|
||||
tile.crate_splitter.name=Förderband-Teiler
|
||||
tile.crane_unboxer.name=Förderband-Entpacker
|
||||
tile.crashed_bomb.name=Blindgänger
|
||||
tile.crate.name=Vorratskiste
|
||||
|
||||
@ -4387,7 +4387,6 @@ tile.conveyor.name=Conveyor Belt
|
||||
tile.conveyor_chute.name=Conveyor Chute
|
||||
tile.conveyor_double.name=Double-Lane Conveyor Belt
|
||||
tile.conveyor_lift.name=Conveyor Chain Lift
|
||||
tile.conveyor_splitter.name=Conveyor Splitter
|
||||
tile.conveyor_triple.name=Triple-Lane Conveyor Belt
|
||||
tile.corium_block.name=Corium
|
||||
tile.crane_boxer.name=Conveyor Boxer
|
||||
@ -4395,6 +4394,7 @@ tile.crane_extractor.name=Conveyor Ejector
|
||||
tile.crane_grabber.name=Conveyor Grabber
|
||||
tile.crane_inserter.name=Conveyor Inserter
|
||||
tile.crane_router.name=Conveyor Sorter
|
||||
tile.crane_splitter.name=Conveyor Splitter
|
||||
tile.crane_unboxer.name=Conveyor Unboxer
|
||||
tile.crashed_bomb.name=Dud
|
||||
tile.crate.name=Supply Crate
|
||||
|
||||
@ -31,10 +31,10 @@ v -0.500000 0.250000 0.375000
|
||||
v -0.500000 0.875000 0.375000
|
||||
v 0.000000 0.250000 0.375000
|
||||
v 0.000000 0.875000 0.375000
|
||||
vt 1.000000 0.875000
|
||||
vt 0.500000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.500000 0.875000
|
||||
vt 0.187500 1.000000
|
||||
vt 0.812500 0.500000
|
||||
vt 0.812500 1.000000
|
||||
vt 0.187500 0.500000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
s off
|
||||
f 10/9/3 11/10/3 9/11/3
|
||||
@ -57,10 +57,10 @@ v -0.500000 0.250000 -0.375000
|
||||
v -0.500000 0.875000 -0.375000
|
||||
v 0.000000 0.250000 -0.375000
|
||||
v 0.000000 0.875000 -0.375000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.500000 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.187500 1.000000
|
||||
vt 0.812500 0.500000
|
||||
vt 0.812500 1.000000
|
||||
vt 0.187500 0.500000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
s off
|
||||
f 17/17/5 20/18/5 18/19/5
|
||||
@ -135,10 +135,10 @@ v -0.500000 0.000000 0.500000
|
||||
v 0.500000 0.000000 0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 43/41/11 42/42/11 41/43/11
|
||||
|
||||
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 333 B |
BIN
src/main/resources/assets/hbm/textures/blocks/crane_top_wide.png
Normal file
|
After Width: | Height: | Size: 330 B |