Update Forge, re-add MCMP support, fixed recipes
This commit is contained in:
@@ -15,7 +15,7 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
|
||||
@Mod(modid = RS.ID, version = RS.VERSION, guiFactory = RS.GUI_FACTORY, updateJSON = RS.UPDATE_JSON)
|
||||
@Mod(modid = RS.ID, version = RS.VERSION, dependencies = RS.DEPENDENCIES, guiFactory = RS.GUI_FACTORY, updateJSON = RS.UPDATE_JSON)
|
||||
public final class RS {
|
||||
static {
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
@@ -23,6 +23,7 @@ public final class RS {
|
||||
|
||||
public static final String ID = "refinedstorage";
|
||||
public static final String VERSION = "1.5.1";
|
||||
public static final String DEPENDENCIES = "required-after:forge@[14.21.0.2329,);";
|
||||
public static final String GUI_FACTORY = "com.raoulvdberge.refinedstorage.gui.config.ModGuiFactory";
|
||||
public static final String UPDATE_JSON = "https://refinedstorage.raoulvdberge.com/update";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*package com.raoulvdberge.refinedstorage.integration.mcmp;
|
||||
package com.raoulvdberge.refinedstorage.integration.mcmp;
|
||||
|
||||
import com.raoulvdberge.refinedstorage.apiimpl.API;
|
||||
import com.raoulvdberge.refinedstorage.block.BlockCable;
|
||||
@@ -54,4 +54,4 @@ public class PartCable implements IMultipart {
|
||||
public void onPartChanged(IPartInfo part, IPartInfo otherPart) {
|
||||
API.instance().discoverNode(part.getActualWorld(), part.getContainer().getPartPos());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*package com.raoulvdberge.refinedstorage.integration.mcmp;
|
||||
package com.raoulvdberge.refinedstorage.integration.mcmp;
|
||||
|
||||
import mcmultipart.api.container.IPartInfo;
|
||||
import mcmultipart.api.multipart.IMultipartTile;
|
||||
@@ -25,5 +25,4 @@ public class PartCableTile implements IMultipartTile {
|
||||
public IPartInfo getInfo() {
|
||||
return info;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,42 @@
|
||||
package com.raoulvdberge.refinedstorage.integration.mcmp;
|
||||
|
||||
import com.raoulvdberge.refinedstorage.RSBlocks;
|
||||
import com.raoulvdberge.refinedstorage.block.BlockCable;
|
||||
import com.raoulvdberge.refinedstorage.tile.*;
|
||||
import mcmultipart.api.addon.IMCMPAddon;
|
||||
import mcmultipart.api.addon.MCMPAddon;
|
||||
import mcmultipart.api.container.IPartInfo;
|
||||
import mcmultipart.api.multipart.IMultipart;
|
||||
import mcmultipart.api.multipart.IMultipartRegistry;
|
||||
import mcmultipart.api.multipart.IMultipartTile;
|
||||
import mcmultipart.api.multipart.MultipartOcclusionHelper;
|
||||
import mcmultipart.api.ref.MCMPCapabilities;
|
||||
import mcmultipart.api.slot.EnumCenterSlot;
|
||||
import mcmultipart.block.BlockMultipartContainer;
|
||||
import mcmultipart.block.TileMultipartContainer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
//@MCMPAddon
|
||||
public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
/*@Override
|
||||
@MCMPAddon
|
||||
public class RSMCMPAddon implements IMCMPAddon {
|
||||
@Override
|
||||
public void registerParts(IMultipartRegistry registry) {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
@@ -32,7 +53,7 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
private void register(IMultipartRegistry registry, BlockCable block) {
|
||||
registry.registerPartWrapper(block, new PartCable(block));
|
||||
registry.registerStackWrapper(Item.getItemFromBlock(block), s -> true, block);
|
||||
}*/
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onAttachCapability(AttachCapabilitiesEvent<TileEntity> e) {
|
||||
@@ -58,7 +79,7 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
}
|
||||
|
||||
private void register(AttachCapabilitiesEvent<TileEntity> e, String id) {
|
||||
/*e.addCapability(new ResourceLocation("refinedstorage:" + id), new ICapabilityProvider() {
|
||||
e.addCapability(new ResourceLocation("refinedstorage:" + id), new ICapabilityProvider() {
|
||||
private PartCableTile tile;
|
||||
|
||||
@Override
|
||||
@@ -79,11 +100,11 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
|
||||
return null;
|
||||
}
|
||||
});*/
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean hasConnectionWith(TileEntity tile, List<AxisAlignedBB> boxes) {
|
||||
/*if (tile != null && tile.hasCapability(MCMPCapabilities.MULTIPART_TILE, null)) {
|
||||
if (tile != null && tile.hasCapability(MCMPCapabilities.MULTIPART_TILE, null)) {
|
||||
IMultipartTile multipartTile = tile.getCapability(MCMPCapabilities.MULTIPART_TILE, null);
|
||||
|
||||
if (multipartTile instanceof PartCableTile && ((PartCableTile) multipartTile).getInfo() != null) {
|
||||
@@ -95,7 +116,7 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -104,13 +125,13 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
public static TileEntity unwrapTile(IBlockAccess world, BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
/*if (tile instanceof TileMultipartContainer.Ticking) {
|
||||
if (tile instanceof TileMultipartContainer.Ticking) {
|
||||
Optional<IMultipartTile> multipartTile = ((TileMultipartContainer.Ticking) tile).getPartTile(EnumCenterSlot.CENTER);
|
||||
|
||||
if (multipartTile.isPresent()) {
|
||||
return multipartTile.get().getTileEntity();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return tile;
|
||||
}
|
||||
@@ -118,7 +139,7 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
public static Block unwrapBlock(IBlockAccess world, BlockPos pos) {
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
|
||||
/*if (state.getBlock() instanceof BlockMultipartContainer) {
|
||||
if (state.getBlock() instanceof BlockMultipartContainer) {
|
||||
Optional<TileMultipartContainer> multipartContainer = BlockMultipartContainer.getTile(world, pos);
|
||||
|
||||
if (multipartContainer.isPresent()) {
|
||||
@@ -128,7 +149,7 @@ public class RSMCMPAddon /*implements IMCMPAddon*/ {
|
||||
return info.get().getPart().getBlock();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return state.getBlock();
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "refinedstorage:basic_processor"
|
||||
"item": "#basic_processor"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:glowstone_dust"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "refinedstorage:core",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"R": {
|
||||
"item": "minecraft:redstone"
|
||||
@@ -19,7 +19,7 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
"I": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:controller"
|
||||
"item": "refinedstorage:controller",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -10,16 +10,16 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "refinedstorage:basic_processor"
|
||||
"item": "#basic_processor"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:quartz"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "refinedstorage:core",
|
||||
"data": 1
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"R": {
|
||||
"item": "minecraft:redstone"
|
||||
@@ -19,7 +19,7 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
"I": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
"item": "refinedstorage:storage_housing"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
{
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
{
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -7,11 +7,14 @@
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"E": {
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"D": {
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"H": {
|
||||
"type": "forge:ore_dict",
|
||||
"ore": "chest"
|
||||
@@ -20,7 +23,7 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:grid_filter"
|
||||
"item": "refinedstorage:filter"
|
||||
}
|
||||
}
|
||||
@@ -10,19 +10,20 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:grid"
|
||||
"item": "refinedstorage:grid",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
{
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
{
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"item": "minecraft:paper"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
"item": "minecraft:ender_pearl"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
"item": "minecraft:ender_pearl"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,13 +10,16 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"G": {
|
||||
"item": "refinedstorage:grid"
|
||||
"item": "refinedstorage:grid",
|
||||
"data": 0
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:controller"
|
||||
"item": "refinedstorage:controller",
|
||||
"data": 0
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:portable_grid"
|
||||
"item": "refinedstorage:portable_grid",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
},
|
||||
"R": {
|
||||
"item": "minecraft:redstone"
|
||||
@@ -19,7 +19,7 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
"I": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"item": "refinedstorage:network_card"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "minecraft:sugar"
|
||||
},
|
||||
"S": {
|
||||
"item": "minecraft:upgrade",
|
||||
"item": "refinedstorage:upgrade",
|
||||
"data": 2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"item": "refinedstorage:basic_processor"
|
||||
"item": "#basic_processor"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"G": {
|
||||
"type": "forge:ore_dict",
|
||||
@@ -23,7 +23,7 @@
|
||||
"item": "refinedstorage:machine_casing"
|
||||
},
|
||||
"D": {
|
||||
"item": "refinedstorage:destruction_core"
|
||||
"item": "#destruction_core"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
"ore": "blockGlass"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:improved_processor"
|
||||
"item": "#improved_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:upgrade"
|
||||
"item": "refinedstorage:upgrade",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,11 @@
|
||||
"item": "refinedstorage:crafting_monitor"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:wireless_crafting_monitor"
|
||||
"item": "refinedstorage:wireless_crafting_monitor",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -17,10 +17,11 @@
|
||||
"data": 3
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:wireless_fluid_grid"
|
||||
"item": "refinedstorage:wireless_fluid_grid",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -13,13 +13,15 @@
|
||||
"item": "minecraft:ender_pearl"
|
||||
},
|
||||
"G": {
|
||||
"item": "refinedstorage:grid"
|
||||
"item": "refinedstorage:grid",
|
||||
"data": 0
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "refinedstorage:wireless_grid"
|
||||
"item": "refinedstorage:wireless_grid",
|
||||
"data": 0
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"A": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
},
|
||||
"M": {
|
||||
"item": "refinedstorage:machine_casing"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"P": {
|
||||
"item": "refinedstorage:basic_processor"
|
||||
"item": "#basic_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"item": "refinedstorage:quartz_enriched_iron"
|
||||
},
|
||||
"C": {
|
||||
"item": "refinedstorage:construction_core"
|
||||
"item": "#construction_core"
|
||||
},
|
||||
"R": {
|
||||
"item": "minecraft:redstone"
|
||||
@@ -19,7 +19,7 @@
|
||||
"item": "refinedstorage:cable"
|
||||
},
|
||||
"I": {
|
||||
"item": "refinedstorage:advanced_processor"
|
||||
"item": "#advanced_processor"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
Reference in New Issue
Block a user