
Qwertygiy
Members-
Posts
41 -
Joined
-
Last visited
Everything posted by Qwertygiy
-
I am making a block of uranium as part of the mod I am making mainly as a testing project to see how well I can return to Minecraft modding. So far I have made it able to swirl with particles just fine, but getting it to grant potion effects is troubling me. It does give me the poison effect at a correct chance, but only visually. My hearts turn green, particles appear, the status effect appears in my HUD, but it does not actually decrease my health like a potion or cave spider bite does, and when it reaches 0:00, does not disappear. I suspect that somehow it is only applying on the client side, even though updateTick is server side? What am I doing wrong? public void updateTick(World par1World, int par2, int par3, int par4, Random random) { if(!par1World.isRemote) //added this and still no luck { AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par2, (double)par3, (double)par4, (double)(par2 + 1), (double)(par3 + 1), (double)(par4 + 1)).expand(4, 4, 4); List list = par1World.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); //tried EntityPlayer.class too, same problem Iterator iterator = list.iterator(); EntityLivingBase entityalive; while (iterator.hasNext()) { entityalive = (EntityLivingBase)iterator.next(); if(random.nextInt(128) == 1) { entityalive.addPotionEffect(new PotionEffect(19, 200, 1)); } } } } EDIT: After commenting out the isRemote part, it seems to work _sometimes._ I suspect that the random value is not the same on client and server and thus the poison effect will not work unless both happen to strike at the same time. I've tried using world.rand, I've tried making a new random with world.getWorldTime() as the seed. Is there any way to fix this without having to remove the randomness entirely?
-
[SOLVED]Nothing happens after installing the forge 1.7.10
Qwertygiy replied to lengkaikai's topic in Support & Bug Reports
This is with Forge 1.7.2, but I get the same problem, so this log may help. fml-client-latest.log contains the following: My game crashes on trying 1.7.10 because this computer cannot turn off Hardware Acceleration and I don't have OpenGL 2.1, and this crash occurs with both Recommended and Latest versions of Forge for 1.7.2; is Java 8 not supported? -
Question: Will 1.5.x mods with SRG-obfuscation work on 1.6?
Qwertygiy replied to Qwertygiy's topic in General Discussion
That's what I thought. I know that 1.5 broke 1.4 things and that was a less major update than 1.6. Thank you for confirming. -
I don't mean to be stupid, but my computer is so full and slow that I don't want to experiment with downloading the launcher and Forge and setting everything up to try and use some non-updated 1.5.x mods alongside Minecraft 1.6.2 and updated mods. I'm not asking whether changes to Minecraft will have broken specific mods; I know that this is inevitable. I just want to know whether it's all broken out of the box like it used to be before SRG obfuscation.
-
Does anyone have the knowledge to help me fix this..?
-
Does anyone have the knowledge to help me fix this..?
-
I'm pretty new to using NBT data, and it's been months since I've been very active at making anything at all, so this is probably me missing something pretty obvious. What I'm trying to do is make a custom record item that uses one item ID for multiple songs, and uses NBT data to store the song name for playing. Here's my item class: Here's the item declarations and such in the main mod file: I can see the non-crafted item with no NBT data in BEI just fine. But when I try to craft it, I get this crash. From Mojang error report java.lang.NullPointerException at net.minecraft.item.ItemStack.func_77954_c(ItemStack.java:138) at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:339) at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443) at net.minecraft.client.gui.inventory.GuiContainer.renderSlotItem(GuiContainer.java:456) at net.minecraft.client.gui.inventory.GuiContainer.func_74192_a(GuiContainer.java:443) at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:146) at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1168) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:867) at net.minecraft.client.Minecraft.run(Minecraft.java:756) at java.lang.Thread.run(Unknown Source) From Forge log: 2013-04-13 11:09:33 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Rendering screen 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1177) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:867) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:756) 2013-04-13 11:09:33 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source) 2013-04-13 11:09:33 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.item.ItemStack.func_77954_c(ItemStack.java:138) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:339) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainer.renderSlotItem(GuiContainer.java:456) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainer.func_74192_a(GuiContainer.java:443) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:146) 2013-04-13 11:09:33 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1168) 2013-04-13 11:09:33 [iNFO] [sTDERR] ... 3 more So, can anyone help me with this?
-
For several MC versions, at least since 1.4.5, probably in 1.4.2, maybe even in 1.3.2, Forge has automatically supported HD textures.
-
[1.5] [SOLVED] How would I render multiple textures on a block?
Qwertygiy replied to Qwertygiy's topic in Modder Support
UPDATE: I have gotten it to work, to some extent. With just very basic modifications to that wiki code (adding the new render method override to the block class), I've gotten this with vanilla glass and ice textures: I still have a lot of work to do to get it to do what I want, but I do have it working a little bit. -
[1.5] [SOLVED] How would I render multiple textures on a block?
Qwertygiy replied to Qwertygiy's topic in Modder Support
I looked at the Secret Rooms mod code; it doesn't seem to be what I'm looking for either -- useful, definitely, if I ever want to make camoflaging blocks, which I probably will if this project gets underway, but it's not what I'm after right now, unfortunately. The wiki page might be able to help me if it works with 1.5; I'll give it a shot soon and see if I can make that work for me. Thank you for your help! -
[1.5] [SOLVED] How would I render multiple textures on a block?
Qwertygiy replied to Qwertygiy's topic in Modder Support
Does anyone else think they know how to do this? If nobody does I will probably have to give up on my project. -
[1.5] [SOLVED] How would I render multiple textures on a block?
Qwertygiy replied to Qwertygiy's topic in Modder Support
Assuming I understood you correctly, I'm not asking about different textures on different sides or metadata. I'm talking about overlaying multiple textures on a single face of a single metadata block, like RailCraft's ores, so that I can have a base texture, and then several partial textures that overlay on top as I want them to, so that I only need around 10 or 16 textures instead of 2000. Thank you for what you did tell me, but it's not what I was asking, sorry. -
[1.5] [SOLVED] How would I render multiple textures on a block?
Qwertygiy replied to Qwertygiy's topic in Modder Support
A day later... Does anybody at all know how? I really don't know enough fancy render stuff (or have the hours and hours of patience to try, fail, and repeat x1000) to try to learn this completely on my own. -
How would I go about rendering multiple layers of textures on a single block face? I've seen AtomicStryker's tutorial on updating textures for 1.5, but I want to, for example, be able to have fancy smart-auto-connected stained glass blocks, without having fifty thousand separate sprites. I know it could be done in some way in 1.4, as RailCraft, XyCraft, and ThaumCraft all did it, but I haven't done much modding in a while and I doubt any of it would work in 1.5 anyway. If someone else somewhere has asked this question and you can link me to a detailed response that they got, that would be great too. But I'm not an expert modder (I haven't successfully done complex stuff since 1.2.5, and not much at all since 1.3) so the more detailed and simple an answer is, the more it would help me.
-
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
I've put my code up on GitHub at https://github.com/Qwertygiy/Agricrafture to make it easier to get help figuring out how to get this working. In addition to it really not liking containers with over 45 slots, my packets and crafting don't appear to be working properly. All in all it's a big mess and I've looked through other code to try to figure out how to fix it but so far am getting nowhere. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
Okay, I did some further work. This time, I basically just copied the vanilla Furnace class and modified it to have 2 burn slots and 4 recipe slots. Same problem as before -- upon right-clicking the block, something tries to access the 46th slot in a 45-slot Array. Since both Containers have more than 45 slots, I suspect I am missing some code somewhere. -
No, but add an extra parameter. if (item.itemID == Ingot.shiftedIndex && item.getItemDamage() == ###) where ### is the metadata/damage value. For example, if you're crafting birch planks, if (item.itemID == Block.planks.shiftedIndex && item.getItemDamage() == 2) would be the if line.
-
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
The high ID was an attempt at bug fixing mostly; because I think I found that the ID I was using (either 0 or 1, I forget) might have been the one used by the vanilla Crafting Table GUI, causing confusion in the code. As it still happened with the high ID, that must not be the case and I'll change it back. I added the remote world check, no obvious difference in the result. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
GuiCulinary: http://pastebin.com/ZiqRdQHE CulinaryGuiHandler: http://pastebin.com/b9R5chTV BlockCulinary: http://pastebin.com/sdMU5Yv4 AgricraftureMain (mod file): http://pastebin.com/C1zr8fMR My proxy classes are currently empty except for preregistering my block texture file. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
Added this function to ContainerCulinary: @Override public Slot getSlot(int par1) { if(par1 < this.inventorySlots.size()) { return (Slot)this.inventorySlots.get(par1); } else { return (Slot)null; } } and also defined inv in TileEntityCulinary immediately instead of in the constructor. I get the same crash as before upon right-clicking the block. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
It's when I right-click the block to open the GUI. Here's TileEntityCulinary.java: http://pastebin.com/h3Qm3LDY Note: everything after line 174 is code involving CulinaryRecipe.java. And yes, before it's a true API I need to remove that import core.* line. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
I am not, so any packet handling is being done either by Forge or by vanilla code, but I may have to use packets in the future. I'm 99% sure of that, and my utter lack of knowledge on how to do so may somehow be involved with the crash, but I don't want to add 300 more lines of code that won't fix the crash. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
Any ideas as to what I should do to fix this? -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy replied to Qwertygiy's topic in Modder Support
inv = new ItemStack[11]; Yep, my TE's array size is fine. You may notice this line in the class file: FMLLog.log(Level.FINE, "ContainerCulinary initiation complete."); and that line DOES show up in the log just before the crash. -
[Unsolved] Array-related crash when opening container GUI
Qwertygiy posted a topic in Modder Support
I have a block with a tile entity inventory, and after spending a couple hours fixing some rookie mistakes, I have run into an actual crash that does not mention any of my code anywhere. Here's the direct crash trace: Now, the first three lines appear to be rather obvious; since 0 is inclusive, something is looking for the 46th item in a 45-item array. The next line isn't too helpful, but the fifth is slightly enlightening. Here's the relevant functions in Container.java: public Slot getSlot(int par1) { return (Slot)this.inventorySlots.get(par1); //line 123 } public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) { for (int var2 = 0; var2 < par1ArrayOfItemStack.length; ++var2) { this.getSlot(var2).putStack(par1ArrayOfItemStack[var2]); //line 341 } } So, to me, putStacksInSlots would appear to be the 'true culprit' of the stack trace. The array here apparently has more than 45 slots, while the Container does not, and so it crashes. I'm using the Recommended Forge, #251; is it a bug with the API or am I doing something incorrectly to set it off? I looked through the change log on Jenkins to make sure it wasn't a bug fixed in a recent release, and it wasn't mentioned. Here's my Container class: Counting slots, there should be 47 of them -- 36 for the player inventory, and 11 for the tile entity. Any ideas what's going on and how to fix it?