mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-28 07:56:01 +00:00
Got cloak to render(W.I.P)
This commit is contained in:
1 parent
31f2c8b0de
commit
a0c3403904
2 files changed
+43
-2
No files matched your search
@@ -2,21 +2,27 @@ package tconstruct.client;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
|
||||
import javax.xml.parsers.*;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cpw.mods.fml.client.registry.*;
|
||||
import cpw.mods.fml.common.registry.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.*;
|
||||
import tconstruct.client.block.*;
|
||||
import tconstruct.client.entity.*;
|
||||
import tconstruct.client.entity.projectile.*;
|
||||
import tconstruct.client.event.EventCloakRender;
|
||||
import tconstruct.client.gui.*;
|
||||
import tconstruct.client.pages.*;
|
||||
import tconstruct.client.tabs.*;
|
||||
import tconstruct.client.tabs.TabRegistry;
|
||||
import tconstruct.common.*;
|
||||
import tconstruct.entity.*;
|
||||
import tconstruct.entity.projectile.*;
|
||||
@@ -29,10 +35,11 @@ import tconstruct.library.client.*;
|
||||
import tconstruct.library.crafting.ToolBuilder;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.util.player.*;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.*;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.client.model.ModelSlime;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.renderer.*;
|
||||
@@ -55,6 +62,10 @@ public class TProxyClient extends TProxyCommon {
|
||||
public static ArmorExtended armorExtended = new ArmorExtended();
|
||||
public static KnapsackInventory knapsack = new KnapsackInventory();
|
||||
|
||||
public TProxyClient(){
|
||||
MinecraftForge.EVENT_BUS.register(new EventCloakRender());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (ID == toolStationID)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package tconstruct.client.event;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.net.*;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
public class EventCloakRender {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onPreRenderSpecials(RenderPlayerEvent.Specials.Pre event){
|
||||
if(event.entityPlayer instanceof AbstractClientPlayer){
|
||||
AbstractClientPlayer abstractClientPlayer = (AbstractClientPlayer)event.entityPlayer;
|
||||
abstractClientPlayer.func_110310_o().field_110559_g = false;
|
||||
abstractClientPlayer.func_110310_o().field_110560_d = new BufferedImage(64, 32, BufferedImage.TYPE_INT_RGB);
|
||||
try {
|
||||
abstractClientPlayer.func_110310_o().field_110560_d.getGraphics().drawImage(new ImageIcon(new URL("https://dl.dropboxusercontent.com/u/48633261/cape.png")).getImage(), 0, 0, null);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
event.renderCape = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user