Everything posted by Draco18s
-
[1.7.10][Solved] Redstone connections
The redstone repeater is a diode.
-
[1.7.10] Placing a vanilla block using my mod but making it unbreakable
Your Block dirt there is the same object as Blocks.dirt , you didn't create anything new with that code. Because setHardness looks like this: public Block setHardness(float val) { this.hardness = val; return this; }
-
(1.7.10) .onEaten - Return Itemstack
He wants to give the player an item (like an empty bowl) when they eat each of item various food items (like soup) without having to create a custom class for those food items. And the answer is no.
-
Saving a CompoundTag inside the root tag
That would be dumb and would violate the whole point of a public getter/setter wrapped around a private object.
-
[1.7.10] How do I setup forge and eclipse?
I still don't know why a batch file with "gradlew setupDecompWorkspace eclipse" in it isn't included, along with another one for IntelliJ.
-
CoreMod doesnt load?
There's a good reason for that and that's because you haven't told Eclipse to load them.
-
Saving a CompoundTag inside the root tag
It absolutely exists. Vanilla does tags-within-tags for a ton of things. For instance, chunk data is an NBT tag that contains the NBT tags of all the entities in that chunk. Enchantments are stored as an NBTTagList, IIRC, as well. So yes, it absolutely exists. Whether or not the name has been de-SRGed, I don't know.
-
Saving a CompoundTag inside the root tag
stack.setTagCompound(new NBTTagCompound()); Like that. Its magic. You now have NBT data and can start storing things into it. stack.getTagCompound().setWhatever("Key",value);
-
[1.7.10] Lost with Tile Entity block render
Uh huh. That would be the case.
-
[1.7]What item can I look at to see how to implement damage-specific textures?
https://github.com/Draco18s/HarderStuff/blob/master/main/java/com/draco18s/ores/item/ItemOreDustSmall.java#L77-L98
-
[1.7.10] Lost with Tile Entity block render
You mean, you aren't sure how to register a renderer for an Entity?
-
[1.7.10] KeyBinding keyUp() method
You need two presses because of this: private boolean pressedLastTick = false;
-
Gravity
There is NOT another way to so it. The static downward acceleration on entities is a hard-coded float value. Is not even a variable.
-
[Solved] "Cannot create a fluidstack from an unregistered fluid"??
See this bit here? See how it occurs after this bit here? Yeah, they need to be reversed. This is why you do not define your blocks, items, and fluids outside of a method.
-
Game Crash
This one's easy dude. Look for references to "magic_gem."
-
[1.7.10] How change texture 'onItemRightClick'
- [1.8][Solved] drawing a simple line
Nope. You need to draw all 12 edges.- [Solved] Item Lifespan
Single simple non-disruptive ASM hook in EntityItemFrame I suppose I could, but when it was reported, I looked into existing hooks and didn't find anything and said, "Actually, that effect is really neat, I like it." So yes, with some ASM I could "fix" the bug, but I thought it was a neat trick. It adds a little something to PvP servers. If someone finds your base where you've stashed all your stat boost items and breaks them, you're no longer so uber.- [1.7.10] How change texture 'onItemRightClick'
You can't add a parameter to a function and expect it to get called by magic.- [Solved] Item Lifespan
Only sort of. If you're checking onUpdate how long its been since creation (rather than incrementing a counter every tick) then it's not free. As soon as the player breaks the item frame and picks up the food, it'll go rotten. But I know what you're thinking, it turned into a kind of "phylactery" effect for my Unique Artifacts mod. If a player found an item that increased their health (or speed, etc.) they could shove it into an item frame and get the bonus permanently. Wasn't something I could prevent so I called it a feature.- [1.8][Solved] drawing a simple line
Huh?- [Solved] Item Lifespan
Items in ItemFrames basically don't exist as far as Minecraft is concerned. There's no code that triggers when an item is placed into the frame (seriously, the item stack isn't told, the item isn't told, and there's no Forge event, and no update methods are called) or when the item frame is broken (although that causes it to drop, and now that the item is an ItemEntity, there is the onEntityItemUpdate method, which runs every tick, so you could check there).- Controlling direction of Large Fireball projectile [SOLVED]
Changing the acceleration is easy, just divide or multiply the vec3 values when you assign them. As for buggy, I don't know. I do know that there's a vanilla bug that the motion/acceleration values aren't saved when the game unloads, causing fireballs to get stuck mid-air (despite being reported to Mojang back in 1.4.4, they didn't fix it until last week's snapshot, 15w36c).- [1.8][Solved] drawing a simple line
Vec3 pos = event.player.getPosition(event.partialTicks); Which event (from net.minecraftforge.client.event package e.g.) should I use? Oh yeah, sorry. I was using the DrawBlockHighlightEvent , but there's a handful of render events that would all be appropriate. And of course, this should be in a client side only event handler, for obvious reasons. I picked DrawBlockHighlightEvent because I was interested in the block that the player was looking at, and that event gave it to me, I didn't have to ray-trace it. That will draw a very specific line in the world, from the block at (0,5,0) to (5,5,0). Every world you create, no matter where you go, that line will be drawn in the same place in the world. But for testing? Sure, it'll work. That's left over from code I removed that determined what color to draw my line. For me, the distance was important, for you it isn't. You can remove that. Here's a pic of what I was doing: http://vignette1.wikia.nocookie.net/reasonable-realism/images/b/b2/2015-08-13_01.44.38.png/revision/latest?cb=20150814171720[/img]- Rotate block when placed
theBest108's post is useless, as the OP isn't getting a metadata value by which to rotate by. Anyway, take a look at BlockFurnace's onBlockPlaced method. - [1.8][Solved] drawing a simple line
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.