mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Fixed not being able to use pick block on gems
This commit is contained in:
parent
b11c3b5935
commit
ce77b6f140
1 changed files with 4 additions and 4 deletions
|
@ -28,6 +28,7 @@ import net.minecraft.network.datasync.DataParameter;
|
||||||
import net.minecraft.network.datasync.DataSerializers;
|
import net.minecraft.network.datasync.DataSerializers;
|
||||||
import net.minecraft.network.datasync.EntityDataManager;
|
import net.minecraft.network.datasync.EntityDataManager;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.EnumActionResult;
|
import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
@ -115,10 +116,9 @@ public class EntitySpell extends EntityCreature implements IMagicals, ICaster<En
|
||||||
dataManager.register(AFFINITY, SpellAffinity.NEUTRAL.ordinal());
|
dataManager.register(AFFINITY, SpellAffinity.NEUTRAL.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack onPlayerMiddleClick(EntityPlayer player) {
|
@Override
|
||||||
ItemStack stack = new ItemStack(getItem(), 1);
|
public ItemStack getPickedResult(RayTraceResult target) {
|
||||||
SpellRegistry.instance().enchantStack(stack, getEffect().getName());
|
return SpellRegistry.instance().enchantStack(new ItemStack(getItem()), getEffect().getName());
|
||||||
return stack;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Item getItem() {
|
protected Item getItem() {
|
||||||
|
|
Loading…
Reference in a new issue