zhuowei / MCPELauncher

Source code for BlockLauncher, a launcher that patches Minecraft for Android
Apache License 2.0
683 stars 189 forks source link

ModPE Wishlist #329

Open slice opened 8 years ago

slice commented 8 years ago

ModPE Wishlist

If you could be so kind @zhuowei, could you add some more features for us?

(added by zhuowei - I guess this is the official wishlist now? yes)

Level.openInventory(player, inventoryType); //Inventory type would be as follows:
InventoryType.CHEST
InventoryType.ANVIL

Block

aetriusgx commented 8 years ago

Yea, some 'issues' state how those functions would look like

zhuowei commented 8 years ago

Redstone is tracked on #303; the last one should be easy to do.

Also, in regards to the original title: there's already an issue somewhere about that topic; I can't really address it at this time since so many scripts depend on current behaviour

Do you just want

    DOWN = 0,
    UP = 1,
    NORTH = 2,
    SOUTH = 3,
    WEST = 4,
    EAST = 5;

? I'm adding that.

slice commented 8 years ago

@zhuowei Sure! Sorry if I sound like a bit demanding. Regarding the original title, that was already in another issue (like you said).

aetriusgx commented 8 years ago

Remember to add per damage destroy hardness! You told me on Twitter to remind you.

slice commented 8 years ago

@ShadowMine64 It's on the wishlist

zhuowei commented 8 years ago

@sliceofcode yeah, I added it then told him to yell at me to make sure I did add it

slice commented 8 years ago

@zhuowei Oh. lol

aetriusgx commented 8 years ago

:P

zhuowei commented 8 years ago

@thejaustin per data value hardness, actually (Sorry about the mistake); basically one would allow each data value of a block to have its own hardness (how long it takes to mine) and probably its own explosion resistance (how much TNT you need to blow it up). Minecraft has support for this (the stair block has different explosion resistances for each type of stairs, even though it uses the same block ID) but ModPE scripts don't have support for that yet

Useful if you need to save block IDs, I guess.

@sliceofcode To make the most basic redstone block, I need to expose these methods to ModPE scripts' custom blocks:

Block::onRedstoneUpdate Block::getSignal Block::isRedstoneBlock

and probably a Level.getRedstoneLevelOrSomething method

should they be done as hooks, as some sort of callback that you set on each custom block, or...

aetriusgx commented 8 years ago

function redstoneHook(x, y, z, powerStrength){

}

And add a new function like Block.isRedstone(id, boolean);

aetriusgx commented 8 years ago

That's a terrible idea, there needs to be more parameters than that, have you read the library? Do you know how long it takes to make a new dimension?

aetriusgx commented 8 years ago

It's never gonna happen

slice commented 8 years ago

@zhuowei Probably hooks.

aetriusgx commented 8 years ago

@sliceofcode @zhuowei How many hooks tho o.O

slice commented 8 years ago

@ShadowMine64

Block::onRedstoneUpdate

aetriusgx commented 8 years ago

@sliceofcode It was a retorical question :P

officialmcpro32 commented 8 years ago

For the enchantments : Item.addEnchantRecipe(id,levels,no. of lapiz); Also if(Item.get enchantment() For The Potions ModPE.setPotion() So it can be eaten without lessening the hunger

officialmcpro32 commented 8 years ago

Request @zhuowei can U make an example on Redstone hooks after you added it and an official implementation off function eatHook()

TaQuIt0 commented 8 years ago

Item.getIcon(id,dmg); that returns the icon name used in items.meta Entity.getMaxHealth(entity); And nbt, Idk how but I want nbt xD

Plz

nasapierce commented 8 years ago

These would be very useful ModPE methods in the future. Thanks for all your work you put into Blocklaucher! :)

Level.canSeeSky(x, y, z); - returns bool, use BlockSource::canSeeSky, it would be useful to not have to use loops.

Player.isSneaking(); - pretty obvious, but for now I am using a custom method with Enitity.isSneaking() and Player.getEntity()

Block.setPathFindable(blockID); - this has been an issue with custom shapes, mobs and players will "auto" jump

Block.getDestroyTime(blockID); - Making an array for this is painful.

Block.setExpDrop(blockID, int); Block.setFriction(blockID, float); Block.isCropBlock(blockID); Block.isContainerBlock(blockID); Block.isCraftingBlock(blockID); Block.isInteractiveBlock(blockID);

These functions would be very useful, thanks again

aetriusgx commented 8 years ago

@ManassehPierce That's a great idea! That'd make a lot of things easier, but with would the is block functions be for?

slice commented 8 years ago

Added new requests to wishlist, RIP @zhuowei

zhuowei commented 8 years ago

@manassehPierce

for now I am using a custom method with Enitity.isSneaking() and Player.getEntity()

That's what you're supposed to do ;) I won't add a Player.(whatever) method that does the exact same thing as an Entity.(whatever) method

I've added canSeeSky, getDestroyTime, get/setFriction, getMaxHealth in latest beta.

zhuowei commented 8 years ago

Custom blocks can now respond to redstone currents (they can't output them yet) - see piston.js in zhuowei/ModPEScripts for an example

aetriusgx commented 8 years ago

Zhuowei FTW :v

Blakintosh commented 8 years ago

Item.setEnchant and Item.getEnchant would not be able to work that way; you want enchantments for the specific item in your inventory. The way you're putting it would mean any item with that id would get enchanted. ModPE would need a specific item identifier in your inventory; such as Item.selectCarried() and Item.selectFromInventorySlot(slot)

Blakintosh commented 8 years ago

Item.set(tool) isn't needed; there are easy workarounds to these anyway, setting destroy times for tools and negating bonus health with attackHook (Entity.setHealth(Entity.getHealth-(hearts)). In MCPE there is no custom drop time ability, all are fixed at 20 ticks or whatever, so Zhuowei would have do to a TON of modding to do that.

aetriusgx commented 8 years ago

Block.getDimension so we can check if a block is at a certain dimension, use BlockSource::getDimension

zhuowei commented 8 years ago

@ShadowMine64 ... you mean Player.getDimension? All hooks only happen in the Player's dimension, I thought?

aetriusgx commented 8 years ago

It would still be useful for blocks

TaQuIt0 commented 8 years ago

Item.getMaxDamage();

aetriusgx commented 8 years ago

[I crash when I enable my resource pack :/]

Nvm I found a fix but now I keep crashing on world load :/ I can send the script, tp, and addon if you need :|

peacestorm commented 8 years ago

Another great method would be ModPE.setItemCategoryIcon(ItemCategory.CATEGORY, ITEM_ID_HERE). This method would change the icon of the specified creative tab. Also it would be great if there were some methods to stop entities from moving.

TaQuIt0 commented 8 years ago

For Entity.isBaby(); just need use Entity.getAnimalAge(entity); and if are -1 or less it means that is a baby And Entity.setBaby(); = Entity.setAnimalAge(entity,-1 or less); El nov. 29, 2015 10:01 AM, "ISAAC300" notifications@github.com escribió:

Entity.isBaby(ent,bool); or Entity.setBaby(ent,bool); Entity.isTamable(ent,bool); or Entity.setTamable(ent,bool); Player.getCarriedItemName(); Block.is/setWaterBlock(id,bool);

— Reply to this email directly or view it on GitHub https://github.com/zhuowei/MCPELauncher/issues/329#issuecomment-160427505 .

jose-vm commented 8 years ago

Could you guys please be more realistic (specially you izaac)?

jose-vm commented 8 years ago

Oh, Zhuowei, what you mentioned about signal strength, I found setter and getter functions for redstone signal @zhuowei

jose-vm commented 8 years ago

@zhuowei for redstone signal (in order):

Good luck.

TaQuIt0 commented 8 years ago

Emm sorry? El nov. 29, 2015 2:52 PM, "ISAAC300" notifications@github.com escribió:

taquito cala-te

— Reply to this email directly or view it on GitHub https://github.com/zhuowei/MCPELauncher/issues/329#issuecomment-160470454 .

aetriusgx commented 8 years ago

Isaac you should really stop, you keep requesting irrelevent functions

slice commented 8 years ago

Sorry, but I'm only adding real suggestions to the list.

officialmcpro32 commented 8 years ago

function genOre(minY,maxY,chunk,Id){ //I know there's a workaround for that

aetriusgx commented 8 years ago

@officialmcpro32 That MIGHT be possible but the only problem is that the native way causes crashes on world generator and if it gets past that, the game freezes then crashes after a few seconds

Khristian-kun commented 8 years ago

Entity.setTarget(attacker, victim) using Mob::setTarget(Mob*);

Entity.getTarget(entity) using Mob::getTarget();

Item.addDescription(id, string) using Item::buildDescriptionName(ItemInstance const&) const;

Item.addEffectDescription(id, string) using Item::buildEffectDescriptionName(ItemInstance const&) const;

Item.canDestroyInCreative(id, bool) using Item::canDestroyInCreative() const;

Block.setSoundType(id, string) using Block::setSoundType(Block::SoundType const&);

Block.animateTick(id, scriptable) using Block::animateTick(BlockSource&, BlockPos const&, Random&);

Entity.changeDimension(entity, DimensionId) using Level::entityChangeDimension(Entity&, DimensionId);

function fallHook(x, y, z, ent) for hook if the entity is falling

Thats my suggestions

ghost commented 8 years ago

Please add my suggestions on the commit file on the code section @zhuowei

jose-vm commented 8 years ago

LMAOOO

ghost commented 8 years ago

please add Item.createIcon(icon id, icon opaque); if its possible because i saw codes on the Vanilla Minecraft Mods that has a create icon method

aetriusgx commented 8 years ago

@KairusDarkSeeker That wouldn't be necessary, that would be used mainly for doors, trap doors, etc..

ghost commented 8 years ago

but i saw it on a vanilla minecraft mod

ghost commented 8 years ago

just create a texture pack using IsoPix

officialmcpro32 commented 8 years ago

@Izaac9236 just make a resource pack