Comments (5)
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.
What about drops from player-only kills?
from crafttweaker.
@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.
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.
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)
- IDataOps.convertTo for String values leaves extra Quotation marks HOT 1
- Game crashes when installing with Kemonocraft HOT 1
- why doesnt this work??? HOT 4
- CraftTweaker preventing block drops 1.20.4 HOT 3
- ScriptProviderCustom could not work normally HOT 3
- crash when adding crafttweaker to my modpack HOT 1
- Replacer example for 1.20+
- GBook mod not see CT resipes HOT 2
- cannot cast KnownTag<ItemDefinition>[] to IIngredient[] HOT 3
- Cannot use Random HOT 1
- recipe functions for more than just crafting table recipes HOT 1
- "import crafttweaker.api.item.type.armor.ArmorItem" causes script compiling issues and cannot be found.
- 1.20 Example is incorrect for crafttweaker.api.loot.LootTable.getRandomItems
- Load scripts from datapacks HOT 2
- Draconic Evolution on newer versions Support HOT 3
- 1.20.1 Fabric Server NBT Ingredients show null HOT 2
- .addshifttooltip sses crouch keybind rather than shift key
- Any import not working HOT 1
- java.io,EoFException, fieldsize is too long! HOT 5
- 1.20.1 | Crash with attribute-edited armor and Cold Sweat HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crafttweaker.