Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import net.minecraft.src.forge.*;
- public class DirtBucket extends ItemBucket implements IBucketHandler, ITextureProvider {
- public DirtBucket(int id, int blockId, int icon) {
- super(id, blockId);
- setIconIndex(icon);
- }
- @Override
- public ItemStack fillCustomBucket(World w, int i, int j, int k) {
- if (w.getBlockId(i, j, k) == Block.grass.blockID ||
- w.getBlockId(i, j, k) == Block.dirt.blockID) {
- w.setBlockWithNotify(i, j, k, 0);
- return new ItemStack(this);
- }
- return null;
- }
- public String getTextureFile()
- {
- return mod_ForgeTutBuckets.itemsPng;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement