mirror of
https://github.com/TicTicBoooom-Mods/MasterfulMachinery.git
synced 2026-01-18 16:37:23 +01:00
1.16 rewrite start
This commit is contained in:
@@ -54,7 +54,6 @@ minecraft {
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
arg '-mixin.config=masterfulmachinery.mixins.json'
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
// The markers can be changed as needed.
|
||||
@@ -67,8 +66,6 @@ minecraft {
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
|
||||
mods {
|
||||
masterfulmachinery {
|
||||
source sourceSets.main
|
||||
@@ -92,7 +89,7 @@ minecraft {
|
||||
// Recommended logging level for the console
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
property 'forge.logging.console.level', 'info'
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
|
||||
mods {
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"controllerId": "basic",
|
||||
"name": "Basic",
|
||||
"ports": [
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"textureOverride": "minecraft:block/white_terracotta",
|
||||
"name": "Item",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:energy",
|
||||
"name": "Energy",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 1000000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"name": "Fluid",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 5000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:pncr_pressure",
|
||||
"name": "Pressure",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"criticalPressure": 7,
|
||||
"dangerPressure": 5,
|
||||
"volume": 7000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:botania_mana",
|
||||
"name": "Mana",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 50000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"name": "Starlight",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 500
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:create_rotation",
|
||||
"name": "Rotation",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"stress": 32
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_gas",
|
||||
"name": "Gas",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_slurry",
|
||||
"name": "Slurry",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_infuse",
|
||||
"name": "Infuse",
|
||||
"id": "simple",
|
||||
"data": {
|
||||
"capacity": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:weather",
|
||||
"name": "Weather",
|
||||
"id": "simple",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
{
|
||||
"controllerId": "mid",
|
||||
"name": "Mid",
|
||||
"ports": [
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Item",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"rows": 3,
|
||||
"columns": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:energy",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Energy",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 1000000000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Fluid",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 10000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:pncr_pressure",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Pressure",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"criticalPressure": 7,
|
||||
"dangerPressure": 5,
|
||||
"volume": 10000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:botania_mana",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Mana",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Starlight",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:create_rotation",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Rotation",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"stress": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_gas",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Gas",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 100000000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_slurry",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Slurry",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 100000000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_infuse",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Infuse",
|
||||
"id": "intermediate",
|
||||
"data": {
|
||||
"capacity": 100000000
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "masterfulmachinery:weather",
|
||||
"textureOverride": "minecraft:block/red_terracotta",
|
||||
"name": "Weather",
|
||||
"id": "intermediate",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
3
plans/port-config.md
Normal file
3
plans/port-config.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## port ideas
|
||||
- configure ingame
|
||||
- datapack config
|
||||
@@ -1,8 +1,55 @@
|
||||
package com.ticticboooom.mods.mm;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import com.ticticboooom.mods.mm.block.ter.model.ControllerBlockModel;
|
||||
import com.ticticboooom.mods.mm.setup.MMBlocks;
|
||||
import com.ticticboooom.mods.mm.setup.MMItems;
|
||||
import com.ticticboooom.mods.mm.setup.MMTiles;
|
||||
import net.minecraft.client.renderer.BlockModelShapes;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.RenderTypeLookup;
|
||||
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.MultiLayerModel;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.thread.EffectiveSide;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
|
||||
@Mod(Ref.MOD_ID)
|
||||
public class ModRoot {
|
||||
public ModRoot() {
|
||||
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
MMTiles.TILES.register(bus);
|
||||
MMBlocks.BLOCKS.register(bus);
|
||||
MMItems.ITEMS.register(bus);
|
||||
|
||||
if (EffectiveSide.get().isClient()){
|
||||
bus.addListener(ModRoot::modelRegistry);
|
||||
bus.addListener(ModRoot::bake);
|
||||
bus.addListener(ModRoot::clientSetup);
|
||||
}
|
||||
}
|
||||
|
||||
public static void bake(ModelBakeEvent event){
|
||||
MMBlocks.CONTROLLER.get().getStateContainer().getValidStates().forEach(blockState -> {
|
||||
ModelResourceLocation modelLocation = BlockModelShapes.getModelLocation(blockState);
|
||||
event.getModelRegistry().put(modelLocation, ControllerBlockModel.INSTANCE);
|
||||
});
|
||||
event.getModelRegistry().put(new ModelResourceLocation(MMItems.CONTROLLER.getId(), "inventory"), ControllerBlockModel.INSTANCE);
|
||||
}
|
||||
|
||||
public static void modelRegistry(ModelRegistryEvent event){
|
||||
ModelLoader.addSpecialModel(MMBlocks.CONTROLLER.getId());
|
||||
}
|
||||
|
||||
public static void clientSetup(FMLClientSetupEvent event){
|
||||
event.enqueueWork(() -> {
|
||||
RenderTypeLookup.setRenderLayer(MMBlocks.CONTROLLER.get(), RenderType.getTranslucent());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
package com.ticticboooom.mods.mm;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.system.CallbackI;
|
||||
|
||||
public class Ref {
|
||||
public static final String MOD_ID = "masterfulmachinery";
|
||||
public static ResourceLocation res(String path){
|
||||
return new ResourceLocation(MOD_ID, path);
|
||||
}
|
||||
|
||||
public static final ResourceLocation CONTROLLER_OVERLAY_MODEL = res("controller_model");
|
||||
|
||||
public static final ResourceLocation JEI_PLUGIN = res("jei");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ticticboooom.mods.mm.block;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import com.ticticboooom.mods.mm.setup.MMTiles;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.MultiLayerModel;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControllerBlock extends Block {
|
||||
public ControllerBlock() {
|
||||
super(Properties.create(Material.IRON));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return MMTiles.CONTROLLER.get().create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ticticboooom.mods.mm.block.item;
|
||||
|
||||
import com.ticticboooom.mods.mm.block.tile.ControllerTile;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.setup.MMBlocks;
|
||||
import com.ticticboooom.mods.mm.util.ControllerHelper;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControllerBlockItem extends BlockItem {
|
||||
public ControllerBlockItem() {
|
||||
super(MMBlocks.CONTROLLER.get(), new Properties().group(MMItemGroup.INSTANCE));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onBlockPlaced(BlockPos pos, World worldIn, @Nullable PlayerEntity player, ItemStack stack, BlockState state) {
|
||||
ResourceLocation loc = ControllerHelper.getId(stack);
|
||||
if (loc == null) {
|
||||
return false;
|
||||
}
|
||||
if (!DataRegistry.CONTROLLERS.containsKey(loc)){
|
||||
return false;
|
||||
}
|
||||
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||
if (tileEntity instanceof ControllerTile) {
|
||||
ControllerTile controller = (ControllerTile) tileEntity;
|
||||
controller.controllerModel = DataRegistry.CONTROLLERS.get(loc);
|
||||
}
|
||||
return super.onBlockPlaced(pos, worldIn, player, stack, state);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ticticboooom.mods.mm.block.item;
|
||||
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.setup.MMItems;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
public class MMItemGroup extends ItemGroup {
|
||||
|
||||
public static final MMItemGroup INSTANCE = new MMItemGroup();
|
||||
|
||||
public MMItemGroup() {
|
||||
super("masterfulmachinery");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(Items.ACACIA_PLANKS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fill(NonNullList<ItemStack> items) {
|
||||
items.addAll(getControllers());
|
||||
super.fill(items);
|
||||
}
|
||||
|
||||
private NonNullList<ItemStack> getControllers() {
|
||||
NonNullList<ItemStack> controllers = NonNullList.create();
|
||||
for (Map.Entry<ResourceLocation, ControllerModel> entry : DataRegistry.CONTROLLERS.entrySet()) {
|
||||
ItemStack stack = new ItemStack(MMItems.CONTROLLER.get());
|
||||
CompoundNBT tag = stack.getOrCreateTag();
|
||||
tag.putString("Controller", entry.getValue().id.toString());
|
||||
controllers.add(stack);
|
||||
}
|
||||
return controllers;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ticticboooom.mods.mm.block.ter;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import com.ticticboooom.mods.mm.block.tile.ControllerTile;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraftforge.client.model.MultiLayerModel;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
|
||||
public class ControllerTER extends TileEntityRenderer<ControllerTile> {
|
||||
public ControllerTER(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(ControllerTile tile, float partialTicks, MatrixStack mat, IRenderTypeBuffer buff, int combinedLightIn, int combinedOverlayIn) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ticticboooom.mods.mm.block.ter.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.FlywheelClient;
|
||||
import com.jozufozu.flywheel.core.QuadConverter;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import com.simibubi.create.content.contraptions.components.flywheel.FlyWheelInstance;
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.util.ControllerHelper;
|
||||
import com.ticticboooom.mods.mm.util.ModelTools;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.QuadTransformer;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
import net.minecraftforge.client.model.data.IDynamicBakedModel;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelProperty;
|
||||
import net.minecraftforge.client.model.generators.ModelBuilder;
|
||||
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.print.attribute.standard.Sides;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ControllerBlockModel implements IDynamicBakedModel {
|
||||
|
||||
public static final ModelProperty<ControllerModel> CONTROLLER = new ModelProperty<>();
|
||||
public static final ControllerBlockModel INSTANCE = new ControllerBlockModel();
|
||||
public static final ControllerItemOverrideList OVERRIDE_LIST = new ControllerItemOverrideList();
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData data) {
|
||||
List<BakedQuad> quads = getModel(data).getQuads(state, side, rand, data);
|
||||
return quads;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideLit() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture(@Nonnull IModelData data) {
|
||||
return getModel(data).getParticleTexture(data);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture() {
|
||||
return this.getParticleTexture(EmptyModelData.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides() {
|
||||
return OVERRIDE_LIST;
|
||||
}
|
||||
|
||||
private IBakedModel getModel(IModelData data) {
|
||||
if (!data.hasProperty(CONTROLLER) || data.getData(CONTROLLER) == null) {
|
||||
return Minecraft.getInstance().getModelManager().getMissingModel();
|
||||
}
|
||||
ControllerModel controller = data.getData(CONTROLLER);
|
||||
IBakedModel model = controller.defaultModel.getModel();
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ticticboooom.mods.mm.block.ter.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverride;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControllerItemOverrideList extends ItemOverrideList {
|
||||
@Nullable
|
||||
@Override
|
||||
public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity livingEntity) {
|
||||
if (!stack.hasTag()) {
|
||||
return super.getOverrideModel(model, stack, world, livingEntity);
|
||||
}
|
||||
CompoundNBT tag = stack.getTag();
|
||||
if (!tag.contains("Controller")){
|
||||
return super.getOverrideModel(model, stack, world, livingEntity);
|
||||
}
|
||||
|
||||
String controller = tag.getString("Controller");
|
||||
ResourceLocation resourceLocation = ResourceLocation.tryCreate(controller);
|
||||
if (resourceLocation == null){
|
||||
return super.getOverrideModel(model, stack, world, livingEntity);
|
||||
}
|
||||
|
||||
if (!DataRegistry.CONTROLLERS.containsKey(resourceLocation)) {
|
||||
return super.getOverrideModel(model, stack, world, livingEntity);
|
||||
}
|
||||
|
||||
ControllerModel controllerModel = DataRegistry.CONTROLLERS.get(resourceLocation);
|
||||
return controllerModel.defaultModel.getModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ticticboooom.mods.mm.block.tile;
|
||||
|
||||
import com.ticticboooom.mods.mm.block.ter.model.ControllerBlockModel;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.setup.MMTiles;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ControllerTile extends TileEntity implements ITickableTileEntity {
|
||||
public ControllerTile() {
|
||||
super(MMTiles.CONTROLLER.get());
|
||||
}
|
||||
|
||||
public ControllerModel controllerModel;
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IModelData getModelData() {
|
||||
return new ModelDataMap.Builder().withInitial(ControllerBlockModel.CONTROLLER, controllerModel).build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ticticboooom.mods.mm.data;
|
||||
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.data.model.PortModel;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class DataRegistry {
|
||||
public static final Map<ResourceLocation, ControllerModel> CONTROLLERS = new HashMap<>();
|
||||
public static final Map<ResourceLocation, PortModel> PORTS = new HashMap<>();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ticticboooom.mods.mm.data.model;
|
||||
|
||||
import com.ticticboooom.mods.mm.data.model.base.BlockstateModel;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
public class ControllerModel {
|
||||
public ResourceLocation id;
|
||||
public ITextComponent name;
|
||||
public BlockstateModel defaultModel;
|
||||
|
||||
public ControllerModel copy() {
|
||||
ControllerModel result = new ControllerModel();
|
||||
result.id = id;
|
||||
result.name = name;
|
||||
result.defaultModel = defaultModel.copy();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ticticboooom.mods.mm.data.model;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
public class PortModel {
|
||||
public ResourceLocation controllerId;
|
||||
public ResourceLocation id;
|
||||
public ITextComponent name;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ticticboooom.mods.mm.data.model.base;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockModelShapes;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BlockstateModel {
|
||||
public ResourceLocation block;
|
||||
public Map<String, String> properties;
|
||||
|
||||
public BlockState createState() {
|
||||
CompoundNBT nbt = new CompoundNBT();
|
||||
nbt.putString("Name", block.toString());
|
||||
CompoundNBT props = new CompoundNBT();
|
||||
for (Map.Entry<String, String> entry : properties.entrySet()) {
|
||||
props.putString(entry.getKey(), entry.getValue());
|
||||
}
|
||||
nbt.put("Properties", props);
|
||||
return NBTUtil.readBlockState(nbt);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public IBakedModel getModel() {
|
||||
return Minecraft.getInstance().getModelManager().getModel(BlockModelShapes.getModelLocation(createState()));
|
||||
}
|
||||
|
||||
public BlockstateModel copy() {
|
||||
BlockstateModel result = new BlockstateModel();
|
||||
result.block = block;
|
||||
result.properties = new HashMap<>();
|
||||
result.properties.putAll(properties);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ticticboooom.mods.mm.data.reload;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.data.util.ParserUtils;
|
||||
import net.minecraft.client.resources.JsonReloadListener;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.AddReloadListenerEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
|
||||
public class ControllerReloadListener extends JsonReloadListener {
|
||||
public static final Gson GSON = new Gson();
|
||||
|
||||
public ControllerReloadListener() {
|
||||
super(GSON, "masterfulmachinery/controllers");
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void on(AddReloadListenerEvent event) {
|
||||
event.addListener(new ControllerReloadListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Map<ResourceLocation, JsonElement> objectIn, IResourceManager resourceManagerIn, IProfiler profilerIn) {
|
||||
for (Map.Entry<ResourceLocation, JsonElement> entry : objectIn.entrySet()) {
|
||||
DataRegistry.CONTROLLERS.put(entry.getKey(), parse(entry.getKey(), entry.getValue().getAsJsonObject()));
|
||||
}
|
||||
}
|
||||
|
||||
private ControllerModel parse(ResourceLocation res, JsonObject json) {
|
||||
ControllerModel model = new ControllerModel();
|
||||
model.id = res;
|
||||
model.name = ParserUtils.parseTextComponent(json.get("name"));
|
||||
model.defaultModel = ParserUtils.parseBlockState(json.getAsJsonObject("defaultModel"));
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ticticboooom.mods.mm.data.reload;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.PortModel;
|
||||
import com.ticticboooom.mods.mm.data.util.ParserUtils;
|
||||
import net.minecraft.client.resources.JsonReloadListener;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.AddReloadListenerEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
|
||||
public class PortConfigurationReloadListener extends JsonReloadListener {
|
||||
public static final Gson GSON = new Gson();
|
||||
|
||||
public PortConfigurationReloadListener() {
|
||||
super(GSON, "masterfulmachinery/ports");
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void on(AddReloadListenerEvent event) {
|
||||
event.addListener(new PortConfigurationReloadListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Map<ResourceLocation, JsonElement> objectIn, IResourceManager resourceManagerIn, IProfiler profilerIn) {
|
||||
for (Map.Entry<ResourceLocation, JsonElement> entry : objectIn.entrySet()) {
|
||||
DataRegistry.PORTS.put(entry.getKey(), parse(entry.getKey(), entry.getValue().getAsJsonObject()));
|
||||
}
|
||||
}
|
||||
|
||||
private PortModel parse(ResourceLocation res, JsonObject json) {
|
||||
PortModel model = new PortModel();
|
||||
model.id = res;
|
||||
model.name = ParserUtils.parseTextComponent(json.get("name"));
|
||||
model.controllerId = ResourceLocation.tryCreate(json.get("controllerId").getAsString());
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.ticticboooom.mods.mm.data;
|
||||
package com.ticticboooom.mods.mm.data.reload;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import net.minecraft.client.resources.JsonReloadListener;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IFutureReloadListener;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.AddReloadListenerEvent;
|
||||
@@ -12,20 +11,18 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
|
||||
public class MMReloadListener extends JsonReloadListener {
|
||||
public class StructureReloadListener extends JsonReloadListener {
|
||||
public static final Gson GSON = new Gson();
|
||||
|
||||
public MMReloadListener() {
|
||||
public StructureReloadListener() {
|
||||
super(GSON, "masterfulmachinery/machines");
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void on(AddReloadListenerEvent event) {
|
||||
event.getListeners().add(new MMReloadListener());
|
||||
event.addListener(new StructureReloadListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ticticboooom.mods.mm.data.util;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ticticboooom.mods.mm.data.model.base.BlockstateModel;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ParserUtils {
|
||||
public static ITextComponent parseTextComponent(JsonElement elem) {
|
||||
if (elem.isJsonObject()) {
|
||||
JsonObject nameObj = elem.getAsJsonObject();
|
||||
String type = nameObj.get("type").getAsString();
|
||||
String key = nameObj.get("key").getAsString();
|
||||
if (type.equals("translation")) {
|
||||
return new TranslationTextComponent(key);
|
||||
} else if (type.equals("string")) {
|
||||
return new StringTextComponent(key);
|
||||
}
|
||||
}
|
||||
return new StringTextComponent(elem.getAsString());
|
||||
}
|
||||
|
||||
public static BlockstateModel parseBlockState(JsonObject obj) {
|
||||
BlockstateModel model = new BlockstateModel();
|
||||
model.block = ResourceLocation.tryCreate(obj.get("block").getAsString());
|
||||
model.properties = new HashMap<>();
|
||||
JsonObject properties = obj.get("properties").getAsJsonObject();
|
||||
for (Map.Entry<String, JsonElement> entry : properties.entrySet()) {
|
||||
model.properties.put(entry.getKey(), entry.getValue().getAsString());
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ticticboooom.mods.mm.integration.jei;
|
||||
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.data.DataRegistry;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.integration.jei.ingredients.controller.ControllerIngredientHelper;
|
||||
import com.ticticboooom.mods.mm.integration.jei.ingredients.controller.ControllerIngredientRenderer;
|
||||
import com.ticticboooom.mods.mm.integration.jei.ingredients.controller.ControllerIngredientType;
|
||||
import com.ticticboooom.mods.mm.integration.jei.ingredients.controller.ControllerIngredientTypeInterpreter;
|
||||
import com.ticticboooom.mods.mm.setup.MMItems;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.JeiPlugin;
|
||||
import mezz.jei.api.registration.IModIngredientRegistration;
|
||||
import mezz.jei.api.registration.ISubtypeRegistration;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
@JeiPlugin
|
||||
public class MMJeiPlugin implements IModPlugin {
|
||||
|
||||
public static final ControllerIngredientType CONTROLLER_TYPE = new ControllerIngredientType();
|
||||
public static final ControllerIngredientHelper CONTROLLER_HELPER = new ControllerIngredientHelper();
|
||||
public static final ControllerIngredientRenderer CONTROLLER_RENDERER = new ControllerIngredientRenderer();
|
||||
|
||||
@Override
|
||||
public ResourceLocation getPluginUid() {
|
||||
return Ref.JEI_PLUGIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIngredients(IModIngredientRegistration registration) {
|
||||
ArrayList<ItemStack> controllers = new ArrayList<>();
|
||||
for (Map.Entry<ResourceLocation, ControllerModel> entry : DataRegistry.CONTROLLERS.entrySet()) {
|
||||
ItemStack stack = new ItemStack(MMItems.CONTROLLER.get());
|
||||
CompoundNBT tag = stack.getOrCreateTag();
|
||||
tag.putString("Controller", entry.getValue().id.toString());
|
||||
controllers.add(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerItemSubtypes(ISubtypeRegistration registration) {
|
||||
registration.registerSubtypeInterpreter(MMItems.CONTROLLER.get(), new ControllerIngredientTypeInterpreter());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ticticboooom.mods.mm.integration.jei.ingredients.controller;
|
||||
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import mezz.jei.api.ingredients.IIngredientHelper;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControllerIngredientHelper implements IIngredientHelper<ControllerModel> {
|
||||
@Nullable
|
||||
@Override
|
||||
public ControllerModel getMatch(Iterable<ControllerModel> ingredients, ControllerModel ingredientToMatch) {
|
||||
return ingredientToMatch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName(ControllerModel ingredient) {
|
||||
return "MM Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueId(ControllerModel ingredient) {
|
||||
return ingredient.id.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModId(ControllerModel ingredient) {
|
||||
return Ref.MOD_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResourceId(ControllerModel ingredient) {
|
||||
return ingredient.id.getPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControllerModel copyIngredient(ControllerModel ingredient) {
|
||||
return ingredient.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorInfo(@Nullable ControllerModel ingredient) {
|
||||
return "Error";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ticticboooom.mods.mm.integration.jei.ingredients.controller;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import mezz.jei.api.ingredients.IIngredientRenderer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ControllerIngredientRenderer implements IIngredientRenderer<ControllerModel> {
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack matrixStack, int xPosition, int yPosition, @Nullable ControllerModel ingredient) {
|
||||
BlockState state = ingredient.defaultModel.createState();
|
||||
matrixStack.push();
|
||||
Minecraft.getInstance().getItemRenderer().renderItemIntoGUI(new ItemStack(state.getBlock().asItem()), xPosition, yPosition);
|
||||
matrixStack.pop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ITextComponent> getTooltip(ControllerModel ingredient, ITooltipFlag tooltipFlag) {
|
||||
return ImmutableList.of(ingredient.name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ticticboooom.mods.mm.integration.jei.ingredients.controller;
|
||||
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import mezz.jei.api.ingredients.IIngredientType;
|
||||
|
||||
public class ControllerIngredientType implements IIngredientType<ControllerModel> {
|
||||
@Override
|
||||
public Class<? extends ControllerModel> getIngredientClass() {
|
||||
return ControllerModel.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ticticboooom.mods.mm.integration.jei.ingredients.controller;
|
||||
|
||||
import com.ticticboooom.mods.mm.block.item.ControllerBlockItem;
|
||||
import com.ticticboooom.mods.mm.data.model.ControllerModel;
|
||||
import com.ticticboooom.mods.mm.util.ControllerHelper;
|
||||
import mezz.jei.api.ingredients.IIngredientType;
|
||||
import mezz.jei.api.ingredients.subtypes.IIngredientSubtypeInterpreter;
|
||||
import mezz.jei.api.ingredients.subtypes.UidContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ControllerIngredientTypeInterpreter implements IIngredientSubtypeInterpreter<ItemStack> {
|
||||
@Override
|
||||
public String apply(ItemStack ingredient, UidContext context) {
|
||||
ResourceLocation id = ControllerHelper.getId(ingredient);
|
||||
if (id == null) {
|
||||
return NONE;
|
||||
}
|
||||
return id.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ticticboooom.mods.mm.ports.base;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.registries.ForgeRegistryEntry;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
@@ -15,4 +16,7 @@ public abstract class PortType extends ForgeRegistryEntry<PortType> {
|
||||
}
|
||||
|
||||
public abstract PortStorage parseStorage(JsonObject data);
|
||||
public TileEntity createTileEntity() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
14
src/main/java/com/ticticboooom/mods/mm/setup/MMBlocks.java
Normal file
14
src/main/java/com/ticticboooom/mods/mm/setup/MMBlocks.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ticticboooom.mods.mm.setup;
|
||||
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.block.ControllerBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public class MMBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Ref.MOD_ID);
|
||||
|
||||
public static final RegistryObject<ControllerBlock> CONTROLLER = BLOCKS.register("controller", ControllerBlock::new);
|
||||
}
|
||||
16
src/main/java/com/ticticboooom/mods/mm/setup/MMItems.java
Normal file
16
src/main/java/com/ticticboooom/mods/mm/setup/MMItems.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.ticticboooom.mods.mm.setup;
|
||||
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.block.ControllerBlock;
|
||||
import com.ticticboooom.mods.mm.block.item.ControllerBlockItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public class MMItems {
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Ref.MOD_ID);
|
||||
|
||||
public static final RegistryObject<ControllerBlockItem> CONTROLLER = ITEMS.register("controller", ControllerBlockItem::new);
|
||||
}
|
||||
14
src/main/java/com/ticticboooom/mods/mm/setup/MMTiles.java
Normal file
14
src/main/java/com/ticticboooom/mods/mm/setup/MMTiles.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ticticboooom.mods.mm.setup;
|
||||
|
||||
import com.ticticboooom.mods.mm.Ref;
|
||||
import com.ticticboooom.mods.mm.block.tile.ControllerTile;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public class MMTiles {
|
||||
public static final DeferredRegister<TileEntityType<?>> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, Ref.MOD_ID);
|
||||
|
||||
public static final RegistryObject<TileEntityType<ControllerTile>> CONTROLLER = TILES.register("controller", () -> TileEntityType.Builder.create(ControllerTile::new, MMBlocks.CONTROLLER.get()).build(null));
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ticticboooom.mods.mm.util;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ControllerHelper {
|
||||
public static ResourceLocation getId(ItemStack stack) {
|
||||
if (!stack.hasTag()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CompoundNBT nbt = stack.getTag();
|
||||
if (!nbt.contains("Controller")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String controller = nbt.getString("Controller");
|
||||
return ResourceLocation.tryCreate(controller);
|
||||
}
|
||||
}
|
||||
57
src/main/java/com/ticticboooom/mods/mm/util/ModelTools.java
Normal file
57
src/main/java/com/ticticboooom/mods/mm/util/ModelTools.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.ticticboooom.mods.mm.util;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.inventory.container.PlayerContainer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
import net.minecraft.util.math.vector.Vector4f;
|
||||
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
|
||||
|
||||
public class ModelTools {
|
||||
|
||||
private static void putVertex(BakedQuadBuilder b, Vector3f normal, Vector4f vec, float u, float v, TextureAtlasSprite sprite) {
|
||||
ImmutableList<VertexFormatElement> elems = b.getVertexFormat().getElements().asList();
|
||||
for (int i = 0; i < elems.size(); i++) {
|
||||
VertexFormatElement e = elems.get(i);
|
||||
switch (e.getUsage()) {
|
||||
case POSITION: b.put(i, vec.getX(), vec.getY(), vec.getZ(), 1.0f);
|
||||
case COLOR: b.put(i, 1f, 1f, 1f, 1f);
|
||||
case UV: putVertexUV(b, u, v, sprite, i, e);
|
||||
case NORMAL: b.put(i, normal.getX(), normal.getY(), normal.getZ(), 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void putVertexUV(BakedQuadBuilder builder, float u, float v, TextureAtlasSprite sprite, int j, VertexFormatElement e) {
|
||||
switch (e.getIndex()) {
|
||||
case 0: builder.put(j, sprite.getInterpolatedU(u), sprite.getInterpolatedV(v));
|
||||
case 2: builder.put(j, (short) 0, (short) 0);
|
||||
default: builder.put(j);
|
||||
}
|
||||
}
|
||||
|
||||
public static BakedQuad createQuad(ResourceLocation texture, Vector3f v1, Vector3f v2, Vector3f v3, Vector3f v4) {
|
||||
Vector3f normal = v3.copy();
|
||||
normal.sub(v2);
|
||||
Vector3f tmp = v1.copy();
|
||||
tmp.sub(v2);
|
||||
normal.cross(tmp);
|
||||
normal.normalize();
|
||||
TextureAtlasSprite sprite = Minecraft.getInstance().getAtlasSpriteGetter(PlayerContainer.LOCATION_BLOCKS_TEXTURE).apply(texture);
|
||||
|
||||
int tw = sprite.getWidth();
|
||||
int th = sprite.getHeight();
|
||||
|
||||
BakedQuadBuilder b = new BakedQuadBuilder(sprite);
|
||||
putVertex(b, normal, new Vector4f(v1), 0, 0, sprite);
|
||||
putVertex(b, normal, new Vector4f(v2), 0, th, sprite);
|
||||
putVertex(b, normal, new Vector4f(v3), tw, th, sprite);
|
||||
putVertex(b, normal, new Vector4f(v4), tw, 0, sprite);
|
||||
b.setApplyDiffuseLighting(true);
|
||||
return b.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"" : {
|
||||
"model": "block/controller_model"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "masterfulmachinery:block/northen",
|
||||
"textures": {
|
||||
"overlay": "masterfulmachinery:block/controller_cutout"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "forge:multi-layer",
|
||||
"textures": {
|
||||
"overlay": "#overlay",
|
||||
"particle": "#overlay"
|
||||
},
|
||||
"layers": {
|
||||
"translucent": {
|
||||
"textures": {
|
||||
"overlay": "#overlay"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "overlay",
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#overlay", "cullface": "north"}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.ticticboooom.mods.mm.core.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"refmap": "masterfulmachinery.refmap.json",
|
||||
"mixins": [
|
||||
"ResourceLoaderMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"maxShiftBy": 3,
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"minVersion": "0.8"
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_starlight",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"data": {
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"data": {
|
||||
"amount": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "render_test",
|
||||
"controllerId": "basic",
|
||||
"name": "Render Test",
|
||||
"layout": [
|
||||
[
|
||||
"C"
|
||||
],
|
||||
[
|
||||
")"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
")": {
|
||||
"block": "botania:mana_spreader"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_all",
|
||||
"controllerId": "basic",
|
||||
"name": "Testing All The Ports",
|
||||
"layout": [
|
||||
[
|
||||
")C*",
|
||||
"+ ,",
|
||||
"- .",
|
||||
"/ 0",
|
||||
"1 2",
|
||||
"3 4",
|
||||
"5 6",
|
||||
"7 8",
|
||||
"9 :",
|
||||
"; <"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
")": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_output"
|
||||
},
|
||||
"*": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_input"
|
||||
},
|
||||
"+": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_output"
|
||||
},
|
||||
",": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_input"
|
||||
},
|
||||
"-": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_output"
|
||||
},
|
||||
".": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_input"
|
||||
},
|
||||
"/": {
|
||||
"block": "masterfulmachinery:basic_simple_port_pncr_pressure_output"
|
||||
},
|
||||
"0": {
|
||||
"block": "masterfulmachinery:basic_simple_port_pncr_pressure_input"
|
||||
},
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_botania_mana_output"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_botania_mana_input"
|
||||
},
|
||||
"3": {
|
||||
"block": "masterfulmachinery:basic_simple_port_astral_starlight_output"
|
||||
},
|
||||
"4": {
|
||||
"block": "masterfulmachinery:basic_simple_port_astral_starlight_input"
|
||||
},
|
||||
"5": {
|
||||
"block": "masterfulmachinery:basic_simple_port_create_rotation_output"
|
||||
},
|
||||
"6": {
|
||||
"block": "masterfulmachinery:basic_simple_port_create_rotation_input"
|
||||
},
|
||||
"7": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_gas_output"
|
||||
},
|
||||
"8": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_gas_input"
|
||||
},
|
||||
"9": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_slurry_output"
|
||||
},
|
||||
":": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_slurry_input"
|
||||
},
|
||||
";": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_infuse_output"
|
||||
},
|
||||
"<": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_infuse_input"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_energy",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Energy",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_fluids",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Fluids",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_gas",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Gas",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_gas_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_gas_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_infuse",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Infuse",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_infuse_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_infuse_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_items",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Items",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_mana",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Mana",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_botania_mana_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_botania_mana_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_model",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Model",
|
||||
"layout": [
|
||||
[
|
||||
"C"
|
||||
],
|
||||
[
|
||||
")"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
")": {
|
||||
"block": "pneumaticcraft:assembly_controller"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_pressure",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Pressure",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_pncr_pressure_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_pncr_pressure_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_rotation",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Rotation",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_create_rotation_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_create_rotation_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_slurry",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Slurry",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_slurry_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_slurry_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_starlight",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Starlight",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_astral_starlight_input"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_astral_starlight_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_energy_st",
|
||||
"controllerId": "basic",
|
||||
"name": "Test Energy",
|
||||
"layout": [
|
||||
[
|
||||
"1BCB2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_input"
|
||||
},
|
||||
"B": {
|
||||
"tag": "minecraft:logs"
|
||||
},
|
||||
"2": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_output"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "test_tiered_fluids",
|
||||
"controllerId": [
|
||||
"basic",
|
||||
"mid"
|
||||
],
|
||||
"name": "Test Tiered Fluids",
|
||||
"layout": [
|
||||
[
|
||||
"1C2"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"1": {
|
||||
"port": {
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"input": true,
|
||||
"controllerId": [
|
||||
"basic",
|
||||
"mid"
|
||||
]
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"port": {
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"input": false,
|
||||
"controllerId": "mid"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_structure",
|
||||
"id": "variable_io",
|
||||
"controllerId": "basic",
|
||||
"name": "Variable IO",
|
||||
"layout": [
|
||||
[
|
||||
")C)",
|
||||
"*+*",
|
||||
")*)"
|
||||
],
|
||||
[
|
||||
"),)",
|
||||
"-./",
|
||||
")0)"
|
||||
],
|
||||
[
|
||||
")))",
|
||||
")1)",
|
||||
")))"
|
||||
]
|
||||
],
|
||||
"legend": {
|
||||
"0": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_output"
|
||||
},
|
||||
"1": {
|
||||
"block": "masterfulmachinery:basic_simple_port_mekanism_gas_output"
|
||||
},
|
||||
")": {
|
||||
"block": "minecraft:polished_blackstone"
|
||||
},
|
||||
"*": {
|
||||
"block": "masterfulmachinery:basic_simple_port_energy_output"
|
||||
},
|
||||
"+": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_output"
|
||||
},
|
||||
",": {
|
||||
"block": "minecraft:glass"
|
||||
},
|
||||
"-": {
|
||||
"block": "masterfulmachinery:basic_simple_port_items_input"
|
||||
},
|
||||
".": {
|
||||
"block": "minecraft:water"
|
||||
},
|
||||
"/": {
|
||||
"block": "masterfulmachinery:basic_simple_port_fluids_input"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_energy",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:energy",
|
||||
"data": {
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:energy",
|
||||
"data": {
|
||||
"amount": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_fluids",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"data": {
|
||||
"fluid":"minecraft:water",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"data": {
|
||||
"fluid": "minecraft:lava",
|
||||
"amount": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_gas",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_gas",
|
||||
"data": {
|
||||
"gas": "mekanism:sodium",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_gas",
|
||||
"data": {
|
||||
"gas": "mekanism:sodium",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_infuse",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_infuse",
|
||||
"data": {
|
||||
"infuse": "mekanism:redstone",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_infuse",
|
||||
"data": {
|
||||
"infuse": "mekanism:redstone",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_items",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"data": {
|
||||
"item": "minecraft:oak_log",
|
||||
"count": 2
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"data": {
|
||||
"item": "minecraft:nether_star",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_items",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"data": {
|
||||
"tag": "minecraft:planks",
|
||||
"count": 2
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:items",
|
||||
"data": {
|
||||
"item": "minecraft:birch_log",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_mana",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:botania_mana",
|
||||
"data": {
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:botania_mana",
|
||||
"data": {
|
||||
"amount": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_pressure",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:pncr_pressure",
|
||||
"data": {
|
||||
"air": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:pncr_pressure",
|
||||
"data": {
|
||||
"air": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_rotation",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:create_rotation",
|
||||
"data": {
|
||||
"speed": 2
|
||||
},
|
||||
"perTick": true
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:create_rotation",
|
||||
"data": {
|
||||
"speed": 64
|
||||
},
|
||||
"perTick": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_slurry",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_slurry",
|
||||
"data": {
|
||||
"slurry": "mekanism:clean_gold",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:mekanism_slurry",
|
||||
"data": {
|
||||
"slurry": "mekanism:clean_gold",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_starlight",
|
||||
"controllerId": "basic",
|
||||
"ticks": 200,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"data": {
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs":[
|
||||
{
|
||||
"type": "masterfulmachinery:astral_starlight",
|
||||
"data": {
|
||||
"amount": 500
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "masterfulmachinery:machine_process",
|
||||
"structureId": "test_tiered_fluid",
|
||||
"controllerId": ["basic", "mid"],
|
||||
"ticks": 20,
|
||||
"inputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"data": {
|
||||
"fluid": "minecraft:water",
|
||||
"amount": 50
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"type": "masterfulmachinery:fluids",
|
||||
"data": {
|
||||
"fluid": "minecraft:water",
|
||||
"amount": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Tits",
|
||||
"defaultModel": {
|
||||
"block": "minecraft:sponge",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
#Fri Dec 03 23:08:50 GMT 2021
|
||||
VERSION_CODE=853
|
||||
#Wed Jan 12 10:10:42 GMT 2022
|
||||
VERSION_CODE=1038
|
||||
|
||||
Reference in New Issue
Block a user