mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
The mod now compiles and runs,
if the following packages are excluded: client.gui (Haven't worked out guis yet) client.nei (NEI isn't here yet) client.render.block (ISBRH doesn't exist any more) client.render.item (Nor do Item renderers) common.multipart (Nor does CB's FMP) generators (Couldn't be bothered, will fix when more of Mek Core works again)
This commit is contained in:
1 parent
6f44d4af24
commit
5e54c0a681
7 files changed
+40
-14
No files matched your search
@@ -27,7 +27,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.ITickable;
|
||||
import net.minecraft.client.renderer.texture.ResourceLocation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -76,10 +75,13 @@ public class MekanismRenderer
|
||||
MinecraftForge.EVENT_BUS.register(new MekanismRenderer());
|
||||
}
|
||||
|
||||
/*
|
||||
@SubscribeEvent
|
||||
public void onStitch(TextureStitchEvent.Pre event)
|
||||
{
|
||||
if(event.map.getGlTextureId()/*TODO Is this right?*/ == 0)
|
||||
if(event.map.getGlTextureId()*/
|
||||
/*TODO Is this right?*//*
|
||||
== 0)
|
||||
{
|
||||
for(EnumColor color : EnumColor.values())
|
||||
{
|
||||
@@ -140,7 +142,8 @@ public class MekanismRenderer
|
||||
RenderPortableTank.resetDisplayInts();
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public static boolean blockIconExists(String texture) //Credit to CoFHCore
|
||||
{
|
||||
String[] split = texture.split(":");
|
||||
@@ -301,6 +304,7 @@ public class MekanismRenderer
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
renderBlocks.renderMaxX = object.maxX;
|
||||
renderBlocks.renderMinX = object.minX;
|
||||
renderBlocks.renderMaxY = object.maxY;
|
||||
@@ -343,6 +347,7 @@ public class MekanismRenderer
|
||||
}
|
||||
|
||||
Tessellator.instance.draw();
|
||||
*/
|
||||
}
|
||||
|
||||
public static void color(EnumColor color)
|
||||
@@ -365,7 +370,7 @@ public class MekanismRenderer
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
public static ResourceLocation getColorIcon(EnumColor color)
|
||||
public static TextureAtlasSprite getColorIcon(EnumColor color)
|
||||
{
|
||||
return colors[color.ordinal()];
|
||||
}
|
||||
@@ -442,6 +447,7 @@ public class MekanismRenderer
|
||||
*/
|
||||
public static void renderItem(ItemStack item)
|
||||
{
|
||||
/*
|
||||
ResourceLocation icon = item.getItem().getIconIndex(item);
|
||||
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
|
||||
|
||||
@@ -470,8 +476,10 @@ public class MekanismRenderer
|
||||
RenderManager.instance.itemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
|
||||
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
public static void prepareItemRender(RenderBlocks renderer, int metadata, Block block)
|
||||
{
|
||||
if(!(block instanceof ISpecialBounds) || ((ISpecialBounds)block).doDefaultBoundSetting(metadata))
|
||||
@@ -545,13 +553,15 @@ public class MekanismRenderer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* Cleaned-up snip of RenderBlocks.renderBlockAsItem() -- used for rendering an item as an entity,
|
||||
* in a player's inventory, and in a player's hand.
|
||||
* @param renderer - RenderBlocks renderer to render the item with
|
||||
* @param metadata - block/item metadata
|
||||
* @param block - block to render
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static void renderItem(RenderBlocks renderer, int metadata, Block block)
|
||||
{
|
||||
prepareItemRender(renderer, metadata, block);
|
||||
@@ -586,7 +596,8 @@ public class MekanismRenderer
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public static void colorFluid(Fluid fluid)
|
||||
{
|
||||
int color = fluid.getColor();
|
||||
@@ -635,6 +646,7 @@ public class MekanismRenderer
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public static TextureMap getTextureMap(int type)
|
||||
{
|
||||
try {
|
||||
@@ -654,7 +666,8 @@ public class MekanismRenderer
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public static float getPartialTick()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -82,7 +82,7 @@ public final class MinerVisualRenderer
|
||||
|
||||
toReturn.setBlockBounds(rel.getX() + 0.4, rel.getY() + 0.4, rel.getZ() + 0.4, rel.getX() + 0.6, rel.getY() + 0.6, rel.getZ() + 0.6);
|
||||
toReturn.baseBlock = Blocks.water;
|
||||
toReturn.setTexture(MekanismRenderer.getColorIcon(EnumColor.WHITE));
|
||||
//toReturn.setTexture(MekanismRenderer.getColorIcon(EnumColor.WHITE));
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.api.peripheral.IPeripheralProvider;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@@ -69,9 +70,9 @@ public class CCPeripheral implements IPeripheral
|
||||
public static class CCPeripheralProvider implements IPeripheralProvider
|
||||
{
|
||||
@Override
|
||||
public IPeripheral getPeripheral(World world, int x, int y, int z, int side)
|
||||
public IPeripheral getPeripheral(World world, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
TileEntity te = world.getTileEntity(new BlockPos(x, y, z));
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
|
||||
if(te != null && te instanceof IComputerIntegration)
|
||||
{
|
||||
|
||||
@@ -27,9 +27,9 @@ public class OCDriver extends DriverTileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z)
|
||||
public ManagedEnvironment createEnvironment(World world, BlockPos pos)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if(tile instanceof IComputerIntegration)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import net.minecraftforge.fml.common.Optional.Method;
|
||||
@@ -90,7 +91,7 @@ public class WailaDataProvider implements IWailaDataProvider
|
||||
|
||||
@Override
|
||||
@Method(modid = "Waila")
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z)
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import mekanism.common.tile.TileEntityElectricChest;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -260,6 +261,15 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
||||
@Method(modid = "BuildCraft")
|
||||
public void wrenchUsed(EntityPlayer player, BlockPos pos) {}
|
||||
|
||||
@Override
|
||||
public boolean canWrench(EntityPlayer player, Entity entity)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wrenchUsed(EntityPlayer player, Entity entity) {}
|
||||
|
||||
@Override
|
||||
public boolean canUseWrench(EntityPlayer player, BlockPos pos)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user