Everything posted by Draco18s
-
[1.7.10] Storing data about the player
Why are people always so eager about re-inventing the wheel? Because then the wheel is yours. And as I said, only if you really really need it. It's highly likely you don't, but I had one use-case where there wasn't a more appropriate place to put data. I probably could have used worldSaveData , but due to the size it probably wouldn't have been a good idea. It was also good experience reading and writing my own NBT files, I learned a lot about some particulars of the Minecraft internals.
-
[1.7.10] Storing data about the player
The data I/O isn't that bad, if you really, really need it. All depends on what you're trying to do.
-
[1.8]¿ Method to break areas of blocks in one shot? <SOLVED>
Packets
-
Question about AxisAlignedBB
an AABB has three dimensions: Length Width Height
-
[Solved] creating an area of effect help (block)
(I think you mean "can learn" ) But that's why that repository is public.
-
[1.7.10] [SOLVED] Directional Models
Usually you want to pass 3 so that the change notifies neighbors. In this case a 2 is sufficient as the block placement alerted neighbors anyway.
-
[1.8]¿ Method to break areas of blocks in one shot? <SOLVED>
Dude. Stop. Right now. You do not know enough Java to fuck around with threads.
-
[Solved] creating an area of effect help (block)
You need a TileEntity for this. I've actually done this, see this class which will handle what you want. It's highly custom though and will allow redstone interactions within the zone (as well as allowing the breaking of some blocks, like webs).
-
[Solved] creating an area of effect help (block)
So you're looking for a block that does what, exactly? I'm not familiar with Bucket's precious stones block so you'll have to explain ( see panel 2).
-
How to use the Profiler?
That was my guess, too.
-
How to show trace/debug log entries in output console?
Soooo... are you looking for the FMLLogger? A compile directive? What?
-
How to use the Profiler?
Ah, that could be. I've mostly not worried about it, as I can't trace it back to my code, thought it has been annoying at times.
-
How to use the Profiler?
Ahhh, I see. I'm running my code on TickPhase.End, but if the main profiler section was already ended then its too late. Bummer. Any idea on "checkPosition < toCheckCount"? When I get a lot of lag in dev, that's the section that's using the most CPU (over a third of the total is root.tick, two thirds of that is root.tick.gameMode, two thirds of that is root.tick.gameMode.checkLight or about 17% of the grand total).
-
How to show trace/debug log entries in output console?
System.out.println("Your message here")
-
How to use the Profiler?
So I've wanted to try and get some details on how long some of my code takes to execute, and thought I'd hook right in to the Shift-F3 display and was able to dig up these calls (this being a location-agnostic call to the server's profiler) from where it is used elsewhere in the code: MinecraftServer.getServer().theProfiler.startSection("_NAME_"); MinecraftServer.getServer().theProfiler.endSection(); Though I've never been able to find any of the sections I name in the F3 overlay (and frequently see a lot of time spent in root.tick.gameMode.checkLight.checkPosition < toCheckCount , on the order of 17% of the entire game loop time, and which I have no idea what that even is). My code that I'm trying to profile is inside a tick handler, so it should be in root.tick somewhere. Anyone have any experience with this?
-
[1.8] [SOLVED] Block emitting light
There's also a few other ways, by overriding one of the three or so getLight() methods.
-
[Solved][1.7.10] Get custom entity to spawn in multiple biomes
Yoink.
-
Auto Smelting Pickaxe
It drops two (and you can only pick up one) because the code is called on both client and server. The item stack created on the client can't be picked up. Also what diesieben said.
-
[1.7.10/9] Making a powered block glow?
You will need to learn Java ASM. Resource packs cannot and will not do what you are trying to do.
-
[1.7.10] [SOLVED] Directional Models
What "doesn't work"?
-
[1.7.10] [SOLVED] Directional Models
Get rid of public int metadir; Use setBlockMetadata when placing the block. A call to getBlockMetadata that you do nothing with is useless.
-
[1.7.10] [SOLVED] Directional Models
That is not what static is for. If you want to save the direction as metadata, save it as metadata, which you're doing and then ignoring in favor of the static variable.
-
[Solved] Block Ids
(That's why I think its more accurate to refer to it as a "save" or "world save")
-
[1.7.10] My Noobish Questions [URGENT]
On 2, look at the Iron Golem. There's an AITask that handles mob targetting and it's easy to find in the IronGolem's class. On 1, I don't think you're going to be able to accomplish that at your current skill level. Heck, I've peered into the void between worlds that is ASM and survived, and I am not sure where I'd even start to look for that.
-
[1.7.10] Tesselator opacity
Is your block declared as being opaque? Are you rendering in pass 0?
IPS spam blocked by CleanTalk.