
memcallen
Members-
Posts
343 -
Joined
-
Last visited
Everything posted by memcallen
-
hugo I tried your way the name is red but it's item.null and the name was working fine before
-
Would it be possible to use a .lang file something like item.itemname.color? or does it have to in the item class
-
How can I set an item name colour? I've seen it done in some large mods like IC2 with different tiers is a different colour and I want to do something like it. Does it just require something extra or more code?
-
I don't see you registering your IWorldGenerator class in the main mod file, also you should use a .lang file instead of using LanguageRegistry.addname()- this method is deprecated
-
Hooray! its rendering!
-
I've tried putting a break point it's rendering but not drawing anything. I'll try it with a float instead of an int.
-
I'm pretty sure that both buildcraft and mekanism use a buffer in their pipes/cables
-
I registered it in my clientproxy like all my other blocks
-
Please help me
-
There is two ways to do this, first you could have each cable store a buffer in their nbt(this requires packets+nbt), secondly you could have a device that stores/ uses the energy to scan along the cable until it reaches a power source(this is a bit tedious). If the cables don't use metadata you could use that but it would only be able to store 15 units of energy.
-
I have no idea why but my block "SteamGenerator" is not rendering I've copied my other two classes that also use special rendering but this one doesn't work when I use t.addVertexWithUV() (t=tessellator.instance) heres my renderer class: @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float meta) { GL11.glTranslated(x, y, z); GL11.glDisable(GL11.GL_LIGHTING); bindTexture(steamgentext); t.startDrawingQuads(); t.setTextureUV(1/4, 1/4); t.addVertexWithUV(0, 1, 1, 1/4, 1/4); t.setTextureUV(1/4, 0/4); t.addVertexWithUV(1, 1, 1, 1/4, 0); t.setTextureUV(0/4, 0/4); t.addVertexWithUV(1, 1, 0, 0, 0); t.setTextureUV(0/4, 1/4); t.addVertexWithUV(0, 1, 0, 0, 1/4); t.draw(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glTranslated(-x, -y, -z); } in my block class I have: @Override public boolean isOpaqueCube(){ return false; } @Override public int getRenderType() { return -1; } public boolean renderAsNormalBlock() { return false; } I've registered the tileEntity,the TileEntitySpecialRenderer but it still doesn't render sidenote:my .png file has 16 textures (4x4)
-
[SOLVED] Set Direction of Block (chest) during generate()
memcallen replied to gottsch's topic in Modder Support
once you set the block you have to set the block metadata after using world.setBlockMetadataWithNotify(). I'm not sure if this works with chests but it should work -
...I just realized that I could use setters/getters sorry for wasting your time
-
also what does the BaseNodeRequest do? I have an error on it and theres no import.
-
I haven't actually figured out guis yet so there is no gui it's just currently a BlockContainer, a TileEntity and TileEntitySpecialRenderer. I will check out how to implement onMessage with my SteamGenerator class, and I'm using packets (the onDataPacket method).
-
I'm currently making a steam generator and I found a small problem. I have no idea how to send a variable to the TileEntity. I'm currently using a packet to relay 2 ints, one for water amount and one for temperature but I can't set the ints from my main block class. Could someone give me an example on how to do this?
-
Someone please help me? I've spent atleast 20 hours trying to figure this out and have made no progress...
-
Now in the proxy it is returning new BluePrintTableGui() and also I set it so it returns it o the client instead of the server
-
Yeah but it needs to be a BlockContainer because it's a tileEntity or do you not need a BlockContainer for tileEntities?
-
I realized I was returning an earlier attempt at a gui, I replaced it with the correct class but I still crashed. Also I was following ScratchForFun's windmill gui tutorial
-
hmm... odd even though I hard-wired it to return my guiscreen class I still crash
-
wait nvm I see what you mean
-
were am I returning null?
-
I'm getting an error on player.openGui I've seen it on multiple gui tuts. but its not working for me common proxy: package com.example.gammacraft.Proxy; import com.example.gammacraft.gui.ProcessorGui; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import cpw.mods.fml.common.network.IGuiHandler; public class ProxyCommon implements IGuiHandler{ public void registerRenderers(){ } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if ( ID == ProcessorGui.GUI_ID ){ return new ProcessorGui();}else{ return null;} } } for the main file I put NetworkRegistry.INSTANCE.registerGuiHandler(Instance, proxy); in my init function and the block file is: package com.example.gammacraft.blocks; import com.example.gammacraft.TileEntity.BluePrintTableTileEntity; import com.example.gammacraft.gui.BluePrintTableGui; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BluePrintTable extends BlockContainer{ @SideOnly(Side.CLIENT) public static IIcon top; @SideOnly(Side.CLIENT) public static IIcon side; public BluePrintTable(int i, Material p_i45386_1_) { super(p_i45386_1_); this.setBlockName("BluePrintTable"); this.setCreativeTab(CreativeTabs.tabMisc); } @Override public TileEntity createNewTileEntity(World var1, int var2) { return new BluePrintTableTileEntity(); } public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float Hitx, float Hity, float Hitz) { player.openGui(BluePrintTableGui.class, 20, world, x, y, z); return true; } } the guiScreen is: package com.example.gammacraft.gui; import com.example.gammacraft.TileEntity.BluePrintTableTileEntity; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; public class BluePrintTableGui extends GuiScreen{ public static final int GUI_ID = 20; public static final ResourceLocation texture = new ResourceLocation("gammacraft","textures/BluePrintTable.png"); public BluePrintTableGui() {} @Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); this.drawRect(50, 50, 100, 100, 5); } } the stacktrace is ---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 9/12/14 7:19 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2255) at com.example.gammacraft.blocks.BluePrintTable.onBlockActivated(BluePrintTable.java:44) at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:349) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1442) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1949) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:953) at net.minecraft.client.Minecraft.run(Minecraft.java:870) at net.minecraft.client.main.Main.main(Main.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2255) at com.example.gammacraft.blocks.BluePrintTable.onBlockActivated(BluePrintTable.java:44) at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:349) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1442) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player867'/221, l='MpServer', x=276.37, y=78.62, z=652.86]] Chunk stats: MultiplayerChunkCache: 225, 225 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (248,64,248), Chunk: (at 8,4,8 in 15,15; contains blocks 240,0,240 to 255,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 39191 game time, 39191 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 58 total; [EntityClientPlayerMP['Player867'/221, l='MpServer', x=276.37, y=78.62, z=652.86], EntityBat['Bat'/400, l='MpServer', x=344.75, y=48.10, z=683.25], EntitySheep['Sheep'/401, l='MpServer', x=338.47, y=70.00, z=683.44], EntityPig['Pig'/287, l='MpServer', x=203.50, y=67.00, z=715.31], EntityPig['Pig'/395, l='MpServer', x=344.61, y=69.00, z=627.08], EntityPig['Pig'/394, l='MpServer', x=338.36, y=71.00, z=616.26], EntityPig['Pig'/393, l='MpServer', x=342.84, y=72.00, z=609.84], EntityPig['Pig'/392, l='MpServer', x=349.28, y=70.00, z=614.47], EntityBat['Bat'/399, l='MpServer', x=347.22, y=47.10, z=681.94], EntityBat['Bat'/398, l='MpServer', x=336.13, y=47.10, z=685.34], EntityMinecartChest['entity.MinecartChest.name'/397, l='MpServer', x=342.50, y=38.50, z=680.50], EntityMinecartChest['entity.MinecartChest.name'/396, l='MpServer', x=337.50, y=38.50, z=669.50], EntitySheep['Sheep'/385, l='MpServer', x=329.50, y=80.00, z=677.33], EntityPig['Pig'/384, l='MpServer', x=322.50, y=81.00, z=666.31], EntitySquid['Squid'/307, l='MpServer', x=232.33, y=56.16, z=587.08], EntityBat['Bat'/309, l='MpServer', x=235.49, y=19.66, z=670.56], EntityBat['Bat'/308, l='MpServer', x=237.25, y=51.10, z=668.47], EntityChicken['Chicken'/310, l='MpServer', x=228.41, y=75.00, z=718.56], EntitySheep['Sheep'/315, l='MpServer', x=248.38, y=72.00, z=646.47], EntityBat['Bat'/314, l='MpServer', x=249.75, y=29.10, z=625.75], EntityBat['Bat'/317, l='MpServer', x=249.93, y=12.98, z=663.66], EntityBat['Bat'/316, l='MpServer', x=249.99, y=12.10, z=657.67], EntitySheep['Sheep'/319, l='MpServer', x=245.84, y=77.00, z=671.44], EntityBat['Bat'/318, l='MpServer', x=248.37, y=21.56, z=667.28], EntityPig['Pig'/288, l='MpServer', x=201.03, y=67.00, z=713.84], EntityPig['Pig'/292, l='MpServer', x=215.69, y=76.00, z=691.09], EntityPig['Pig'/293, l='MpServer', x=221.53, y=73.00, z=702.47], EntityPig['Pig'/294, l='MpServer', x=220.69, y=74.00, z=718.50], EntityChicken['Chicken'/295, l='MpServer', x=208.81, y=69.00, z=704.25], EntityChicken['Chicken'/296, l='MpServer', x=209.81, y=68.00, z=717.16], EntityPig['Pig'/297, l='MpServer', x=209.96, y=69.00, z=715.58], EntityPig['Pig'/351, l='MpServer', x=285.50, y=67.00, z=686.84], EntityPig['Pig'/350, l='MpServer', x=281.28, y=70.00, z=677.50], EntityPig['Pig'/349, l='MpServer', x=277.52, y=77.00, z=655.44], EntityPig['Pig'/348, l='MpServer', x=283.53, y=73.00, z=667.44], EntityPig['Pig'/347, l='MpServer', x=274.32, y=78.00, z=638.50], EntityPig['Pig'/346, l='MpServer', x=277.69, y=78.00, z=638.50], EntityBat['Bat'/326, l='MpServer', x=258.75, y=50.10, z=628.25], EntityBat['Bat'/327, l='MpServer', x=261.28, y=48.10, z=626.75], EntityBat['Bat'/325, l='MpServer', x=261.38, y=35.74, z=595.95], EntityPig['Pig'/334, l='MpServer', x=258.84, y=65.00, z=712.06], EntityPig['Pig'/335, l='MpServer', x=270.16, y=64.00, z=708.38], EntityPig['Pig'/332, l='MpServer', x=258.50, y=68.00, z=678.03], EntityPig['Pig'/333, l='MpServer', x=262.78, y=71.00, z=674.50], EntitySheep['Sheep'/330, l='MpServer', x=270.13, y=76.00, z=638.53], EntityPig['Pig'/331, l='MpServer', x=260.50, y=71.00, z=672.16], EntityBat['Bat'/328, l='MpServer', x=262.50, y=48.10, z=626.75], EntityBat['Bat'/329, l='MpServer', x=258.72, y=50.10, z=628.25], EntityPig['Pig'/369, l='MpServer', x=315.78, y=66.00, z=682.88], EntityPig['Pig'/368, l='MpServer', x=304.88, y=81.00, z=658.75], EntitySheep['Sheep'/383, l='MpServer', x=331.50, y=82.00, z=669.66], EntityPig['Pig'/382, l='MpServer', x=320.05, y=85.00, z=654.12], EntityPig['Pig'/352, l='MpServer', x=286.46, y=64.69, z=690.58], EntityPig['Pig'/353, l='MpServer', x=283.53, y=64.00, z=694.78], EntityPig['Pig'/354, l='MpServer', x=275.94, y=64.00, z=710.97], EntityPig['Pig'/364, l='MpServer', x=292.61, y=65.47, z=684.72], EntitySheep['Sheep'/365, l='MpServer', x=290.59, y=70.00, z=672.31], EntityPig['Pig'/363, l='MpServer', x=301.47, y=66.00, z=680.31]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:384) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2433) at net.minecraft.client.Minecraft.run(Minecraft.java:899) at net.minecraft.client.main.Main.main(Main.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
-
your problem is that you need to use packets to relay to nbt data from the client to the server (even if its in singleplayer) and when you log out it deletes whatever was saved if you don't