Added spotless back and reformatted

This commit is contained in:
Sebastian Hartte
2020-07-27 20:07:27 +02:00
parent 49296915c9
commit 780f68952b
593 changed files with 4192 additions and 3969 deletions
@@ -1,10 +1,17 @@
package appeng.block.qnb;
import appeng.client.render.cablebus.CubeBuilder;
import appeng.core.Api;
import appeng.core.AppEng;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableList;
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
@@ -24,13 +31,9 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockRenderView;
import javax.annotation.Nullable;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import appeng.client.render.cablebus.CubeBuilder;
import appeng.core.Api;
import appeng.core.AppEng;
class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
@@ -40,12 +43,12 @@ class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
new Identifier(AppEng.MOD_ID, "block/quantum_ring"));
private static final SpriteIdentifier TEXTURE_RING_LIGHT = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
new Identifier(AppEng.MOD_ID, "block/quantum_ring_light"));
private static final SpriteIdentifier TEXTURE_RING_LIGHT_CORNER = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
new Identifier(AppEng.MOD_ID, "block/quantum_ring_light_corner"));
private static final SpriteIdentifier TEXTURE_RING_LIGHT_CORNER = new SpriteIdentifier(
SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier(AppEng.MOD_ID, "block/quantum_ring_light_corner"));
private static final SpriteIdentifier TEXTURE_CABLE_GLASS = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
new Identifier(AppEng.MOD_ID, "part/cable/glass/transparent"));
private static final SpriteIdentifier TEXTURE_COVERED_CABLE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
new Identifier(AppEng.MOD_ID, "part/cable/covered/transparent"));
private static final SpriteIdentifier TEXTURE_COVERED_CABLE = new SpriteIdentifier(
SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier(AppEng.MOD_ID, "part/cable/covered/transparent"));
private static final float DEFAULT_RENDER_MIN = 2.0f;
private static final float DEFAULT_RENDER_MAX = 14.0f;
@@ -89,7 +92,8 @@ class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
}
@Override
public void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {
public void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos pos,
Supplier<Random> randomSupplier, RenderContext context) {
QnbFormedState formedState = getState(blockView, pos);
if (formedState == null) {
@@ -185,7 +189,7 @@ class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
}
private void renderCableAt(CubeBuilder builder, float thickness, Sprite texture, float pull,
Set<Direction> connections) {
Set<Direction> connections) {
builder.setTexture(texture);
if (connections.contains(Direction.WEST)) {
@@ -1,9 +1,14 @@
package appeng.block.qnb;
import appeng.client.render.BasicUnbakedModel;
import appeng.core.AppEng;
import java.util.Collection;
import java.util.function.Function;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableSet;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.ModelBakeSettings;
import net.minecraft.client.render.model.ModelLoader;
@@ -11,10 +16,8 @@ import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.util.Identifier;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.function.Function;
import java.util.stream.Stream;
import appeng.client.render.BasicUnbakedModel;
import appeng.core.AppEng;
public class QnbFormedModel implements BasicUnbakedModel {
@@ -22,7 +25,8 @@ public class QnbFormedModel implements BasicUnbakedModel {
@Nullable
@Override
public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter,
ModelBakeSettings rotationContainer, Identifier modelId) {
BakedModel ringModel = loader.bake(MODEL_RING, rotationContainer);
return new QnbFormedBakedModel(ringModel, textureGetter);
}
@@ -20,11 +20,11 @@ package appeng.block.qnb;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.StateManager;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.BlockPos;
import net.minecraft.block.ShapeContext;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
@@ -1,9 +1,9 @@
package appeng.block.qnb;
import net.minecraft.client.render.RenderLayer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.RenderLayer;
import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.IBlockRendering;
@@ -23,14 +23,14 @@ import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
@@ -51,8 +51,8 @@ public class QuantumLinkChamberBlock extends QuantumBaseBlock {
static {
final double onePixel = 2.0 / 16.0;
SHAPE = VoxelShapes.cuboid(
new Box(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
SHAPE = VoxelShapes
.cuboid(new Box(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
}
public QuantumLinkChamberBlock() {
@@ -65,8 +65,8 @@ public class QuantumLinkChamberBlock extends QuantumBaseBlock {
if (bridge != null) {
if (bridge.hasQES()) {
if (AppEng.instance().shouldAddParticles(rand)) {
AppEng.instance().spawnEffect(EffectType.Energy, w, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5,
null);
AppEng.instance().spawnEffect(EffectType.Energy, w, pos.getX() + 0.5, pos.getY() + 0.5,
pos.getZ() + 0.5, null);
}
}
}
@@ -20,9 +20,9 @@ package appeng.block.qnb;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.BlockPos;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
@@ -51,7 +51,7 @@ public class QuantumRingBlock extends QuantumBaseBlock {
}
private static VoxelShape createShape(double onePixel) {
return VoxelShapes.cuboid(
new Box(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
return VoxelShapes
.cuboid(new Box(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
}
}