Conversation
# Conflicts: # src/main/java/com/fouristhenumber/utilitiesinexcess/ClientProxy.java # src/main/java/com/fouristhenumber/utilitiesinexcess/ModBlocks.java # src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java # src/main/java/com/fouristhenumber/utilitiesinexcess/config/blocks/BlockConfig.java
There was a problem hiding this comment.
nitpick: i think this name can be more specific. it doesn't just draw a line. it draws the box and lines(plural)
There was a problem hiding this comment.
yeah agreed, it was originally just going to draw the line but it evolved and the name never changed 🙃
| import net.minecraft.item.ItemBlock; | ||
| import net.minecraft.item.ItemStack; | ||
|
|
||
| import com.fouristhenumber.utilitiesinexcess.common.blocks.*; |
There was a problem hiding this comment.
no star imports (change ur intellij settings?)
| import com.fouristhenumber.utilitiesinexcess.common.renderers.BlackoutCurtainsRenderer; | ||
| import com.fouristhenumber.utilitiesinexcess.common.renderers.LapisAetheriusRenderer; | ||
| import com.fouristhenumber.utilitiesinexcess.common.renderers.SpikeRenderer; | ||
| import com.fouristhenumber.utilitiesinexcess.common.tileentities.*; |
| } | ||
| TileEntityCollector collector = (TileEntityCollector) tile; | ||
|
|
||
| collector.incrementSize(); |
There was a problem hiding this comment.
maybe incrementing size initially just displays the border and then sequential activation of the TE grow the border (given the display is active)
also a little bit of a feature req in shift-click decrementing the size, if its not a pain
|
apart from tooltips and what not, this is more or less good |
| } | ||
|
|
||
| @Override | ||
| public void updateEntity() { |
There was a problem hiding this comment.
this method could be divided.
@Override
public void updateEntity() {
AxisAlignedBB area = getRadiusAABB();
if (worldObj.isRemote) {
updateClientEffects(area);
return;
}
updateServerItemInsertion(area);
}
private void updateClientEffects(AxisAlignedBB area) {
if (borderTimer > 0 && --borderTimer <= 0) {
showBorder = false;
}
itemPositions.clear();
for (EntityItem item :
worldObj.getEntitiesWithinAABB(EntityItem.class, area)) {
if (item.isDead || !item.onGround) {
continue;
}
itemPositions.add(
Vec3.createVectorHelper(
item.posX,
item.posY + 0.25,
item.posZ
)
);
}
}
private void updateServerItemInsertion(AxisAlignedBB area) {
TileEntity te = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if (!(te instanceof IInventory chest)) {
return;
}
ItemSink sink = ItemUtil.getItemSink(chest, ForgeDirection.UP);
if (sink == null) {
return;
}
for (EntityItem item :
worldObj.getEntitiesWithinAABB(EntityItem.class, area)) {
if (item.isDead || !item.onGround || item.delayBeforeCanPickup > 0) {
continue;
}
ItemStack stack = item.getEntityItem();
if (stack == null) {
continue;
}
int leftover = sink.store(new InsertionItemStack(stack));
if (leftover <= 0) {
item.setDead();
} else {
stack.stackSize = leftover;
}
}
}


should work exactly like the EU2 One, just needs textures and tooltips 👍