
BuddingDev
Members-
Posts
237 -
Joined
-
Last visited
Everything posted by BuddingDev
-
I have been modding for a while. Can someone summarise what ticking "stuff" means? I keep getting this error. I hope to fix it myself.
-
What does it mean by class stuff is missing a mapping!
-
Oh so i missed out an addon to the block class Anyway, thanks!
-
Problems Arise when i am trying to do this: Block Class: http://pastebin.com/h53PLwTU TileEntityClass: http://pastebin.com/UjbkFE1w Detection Logic: http://pastebin.com/177kbh8K Anyone know what i have done wrong? No message came up when the TileEntity "update".
-
And also, what does those fellow member functions do? I know what "vector" is in mathematics, but I completely have no idea what Vec3 is in Minecraft Forge...
-
Can anyone explain how to properly initialise the Vec3 type?
-
Hmm... I am not sure, but you are looking for a thing called TileEntity, not EntityTile? Honestly, there is no method to convert a Block into a Entity. You may consider making a dummy entity that, when constructed, explodes instantly. By the way, it is quite diffic--- advanced to control whether a player is damaged by specific explosions. (I dont even know how)
-
[1.7.10] Block updateTick Assistance [SOLVED]
BuddingDev replied to Magthidon's topic in Modder Support
Digging into the code, I came with such conclusions: 1. markBlockForUpdate (seen from World.class) (member function of interface IWorldAccess) IWorldAccess has so many thing to do with world access: Play sounds, spawn particles, Play Records etc. This is said to be able to be called from wither side (Client and Server) to "re-render the target block" (unsure what it does) 2. (you said you understood it will be called when meta changes) 3. notifyBlockOfNeighborChange and notifyBlocksOfNeighborChange These functions are called so that (When will you use it?) target blocks are told to update and do stuff accordingly. Such example would be the notorious sand/gravel-torch trap: When the trap maker feels good, he punches the torch at the bottom, and the torch (generally, blocks, items, and TileEntities) is destroyed. The code tells it to call BlocksChange. When Minecraft receives BlocksChange, it helpfully assists the torch by calling BlockChange on each direction, and thus saves labour. In this trap case, it triggers sands to check its state. The Sand found itself hanging free mid-air, so it vanishes and summons a FallingSand. This triggers another BlocksChange, where origin is at the Sand. So this finally triggers the whole chunk of sand/gravel to fall and suffocate the victim. I hope these helped!!! -
Now I have a list with target Blocks. Then I should proceed to: How to get position of those Blocks?
-
As stated, I would like to know a method to know what blocks are in a radius So that I can do something special for them.
-
Hi I am curious to know if there is a way to sort items in a creative tab. For example: [tabMod] First Squad Item Second Squad Item Third Squad Item ... Is this possible? (I think so... but how?)
-
[1.7.10]Making Meta Items and getting Damage Values
BuddingDev replied to BuddingDev's topic in Modder Support
Thx for the help. BTW, is it possible to get meta within an item? EG, if meta is 1, shoot an arrow, if meta is 2, shoot a flying TNT -
I am interested in making some sort of meta items, like the 16 dyes. But I cant seem to register / get meta data properly. Can someone introduce a way to properly register meta items?
-
Is there a function to detect redstone I/O? Or is there a function to I/O redstone? Or there is just methods / snippets to do so?
-
Oh... So there is a getBlockType() in TileEntity... And it contains so many stuff... Thanks for the hint!!!
-
Something like (In the Block:) read from NBT (In the TE:) set NBT ? If I am correct, I still need to know what to call to update the block for lighting. OR, I need to know the func used to set lighting for the TE.
-
I am trying to do some block updates per tick. Something like when the tile entity component detects something (rain) it sends redstone / signal to the block and the block lights up. Problem is: Lighting is done in Block. Detect is done in TileEntity. Any idea how these 2 mix together?
-
Draco: Actually when newbies show up here (including me) they always search for some stuff named sleep or wait to pause the execution of some script. (Wait to spawn another stuff, for another particle...) What they (including me) did not know is that it actually stops the whole minecraft, causing client and server to get messed up in the sync, or crashed as {Ticking Entity} etc. Actually we can use onUpdate functions to count timers. (items and entities have this called every tick)
-
yeah, use the latter one instead. We are learning modding together so let's compare methods to see of which one is better.
-
Thanks for the help. I am now digging into the code and hopefully coming up with plentiful of new knowledge ready for usage.
-
Now here is a step by step tutorial of making such custom entity. First, think of what your entity should be called in the code. It can be like EntityCustomXPOrb or something you wish. Second, when making (public class "Name"), be sure it extends (extends EntityXPOrb) so that you can have everything in (EntityXPOrb) ready for your usage. And because you inherit from a pre-defined class (or you can say it is vanilla) you can skip the annoying stuff about update movements, renders, textures, and eventually what the xp orb should do with the player. Third, make constructor "Name"(World world, double x, double y, double z, int xp), then add super(world, x, y, z, xp) to tell Forge / Minecraft you now have a new entity which is similar to those in vanilla Minecraft, and tell Minecraft to make a new EntityXPOrb based on your values. Finally, call world.spawnEntityInWorld(new "Name"(this.worldObj, x, y, z, xp)); when you want to spawn your entity. I hope this helps.
-
You may try to give player XP indirectly by spawning XP orbs at their position and setting their (orb) values to your desired value. Extends EntityXPOrb And you may find out usage / constructor of it.
-
Is it possible to use AABB into a block / tile entity? I checked the code of Zombie Pigmen and found implementation of such method in entities. I would like to check out the vanilla spawner code, but IDK what the spawner is called in the codes. Thx for the help!
-
You mean where the player is looking at / the cross-hair is pointed to? Players may not always face vertically. You can try using MovingObjectPosition mop = Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F); It may help, considering you know how to extract data from the variable 'mop'.
-
Then I can only configure the position from somewhere like Entity entity = new Entity(); entity.setLocation(); Is that right? By the way, thanks for the info!!!