Fix formatting

This commit is contained in:
yueh
2020-07-28 11:44:57 +02:00
parent a65be62cd1
commit 0beab559a6
74 changed files with 221 additions and 188 deletions
@@ -120,10 +120,10 @@ public class EncodedPatternItem extends AEBaseItem {
InvalidPatternHelper invalid = new InvalidPatternHelper(stack);
final ITextComponent label = (invalid.isCraftable() ? GuiText.Crafts.text()
: GuiText.Creates.text()).deepCopy().func_240702_b_(": ");
final ITextComponent and = new StringTextComponent(" ").deepCopy()
.func_230529_a_(GuiText.And.text()).deepCopy().func_240702_b_(" ");
final ITextComponent label = (invalid.isCraftable() ? GuiText.Crafts.text() : GuiText.Creates.text())
.deepCopy().func_240702_b_(": ");
final ITextComponent and = new StringTextComponent(" ").deepCopy().func_230529_a_(GuiText.And.text())
.deepCopy().func_240702_b_(" ");
final ITextComponent with = GuiText.With.text().deepCopy().func_240702_b_(": ");
boolean first = true;
@@ -139,10 +139,8 @@ public class EncodedPatternItem extends AEBaseItem {
}
if (invalid.isCraftable()) {
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy()
.func_240702_b_(" ");
final ITextComponent canSubstitute = invalid.canSubstitute() ? GuiText.Yes.text()
: GuiText.No.text();
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy().func_240702_b_(" ");
final ITextComponent canSubstitute = invalid.canSubstitute() ? GuiText.Yes.text() : GuiText.No.text();
lines.add(substitutionLabel.deepCopy().func_230529_a_(canSubstitute));
}
@@ -160,8 +158,8 @@ public class EncodedPatternItem extends AEBaseItem {
final Collection<IAEItemStack> in = details.getInputs();
final Collection<IAEItemStack> out = details.getOutputs();
final ITextComponent label = (isCrafting ? GuiText.Crafts.text() : GuiText.Creates.text())
.deepCopy().func_240702_b_(": ");
final ITextComponent label = (isCrafting ? GuiText.Crafts.text() : GuiText.Creates.text()).deepCopy()
.func_240702_b_(": ");
final ITextComponent and = new StringTextComponent(" ").deepCopy().func_230529_a_(GuiText.And.text())
.func_240702_b_(" ");
final ITextComponent with = GuiText.With.text().deepCopy().func_240702_b_(": ");
@@ -100,7 +100,7 @@ public class SpatialStorageCellItem extends AEBaseItem implements ISpatialStorag
@Override
public TransitionResult doSpatialTransition(final ItemStack is, final ServerWorld w, final WorldCoord min,
final WorldCoord max, int playerId) {
final WorldCoord max, int playerId) {
final int targetX = max.x - min.x - 1;
final int targetY = max.y - min.y - 1;
final int targetZ = max.z - min.z - 1;
@@ -107,14 +107,15 @@ public class ColorApplicatorItem extends AEBasePoweredItem
public ColorApplicatorItem(Item.Properties props) {
super(AEConfig.instance().getColorApplicatorBattery(), props);
ItemModelsProperties.func_239418_a_(this, new ResourceLocation(AppEng.MOD_ID, "colored"), (itemStack, world, entity) -> {
// If the stack has no color, don't use the colored model since the impact of
// calling getColor for every quad is extremely high, if the stack tries to
// re-search its
// inventory for a new paintball everytime
AEColor col = getActiveColor(itemStack);
return (col != null) ? 1 : 0;
});
ItemModelsProperties.func_239418_a_(this, new ResourceLocation(AppEng.MOD_ID, "colored"),
(itemStack, world, entity) -> {
// If the stack has no color, don't use the colored model since the impact of
// calling getColor for every quad is extremely high, if the stack tries to
// re-search its
// inventory for a new paintball everytime
AEColor col = getActiveColor(itemStack);
return (col != null) ? 1 : 0;
});
}
@Override
@@ -321,7 +322,7 @@ public class ColorApplicatorItem extends AEBasePoweredItem
}
private boolean recolourBlock(final Block blk, final Direction side, final World w, final BlockPos pos,
final AEColor newColor, @Nullable final PlayerEntity p) {
final AEColor newColor, @Nullable final PlayerEntity p) {
final BlockState state = w.getBlockState(pos);
Block recolored = BlockRecolorer.recolor(blk, newColor);
@@ -285,8 +285,9 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
while (penetration > 0 && hasDestroyed) {
hasDestroyed = false;
final AxisAlignedBB bb = new AxisAlignedBB(Math.min(Vector3d.x, Vector3d1.x), Math.min(Vector3d.y, Vector3d1.y),
Math.min(Vector3d.z, Vector3d1.z), Math.max(Vector3d.x, Vector3d1.x), Math.max(Vector3d.y, Vector3d1.y),
final AxisAlignedBB bb = new AxisAlignedBB(Math.min(Vector3d.x, Vector3d1.x),
Math.min(Vector3d.y, Vector3d1.y), Math.min(Vector3d.z, Vector3d1.z),
Math.max(Vector3d.x, Vector3d1.x), Math.max(Vector3d.y, Vector3d1.y),
Math.max(Vector3d.z, Vector3d1.z)).grow(16, 16, 16);
Entity entity = null;
@@ -322,8 +323,8 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
}
}
RayTraceContext rayTraceContext = new RayTraceContext(Vector3d, Vector3d1, RayTraceContext.BlockMode.COLLIDER,
RayTraceContext.FluidMode.NONE, p);
RayTraceContext rayTraceContext = new RayTraceContext(Vector3d, Vector3d1,
RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.NONE, p);
final Vector3d vec = new Vector3d(d0, d1, d2);
RayTraceResult pos = w.rayTraceBlocks(rayTraceContext);
if (entity != null && pos.getType() != RayTraceResult.Type.MISS