Everything posted by Draco18s
-
[1.7.10] Getting virtual chest inventory
- [Solved] Formatting achievement text
Oh, that's handy.- Counter Minecraft's Air Drag
Air drag is 2%. That is, velocity is multiplied by 0.98 every tick.- Initialize Ore Recipes with a list of items
Most of the things you program in your life will be "dirty workarounds." Some of them (like this one) is called a "helper method." http://www.stilldrinking.org/programming-sucks- [Solved] Formatting achievement text
Newlines aren't supported in the language files. Extended character sets (like UTF) are also...less than supported. You'll find that it'll work fine in dev, then you'll compile, and it won't work. So the § symbol that Minecraft uses for colors likely won't work either. You'll have to find a substitution string to use in the lang file which you'll extract after translating the untranslated version, and replace with the desired symbol (e.g. EnumChatFormatting.WHATEVER ). I had to do this to get the degree symbol (°): //class initialization //translate from UTF-16 hex to a string of (8-bit) chars. int codePoint = 0x1D3C; char[] charPair = Character.toChars(codePoint); /*public static string*/ deg = new String(charPair); ... //waila tooltip method: currenttip.add(StatCollector.translateToLocal("description.temperature") + ": " + val + deg); And from another project where I wanted to let a symbol be used in the lang file, which was then formatted (this is closer to what you're doing): #Lang file #Comments in lang files are denoted by the # at the front of the line #{H} here will use a UTF heart symbol effect.Hearts={H} //Item tooltip String heart = StatCollector.translateToLocal("effect.Hearts"); heart.replace("{H}", EnumChatFormatting.RED + ((char) 0x2665)); par3List.add(StatCollector.translateToLocal("effect.Health Boost") + " " + EnumChatFormatting.BLUE + "+2.5 " + heart); § is the "section" character. ¶ is paragraph.- Giving a standard block an inventory?
Simply: You can't use the vanilla cauldron. It does not have a TE and you need a TE to store items.- [1.8] Creating teleporters
Well, when you right-click the block with the item, store data in the stack's NBT tag.- [Solved][1.8] Overlay rendering - Non overlay rendering
Why are you trying to render 2D and 3D things on the same event?- [1.8] Creating teleporters
You're going to have to debug. It looks like the UUID isn't saving or loading properly so it ends up as null.- [1.8] (FIXED) WorldSavedData
I don't know, but line 113 of the Scythe appears to be checking for equality, not actually doing an assignment (or...whatever its supposed to be doing, as that line accomplishes nothing). My guess is that the code is running both server side and client side, causing duplication.- [1.8] Creating teleporters
override getBlockRelativePlayerHardness (iirc the method name correctly, search the Block class)- [1.8]Rendering 2D quads on block using TileEntitySpecialRender or something else
Well, get ready to learn. http://www.falloutsoftware.com/tutorials/gl/gl3.htm The Tessellator is just a wrapper around the OpenGL calls. There are other ways to use OpenGL than drawing quads, the Tessellator just forces quads because that's what it's used for.- [1.8] Village Building Problems
#2 has to do with the fact that the block decides on its own metadata after being placed, ignoring the metadata passed to the setBlock method. Just do world.setBlockMetadata(...) afterwards.- [1.8][SOLVED] TE Registration not Sticking
isRemote (a property) is used when you're performing logic updates, where the server has precedence and sends updates to the client. side (an annotation) is used when you want to remove a method, class, or field entirely when it is loaded on the other side.- making custom ores
See, your hashmaps are useless. this.addToBaseMap(this, baseBlock); //this serves no purpose If you have the block that is the key in that map ( registry.baseBlockMap.get(theBlock) ), you can just do theBlock.baseBlock and get the same thing. What you should be doing is storing a block1 -> block2 map where block1 is "this" and block2 is the next density (or whatever) down after its mined. Then you just have to create the blocks in the correct order (densest to least dense) adding to the map as you go.- [1.7.10] BlockRenderer vs TileEntitySpecialRenderer
AFAIK that is an accurate statement.- making custom ores
Its still a terrible, terrible loop. I'm almost certain there is a collection that would suit your needs better than a HashMap which you aren't even using as a hash map. You're treating them as arrays for no good reason. Because seriously, currentOre.ore.equals(registry.oreMap.get(inputBlock)) //being true could be done by currentOre = registry.oreMap.get(inputBlock) AFAICT.- Disable Layers in Forge?
You can't do that in the json file, you need to do that in a custom renderer. BakedModelQuad, iirc.- [1.7.10] Question on AnvilChunkLoader....
No, not really. It's way easier to destroy a project that has a database.- making custom ores
Ok....what are you using meta for, then?- making custom ores
Trying to have more than 16 density values is probably messing you up.- making custom ores
I do not even know WTF you're doing here.- [1.8] Trying to Remove Vanilla Recipes
Or if you do, count down. Because you removed an element, the next one is at the current index, which you increment before looking at a new element.- making custom ores
Aside from the fact that I'd originally needed some slight customization between the different ores (which has become less and less needed) you can do it all through one class. You just need to push enough things into the constructor (or have setters).- making custom ores
- [Solved] Formatting achievement text
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.