Git Product home page Git Product logo

Comments (5)

jaredlll08 avatar jaredlll08 commented on June 9, 2024 1

The syntax will be:

//makes sheep drop dirt with a stacksize of between 1 and 5 (inclusive)
game.getEntity("Sheep").addDrop(<minecraft:dirt>, 1, 5);
//makes sheep drop sticks when killed by a player with a stacksize of between 1 and 5(inclusive)
game.getEntity("Sheep").addPlayerOnlyDrop(<minecraft:stick>, 1, 5);
//makes sheep drop a diamond
game.getEntity("Sheep").addDrop(<minecraft:diamond>);
//makes sheep not drop any wool (wild card is used to all Sheep colours are affected)
game.getEntity("Sheep").removeDrop(<minecraft:wool:*>);

from crafttweaker.

UndeadZeratul avatar UndeadZeratul commented on June 9, 2024

What about drops from player-only kills?

from crafttweaker.

DRTR0 avatar DRTR0 commented on June 9, 2024

@UndeadZeratul That's what I was implying. There could also be a true/false parameter where it must be player kill or not.

from crafttweaker.

UndeadZeratul avatar UndeadZeratul commented on June 9, 2024

Ah, the first one mentions in the comment when villager is killed, but that could be from a zombie, or some form of mob farm that doesn't allow player-only drops.

I was thinking of a true/false parameter as well, since just setting the min to 0 doesn't imply player-only drops.

Either that, or a different method entirely, something like:

mobdrops.addPlayerOnly(mob, item, min, max);
mobdrops.addPlayerOnly(Zombie, <minecraft:bread>, 2, 3); // Drops 2-3 bread when a zombie is killed by the player.

The only thing I'm noticing is that MineTweaker/CraftTweaker (last I looked into it, back in 1.7.10) doesn't have any structure for entities, does it? Would the mob parameter be a String representing the mob's name?

from crafttweaker.

DRTR0 avatar DRTR0 commented on June 9, 2024

@UndeadZeratul

I would say the mob parameter be a string of the entity ID's, and then translated into the coding net.minecraft.mob.whatever it is.

Perhaps,

To remove the drop table of a mob.
mobdrops.remove(mob)
mobdrops.remove(Spider);

To add
mobdrops.add(mob, item, min, max, chance, playeronly)
mobdrops.add(Villager, minecraft:emerald, 1, 1, 0.10, true);
Villager has a 10% chance of dropping an emerald on player kills only.

from crafttweaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.