CC: Tweaked

CC: Tweaked

64M Downloads

Is it possible for me to add playAudio function to version 1.89

yusufarslan7 opened this issue ยท 2 comments

commented

Hello, I'm playing with my friends on minecraft 1.12.2 so we are using cc version 1.89,

now we need to use the playAudio function but it's added in 1.100 ,

i'm not really experienced about modding so i want to ask that is it possible for me to manually add the sound functions, (the version we play has the speaker item but it might need some changes too)

if possible, how? if not, is there a workaround?

commented

To add function, you need use the @LuaFunction annotation in the peripheral's class.
You can view other functions in CC:T as examples.

commented

So this is possible, but it's also a lot of work, and so not something I'd recommend for someone starting off modding. An awful lot changed between Minecraft 1.12 and 1.16 (both for Minecraft itself, and CC:T), and so you'd have to implement most of the feature from scratch.

Some of this is relatively easy (as @zyxkad mentions, you need to register the peripheral function. Though not with @LuaFunction), but anything involving the actual playing of sounds will probably be quite difficult. The sound engine changed post 1.12, and so I think some of the integration with that will be quite different.

If you're just looking for a way to play music from a file, Computronics has a tape drive, that can play DFPWM audio.