Skip to content

Commit

Permalink
Merge pull request #126 from Chainmail-Studios/shnup
Browse files Browse the repository at this point in the history
haha yes
  • Loading branch information
Shnupbups authored Jul 1, 2020
2 parents d72e341 + 273df82 commit b362dc7
Show file tree
Hide file tree
Showing 31 changed files with 122 additions and 40 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ api_version = 0.14.1+build.372-1.16

# Mod
mod_name = astromine
mod_version = 1.0.18
mod_version = 1.0.19
mod_group = com.github.chainmailstudios
version_meta = fabric-1.16.1

# Dependency
cardinal_components_version = 2.4.1
spinnery_version = 3.0.48+fabric-1.16.x
shapes_version = 2.0.0+build.10
patchouli_version = 1.16-37.20-FABRIC
patchouli_version = 1.16-37.21-FABRIC
lba_version=0.7.0

# Conveniences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@

import com.github.chainmailstudios.astromine.client.render.entity.SpaceSlimeEntityRenderer;
import com.github.chainmailstudios.astromine.client.render.entity.SuperSpaceSlimeEntityRenderer;
import com.github.chainmailstudios.astromine.registry.client.AstromineBlockEntityRenderers;
import com.github.chainmailstudios.astromine.registry.client.AstromineClientCallbacks;
import com.github.chainmailstudios.astromine.registry.client.AstromineClientModels;
import com.github.chainmailstudios.astromine.registry.client.AstromineClientPackets;
import com.github.chainmailstudios.astromine.registry.client.AstromineEntityRenderers;
import com.github.chainmailstudios.astromine.registry.client.AstromineParticleFactories;
import com.github.chainmailstudios.astromine.registry.client.AstrominePatchouliPages;
import com.github.chainmailstudios.astromine.registry.client.AstromineRenderLayers;
import com.github.chainmailstudios.astromine.registry.client.AstromineScreens;
import com.github.chainmailstudios.astromine.registry.client.AstromineSkyboxes;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

@Environment(EnvType.CLIENT)
public class AstromineClient implements ClientModInitializer {
Expand All @@ -24,9 +35,6 @@ public void onInitializeClient() {
AstromineClientCallbacks.initialize();
AstromineClientPackets.initialize();
AstromineRenderLayers.initialize();

EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.SPACE_SLIME, (dispatcher, context) -> new SpaceSlimeEntityRenderer(dispatcher));

EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.SUPER_SPACE_SLIME, (dispatcher, context) -> new SuperSpaceSlimeEntityRenderer(dispatcher));
AstrominePatchouliPages.initialize();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.github.chainmailstudios.astromine.client.patchouli;

import com.github.chainmailstudios.astromine.common.recipe.SortingRecipe;
import vazkii.patchouli.client.book.page.abstr.PageSimpleProcessingRecipe;

public class SortingPage extends PageSimpleProcessingRecipe<SortingRecipe> {
public SortingPage() {
super(SortingRecipe.Type.INSTANCE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.github.chainmailstudios.astromine.registry.AstromineBlockEntityTypes;
import com.github.chainmailstudios.astromine.registry.AstromineBlocks;
import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes;
import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;
import nerdhub.cardinal.components.api.component.ComponentProvider;
import org.jetbrains.annotations.NotNull;
import spinnery.widget.api.Color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ protected void initDataTracker() {

@Override
protected void readCustomDataFromTag(CompoundTag tag) {
tag.put("fluid", fluidInventory.write(fluidInventory, Optional.empty(), Optional.empty()));
fluidInventory.read(fluidInventory, tag.getCompound("fluid"), Optional.empty(), Optional.empty());
}

@Override
protected void writeCustomDataToTag(CompoundTag tag) {
fluidInventory.read(fluidInventory, tag.getCompound("fluid"), Optional.empty(), Optional.empty());
tag.put("fluid", fluidInventory.write(fluidInventory, Optional.empty(), Optional.empty()));
}

public Box getHardCollisionBox(Entity collidingEntity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;

import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

public class FireExtinguisherItem extends Item {
long lastPlayed = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import com.github.chainmailstudios.astromine.common.block.HolographicBridgeProjectorBlock;
import com.github.chainmailstudios.astromine.common.block.entity.HolographicBridgeProjectorBlockEntity;
import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;
import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap;

public class HolographicConnectorItem extends Item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.github.chainmailstudios.astromine.registry.AstromineEntityTypes;
import com.github.chainmailstudios.astromine.registry.AstromineItems;
import com.github.chainmailstudios.astromine.registry.AstromineParticles;
import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.github.chainmailstudios.astromine.common.entity.projectile.BulletEntity;
import com.github.chainmailstudios.astromine.common.utilities.ClientUtilities;
import com.github.chainmailstudios.astromine.registry.AstromineEntityTypes;
import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.common.item.weapon.BaseWeapon;
import com.github.chainmailstudios.astromine.registry.AstromineItems;
import com.github.chainmailstudios.astromine.registry.AstromineSounds;
import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

public class Weaponry {
public static final class ScarH extends BaseWeapon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.github.chainmailstudios.astromine.common.utilities.FractionUtilities;
import com.github.chainmailstudios.astromine.common.volume.energy.EnergyVolume;
import com.github.chainmailstudios.astromine.common.volume.fluid.FluidVolume;
import com.github.chainmailstudios.astromine.registry.AstromineBlocks;
import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes;

import com.google.gson.Gson;
Expand Down Expand Up @@ -117,6 +118,11 @@ public DefaultedList<Ingredient> getPreviewInputs() {
return DefaultedList.of(); // we are not dealing with items
}

@Override
public ItemStack getRecipeKindIcon() {
return new ItemStack(AstromineBlocks.ELECTROLYZER);
}

public Identifier getIdentifier() {
return identifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.github.chainmailstudios.astromine.common.utilities.FractionUtilities;
import com.github.chainmailstudios.astromine.common.volume.energy.EnergyVolume;
import com.github.chainmailstudios.astromine.common.volume.fluid.FluidVolume;
import com.github.chainmailstudios.astromine.registry.AstromineBlocks;
import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes;

import com.google.gson.Gson;
Expand Down Expand Up @@ -117,6 +118,11 @@ public DefaultedList<Ingredient> getPreviewInputs() {
return DefaultedList.of(); // we are not dealing with items
}

@Override
public ItemStack getRecipeKindIcon() {
return new ItemStack(AstromineBlocks.FUEL_MIXER);
}

public Identifier getIdentifier() {
return identifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.github.chainmailstudios.astromine.common.utilities.FractionUtilities;
import com.github.chainmailstudios.astromine.common.volume.energy.EnergyVolume;
import com.github.chainmailstudios.astromine.common.volume.fluid.FluidVolume;
import com.github.chainmailstudios.astromine.registry.AstromineBlocks;
import com.github.chainmailstudios.astromine.registry.AstromineComponentTypes;

import com.google.gson.Gson;
Expand Down Expand Up @@ -100,7 +101,12 @@ public RecipeType<?> getType() {
public DefaultedList<Ingredient> getPreviewInputs() {
return DefaultedList.of(); // we are not dealing with items
}


@Override
public ItemStack getRecipeKindIcon() {
return new ItemStack(AstromineBlocks.LIQUID_GENERATOR);
}

public Fluid getFluid() {
return fluid.get();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.chainmailstudios.astromine.common.recipe;

import net.minecraft.block.Blocks;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf;
Expand All @@ -20,6 +21,7 @@
import com.github.chainmailstudios.astromine.common.utilities.PacketUtilities;
import com.github.chainmailstudios.astromine.common.utilities.ParsingUtilities;
import com.github.chainmailstudios.astromine.common.utilities.StackUtilities;
import com.github.chainmailstudios.astromine.registry.AstromineBlocks;

import com.google.common.collect.Lists;
import com.google.gson.Gson;
Expand Down Expand Up @@ -100,6 +102,11 @@ public DefaultedList<Ingredient> getPreviewInputs() {
defaultedList.add(this.input);
return defaultedList;
}

@Override
public ItemStack getRecipeKindIcon() {
return new ItemStack(AstromineBlocks.SORTER);
}

public int getTimeTotal() {
return timeTotal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.chainmailstudios.astromine.mixin;

import com.github.chainmailstudios.astromine.client.model.RocketEntityModel;
import com.github.chainmailstudios.astromine.registry.AstromineClientModels;
import com.github.chainmailstudios.astromine.registry.client.AstromineClientModels;
import com.github.chainmailstudios.astromine.registry.AstromineItems;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.util.math.MatrixStack;

import com.github.chainmailstudios.astromine.registry.AstromineScreens;
import com.github.chainmailstudios.astromine.registry.client.AstromineScreens;
import spinnery.widget.api.Position;

@Mixin(InGameHud.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Lazy;

import com.github.chainmailstudios.astromine.registry.client.AstromineSounds;

import java.util.function.Supplier;

public class AstromineArmorMaterials {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;

Expand All @@ -8,6 +8,7 @@
import net.minecraft.client.render.block.entity.BlockEntityRenderer;

import com.github.chainmailstudios.astromine.client.render.block.HolographicBridgeBlockEntityRenderer;
import com.github.chainmailstudios.astromine.registry.AstromineBlockEntityTypes;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.fabric.api.event.client.ClientTickCallback;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.client.model.RocketEntityModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand All @@ -9,6 +9,8 @@

import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.common.entity.RocketEntity;
import com.github.chainmailstudios.astromine.registry.AstromineCommonPackets;
import com.github.chainmailstudios.astromine.registry.AstromineEntityTypes;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;

import com.github.chainmailstudios.astromine.client.render.entity.BulletEntityRenderer;
import com.github.chainmailstudios.astromine.client.render.entity.RocketEntityRenderer;
import com.github.chainmailstudios.astromine.client.render.entity.SpaceSlimeEntityRenderer;
import com.github.chainmailstudios.astromine.client.render.entity.SuperSpaceSlimeEntityRenderer;
import com.github.chainmailstudios.astromine.registry.AstromineEntityTypes;

public class AstromineEntityRenderers {
public static void initialize() {
EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.BULLET_ENTITY_TYPE, BulletEntityRenderer::new);
EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.ROCKET, RocketEntityRenderer::new);
EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.SPACE_SLIME, (dispatcher, context) -> new SpaceSlimeEntityRenderer(dispatcher));
EntityRendererRegistry.INSTANCE.register(AstromineEntityTypes.SUPER_SPACE_SLIME, (dispatcher, context) -> new SuperSpaceSlimeEntityRenderer(dispatcher));
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import com.github.chainmailstudios.astromine.client.particle.RocketFlameParticle;
import com.github.chainmailstudios.astromine.registry.AstromineItems;
import com.github.chainmailstudios.astromine.registry.AstromineParticles;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.client.patchouli.SortingPage;
import vazkii.patchouli.client.book.ClientBookRegistry;

@Environment(EnvType.CLIENT)
public class AstrominePatchouliPages {
@Environment(EnvType.CLIENT)
public static void initialize() {
ClientBookRegistry.INSTANCE.pageTypes.put(AstromineCommon.identifier("sorting"), SortingPage.class);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import com.github.chainmailstudios.astromine.client.screen.*;
import com.github.chainmailstudios.astromine.common.container.*;
Expand All @@ -7,6 +7,7 @@
import net.fabricmc.fabric.api.client.screenhandler.v1.ScreenRegistry;

import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.registry.AstromineContainers;
import spinnery.client.screen.InGameHudScreen;
import spinnery.widget.WInterface;
import spinnery.widget.WStaticImage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import com.github.chainmailstudios.astromine.AstromineCommon;
import com.github.chainmailstudios.astromine.client.registry.SkyboxRegistry;
import com.github.chainmailstudios.astromine.client.render.sky.skybox.SpaceSkybox;
import com.github.chainmailstudios.astromine.registry.AstromineDimensionTypes;

public class AstromineSkyboxes {
public static void initialize() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.chainmailstudios.astromine.registry;
package com.github.chainmailstudios.astromine.registry.client;

import net.minecraft.sound.SoundEvent;
import net.minecraft.util.registry.Registry;
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/assets/astromine/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,5 +370,7 @@
"text.astromine.world.meteors.page_one.text": "Foreign bodies that, cruising through the stairs, collided with a planetary body; said to contain $(thing)$(l:world/meteor_ores)extraterrestrial ores$().",
"text.astromine.world.ore_clusters.title": "Ore Clusters",
"text.astromine.world.ore_clusters.page_one.title": "Ore Clusters",
"text.astromine.world.ore_clusters.page_one.text": "Clusters of ores obtained from $(thing)$(l:world/asteroid_ores)asteroid ores$() or $(thing)$(l:world/meteor_ores)meteor ores$(), which may be processed for resources."
"text.astromine.world.ore_clusters.page_one.text": "Clusters of ores obtained from $(thing)$(l:world/asteroid_ores)asteroid ores$() or $(thing)$(l:world/meteor_ores)meteor ores$(), which may be processed for resources.",
"text.astromine.world.ore_clusters.page_two.title": "Processing",
"text.astromine.world.ore_clusters.page_two.text": "Sorting clusters will result in two of their respective $(thing)dusts$()."
}
Loading

0 comments on commit b362dc7

Please sign in to comment.