1. When i define a new item, how do i make the texture of a block, but keep it nonplacable? Answered by ShadowMineCore
2. How can i vanish players completely so that when they are hit, they do not take damage(like the vanish plugins in mcpv)? Invisibility potion effect is not desired, though if there is nothing else, I will take it.
3. How can i turn pvp off? As in, cannot hit at all, not the one where you can kb but not kill. If the previous question is answered, ignore this one. Answered by ShadowMineCore
4. There are many new functions in 0.12, but in the dump file they are, well, dumped. Is there any indepth guide like connor4948's github pages were?
lol on connors github preventDefault(); was never really explained so I never figured it out a little tutorial please? just so that i can know its limitations
Basically the function preventDefault makes whatever would usually happen in the game not happen. For example:
function attackHook(attacker, victim){
preventDefault();
}
This code stops any mob from taking damage. Or this code here:
function attackHook(x, y, z, itemId, blockId, side, blockDamage, itemDamage){
preventDefault();
}
makes blocks like crafting tables and furnaces useless.
Hope I helped!
Rollback Post to RevisionRollBack
Please give me an Internet. Please. Pretty Please with sprinkles on top
I have a twitter!! Follow me for regular updates on my mods! https://twitter.com/DamienMiller11
What if i want the block to have a custom name? Or i want to switch two blocks textures? What do i put in modpe.setitem? Also, when i make a new item with the texture of a sword, the item held looks small like a normal item in third person view, and not large like a sword. Is there any way to edit the 3rd person and multiplayer rendering of held items?
Wouldn't the right side comparison be in id numbers? Correct me if I'm wrong please.
EntityType is a Blocklauncher constant. Like MobEffect, ParticleType, DimensionId, and EntityRenderType. These all are linked to numbers in Blocklauncher so you dont have to look up / memorize numbers. If you dump ModPE methods you can see a list of all these, it is really helpful.
So entitytype will only work on blocklsunvher, and not any other modpe runner? Also thank you darkserver, i played coop with some friends today and that code worked perfectly.
Because i would've thought that it would be in modpe, not just bl. For example, master for Minecraft has a modpe runner it would work on that too right?
So entitytype will only work on blocklsunvher, and not any other modpe runner? Also thank you darkserver, i played coop with some friends today and that code worked perfectly.
Because i would've thought that it would be in modpe, not just bl. For example, master for Minecraft has a modpe runner it would work on that too right?
Nope. It might have an equivalent to that, but chances are it wouldn't be the same.
Rollback Post to RevisionRollBack
Please give me an Internet. Please. Pretty Please with sprinkles on top
I have a twitter!! Follow me for regular updates on my mods! https://twitter.com/DamienMiller11
To post a comment, please login or register a new account.
1. When i define a new item, how do i make the texture of a block, but keep it nonplacable?Answered by ShadowMineCore2. How can i vanish players completely
so that when they are hit, they do not take damage(like the vanish plugins in mcpv)? Invisibility potion effect is not desired, though if there is nothing else, I will take it.3. How can i turn pvp off? As in, cannot hit at all, not the one where you can kb but not kill. If the previous question is answered, ignore this one.Answered by ShadowMineCore4. There are many new functions in 0.12, but in the dump file they are, well, dumped. Is there any indepth guide like connor4948's github pages were?
I have nothing to say...
For the non placable block-
function useItem(x, y, z, itemId, blockId, side){
if(itemId == YOURID){
preventDefault();
}
}
No pvp:
function attackHook(m, v){
preventDefault();
}
The heck is this for
lol on connors github preventDefault(); was never really explained so I never figured it out a little tutorial please? just so that i can know its limitations
I have nothing to say...
Basically the function preventDefault makes whatever would usually happen in the game not happen. For example:
function attackHook(attacker, victim){ preventDefault(); }This code stops any mob from taking damage. Or this code here:
function attackHook(x, y, z, itemId, blockId, side, blockDamage, itemDamage){ preventDefault(); }makes blocks like crafting tables and furnaces useless.
Hope I helped!
I have a twitter!! Follow me for regular updates on my mods!
https://twitter.com/DamienMiller11
Well, you forgot to make the 2nd function useItem, but if he still wants to attack mobs, and just not players, you may want something more like:
function attackHook(attacker, victim){ if( Entity.getEntityTypeId( attacker ) == EntityType.PLAYER && Entity.getEntityTypeId( victim ) == EntityType.PLAYER ){ // this will allow mobs to attack players, players to attack mobs, but players cant attack players. } }Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Very useful thank you to all
I have nothing to say...
What if i want the block to have a custom name? Or i want to switch two blocks textures? What do i put in modpe.setitem? Also, when i make a new item with the texture of a sword, the item held looks small like a normal item in third person view, and not large like a sword. Is there any way to edit the 3rd person and multiplayer rendering of held items?
I have nothing to say...
Wouldn't the right side comparison be in id numbers? Correct me if I'm wrong please.
I have nothing to say...
EntityType is a Blocklauncher constant. Like MobEffect, ParticleType, DimensionId, and EntityRenderType. These all are linked to numbers in Blocklauncher so you dont have to look up / memorize numbers. If you dump ModPE methods you can see a list of all these, it is really helpful.
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
So entitytype will only work on blocklsunvher, and not any other modpe runner? Also thank you darkserver, i played coop with some friends today and that code worked perfectly.
Because i would've thought that it would be in modpe, not just bl. For example, master for Minecraft has a modpe runner it would work on that too right?
I have nothing to say...
Nope. It might have an equivalent to that, but chances are it wouldn't be the same.
I have a twitter!! Follow me for regular updates on my mods!
https://twitter.com/DamienMiller11