Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 38 additions & 12 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/packaging" />
<property name="src.dir" value="src" />
<property name="forge.buildnum" value="684" />
<property name="forge.version" value="1.5.2-7.8.0.${forge.buildnum}" />
<property name="forge.buildnum" value="818" />
<property name="forge.version" value="1.6.2-9.10.0.${forge.buildnum}" />
<property name="forge.url" value="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${forge.version}.zip" />
<property name="forge.dir" value="${build.dir}/forge" />
<property name="mcp.dir" value="${forge.dir}/mcp" />
Expand All @@ -29,7 +29,31 @@

<property name="verclass.dir" value="${mcpsrc.dir}/powercrystals/core" />
<property name="verclass.name" value="CoreCore.java"/>


<path id="build.classpath">
<pathelement location="${mcp.dir}/bin/minecraft"/>
<pathelement location="${mcp.dir}\jars\libraries\argo\argo\2.25_fixed\argo-2.25_fixed.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\com\google\code\gson\gson\2.2.2\gson-2.2.2.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\com\google\guava\guava\14.0\guava-14.0.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar"/>
<pathelement
location="${mcp.dir}\jars\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar"/>
<pathelement
location="${mcp.dir}\jars\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\lzma\lzma\0.0.1\lzma-0.0.1.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\net\minecraft\launchwrapper\1.3\launchwrapper-1.3.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\org\bouncycastle\bcprov-jdk15on\1.47\bcprov-jdk15on-1.47.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwjgl-2.9.0.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar"/>
<pathelement location="${mcp.dir}\jars\libraries\org\ow2\asm\asm-debug-all\4.1\asm-debug-all-4.1.jar"/>
</path>

<mkdir dir="${download.dir}"/>
<mkdir dir="${build.dir}" />
Expand Down Expand Up @@ -59,6 +83,10 @@
<copy todir="${mcpsrc.dir}/powercrystals" overwrite="true">
<fileset dir="${src.dir}/powercrystals"/>
</copy>
<mkdir dir="${mcpsrc.dir}/assets" />
<copy todir="${mcpsrc.dir}/assets" overwrite="true">
<fileset dir="${src.dir}/assets"/>
</copy>
<copy todir="${mcpsrc.dir}" file="pcc_at.cfg" overwrite="true"/>

<exec dir="${verclass.dir}" executable="sh" osfamily="unix" outputproperty="grep.out">
Expand Down Expand Up @@ -95,13 +123,11 @@

<target name="build" depends="extract-dependencies" unless="already-compiled">
<!-- Recompile -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c recompile.bat"/>
</exec>

<exec dir="${mcp.dir}" executable="sh" osfamily="unix" failonerror="true">
<arg value="recompile.sh" />
</exec>
<depend srcdir="${mcpsrc.dir}" destdir="${mcp.dir}/bin/minecraft">
<include name="powercrystals/core/**/*.java"/>
</depend>
<javac srcdir="${mcpsrc.dir}" destdir="${mcp.dir}/bin/minecraft" target="1.6" source="1.6"
classpathref="build.classpath" debug="true" debuglevel="lines,source" includeAntRuntime="false"/>

<!-- Reobf -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
Expand All @@ -119,8 +145,8 @@
</copy>
<copy todir="${classes.dir}" file="${mcpsrc.dir}/pcc_at.cfg" overwrite="true"/>

<copy todir="${classes.dir}/powercrystals/core/textures">
<fileset dir="${mcpsrc.dir}/powercrystals/core/textures" />
<copy todir="${classes.dir}/assets">
<fileset dir="${mcpsrc.dir}/assets" />
</copy>
</target>

Expand Down
28 changes: 14 additions & 14 deletions pcc_at.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# NetherOres
public sc.p(Lmp;)V # EntityZombiePigman.becomeAngryAt (func_70835_c)
public se.d # EntitySilverfish.allySummonCooldown (field_70843_d)
public tm.c(Lnm;)V # EntityZombiePigman.becomeAngryAt (func_70835_c)
public tp.bp # EntitySilverfish.allySummonCooldown (field_70843_d)

# MFR
public mv.e # EntityList.classToIDMapping (field_75624_e)
public mv.f # EntityList.stringToIDMapping (field_75622_f)
public mp.ab # Entity.rand
public sg.a(I)V # EntitySlime.setSlimeSize (func_70799_a)
public sj.a(I)V # EntityZombie.startConversion (func_82228_a)
public nc.e # EntityXPOrb.xpValue
public-f apa.aX # Block.ice (field_72036_aT)
public-f apa.bu # Block.thinGlass (field_72003_bq)
public ns.e # EntityList.classToIDMapping (field_75624_e)
public ns.f # EntityList.stringToIDMapping (field_75622_f)
public nm.ab # Entity.rand (field_70146_Z)
public tr.a(I)V # EntitySlime.setSlimeSize (func_70799_a)
public tv.a(I)V # EntityZombie.startConversion (func_82228_a)
public nz.e # EntityXPOrb.xpValue (field_70530_e)
public-f aqw.aY # Block.ice (field_72036_aT)
public-f aqw.bv # Block.thinGlass (field_72003_bq)

# PC Core
public axr.g # GuiScreen.mc (field_73882_e)
public axr.m # GuiScreen.fontRenderer (field_73886_k)
public ayl.e # GuiContainer.guiLeft (field_74198_m)
public ayl.o # GuiContainer.guiTop (field_74197_n)
public awb.f # GuiScreen.mc (field_73882_e)
public awb.o # GuiScreen.fontRenderer (field_73886_k)
public awv.p # GuiContainer.guiLeft (field_74198_m)
public awv.q # GuiContainer.guiTop (field_74197_n)
20 changes: 19 additions & 1 deletion src/powercrystals/core/CoreCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class CoreCore extends DummyModContainer implements IUpdateableMod
{
public static final String version = "1.5.1R1.1.8B1";
public static final String version = "1.6.2R1.2.0B1";
public static final String modId = "PowerCrystalsCore";
public static final String modName = "PowerCrystals Core";

Expand Down Expand Up @@ -115,4 +115,22 @@ public String getModVersion()
{
return version;
}

@Override
public File getSource() {
return CoreLoader.source;
}

@Override
public Class<?> getCustomResourcePackClass()
{
try
{
return getSource().isDirectory() ? Class.forName("cpw.mods.fml.client.FMLFolderResourcePack", true, getClass().getClassLoader()) : Class.forName("cpw.mods.fml.client.FMLFileResourcePack",true, getClass().getClassLoader());
}
catch (ClassNotFoundException e)
{
return null;
}
}
}
5 changes: 4 additions & 1 deletion src/powercrystals/core/CoreLoader.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package powercrystals.core;

import java.io.File;
import java.util.Map;

import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;

@MCVersion(value = "1.5.2")
@MCVersion(value = "1.6.2")
public class CoreLoader implements IFMLLoadingPlugin
{
public static boolean runtimeDeobfEnabled = true;
public static File source = null;

@Override
public String[] getLibraryRequestClass()
Expand Down Expand Up @@ -38,5 +40,6 @@ public String getSetupClass()
public void injectData(Map<String, Object> data)
{
runtimeDeobfEnabled = (Boolean)data.get("runtimeDeobfuscationEnabled");
source = (File)data.get("coremodLocation");
}
}
10 changes: 5 additions & 5 deletions src/powercrystals/core/asm/PCCASMTransformer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package powercrystals.core.asm;

import cpw.mods.fml.relauncher.FMLRelauncher;
import cpw.mods.fml.relauncher.IClassTransformer;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import net.minecraft.launchwrapper.IClassTransformer;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -22,7 +22,7 @@ public class PCCASMTransformer implements IClassTransformer
{
private String desc;
private ArrayList<String> workingPath = new ArrayList<String>();
private boolean isClient = FMLRelauncher.side().equals("CLIENT");
private boolean isClient = FMLLaunchHandler.side().equals("CLIENT");

public PCCASMTransformer()
{
Expand Down Expand Up @@ -131,7 +131,7 @@ private byte[] writeWorldServer(String name, String transformedName, byte[] byte
ClassNode cn = new ClassNode(Opcodes.ASM4);
cr.accept(cn, ClassReader.EXPAND_FRAMES);

for(MethodNode m : cn.methods)
for(MethodNode m : (List<MethodNode>)cn.methods)
{
if("<init>".equals(m.name) && "(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/world/storage/ISaveHandler;Ljava/lang/String;Lnet/minecraft/world/WorldProvider;Lnet/minecraft/world/WorldSettings;Lnet/minecraft/profiler/Profiler;Lnet/minecraft/logging/ILogAgent;)V".equals(m.desc))
{
Expand Down Expand Up @@ -186,7 +186,7 @@ private boolean implement(ClassNode cn)
return false;
}
boolean interfaces = false;
for (AnnotationNode node : cn.visibleAnnotations)
for (AnnotationNode node : (List<AnnotationNode>)cn.visibleAnnotations)
{
if (node.desc.equals(desc))
{
Expand Down
3 changes: 2 additions & 1 deletion src/powercrystals/core/block/BlockFluidClassic.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
Expand Down Expand Up @@ -98,7 +99,7 @@ protected void updateFlowLevel(World world, int x, int y, int z, int quantaRemai
}

@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving living, ItemStack theItem)
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack theItem)
{
world.setBlock(x, y, z, blockID, quantaPerBlock - 1, 3);
}
Expand Down
7 changes: 4 additions & 3 deletions src/powercrystals/core/gui/GuiScreenBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
import net.minecraft.util.ResourceLocation;

@SideOnly(Side.CLIENT)
public abstract class GuiScreenBase extends GuiContainer
{
protected List<Control> _controls = new LinkedList<Control>();
protected String _backgroundTexture;
protected ResourceLocation _backgroundTexture;

public GuiScreenBase(Container container, String backgroundTexture)
public GuiScreenBase(Container container, ResourceLocation backgroundTexture)
{
super(container);
_backgroundTexture = backgroundTexture;
Expand All @@ -34,7 +35,7 @@ protected void drawGuiContainerBackgroundLayer(float gameTicks, int mouseX, int
mouseX -= guiLeft;
mouseY -= guiTop;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(_backgroundTexture);
mc.renderEngine.func_110577_a(_backgroundTexture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

GL11.glPushMatrix();
Expand Down
11 changes: 8 additions & 3 deletions src/powercrystals/core/gui/controls/Button.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
import org.lwjgl.opengl.GL11;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import powercrystals.core.gui.Control;
import powercrystals.core.gui.GuiRender;

public abstract class Button extends Control
{
private static final ResourceLocation BUTTON_HOVER = new ResourceLocation("powercrystals", "core/textures/button_hover.png");
private static final ResourceLocation BUTTON_ENABLED = new ResourceLocation("powercrystals", "core/textures/button_enabled.png");
private static final ResourceLocation BUTTON_DISABLED = new ResourceLocation("powercrystals", "core/textures/button_disabled.png");

private String _text;

public Button(GuiContainer containerScreen, int x, int y, int width, int height, String text)
Expand All @@ -26,15 +31,15 @@ public void drawBackground(int mouseX, int mouseY, float gameTicks)
{
if(enabled && isPointInBounds(mouseX, mouseY))
{
GL11.glBindTexture(GL11.GL_TEXTURE_2D, containerScreen.mc.renderEngine.getTexture("/powercrystals/core/textures/button_hover.png"));
containerScreen.mc.renderEngine.func_110577_a(BUTTON_HOVER);
}
else if(enabled)
{
GL11.glBindTexture(GL11.GL_TEXTURE_2D, containerScreen.mc.renderEngine.getTexture("/powercrystals/core/textures/button_enabled.png"));
containerScreen.mc.renderEngine.func_110577_a(BUTTON_ENABLED);
}
else
{
GL11.glBindTexture(GL11.GL_TEXTURE_2D, containerScreen.mc.renderEngine.getTexture("/powercrystals/core/textures/button_disabled.png"));
containerScreen.mc.renderEngine.func_110577_a(BUTTON_DISABLED);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GuiRender.drawTexturedModalRect(x, y, 0, 0, width / 2, height / 2);
Expand Down
11 changes: 8 additions & 3 deletions src/powercrystals/core/gui/controls/SliderHorizontal.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
import org.lwjgl.opengl.GL11;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import powercrystals.core.gui.Control;
import powercrystals.core.gui.GuiColor;
import powercrystals.core.gui.GuiRender;

public abstract class SliderHorizontal extends Control
{
private static final ResourceLocation BUTTON_HOVER = new ResourceLocation("powercrystals", "core/textures/button_hover.png");
private static final ResourceLocation BUTTON_ENABLED = new ResourceLocation("powercrystals", "core/textures/button_enabled.png");
private static final ResourceLocation BUTTON_DISABLED = new ResourceLocation("powercrystals", "core/textures/button_disabled.png");

private int _value;
private int _valueMax;

Expand Down Expand Up @@ -49,15 +54,15 @@ public void drawForeground(int mouseX, int mouseY)

if(enabled && isPointInBounds(mouseX, mouseY))
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_hover.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_HOVER);
}
else if(enabled)
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_enabled.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_ENABLED);
}
else
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_disabled.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_DISABLED);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GuiRender.drawTexturedModalRect(sliderX, sliderY, 0, 0, sliderWidth / 2, sliderHeight / 2);
Expand Down
11 changes: 8 additions & 3 deletions src/powercrystals/core/gui/controls/SliderVertical.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package powercrystals.core.gui.controls;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;

Expand All @@ -10,6 +11,10 @@

public abstract class SliderVertical extends Control
{
private static final ResourceLocation BUTTON_HOVER = new ResourceLocation("powercrystals", "core/textures/button_hover.png");
private static final ResourceLocation BUTTON_ENABLED = new ResourceLocation("powercrystals", "core/textures/button_enabled.png");
private static final ResourceLocation BUTTON_DISABLED = new ResourceLocation("powercrystals", "core/textures/button_disabled.png");

private int _value;
private int _valueMax;

Expand Down Expand Up @@ -50,15 +55,15 @@ public void drawForeground(int mouseX, int mouseY)

if(enabled && isPointInBounds(mouseX, mouseY))
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_hover.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_HOVER);
}
else if(enabled)
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_enabled.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_ENABLED);
}
else
{
containerScreen.mc.renderEngine.bindTexture("/powercrystals/core/textures/button_disabled.png");
containerScreen.mc.renderEngine.func_110577_a(BUTTON_DISABLED);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GuiRender.drawTexturedModalRect(sliderX, sliderY, 0, 0, sliderWidth / 2, sliderHeight / 2);
Expand Down
4 changes: 0 additions & 4 deletions src/powercrystals/core/inventory/InventoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ public static IInventoryManager create(IInventory inventory, ForgeDirection targ
{
return new InventoryManagerSided((ISidedInventory)inventory, targetSide);
}
else if(inventory instanceof net.minecraftforge.common.ISidedInventory)
{
return new InventoryManagerLegacy((net.minecraftforge.common.ISidedInventory)inventory, targetSide);
}
else if(inventory instanceof IInventory)
{
return new InventoryManagerStandard(inventory, targetSide);
Expand Down
Loading