And also, the mobs dont do loot when I use custom weapon to kill them.
That's a weird issue with custom weapons. You'll have to use the deathHook() function to make mobs drop loot manually.
Let me see if I can make up an example code here.
ModPE.setItem(710, "sword", 0, "Better Wooden Sword", 1);
ModPE.setItem(711, "skull_zombie", 0, "Zombie Head", 1);
Item.setHandEquipped(710, true);
Item.setHandEquipped(711, true);
/*Any crafting recipes,
Damage settings, or
other Item functions should
be put here.*/
/*Your attackHook()
function here*/
function deathHook(a, v) {
x = Entity.getX(v);
y = Entity.getY(v);
z = Entity.getZ(v);
mobid = [insert array of mob IDs];
mobdrops = [insert array of item IDs that correspond to the mob IDs]
if (Player.getCarriedItem() == 710) {
for (i = 0; i < mobid.length; i++) {
random = Math.floor(Math.random()*(3));
if (v == mobid<em>) {
if (random > 0) {
Level.dropItem(x, y, z, mobdrops<em>, random, 0);
}
}
}
}
if (Player.getCarriedItem() == 710) {
for (i = 0; i < mobid.length; i++) {
random = Math.floor(Math.random()*(3));
if (v == mobid) {
if (random > 0) {
Level.dropItem(x, y, z, mobdrops, random, 0);
}
}
}
}
}
The Meaning of Life, the Universe, and Everything.
Join Date:
4/7/2016
Posts:
48
Member Details
1. Can someone tell me how to use texture offset for custom mob models, like how you know where x, y on the png file and where setTextureOffset (0,0) starts at
2. Do any one know how to spawn a mob facing the direction your facing at?
I think I have a problem with the custom texture, It seems that modded items does not have its custom texture and when I pressed it, blocklauncher crashes.
Hello! I was wondering if anyone could help me, I really want to make a mod which includes random mob textures for MCPE. I’ve already figured out how to do this using OptiFine on the Java PC edition, but I really want to do this on pocket edition as well. For example: I would really like to make a bunch of different types of textures for cows, I’ve already made 46 different textures named cow2.png, cow3.png etc. and I’ve loaded OptiFine on my MCPE with no luck. I’ve tried several different options, also tried including a JSON file in my MCPACK zip file but the only thing that happens is I can get the main cow texture to change. If anyone has any ideas or insight, it would be greatly appreciated!
I've tried replacing the first "Monado.png" with a direct imgur link as well, but BlockLauncher keeps saying that "the item icon Monado.png/(imgur link):0 doesn't exist." I'm beyond confused at this point, but thanks for any help.
Hi guys, this is my first tread here and i hope you can help me.
It's been a while since i've been trying to install some mods on minecraft pe, i've found the right minecraft version(0.14/0.15/0.16) and i've found the right block launcher version, but when i try to open block launcher, it just doesn't work...
My smartphone is a Zenfone 3 (8.0.0 android version) and the message that appears, when i try to open the app, says: "BlockLaucher Stopped".
Blocklauncher luôn có vấn đề với Oppo . The first time i used it was normal and it said found a crash , return the the normal mode, or continue with the safe mode, but the second time I used Blocklauncher , it only had a black screen and exited to the main screen. My friend has a Oppo which have the same problem .
Please help me .
Hello, I'm starting to develop add-ons for MCPE. (I am Brazilian and I am not very fluent in English, so I am using the Google translator. Forgive me for the mistakes!) I have already made some hostile humanoids with a custom model and they are mad at me, they punch me and this is perfect. But continuing my God of War 1 add-on, I came to Hydra, the snake / dragon / monster from Greek mythology. There are three heads in the game, but I made them separately, just from the neck up. Obviously I want Hydra to attack me with the head, since she has no arms. The animations and their controllers are in place, I've already put the behaviors look_at_player, look_at_target, look_around, closer_attackable_target, melee_attack, attack, etc ... But she has no desire to attack me. Hydra usually looks around and looks at me, but she doesn't feel angry. When I placed Hydra's spawn egg, she even did the attack animation, but did no damage. Was the problem with behavioral parameters or other things? If anyone wants and can help me, I really appreciate it, if you need the codes just ask!
Saw your post figured why not. So I'm trying to make an addon in bedrock edition like villager guards. Trying to make it so when you interact with a bow the villager becomes a bowguard entity and when you interact with a sword the villager becomes a swordguard entity. However, it seems I can only make one interact component. Can you tell me what I'm doing wrong? I suspect it's because I'm trying to duplicate the interact events instead of placing them together inside the interactions component
So for what I'm reading, you have a working code. Right after the:
Add this in for every item that you want to wield like a normal sword or tool, right after the setItem() functions:
Make sure to replace id for the ID of your custom weapons.
That's a weird issue with custom weapons. You'll have to use the deathHook() function to make mobs drop loot manually.
Let me see if I can make up an example code here.
getCarriedItem();
{if (getCarriedItem ()== 331)
{
clientMessage("Hi");
}
}
It doesnt work.
Hey,
Ive been trying to get custom textures in my mcpe mod but i cant get it to work., ill give you the script im using
ModPE.overrideTexture("images/items-opaque.png", "my drop box link to items_opaque");
ModPE.setItem(369, "blaze_rod", 0, "Blood Rod");
Btw the blaze rod is the item i edited and i made it red!
Ok and if you say to make a var thing, dont. I tried and it doesnt make a difference
2. Its in the wrong order? the other way brings up an error msg in block launcher (same with the var)
Plz help!
1. Can someone tell me how to use texture offset for custom mob models, like how you know where x, y on the png file and where setTextureOffset (0,0) starts at
2. Do any one know how to spawn a mob facing the direction your facing at?
How do you make a consumable item as in like when you attack something holding this item, the item will be reduced by one as in number not data?
Remember the time where minecraft was in development? Oh wait, I actually don't remember it...
I think I have a problem with the custom texture, It seems that modded items does not have its custom texture and when I pressed it, blocklauncher crashes.
Someone please help me.
Remember the time where minecraft was in development? Oh wait, I actually don't remember it...
tbh I just do what other mods are doing
I will post it here since its pretty basic enough.
ModPE.setItem(500,"papersword",0,"Paper Sword",1);Item.setHandEquipped(500, true);
I save the texture in papercraftformyself.zip/assets/images/items-opaque
Also, many ppl commented this too in zhouwei's twitter
Remember the time where minecraft was in development? Oh wait, I actually don't remember it...
Nvm, I decided to use the beta that is able to support modpkgs...
anyway, how do you set another mob to look at the player?
Remember the time where minecraft was in development? Oh wait, I actually don't remember it...
Hello! I was wondering if anyone could help me, I really want to make a mod which includes random mob textures for MCPE. I’ve already figured out how to do this using OptiFine on the Java PC edition, but I really want to do this on pocket edition as well. For example: I would really like to make a bunch of different types of textures for cows, I’ve already made 46 different textures named cow2.png, cow3.png etc. and I’ve loaded OptiFine on my MCPE with no luck. I’ve tried several different options, also tried including a JSON file in my MCPACK zip file but the only thing that happens is I can get the main cow texture to change. If anyone has any ideas or insight, it would be greatly appreciated!
Thank you so much!
Amber
Hey,
I've been attempting to just get a texture going. Here's my code:
var montex = "Monado.png";
ModPE.overrideTexture("images/items-opaque.png", montex);
ModPE.setItem(500, montex, 0, "Monado");
I've tried replacing the first "Monado.png" with a direct imgur link as well, but BlockLauncher keeps saying that "the item icon Monado.png/(imgur link):0 doesn't exist." I'm beyond confused at this point, but thanks for any help.
Hi guys, this is my first tread here and i hope you can help me.
It's been a while since i've been trying to install some mods on minecraft pe, i've found the right minecraft version(0.14/0.15/0.16) and i've found the right block launcher version, but when i try to open block launcher, it just doesn't work...
My smartphone is a Zenfone 3 (8.0.0 android version) and the message that appears, when i try to open the app, says: "BlockLaucher Stopped".
I'll be very grateful if you can help me.
Blocklauncher luôn có vấn đề với Oppo . The first time i used it was normal and it said found a crash , return the the normal mode, or continue with the safe mode, but the second time I used Blocklauncher , it only had a black screen and exited to the main screen. My friend has a Oppo which have the same problem .
Please help me .
Hello, I'm starting to develop add-ons for MCPE. (I am Brazilian and I am not very fluent in English, so I am using the Google translator. Forgive me for the mistakes!) I have already made some hostile humanoids with a custom model and they are mad at me, they punch me and this is perfect. But continuing my God of War 1 add-on, I came to Hydra, the snake / dragon / monster from Greek mythology. There are three heads in the game, but I made them separately, just from the neck up. Obviously I want Hydra to attack me with the head, since she has no arms. The animations and their controllers are in place, I've already put the behaviors look_at_player, look_at_target, look_around, closer_attackable_target, melee_attack, attack, etc ... But she has no desire to attack me. Hydra usually looks around and looks at me, but she doesn't feel angry. When I placed Hydra's spawn egg, she even did the attack animation, but did no damage. Was the problem with behavioral parameters or other things? If anyone wants and can help me, I really appreciate it, if you need the codes just ask!
Saw your post figured why not. So I'm trying to make an addon in bedrock edition like villager guards. Trying to make it so when you interact with a bow the villager becomes a bowguard entity and when you interact with a sword the villager becomes a swordguard entity. However, it seems I can only make one interact component. Can you tell me what I'm doing wrong? I suspect it's because I'm trying to duplicate the interact events instead of placing them together inside the interactions component
Suspected string
"minecraft:interact": {
"interactions": {
"on_interact": {
"filters": {
"all_of": [
{ "test": "has_equipment", "domain": "hand", "subject": "other", "value": "bow" },
{ "test": "has_component", "subject": "self", "operator": "!=", "value": "minecraft:is_baby" }
]
},
"event": "become_bowguard",
"target": "self"
},
"use_item": true
}
},
Full json
{
"format_version": "1.16.100",
"minecraft:entity": {
"description": {
"identifier": "minecraft:villager_v2",
"is_spawnable": true,
"is_summonable": false,
"is_experimental": false
},
"component_groups": {
"trade_resupply_component_group": {
"minecraft:trade_resupply": {}
},
"become_witch": {
"minecraft:transformation": {
"into": "minecraft:witch",
"delay": 0.5
}
},
"become_zombie": {
"minecraft:transformation": {
"into": "minecraft:zombie_villager_v2",
"keep_level": true
}
},
"become_swordguard": {
"minecraft:transformation": {
"into": "ayrtown:steve"
}
},
"become_bowguard": {
"minecraft:transformation": {
"into": "ayrtown:alex"
}
},
"work_schedule": {
"minecraft:scheduler": {
"min_delay_secs": 0,
"max_delay_secs": 10,
"scheduled_events" : [
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 0 },
{ "test": "hourly_clock_time", "operator": "<", "value": 8000 }
]
},
"event": "minecraft:schedule_work_pro_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 8000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 10000 }
]
},
"event": "minecraft:schedule_gather_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 10000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 11000 }
]
},
"event": "minecraft:schedule_work_pro_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 11000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 12000 }
]
},
"event": "minecraft:schedule_home_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 12000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 24000 }
]
},
"event": "minecraft:schedule_bed_villager"
}
]
}
},
"basic_schedule": {
"minecraft:scheduler": {
"min_delay_secs": 0,
"max_delay_secs": 10,
"scheduled_events" : [
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 0 },
{ "test": "hourly_clock_time", "operator": "<", "value": 8000 }
]
},
"event": "minecraft:schedule_wander_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 8000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 10000}
]
},
"event": "minecraft:schedule_gather_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 10000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 11000 }
]
},
"event": "minecraft:schedule_wander_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 11000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 12000 }
]
},
"event": "minecraft:schedule_home_villager"
},
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator": ">=", "value": 12000 },
{ "test": "hourly_clock_time", "operator": "<", "value": 24000 }
]
},
"event": "minecraft:schedule_bed_villager"
}
]
}
},
"child_schedule": {
"minecraft:scheduler": {
"min_delay_secs": 0,
"max_delay_secs": 10,
"scheduled_events" : [
{
"filters": {
"all_of": [
{ "test": "hourly_clock_time", "operator":