Everything posted by Draco18s
-
1.7.10 Stained pane Glass Metadata or TileEntity
Or metadata.
-
[1.7.10][SOLVED]Rotate tileentity model
It's a vector, actually. You can rotate around an arbitrary vector if you'd like, too: GL11.glRotatef((meta - 1) * (-90), 0.707F, 0.707F, 0F); But yes, for most purposes you'll be rotating around an axis.
-
[1.7.10] Turn block to Default Block (Techne Model)
This is the worst idea ever. Use a damn tile entity for christ sakes.
-
[1.7.10] Gui without tileEntity?
Make your gui extend GuiScreen instead.
-
[1.7.10] Is it possible to use an Items object in a HashMap?
Any class that meaningfully overrides hashCode and equals is hash-mappable. Vanilla blocks and items are natively stored in a hashmap-type object ( RegistryNamespaced , which buried in the object hierarchy utilizes IdentityHashMap ).
-
Saving a Reference to an Entity (Save/Load Persistence)
Yep, just got it working. Did a slightly larger volume, just in case the cart gets away for any reason. Thanks muchly.
-
Saving a Reference to an Entity (Save/Load Persistence)
TE and cart will be in the same chunk. Specifically 1 block away from each other.
-
Saving a Reference to an Entity (Save/Load Persistence)
Oh, I can get a persistent ID all I want. I have no way of going "Hey, server, find me this non-living entity by this UUID." I can get players by UUID, but not any thing else. I'll take a look at leashes. I was going that route, but I wasn't sure if that'd even work for entities like minecarts (its not transparent on if those are saved/loaded and keep the same UUID, or what. I would assume so, but you know what they say about about assuming...).
-
[1.8] class of Mushroom Block?
Question: [/img] or [/img] ? Because as Diesieben says, Huge Mushrooms are BlockHugeMushroom.
-
onNeighbourBlock in metadata block class
EXACTLY LIKE HOW YOU CHECK THE BLOCK BELOW IT FOR META 1! Yeesh.
-
[1.8] class of Mushroom Block?
Blocks.red_mushroom; ? Blocks.brown_mushroom; ? It's amazing what you can find by using ctrl-f inside Block.java blockRegistry.addObject(39, "brown_mushroom", (new BlockMushroom()).setHardness(0.0F).setStepSound(soundTypeGrass).setLightLevel(0.125F).setBlockName("mushroom").setBlockTextureName("mushroom_brown")); blockRegistry.addObject(40, "red_mushroom", (new BlockMushroom()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("mushroom").setBlockTextureName("mushroom_red"));
-
[1.7.10] How can I name my custom Logs?
[nobbc][/nobbc] causes italics. You need to wrap it in [nobbc][nobbc][/nobbc]
-
[1.7.10][1.8] Creating filled_map items pre-populated with data - How?
On this, you can change that, but I wouldn't bother. I think there's a piece that makes it so that it uses less network data, but I don't recall exactly. I don't remember what bits to fiddle with to do it, but I did make it update slower than normal (for one of my maps). It might be the mapData.setColumnDirty(...) function.
-
Cant load test run in eclipse
You have a null pointer in your main mod file
-
onNeighbourBlock in metadata block class
Then you're doing several things wrong. 1) That code sets the block to the north, not itself 2) That code never says "am I metadata 0?" 3) That code uses update flag 1, not 3 (you almost always want 3)
-
Saving a Reference to an Entity (Save/Load Persistence)
I need to be able to save out and then reload a reference to a Minecart, because the TileEntity is "catching" it and hold it in place until its finished, then reapplying some momentum to it when its done, so that the cart continues on its merry way. Problem is, I can't seem to make that "reapplying some momentum to it when its done" part work after a save/load because I literally have no way of getting an entity from the World by anything other than incremental spawn ID (not guaranteed to persist, AFAIK) or by AABB (not save-able or not able to ensure match). What am I missing?
-
[1.7.10] How can I name my custom Logs?
FTFY
-
[1.8] consume ItemStacks used in recipes not working ?
Vanilla recipe objects are designed to only consume 1 item in a stack. If you want it to consume more, you need to create your own IRecipe class.
-
Reflection and obfuscation - Not the best friends!
Oh that. Not that I know of. All that info is stored in a CSV file: C:\Users\[username]\.gradle\caches\minecraft\net\minecraftforge\forge\[forge version]\unpacked\conf You want fields.csv and methods.csv and be aware that same-name objects in different classes have different obfuscated names.
-
[1.7.10][1.8] Creating filled_map items pre-populated with data - How?
Heh. I only remember that I chewed on it back in 1.6.4, I remember almost nothing other than what I was able to glean from my code. I did some pretty neat shit, though. Thinking about using the ore map with this custom data block I have (er, data object, it's not a Block ). It'd be harder to get data into the map (using the existing prospecting method) but would have a little more permanence.
-
[1.8] How to get the current Tick and partial tick count?
totalWorldTime is the "number of ticks the world has been active in memory" (I don't believe that unloaded dimensions will see this number increase; e.g. mod-added dims, as the nether and end always have some portions loaded). worldTime on the other hand is closer to a "current date." It doesn't tick when DaylightCycle is false and is incremented to sunrise when the player sleeps. Use them well (and don't use setWorldTime() unless you have a damn good reason to).
-
Reflection and obfuscation - Not the best friends!
There's a way of detecting if you're in a deobf environment (I don't use reflection often enough to be using that method, or remember what it's called) and you can do an if(obf) { str = "p_1234_0_" } else { str = "theThing" } and do the reflection with the str variable.
-
[1.7.10] Weird World Time issue
That may have been true once, but if you look at /** * Set current world time */ public void setWorldTime(long p_76068_1_) { this.worldTime = p_76068_1_; } in the same class, you'd notice that it doesn't enforce the note in the javadoc (which was written by someone contributing to MCP, not Mojang). And if you trace all usages back around to the things that actually make it go up, you'll notice a continuous lack of any %24000 math, except here in WorldServer.java: public void tick() { //... if (this.areAllPlayersAsleep()) { if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle")) { long i = this.worldInfo.getWorldTime() + 24000L; this.worldInfo.setWorldTime(i - i % 24000L); } this.wakeAllPlayers(); } //... } Which goes out of its way to insure that the value isn't truncated to 23999.
-
[1.7.10] Are events client side or server side?
No. http://www.minecraftforge.net/forum/index.php/topic,22764.0.html
-
Why are the blocks without tile_Entity loaded and the once with them aren't
?
IPS spam blocked by CleanTalk.