Code cleanup

This commit is contained in:
Martin Prokoph
2024-07-31 11:31:06 +02:00
parent 3af6b9fa9c
commit 0b32c5afc1
4 changed files with 17 additions and 26 deletions

View File

@@ -17,7 +17,9 @@ import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.item.*;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.state.property.EnumProperty;
@@ -108,7 +110,7 @@ public class DecorativeMain implements ModInitializer {
DoubleLamps.init();
Clocks.init();
OreFeatures.init();
new DecorativeSoundEvents();
DecorativeSoundEvents.init();
}
public static Identifier id(String path) {
return Identifier.of(MOD_ID, path);

View File

@@ -8,7 +8,11 @@ import net.minecraft.util.Identifier;
import static eu.midnightdust.motschen.decorative.DecorativeMain.id;
public class DecorativeSoundEvents {
public static final SoundEvent CEILINGFAN_AMBIENT = register(id("ceiling_fan.ambient"));
public static SoundEvent CEILINGFAN_AMBIENT;
public static void init() {
CEILINGFAN_AMBIENT = register(id("ceiling_fan.ambient"));
}
private static SoundEvent register(Identifier id) {
return Registry.register(Registries.SOUND_EVENT, id, SoundEvent.of(id));

View File

@@ -1,28 +1,13 @@
{
"variants": {
"facing=south,program=off": { "model": "decorative:block/old_television_off", "uvlock": true },
"facing=west,program=off": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 90 },
"facing=north,program=off": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 180 },
"facing=east,program=off": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 270 },
"facing=south,powered=false": { "model": "decorative:block/old_television_off", "uvlock": true },
"facing=west,powered=false": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 90 },
"facing=north,powered=false": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 180 },
"facing=east,powered=false": { "model": "decorative:block/old_television_off", "uvlock": true, "y": 270 },
"facing=south,program=nyancat": { "model": "decorative:block/old_television_nyancat", "uvlock": true },
"facing=west,program=nyancat": { "model": "decorative:block/old_television_nyancat", "uvlock": true, "y": 90 },
"facing=north,program=nyancat": { "model": "decorative:block/old_television_nyancat", "uvlock": true, "y": 180 },
"facing=east,program=nyancat": { "model": "decorative:block/old_television_nyancat", "uvlock": true, "y": 270 },
"facing=south,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true },
"facing=west,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true, "y": 90 },
"facing=north,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true, "y": 180 },
"facing=east,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true, "y": 270 },
"facing=south,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true },
"facing=west,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 90 },
"facing=north,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 180 },
"facing=east,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 270 },
"facing=south,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true },
"facing=west,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true, "y": 90 },
"facing=north,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true, "y": 180 },
"facing=east,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true, "y": 270 }
"facing=south,powered=true": { "model": "decorative:block/old_television_on", "uvlock": true },
"facing=west,powered=true": { "model": "decorative:block/old_television_on", "uvlock": true, "y": 90 },
"facing=north,powered=true": { "model": "decorative:block/old_television_on", "uvlock": true, "y": 180 },
"facing=east,powered=true": { "model": "decorative:block/old_television_on", "uvlock": true, "y": 270 }
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B