Everything posted by Draco18s
-
[1.7.10] Radiant Heat From Lava
Programming Sucks at a high level of abstraction enough. Having to think in single-byte instructions is maddening. Two freaking days to write 11 lines of code that insert 2 lines (in regular Java) into BlockCrops. #NeverAgain
-
[1.7.2] Trying to Insta-Kill Player with potion
- Problem sending message to player
That's not what @SideOnly is for.- [1.8]How to access and edit, adjacent tile entities.
Yeah, don't use bitwise AND unless you know what you're doing. Eclipse should throw an error...- [1.7.10] Prevent block placement above a certain block?
Fill the volume with invisible technical blocks that do not allow replacement (and otherwise are treated as air).- [1.8]How to access and edit, adjacent tile entities.
Unfortunately, I cannot tell which line in your pasted code is TileFuelGenerator.java line 366.- [1.8]Disable pickaxe swing animation? is posible
It does look like that, but here's how it's used in EntityLivingBase.java: public void swingItem() { ItemStack stack = this.getHeldItem(); if (stack != null && stack.getItem() != null) { Item item = stack.getItem(); if (item.onEntitySwing(this, stack)) //<-- RIGHT HERE { return; } } if (!this.isSwingInProgress || this.swingProgressInt >= this.getArmSwingAnimationEnd() / 2 || this.swingProgressInt < 0) { this.swingProgressInt = -1; this.isSwingInProgress = true; if (this.worldObj instanceof WorldServer) { ((WorldServer)this.worldObj).getEntityTracker().func_151247_a(this, new S0BPacketAnimation(this, 0)); } } }- Write Array List to NBT
And of what type is the ArrayList?- [1.7.10] Getting ItemStack from Slot.
Man, I fcuked up my own URL tags by including the second link! Haha.- [1.7.10] Getting ItemStack from Slot.
Fixed that mangled GitGUI] GitGUI is pretty easy to work with, once you have it set up correctly. It has its flaws, but for pushing and pulling a repo to GitHub its very simple.- Container help
Going to drop this in here because it's relevant.- [1.8]Is there any information about BlockState out there yet?
I think it will be more used than those skipped versions in the past, but yeah, there's going to be a A LOT of people--the lower skilled among us and those with less time--who will look at the sheer number of things that they'll have to relearn and say to themselves, "I think I'm happy with 1.7.10, I'll just add Gany's Surface for the 1.8 stuff."- Container help
- [1.7.10] setBlock event
's what everyone else says. And by "everyone" I mean the 12 year olds who claim 4 years of Java experience and can't figure out why casting an Entity that's an instanceof EntityWolf to EntityPlayer crashes.- Container help
That sounds like you're missing one of two things: 1) getDescriptionPacket and onDataPacket methods 2) if (worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); inside your setInventorySlotContents method.- Textures won't run in compiled .jar, but will in the Runtime Environment.
It might Have Something to do With The capitalization Of your Texture files and Folders. Does the Case that you Used in your Code match, EXACTLY, the case Used in your file Structure? Windows doesn't give two shits if its a T or a t, but once it's archived into a JAR or ZIP file, it does.- More than 2 render passes
Unfortunately that doesn't seem to be true for 1.7, I think you're right that it was possible in 1.6 but it's been eliminated, the renderer only ever performs pass 0 and 1, and it skips pass 1 if getRenderBlockPass() doesn't return >=1. Aw that's a bummer.- [1.7.10] EntityThrowable issue
While this isn't going to solve your problem... SummonSphereShoes var2 double var3 double var5 double var7 Egads man, use intelligent variable names, please. This reeks of decompiled and copy-pasted code. this.rand.nextInt(3); /*...*/ getRNG().nextFloat(); Dafuk? Why didn't you use this.rand both times? It's a protected variable, there's no reason to use the public getter, much less using it in one place and not-using it in another inside the same method.- More than 2 render passes
That: @Override public int getRenderBlockPass() { return renderPass; } Is not what that is for. That function is supposed to return which pass the block renders in, not what pass the rendering is on. Basically, Vanilla is asking your block what pass it needs to render in, you return a 0 (default value for an unassigned integer), which it then goes on to render a Pass 0 and a Pass 1 (your block cheating and getting both) and then finishes with having done two passes (leaving a 1 stored in renderPass, so the next time that getter will return 1, having changed nothing). If you need a third, make that function return 2. IIRC that will cause the Vanilla code to see that "at least one block" requires a third pass and will loop through an extra time.- [1.8]Is there any information about BlockState out there yet?
Probably a mid-point step towards the API. I suspect there will be a revision farther down the line that will make it "simpler" again while retaining the benefits of the new system. But...it probably means I'll be skipping 1.8- [1.7.10] setBlock event
Based on having done basically that ("scan all the blocks") it's pretty fast, especially if you use Ernio's method, just keep in mind that an ExtendedBlockStorage object is a 16x16x16 volume (so each one in the array covers a range of 16 blocks on the Y axis inside a given chunk). If you're only looking for grass and leaves, you can easily skip the first 3. The fourth is probably skippable as well. Then you just have to skip the null ones until you run out (its possible for a non-null volume to be above a null volume in the extreme hills biome!). You can see what I did here. There's some things I need to update (like the fact that at one time it was registered as an IWorldGenerator, and now isn't and is called from a chunk generation event, so I can remove that interface).1 But the core loop is valid and handles blocks as their internally native block IDs (to avoid the overhead of converting every int back to a Block). There's some bits you don't need, of course, but that should at least help you figure out how to translate human-readable x/y/z values into the NibbleArray indexes (I had to dig into each call from world.getBlock until I had dissected all the way down to an inline array lookup). Also be alert to the fact that I broke the 16 block volume into two 8 block volumes for my own purposes. 1Huh, I don't remember doing that (Line 151). The hell'd I do that for? *Fixes*- [1.7.10] Radiant Heat From Lava
Might want to hash the blocks' position so they don't all run at the same time.- [1.7.10] Parsing Cacti and Similar
No, I mean why do you need that information? What are you doing with it?- Crops: quantitydropped [Solved]
Look at the function in Item.java You return an ArrayList of ItemStacks- [1.8] Replacement for super.onItemUse?
Obviously add "return false" just so you can run it. But seriously, are you sure you have the right method signature? If you put @Override on the line above this method, what does Eclipse tell you? - Problem sending message to player
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.