Merge branch 'master' into inv-touchups

* master:
  Only do multiblock form message/particles if within 10 blocks of the multiblock
  fix #143
  Fix being unable to connect logistical transporters to top of Bins
This commit is contained in:
aidancbrady committed 2019-04-01 01:58:45 -04:00
commit bbb9cf6884
3 files changed
+20 -13

No files matched your search

+15 -10
View File
@@ -208,6 +208,7 @@ import mekanism.common.tile.transmitter.TileEntityThermodynamicConductor;
import mekanism.common.tile.transmitter.TileEntityUniversalCable;
import mekanism.common.util.TextComponentGroup;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.ItemMeshDefinition;
@@ -1000,21 +1001,25 @@ public class ClientProxy extends CommonProxy {
@Override
public void doGenericSparkle(TileEntity tileEntity, INodeChecker checker) {
Minecraft.getMinecraft().player
.sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"),
true);
if (client.enableMultiblockFormationParticles) {
new SparkleAnimation(tileEntity, checker).run();
EntityPlayerSP player = Minecraft.getMinecraft().player;
if (tileEntity.getPos().distanceSq(player.getPosition()) <= 100) {
player.sendStatusMessage(
new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), true);
if (client.enableMultiblockFormationParticles) {
new SparkleAnimation(tileEntity, checker).run();
}
}
}
@Override
public void doMultiblockSparkle(final TileEntityMultiblock<?> tileEntity) {
Minecraft.getMinecraft().player
.sendStatusMessage(new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"),
true);
if (client.enableMultiblockFormationParticles) {
new SparkleAnimation(tileEntity, tile -> MultiblockManager.areEqual(tile, tileEntity)).run();
EntityPlayerSP player = Minecraft.getMinecraft().player;
if (tileEntity.getPos().distanceSq(player.getPosition()) <= 100) {
player.sendStatusMessage(
new TextComponentGroup(TextFormatting.BLUE).translation("chat.mek.multiblockformed"), true);
if (client.enableMultiblockFormationParticles) {
new SparkleAnimation(tileEntity, tile -> MultiblockManager.areEqual(tile, tileEntity)).run();
}
}
}
@@ -135,7 +135,7 @@ public class TransitRequest {
/** slot ID to item count map - this details how many items we will be pulling from each slot */
private Map<Integer, Integer> idMap = new HashMap<>();
private ItemStack toSend;
private ItemStack toSend = ItemStack.EMPTY;
private TransitResponse() {}
@@ -28,8 +28,10 @@ public final class TransporterUtils {
return false;
}
if (tile instanceof TileEntityBin) {
//Special handling for bins that allows them to only be inserted into from the top
if (side != EnumFacing.UP) {
//Special handling to allow bins to only be connected to from the top and bottom by logistical transporters
//TODO: Strip this out when making the capability pass and only actually give the capabilities from the top
// and bottom. For the bottom one maybe even only give it "read only" access.
if (side != EnumFacing.DOWN && side != EnumFacing.UP) {
return false;
}
}