Uses Reborncores version of MCMP

This commit is contained in:
modmuss50 2016-06-01 12:06:51 +01:00
parent 73d771dd72
commit 96235d2c9d
11 changed files with 41 additions and 34 deletions

View file

@ -57,7 +57,7 @@ configurations {
}
version = "1.2.3"
version = "1.3.0"
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {

View file

@ -1,6 +1,7 @@
package techreborn.client.render.parts;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.TextureStitchEvent;
@ -11,12 +12,16 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import techreborn.parts.fluidPipes.EnumFluidPipeTypes;
import techreborn.parts.powerCables.EnumCableType;
import java.util.HashMap;
/**
* Created by modmuss50 on 04/03/2016.
*/
public class ClientPartModelBakery
{
public static HashMap<EnumCableType, TextureAtlasSprite> textureMap = new HashMap<>();
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onModelBake(ModelBakeEvent event)
@ -25,7 +30,7 @@ public class ClientPartModelBakery
{
event.getModelRegistry().putObject(
new ModelResourceLocation("techreborn:cable#type=" + type.getName().toLowerCase()),
new RenderCablePart(type));
new RenderCablePart());
}
for(EnumFluidPipeTypes type : EnumFluidPipeTypes.values()){
event.getModelRegistry().putObject(
@ -41,6 +46,7 @@ public class ClientPartModelBakery
for (EnumCableType type : EnumCableType.values())
{
event.getMap().registerSprite(new ResourceLocation(type.textureName));
}
for(EnumFluidPipeTypes type : EnumFluidPipeTypes.values()){
event.getMap().registerSprite(new ResourceLocation(type.textureName));

View file

@ -19,19 +19,19 @@ import java.util.List;
public class RenderCablePart implements IBakedModel
{
EnumCableType type;
private FaceBakery faceBakery = new FaceBakery();
private TextureAtlasSprite texture;
public RenderCablePart(EnumCableType type)
{
texture = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(type.textureName);
this.type = type;
}
@Override
public List<BakedQuad> getQuads(IBlockState blockState, EnumFacing side, long rand)
{
TextureAtlasSprite texture;
EnumCableType type = blockState.getValue(CableMultipart.TYPE);
if(ClientPartModelBakery.textureMap.containsKey(type)){
texture = ClientPartModelBakery.textureMap.get(type);
} else {
texture = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(type.textureName);
ClientPartModelBakery.textureMap.put(type, texture);
}
ArrayList<BakedQuad> list = new ArrayList<>();
BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0F, 0.0F, 16.0F, 16.0F }, 0);
BlockPartFace face = new BlockPartFace(null, 0, "", uv);
@ -101,7 +101,10 @@ public class RenderCablePart implements IBakedModel
@Override
public TextureAtlasSprite getParticleTexture()
{
return texture;
if(ClientPartModelBakery.textureMap.containsKey(EnumCableType.COPPER)){
return ClientPartModelBakery.textureMap.get(EnumCableType.COPPER);
}
return Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();
}
@Override

View file

@ -39,10 +39,10 @@ public class CompatManager
isGregTechLoaded = true;
}
//registerCompact(MinetweakerCompat.class, "MineTweaker3");
registerCompact(TechRebornParts.class, "mcmultipart");
registerCompact(ClientPartLoader.class, "mcmultipart", "@client");
registerCompact(StandalonePartCompact.class, "!mcmultipart");
registerCompact(WailaMcMultiPartCompact.class, "mcmultipart", "Waila", "!IC2");
registerCompact(TechRebornParts.class, "reborncore-mcmultipart");
registerCompact(ClientPartLoader.class, "reborncore-mcmultipart", "@client");
registerCompact(StandalonePartCompact.class, "!reborncore-mcmultipart");
registerCompact(WailaMcMultiPartCompact.class, "reborncore-mcmultipart", "Waila", "!IC2");
registerCompact(CompatModuleWaila.class, "Waila");
//registerCompact(CompatModuleTinkers.class, "tconstruct");
//registerCompact(CompatModulePsi.class, "Psi");

View file

@ -4,16 +4,14 @@ import java.util.HashMap;
import javax.annotation.Nullable;
import mcmultipart.multipart.MultipartRegistry;
import reborncore.mcmultipart.multipart.MultipartRegistry;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import reborncore.common.packets.AddDiscriminatorEvent;
import techreborn.compat.ICompatModule;
import techreborn.parts.fluidPipes.*;
import techreborn.parts.powerCables.CableMultipart;

View file

@ -1,7 +1,7 @@
package techreborn.parts.fluidPipes;
import mcmultipart.item.ItemMultiPart;
import mcmultipart.multipart.IMultipart;
import reborncore.mcmultipart.item.ItemMultiPart;
import reborncore.mcmultipart.multipart.IMultipart;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;

View file

@ -1,9 +1,9 @@
package techreborn.parts.fluidPipes;
import mcmultipart.MCMultiPartMod;
import mcmultipart.microblock.IMicroblock;
import mcmultipart.multipart.*;
import mcmultipart.raytrace.PartMOP;
import reborncore.mcmultipart.MCMultiPartMod;
import reborncore.mcmultipart.microblock.IMicroblock;
import reborncore.mcmultipart.multipart.*;
import reborncore.mcmultipart.raytrace.PartMOP;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;

View file

@ -1,9 +1,9 @@
package techreborn.parts.powerCables;
import mcmultipart.MCMultiPartMod;
import mcmultipart.microblock.IMicroblock;
import mcmultipart.multipart.*;
import mcmultipart.raytrace.PartMOP;
import reborncore.mcmultipart.MCMultiPartMod;
import reborncore.mcmultipart.microblock.IMicroblock;
import reborncore.mcmultipart.multipart.*;
import reborncore.mcmultipart.raytrace.PartMOP;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;

View file

@ -2,8 +2,8 @@ package techreborn.parts.powerCables;
import java.util.List;
import mcmultipart.item.ItemMultiPart;
import mcmultipart.multipart.IMultipart;
import reborncore.mcmultipart.item.ItemMultiPart;
import reborncore.mcmultipart.multipart.IMultipart;
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;

View file

@ -1,6 +1,6 @@
package techreborn.parts.walia;
import mcmultipart.block.TileMultipartContainer;
import reborncore.mcmultipart.block.TileMultipartContainer;
import mcp.mobius.waila.api.IWailaRegistrar;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInterModComms;

View file

@ -3,9 +3,9 @@ package techreborn.parts.walia;
import java.util.ArrayList;
import java.util.List;
import mcmultipart.block.TileMultipartContainer;
import mcmultipart.raytrace.PartMOP;
import mcmultipart.raytrace.RayTraceUtils;
import reborncore.mcmultipart.block.TileMultipartContainer;
import reborncore.mcmultipart.raytrace.PartMOP;
import reborncore.mcmultipart.raytrace.RayTraceUtils;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;