mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
parent
f4bb53ec5e
commit
1ad751583b
1 changed files with 3 additions and 1 deletions
|
@ -43,6 +43,7 @@ import java.util.function.Function;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class BlockProjectileGenerator extends BlockContainerImpl implements ITESRProvider<TileEntityProjectileGenerator>, ICustomBlockState {
|
public class BlockProjectileGenerator extends BlockContainerImpl implements ITESRProvider<TileEntityProjectileGenerator>, ICustomBlockState {
|
||||||
|
|
||||||
public BlockProjectileGenerator() {
|
public BlockProjectileGenerator() {
|
||||||
super("projectile_generator", TileEntityProjectileGenerator::new, Properties.create(Material.ROCK).hardnessAndResistance(2.5F).sound(SoundType.STONE));
|
super("projectile_generator", TileEntityProjectileGenerator::new, Properties.create(Material.ROCK).hardnessAndResistance(2.5F).sound(SoundType.STONE));
|
||||||
|
|
||||||
|
@ -58,7 +59,8 @@ public class BlockProjectileGenerator extends BlockContainerImpl implements ITES
|
||||||
DispenserBlock.registerDispenseBehavior(Items.TRIDENT, new ProjectileDispenseBehavior() {
|
DispenserBlock.registerDispenseBehavior(Items.TRIDENT, new ProjectileDispenseBehavior() {
|
||||||
@Override
|
@Override
|
||||||
protected ProjectileEntity getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn) {
|
protected ProjectileEntity getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn) {
|
||||||
TridentEntity ret = new TridentEntity(worldIn, position.getX(), position.getY(), position.getZ());
|
TridentEntity ret = new TridentEntity(EntityType.TRIDENT, worldIn);
|
||||||
|
ret.setPosition(position.getX(), position.getY(), position.getZ());
|
||||||
// set thrownStack
|
// set thrownStack
|
||||||
ObfuscationReflectionHelper.setPrivateValue(TridentEntity.class, ret, stackIn.copy(), "field_203054_h");
|
ObfuscationReflectionHelper.setPrivateValue(TridentEntity.class, ret, stackIn.copy(), "field_203054_h");
|
||||||
ret.pickupStatus = AbstractArrowEntity.PickupStatus.ALLOWED;
|
ret.pickupStatus = AbstractArrowEntity.PickupStatus.ALLOWED;
|
||||||
|
|
Loading…
Reference in a new issue