Everything posted by Draco18s
-
[1.7.10] [UNSOLVED] Injecting name from a config file into lang file?
You can try looking at the StringTranslate class.
-
[1.7.10] General guidelines for when code should run (server only or both)?
Entities should totally run their movement code on the client side, as while the server will enforce what it believes is going on, if the client end isn't doing ANYTHING then the entity will jump around as it periodically gets packets from the server correcting its location.
-
reading text in book and quills
You can also grab NBTExplorer and spy on the tags for any item.
-
Game Registry Error!
Sorry, your other thread isn't something I can help with. Off-hand I'd guess that the box is too large for the texture or that the UVs are wrong.
-
Unable to delete water blocks
No, I mean, why does it need to destroy the water in order to fly through it?
-
Unable to delete water blocks
Maybe I'm missing something, but why does it need to remove the water at all?
-
Game Registry Error!
And...as soon as someone tries to use this on a server, it will crash. public void load(FMLInitializationEvent event) { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeads.class, new TileEntityHeadsRenderer()); <-- really, client stuff outside the proxy?
-
Unable to delete water blocks
And by "changed" we mean "that was a vanilla bug, and it was fixed."
-
Unable to delete water blocks
Ok, so a couple things--and this is not related to your described problem. 1) if (b != Blocks.air && b == Blocks.bedrock) I do not think this is doing what you meant for it to do. 2) worldObj.removeTileEntity(x, y, z); unless your intent is for chests (and other containers) to destroy their contents and not drop them, this is likely not a good idea. 3) } else if (b != Blocks.air && b == Blocks.water){ and } else if (b != Blocks.air && b == Blocks.flowing_water){ same problem as #1 Now, related to your actual problem: You do know that two water source blocks adjacent to each other will cause the non-source block between them to become a source block, yes? Ok good. If it's not that behavior, then I don't know what's causing your problem.
-
[1.7.10] Creating custom particles.
Good to know. Also I didn't write that system, I just know it works.
-
[1.7.10]All Tile entities affected by changes to others
By the way, you also have this in your block class: TileEntityCoffeeMaker instance; That's a no-no, as the Block class is a singleton and you want to have more than one TileEntity instance. That's why world.getTileEntity(x,y,z) exists.
-
[1.7.10] Creating custom particles.
Couple classes involved: //sends the particle https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/components/ComponentOreRadar.java //renders the particle https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/RadarParticle.java //network handler https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/network/PacketHandlerClient.java
-
MultiTexture Block
You mean like... if(side == 0) { return bottom; } else if(side == 1) { return top; } else if... ? Basic java.
-
[1.7.10]Can't load textures or localize
See: http://www.minecraftforge.net/forum/index.php/topic,25120.0.html
-
[1.7.x] Rotate Entities on spawn [UNSOLVED] :(
setAngles applies to the body, setRotationYawHead only affects the head, as indicated by the method name. If that's not working, then it's clearly being changed by something else later. Double check your updateTick method.
-
[1.7.10] Particle System The Same For 1.7?
Not going to watch the video to find out what they're doing. That said, here's a particle that works in 1.7 https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/AntibuilderParticle.java
-
[1.7.x] Rotate Entities on spawn [UNSOLVED] :(
Logger.setAngles(180, 0); ?
-
[1.7.x] Rotate Entities on spawn [UNSOLVED] :(
player.rotationYaw + 180 ?
-
Built-in support for unique config files for each world
Like I said, nbt is performing "well enough" for the moment, so I've been focusing on other tasks. But I'll look into it.
-
Built-in support for unique config files for each world
I'll take a look, but really what I need for it is a better runtime data structure. The data is constructed during chunk generation and is heavily accessed. It's just ever so slightly too slow for my liking to use NBT, but I can't figure out a better way to structure the data such that the data that's needed is held in ram and offloaded to the drive as needed; similar to chunk data, just not that much of it (I've got only a dozen or so values that need to be tracked per chunk, but it needs to be keyed by both location and string-name).
-
Forge 1236 - Config Comments Unexpected Behavior
Ah! I didn't see that there was a comment-passed version. That makes so much more sense. The JavaDoc window that pops up auto-complete suggestions is not very wide, so anything beyond "string name" gets cut off and I've been using that particular getter for a while now (easily as far back as 1.6.2 if not earlier). Thanks as always, diesieben07!
-
[1.7.10] Changing server time in onServerTick
And your goal here is to...?
-
Built-in support for unique config files for each world
You want per-world configs? This is Java, use your FileIO. All the tools you need already exist. The hard one to figure out was "DimensionManager.getCurrentSaveRootDirectory()" and I found that just by poking around with the classes I knew about, knowing that one of them had to know where the world's save directory was. File folder = new File(DimensionManager.getCurrentSaveRootDirectory(), "myPerWorldStorage"); folder.mkdir(); try { FileInputStream fis = new FileInputStream(new File(folder, s)); DataInputStream instream = new DataInputStream(fis); //read/write file instream.close(); fis.close(); } catch (IOException e) { //error handling } BAM. And proof that I'm not talking out of my ass: Mind, I'm saving nbt files that store run-time data not configs, but that's the rough outline of what you need.
-
[1.7.10] Using NBT to store items in a tileentity ?
You're missing: tc.setTag("Items", nbttaglist); in writeToNBT. Blame Ives. @Override public void writeToNBT(NBTTagCompound tc) { super.writeToNBT(tc); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < inventory.length; ++i) { if (inventory[i] != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte)i); inventory[i].writeToNBT(nbttagcompound1); nbttaglist.appendTag(nbttagcompound1); } } tc.setTag("Items", nbttaglist); //you're missing this line //tc.setInteger("siftTime", siftTime); //this is how you would set other variables that need to be saved, such as burnTime for a furnace }
-
[1.7.10] Using NBT to store items in a tileentity ?
java.lang.RuntimeException: class com.Looke81.BioWarfare.tileentity.TileEntityAgarPlate is missing a mapping! This is a bug! You didn't register your TE. Game crashes if you don't, hehe.
IPS spam blocked by CleanTalk.