Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNijjar committed Jul 14, 2023
1 parent 2fa74d7 commit 1edc6ff
Show file tree
Hide file tree
Showing 145 changed files with 1,507 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion common/src/main/java/earth/terrarium/ad_astra/AdAstra.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void postInit() {
CauldronInteraction.WATER.put(ModItems.SPACE_SUIT.get(), CauldronInteraction.DYED_ITEM);
CauldronInteraction.WATER.put(ModItems.SPACE_PANTS.get(), CauldronInteraction.DYED_ITEM);
CauldronInteraction.WATER.put(ModItems.SPACE_BOOTS.get(), CauldronInteraction.DYED_ITEM);

PlatformUtils.registerStrippedLog(ModBlocks.GLACIAN_LOG.get(), ModBlocks.STRIPPED_GLACIAN_LOG.get());
for (IRecipeConditionSerializer<?> recipeConditionSerializer : ModRecipeConditionSerializers.getSerializers()) {
PlatformUtils.registerRecipeConditionSerializer(recipeConditionSerializer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import net.minecraft.server.packs.resources.PreparableReloadListener;
import net.minecraft.world.inventory.InventoryMenu;
import net.minecraft.world.item.DyeableArmorItem;
import net.minecraft.world.level.FoliageColor;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.Fluid;
Expand Down Expand Up @@ -96,11 +95,11 @@ public static void onRegisterBlockRenderTypes(BiConsumer<RenderType, List<Block>
ClientHooks.setRenderLayer(ModBlocks.VENT.get(), RenderType.cutout());
ModBlocks.GLOBES.stream().forEach(block -> register.accept(RenderType.cutout(), List.of(block.get())));
register.accept(RenderType.cutout(), List.of(
ModBlocks.WATER_PUMP.get(), ModBlocks.ENERGIZER.get(), ModBlocks.STEEL_DOOR.get(), ModBlocks.STEEL_TRAPDOOR.get(), ModBlocks.GLACIAN_DOOR.get(),
ModBlocks.GLACIAN_TRAPDOOR.get(), ModBlocks.AERONOS_DOOR.get(), ModBlocks.AERONOS_TRAPDOOR.get(), ModBlocks.STROPHAR_DOOR.get(), ModBlocks.STROPHAR_TRAPDOOR.get(),
ModBlocks.EXTINGUISHED_TORCH.get(), ModBlocks.WALL_EXTINGUISHED_TORCH.get(), ModBlocks.EXTINGUISHED_LANTERN.get(), ModBlocks.GLACIAN_LEAVES.get(),
ModBlocks.NASA_WORKBENCH.get(), ModBlocks.AERONOS_MUSHROOM.get(), ModBlocks.STROPHAR_MUSHROOM.get(), ModBlocks.AERONOS_LADDER.get(), ModBlocks.STROPHAR_LADDER.get(),
ModBlocks.AERONOS_CHEST.get(), ModBlocks.STROPHAR_CHEST.get()
ModBlocks.WATER_PUMP.get(), ModBlocks.ENERGIZER.get(), ModBlocks.STEEL_DOOR.get(), ModBlocks.STEEL_TRAPDOOR.get(), ModBlocks.GLACIAN_DOOR.get(),
ModBlocks.GLACIAN_TRAPDOOR.get(), ModBlocks.AERONOS_DOOR.get(), ModBlocks.AERONOS_TRAPDOOR.get(), ModBlocks.STROPHAR_DOOR.get(), ModBlocks.STROPHAR_TRAPDOOR.get(),
ModBlocks.EXTINGUISHED_TORCH.get(), ModBlocks.WALL_EXTINGUISHED_TORCH.get(), ModBlocks.EXTINGUISHED_LANTERN.get(), ModBlocks.GLACIAN_LEAVES.get(),
ModBlocks.NASA_WORKBENCH.get(), ModBlocks.AERONOS_MUSHROOM.get(), ModBlocks.STROPHAR_MUSHROOM.get(), ModBlocks.AERONOS_LADDER.get(), ModBlocks.STROPHAR_LADDER.get(),
ModBlocks.AERONOS_CHEST.get(), ModBlocks.STROPHAR_CHEST.get()
));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public void render(ClientLevel level, int ticks, float tickDelta, PoseStack pose
Vector3f rotation = skyObject.rotation();
switch (skyObject.renderType()) {
case STATIC -> {} // Do not modify the scale or rotation
case DYNAMIC -> rotation = new Vector3f(level.getTimeOfDay(tickDelta) * 360.0f + rotation.x(), rotation.y(), rotation.z());
case DYNAMIC ->
rotation = new Vector3f(level.getTimeOfDay(tickDelta) * 360.0f + rotation.x(), rotation.y(), rotation.z());
case SCALING -> scale *= SkyUtil.getScale();
case DEBUG -> rotation = new Vector3f(60, 0, 0); // Test things without restarting Minecraft
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.mojang.math.Vector3f;
import com.teamresourceful.resourcefullib.common.color.Color;
import earth.terrarium.ad_astra.client.resourcepack.PlanetSkyRenderer;
import earth.terrarium.ad_astra.mixin.client.LevelRendererAccessor;
import earth.terrarium.ad_astra.common.level.LevelSeed;
import earth.terrarium.ad_astra.mixin.client.LevelRendererAccessor;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.Camera;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
public class StarInformation {
public static final Color BASE_COLOUR = new Color(255, 255, 255, 255);
public static final Color[] STAR_COLOURS = new Color[]{
BASE_COLOUR,
new Color(204, 238, 255, 255),
new Color(204, 153, 255, 255),
new Color(255, 255, 153, 255),
new Color(255, 204, 102, 255)
BASE_COLOUR,
new Color(204, 238, 255, 255),
new Color(204, 153, 255, 255),
new Color(255, 255, 153, 255),
new Color(255, 204, 102, 255)
};
public static final CacheableBiFunction<Long, Integer, StarInformation> STAR_CACHE = new CacheableBiFunction<>(StarInformation::new);
private final Vector3f[] param1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@Environment(EnvType.CLIENT)
public class ClientModParticles {

public static void onRegisterParticles(BiConsumer<ParticleType<SimpleParticleType>, ClientModParticles.SpriteParticleRegistration<SimpleParticleType> > register) {
public static void onRegisterParticles(BiConsumer<ParticleType<SimpleParticleType>, ClientModParticles.SpriteParticleRegistration<SimpleParticleType>> register) {
register.accept(ModParticleTypes.VENUS_RAIN.get(), SplashParticle.Provider::new);
register.accept(ModParticleTypes.LARGE_FLAME.get(), LargeFlameParticle.Provider::new);
register.accept(ModParticleTypes.LARGE_SMOKE.get(), LargeFlameParticle.Provider::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void init() {

if (slot.equals(EquipmentSlot.CHEST)) {
if (JetSuit.hasFullSet(entity)) {
((JetSuit)stack.getItem()).spawnParticles(entity.level, entity, original);
((JetSuit) stack.getItem()).spawnParticles(entity.level, entity, original);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import earth.terrarium.ad_astra.AdAstra;
import earth.terrarium.ad_astra.client.AdAstraClient;
import earth.terrarium.ad_astra.common.block.door.SlidingDoorBlock;
import earth.terrarium.ad_astra.common.block.door.SlidingDoorBlockEntity;
import earth.terrarium.ad_astra.client.AdAstraClient;
import earth.terrarium.ad_astra.common.registry.ModBlocks;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import com.mojang.math.Vector3f;
import com.mojang.math.Vector4f;
import earth.terrarium.ad_astra.AdAstra;
import earth.terrarium.ad_astra.client.AdAstraClient;
import earth.terrarium.ad_astra.common.block.flag.FlagBlock;
import earth.terrarium.ad_astra.common.block.flag.FlagBlockEntity;
import earth.terrarium.ad_astra.client.AdAstraClient;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -82,8 +82,8 @@ private static void renderFace(FlagBlockEntity entity, PoseStack poseStack, Mult

if (flip) flipY(poseStack, 0.5f);
VertexConsumer vertexConsumer = buffer.getBuffer(getRenderLayer(entity.getOwner()));
renderQuad(poseStack, vertexConsumer, 0.5f, 0.5f, 8f/64f, 8f/64f, 8f/64f, 8f/64f, packedLight, overlay);
renderQuad(poseStack, vertexConsumer, 0.5f, 0.5f, 40f/64f, 8f/64f, 8f/64f, 8f/64f, packedLight, overlay);
renderQuad(poseStack, vertexConsumer, 0.5f, 0.5f, 8f / 64f, 8f / 64f, 8f / 64f, 8f / 64f, packedLight, overlay);
renderQuad(poseStack, vertexConsumer, 0.5f, 0.5f, 40f / 64f, 8f / 64f, 8f / 64f, 8f / 64f, packedLight, overlay);
poseStack.popPose();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class FlagTexture extends SimpleTexture {
public FlagTexture(String url) {
super(DEFAULT_FLAG);
this.request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("User-Agent", "Ad Astra (Minecraft Mod)")
.build();
.uri(URI.create(url))
.header("User-Agent", "Ad Astra (Minecraft Mod)")
.build();
}

@SuppressWarnings({"UnstableApiUsage", "deprecation"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,33 @@ public static LayerDefinition createBodyLayer() {
PartDefinition partdefinition = meshdefinition.getRoot();

PartDefinition head = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 19).mirror().addBox(-4.0F, -9.0F, -4.0F, 8.0F, 9.0F, 8.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(0, 0).mirror().addBox(-4.5F, -18.0F, -4.5F, 9.0F, 10.0F, 9.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(0, 20).mirror().addBox(-1.0F, -3.0F, -6.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(0.0F, 0.0F, 0.0F));
.texOffs(0, 0).mirror().addBox(-4.5F, -18.0F, -4.5F, 9.0F, 10.0F, 9.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(0, 20).mirror().addBox(-1.0F, -3.0F, -6.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(0.0F, 0.0F, 0.0F));

PartDefinition extra_arms = partdefinition.addOrReplaceChild("extra_arms", CubeListBuilder.create(), PartPose.offset(0.0F, 0.0F, 3.0F));

PartDefinition backarm1 = extra_arms.addOrReplaceChild("backarm1", CubeListBuilder.create(), PartPose.offset(-1.2968F, 6.4078F, 0.3907F));

PartDefinition body_r1 = backarm1.addOrReplaceChild("body_r1", CubeListBuilder.create().texOffs(52, 0).addBox(-11.5F, 0.0F, 9.5F, 10.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(36, 0).addBox(-1.5F, 0.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.2968F, -0.4078F, 0.1093F, -0.6109F, -0.6109F, 0.0F));
.texOffs(36, 0).addBox(-1.5F, 0.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.2968F, -0.4078F, 0.1093F, -0.6109F, -0.6109F, 0.0F));

PartDefinition backarm2 = extra_arms.addOrReplaceChild("backarm2", CubeListBuilder.create(), PartPose.offset(1.0F, 6.0F, 1.0F));

PartDefinition body_r2 = backarm2.addOrReplaceChild("body_r2", CubeListBuilder.create().texOffs(52, 0).mirror().addBox(2.0F, 0.0F, 9.5F, 10.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(36, 0).addBox(0.0F, 0.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.5F, 0.0F, -0.5F, -0.6109F, 0.6981F, 0.0F));
.texOffs(36, 0).addBox(0.0F, 0.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.5F, 0.0F, -0.5F, -0.6109F, 0.6981F, 0.0F));

PartDefinition backarm3 = extra_arms.addOrReplaceChild("backarm3", CubeListBuilder.create(), PartPose.offset(-1.0F, 4.0F, 1.0F));

PartDefinition body_r3 = backarm3.addOrReplaceChild("body_r3", CubeListBuilder.create().texOffs(52, 0).addBox(-11.5F, -2.0F, 9.5F, 10.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(36, 0).addBox(-1.5F, -2.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 1.0F, -0.5F, 0.6109F, -0.6109F, 0.0F));
.texOffs(36, 0).addBox(-1.5F, -2.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 1.0F, -0.5F, 0.6109F, -0.6109F, 0.0F));

PartDefinition backarm4 = extra_arms.addOrReplaceChild("backarm4", CubeListBuilder.create(), PartPose.offset(1.0F, 4.0F, 0.0F));

PartDefinition body_r4 = backarm4.addOrReplaceChild("body_r4", CubeListBuilder.create().texOffs(52, 0).mirror().addBox(2.0F, -2.0F, 9.5F, 10.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(36, 0).addBox(0.0F, -2.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.5F, 1.0F, 0.5F, 0.6109F, 0.6109F, 0.0F));
.texOffs(36, 0).addBox(0.0F, -2.0F, -0.5F, 2.0F, 2.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.5F, 1.0F, 0.5F, 0.6109F, 0.6109F, 0.0F));

PartDefinition body = partdefinition.addOrReplaceChild("body", CubeListBuilder.create().texOffs(100, 0).mirror().addBox(0.0F, -12.0F, -5.0F, 8.0F, 12.0F, 6.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(0, 36).mirror().addBox(0.0F, -12.0F, -5.0F, 8.0F, 19.0F, 6.0F, new CubeDeformation(0.5F)).mirror(false), PartPose.offset(-4.0F, 12.0F, 2.0F));
.texOffs(0, 36).mirror().addBox(0.0F, -12.0F, -5.0F, 8.0F, 19.0F, 6.0F, new CubeDeformation(0.5F)).mirror(false), PartPose.offset(-4.0F, 12.0F, 2.0F));

PartDefinition leg0 = partdefinition.addOrReplaceChild("leg0", CubeListBuilder.create().texOffs(0, 81).mirror().addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(2.0F, 12.0F, 0.0F));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public static LayerDefinition createBodyLayer() {
PartDefinition partdefinition = meshdefinition.getRoot();

PartDefinition head = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(3, 19).addBox(-3.5F, -3.8F, -2.9F, 7.0F, 6.0F, 7.0F, new CubeDeformation(0.0F))
.texOffs(50, 53).addBox(1.5F, -5.8F, -0.9F, 4.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(32, 52).addBox(3.5F, -5.8F, 1.1F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(51, 56).addBox(-5.5F, -5.8F, 1.1F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(52, 18).addBox(-5.5F, -5.8F, -0.9F, 4.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 12.8F, -1.9F, 0.0F, 3.1416F, 0.0F));
.texOffs(50, 53).addBox(1.5F, -5.8F, -0.9F, 4.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(32, 52).addBox(3.5F, -5.8F, 1.1F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(51, 56).addBox(-5.5F, -5.8F, 1.1F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(52, 18).addBox(-5.5F, -5.8F, -0.9F, 4.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 12.8F, -1.9F, 0.0F, 3.1416F, 0.0F));

PartDefinition ear_left = head.addOrReplaceChild("ear_left", CubeListBuilder.create().texOffs(21, 38).addBox(-3.3927F, -0.7456F, -1.5F, 4.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-2.9417F, -2.791F, 1.35F, 0.0F, 0.0F, -0.9599F));

Expand All @@ -43,10 +43,10 @@ public static LayerDefinition createBodyLayer() {
PartDefinition right_hind_leg = partdefinition.addOrReplaceChild("right_hind_leg", CubeListBuilder.create().texOffs(12, 30).addBox(-1.5F, -2.0F, -1.5F, 3.0F, 7.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(-3.0F, 20.0F, 9.5F));

PartDefinition body = partdefinition.addOrReplaceChild("body", CubeListBuilder.create().texOffs(0, 40).addBox(-1.25F, -2.8333F, -9.1667F, 3.0F, 2.0F, 3.0F, new CubeDeformation(0.0F))
.texOffs(0, 40).addBox(5.75F, 1.1667F, -2.1667F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-5.25F, -6.8333F, -2.1667F, 11.0F, 8.0F, 10.0F, new CubeDeformation(0.0F))
.texOffs(27, 27).addBox(-5.25F, -4.8333F, -7.1667F, 11.0F, 6.0F, 5.0F, new CubeDeformation(0.0F))
.texOffs(0, 40).addBox(-5.25F, 1.1667F, -2.1667F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.25F, 18.8333F, 5.0333F, 0.0F, 3.1416F, 0.0F));
.texOffs(0, 40).addBox(5.75F, 1.1667F, -2.1667F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-5.25F, -6.8333F, -2.1667F, 11.0F, 8.0F, 10.0F, new CubeDeformation(0.0F))
.texOffs(27, 27).addBox(-5.25F, -4.8333F, -7.1667F, 11.0F, 6.0F, 5.0F, new CubeDeformation(0.0F))
.texOffs(0, 40).addBox(-5.25F, 1.1667F, -2.1667F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.25F, 18.8333F, 5.0333F, 0.0F, 3.1416F, 0.0F));

PartDefinition cube_r1 = body.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 40).addBox(13.0F, -1.0F, 3.0F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(4.75F, 2.1667F, -5.1667F, 0.0F, -1.5708F, 0.0F));

Expand Down
Loading

0 comments on commit 1edc6ff

Please sign in to comment.