Tag, you're it
This commit is contained in:
parent
01a797b1e6
commit
9732ecb06e
4 changed files with 55 additions and 2 deletions
|
@ -33,6 +33,7 @@ import net.minecraft.world.level.biome.Biome;
|
|||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import su.a71.tardim_ic.tardim_ic.Registration;
|
||||
import su.a71.tardim_ic.tardim_ic.utils.FakePlayer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -826,4 +827,29 @@ public class DigitalInterfacePeripheral implements IPeripheral {
|
|||
|
||||
return new ObjectLuaTable(skins);
|
||||
}
|
||||
|
||||
/**
|
||||
* Play cloister bell sound.
|
||||
*/
|
||||
@LuaFunction(mainThread = true)
|
||||
public final void cloisterBell() throws LuaException {
|
||||
if (this.tileEntity.getLevel().isClientSide()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Level lvl = this.tileEntity.getLevel();
|
||||
if (!lvl.isClientSide) {
|
||||
lvl.playSound(
|
||||
null,
|
||||
this.tileEntity.getPos(),
|
||||
Registration.CLOISTER_SOUND_EVENT,
|
||||
SoundSource.BLOCKS,
|
||||
1.5f,
|
||||
1f
|
||||
);
|
||||
}
|
||||
} catch (Exception var9) {
|
||||
throw new LuaException("There was an error trying to play the sound");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package su.a71.tardim_ic.tardim_ic.digital_interface;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import com.swdteam.common.command.tardim.CommandTardimBase;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Holder;
|
||||
|
@ -34,6 +35,7 @@ import com.swdteam.common.init.TRDSounds;
|
|||
import com.swdteam.common.item.ItemTardim;
|
||||
import com.swdteam.main.Tardim;
|
||||
|
||||
import su.a71.tardim_ic.tardim_ic.Registration;
|
||||
import su.a71.tardim_ic.tardim_ic.utils.FakePlayer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -813,4 +815,29 @@ public class DigitalInterfacePeripheral implements IPeripheral {
|
|||
|
||||
return new ObjectLuaTable(skins);
|
||||
}
|
||||
|
||||
/**
|
||||
* Play cloister bell sound.
|
||||
*/
|
||||
@LuaFunction(mainThread = true)
|
||||
public final void cloisterBell() throws LuaException {
|
||||
if (this.tileEntity.getLevel().isClientSide()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Level lvl = this.tileEntity.getLevel();
|
||||
if (!lvl.isClientSide) {
|
||||
lvl.playSound(
|
||||
null,
|
||||
this.tileEntity.getPos(),
|
||||
Registration.CLOISTER_SOUND.get(),
|
||||
SoundSource.BLOCKS,
|
||||
1.5f,
|
||||
1f
|
||||
);
|
||||
}
|
||||
} catch (Exception var9) {
|
||||
throw new LuaException("There was an error trying to play the sound");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ license = "MIT"
|
|||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId = "tardim_ic" #mandatory
|
||||
version = "0.9" #mandatory
|
||||
version = "1.0" #mandatory
|
||||
# A display name for the mod
|
||||
displayName = "TARDIM: In Control" #mandatory
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Project
|
||||
version=0.9
|
||||
version=1.0
|
||||
group=su.a71.tardim_ic
|
||||
|
||||
# Common
|
||||
|
|
Loading…
Add table
Reference in a new issue