1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

Fix several other client-only methods

This commit is contained in:
SquidDev 2019-06-21 21:32:15 +01:00
parent 3052506e2e
commit 42220c4268
3 changed files with 3 additions and 3 deletions

View File

@ -503,7 +503,7 @@ private synchronized void ejectContents( boolean destroyed )
double y = pos.getY() + 0.75;
double z = pos.getZ() + 0.5 + zOff * 0.5;
ItemEntity entityitem = new ItemEntity( getWorld(), x, y, z, disks );
entityitem.setVelocity( xOff * 0.15, 0, zOff * 0.15 );
entityitem.setMotion( xOff * 0.15, 0, zOff * 0.15 );
getWorld().addEntity( entityitem );
if( !destroyed ) getWorld().playBroadcastSound( 1000, getPos(), 0 );

View File

@ -120,7 +120,7 @@ private synchronized Object[] playNote( Object[] arguments, ILuaContext context
}
// If the resource location for note block notes changes, this method call will need to be updated
boolean success = playSound( context, instrument.getSound().getName(), volume, (float) Math.pow( 2.0, (pitch - 12.0) / 12.0 ), true );
boolean success = playSound( context, instrument.getSound().getRegistryName(), volume, (float) Math.pow( 2.0, (pitch - 12.0) / 12.0 ), true );
if( success ) m_notesThisTick.incrementAndGet();
return new Object[] { success };

View File

@ -172,7 +172,7 @@ public static void dropItemStack( @Nonnull ItemStack stack, World world, double
public static void dropItemStack( @Nonnull ItemStack stack, World world, double xPos, double yPos, double zPos, double xDir, double yDir, double zDir )
{
ItemEntity item = new ItemEntity( world, xPos, yPos, zPos, stack.copy() );
item.setVelocity(
item.setMotion(
xDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1,
yDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1,
zDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1