mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-15 19:55:42 +00:00
Fix several other client-only methods
This commit is contained in:
parent
3052506e2e
commit
42220c4268
@ -503,7 +503,7 @@ public final class TileDiskDrive extends TileGeneric implements DefaultInventory
|
|||||||
double y = pos.getY() + 0.75;
|
double y = pos.getY() + 0.75;
|
||||||
double z = pos.getZ() + 0.5 + zOff * 0.5;
|
double z = pos.getZ() + 0.5 + zOff * 0.5;
|
||||||
ItemEntity entityitem = new ItemEntity( getWorld(), x, y, z, disks );
|
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 );
|
getWorld().addEntity( entityitem );
|
||||||
if( !destroyed ) getWorld().playBroadcastSound( 1000, getPos(), 0 );
|
if( !destroyed ) getWorld().playBroadcastSound( 1000, getPos(), 0 );
|
||||||
|
@ -120,7 +120,7 @@ public abstract class SpeakerPeripheral implements IPeripheral
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the resource location for note block notes changes, this method call will need to be updated
|
// 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();
|
if( success ) m_notesThisTick.incrementAndGet();
|
||||||
return new Object[] { success };
|
return new Object[] { success };
|
||||||
|
@ -172,7 +172,7 @@ public final class WorldUtil
|
|||||||
public static void dropItemStack( @Nonnull ItemStack stack, World world, double xPos, double yPos, double zPos, double xDir, double yDir, double zDir )
|
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() );
|
ItemEntity item = new ItemEntity( world, xPos, yPos, zPos, stack.copy() );
|
||||||
item.setVelocity(
|
item.setMotion(
|
||||||
xDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1,
|
xDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1,
|
||||||
yDir * 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
|
zDir * 0.7 + world.getRandom().nextFloat() * 0.2 - 0.1
|
||||||
|
Loading…
Reference in New Issue
Block a user