mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
parent
5bf5b14fa8
commit
75948872b7
1 changed files with 4 additions and 2 deletions
|
@ -47,6 +47,8 @@ public class BlockSpring extends BlockContainerImpl implements ICustomBlockState
|
||||||
@Override
|
@Override
|
||||||
public int getColor(ItemStack stack, int i) {
|
public int getColor(ItemStack stack, int i) {
|
||||||
Player player = Minecraft.getInstance().player;
|
Player player = Minecraft.getInstance().player;
|
||||||
|
if (player == null)
|
||||||
|
return 0;
|
||||||
return BiomeColors.getAverageWaterColor(player.level, player.blockPosition());
|
return BiomeColors.getAverageWaterColor(player.level, player.blockPosition());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -57,7 +59,6 @@ public class BlockSpring extends BlockContainerImpl implements ICustomBlockState
|
||||||
generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName())));
|
generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Supplier<RenderType> getRenderType() {
|
public Supplier<RenderType> getRenderType() {
|
||||||
return RenderType::translucent;
|
return RenderType::translucent;
|
||||||
|
@ -68,7 +69,8 @@ public class BlockSpring extends BlockContainerImpl implements ICustomBlockState
|
||||||
var tile = levelIn.getBlockEntity(pos);
|
var tile = levelIn.getBlockEntity(pos);
|
||||||
if (tile instanceof BlockEntitySpring)
|
if (tile instanceof BlockEntitySpring)
|
||||||
((BlockEntitySpring) tile).consumeAura(2500);
|
((BlockEntitySpring) tile).consumeAura(2500);
|
||||||
return new ItemStack(Items.WATER_BUCKET); }
|
return new ItemStack(Items.WATER_BUCKET);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<SoundEvent> getPickupSound() {
|
public Optional<SoundEvent> getPickupSound() {
|
||||||
|
|
Loading…
Reference in a new issue