Everything posted by Animefan8888
-
[1.10] transferstackinslot! Help!!
There is not a non packet way to do this as you need to communicate with the server from the client and packets are the only way to do this. You could instead of using a command use something else like an Item right click. And I believe the id's for mods are mod specific. Then converted to universal later.
-
Container disappears when created by item.
I only see one register call. And that is for your crate.
-
[1.10] transferstackinslot! Help!!
Read this http://www.minecraftforge.net/forum/index.php?topic=20135.0
-
Container disappears when created by item.
Show your Item/Block registration.
-
Making an item which is both stackable and damageable
Forge uses github and accepts pull requests, when they deem them useful. Ohh, so you mean suggest a change to Forge that would make it easier for me to do this? Not a change an addition, you will suggest the event OnSlotClickEvent or some name similar.
-
[1.10] transferstackinslot! Help!!
I believe that code is executed on the client side of things so you will want to send a packet with as little information as possible to get this done then do it in the packet.
-
Making an item which is both stackable and damageable
Pull Request I don't understand what you mean by pull request here, isn't that a github thing? Forge uses github and accepts pull requests, when they deem them useful.
-
Making an item which is both stackable and damageable
Pull Request
-
Container disappears when created by item.
Oops no the setBlockState one.
-
Making an item which is both stackable and damageable
You could put in a PR for slot click? Then when a slot is clicked handle averaging.
-
Container disappears when created by item.
Try changing the number at the end of the line to 1.
-
[1.10] transferstackinslot! Help!!
Where are you running the code at?
-
[Solved] [1.10.2] GuiContainer#drawRect drawing at wrong coordinates?
Show an image of what it should look like and one with what it does look like.
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
I would use the pop and push methods.
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
The # means you need an instance of that type. So do Color color = new Color(R, G, B).getRGB(); Oooooooh. I thought you guys just did that instead of using a decimal Well, good news is something displayed up top. Bad news is, I have no idea where any of that is coming from O_O https://gyazo.com/57afd183d694cde09cd5c1a2df39ce5a I believe that means that textures are bound weirdly. Instead of TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); Just do this.mc.getTextureManager().bindTexture(// Create ResourceLocation in a variable in the class instead of creating it every time the code is ran.//)
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
The # means you need an instance of that type. So do Color color = new Color(R, G, B).getRGB();
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
Only the percentage method has to be a double. I see what you were saying about the doubles. I felt dumb when I realized what you meant. haha. Unfortunately, the rectangle still isn't being drawn. No errors are being thrown. I checked the value for "getRightCoord()" and it's 58, just as it should be. I'm not sure what's going on. Here's the code again: public class GuiEnergyBarTwo extends Gui { private int xSize = 116, ySize = 17; //size of desired window. Max is 256x256 public void draw(){ System.out.println("" + getRightCoord()); TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); GlStateManager.pushMatrix(); //---- inner ---- drawRect(0, 0, getRightCoord(), ySize - 1, 1); //---- outline ---- GlStateManager.enableAlpha(); drawTexturedModalRect(0, 0, 0, 0, xSize, ySize); GlStateManager.popMatrix(); } private int getRightCoord(){ return (int)((ClientProxy.clientInfo.getEnergyPercentage() /100) * xSize); //this returns the retrieved percentage of the length of the rectangle } } Try making the last value in drawRect a RGB value using Color#getRGB()
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
Only the percentage method has to be a double.
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
First thing is first you are using integers when you should be using doubles or floats. That may fix your problem.
-
Container disappears when created by item.
This is probably why. Why are you doing this? int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(stack, playerIn, worldIn, pos); if (hook != 0) return hook > 0 ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
-
[1.10.2] Client can't connect to server
According to the error you are sending a packet and it is erroring on this line https://github.com/tiffit/TaleCraft/blob/master/src/main/java/talecraft/network/packets/StringNBTCommandPacket.java#L34 With a index out of bounds exception as said in your log at line 1586.
-
Held Block Display
You wouldn't cause blocks are called from both sides. You must call it in your ClientProxy.
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
Okay, I think this is the last problem. I created this new class, hold an instance of it in the ClientProxy, and just manually call ClientProxy.energyGui.draw() in the event you said above. The outline draws fine now and allows for movement, but the "inner" area (drawRect(...)) doesn't display at all. Would you happen to have any hunches off the top of your head? public class GuiEnergyBarTwo extends Gui { private int xSize = 116, ySize = 17; //size of desired window. Max is 256x256 public void draw(){ TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); GlStateManager.pushMatrix(); //---- inner ---- drawRect(0, 0, getRightCoord(), ySize - 1, 1); //---- outline ---- GlStateManager.enableAlpha(); drawTexturedModalRect(0, 0, 0, 0, xSize, ySize); GlStateManager.popMatrix(); } private int getRightCoord(){ int energyPercent = ClientProxy.clientInfo.getEnergyPercentage(); return xSize * (energyPercent/100); //this returns the needed percentage of the length of the rectangle } } Could you post ClientProxy.clientInfo.getEnergyPercentage();
-
Block Texture Problem [1.11]
Also post your block model jsons.
-
Creating advanced (Shift + Hover) Tooltips
Most likely in the "toolTip.add()" while the "sneak" key is not pressed it could render "Press " localized.key.name or something, would make it more dynamic Also a localization call.
IPS spam blocked by CleanTalk.