mirror of
https://github.com/TeamMidnightDust/PictureSign.git
synced 2025-12-17 22:55:09 +01:00
Huge code cleanup, Architectury & Watermedia
- A huge cleanup of the codebase - Make use of the Architectury build system - Replaced VideoLib with WATERMeDIA (More features, better stability, multiplatform support)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package eu.midnightdust.picturesign.mixin;
|
||||
|
||||
import eu.midnightdust.picturesign.util.VideoHandler;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.block.entity.SignBlockEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
|
||||
import static eu.midnightdust.picturesign.PictureSignClient.MOD_ID;
|
||||
import static eu.midnightdust.picturesign.PictureSignClient.id;
|
||||
|
||||
@Mixin(value = SignBlockEntity.class, priority = 1100)
|
||||
public abstract class MixinSignBlockEntity extends BlockEntity {
|
||||
public MixinSignBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Unique
|
||||
public void markRemoved() {
|
||||
Identifier videoId = id(pos.getX() + "_" + pos.getY() + "_" + pos.getZ() + "_f");
|
||||
Identifier videoId2 = id(pos.getX() + "_" + pos.getY() + "_" + pos.getZ() + "_b");
|
||||
VideoHandler.closePlayer(videoId);
|
||||
VideoHandler.closePlayer(videoId2);
|
||||
super.markRemoved();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user