diff --git a/build.properties b/build.properties index a78f97d4a..a46542ebe 100644 --- a/build.properties +++ b/build.properties @@ -6,7 +6,7 @@ mod_version=8.0.0 minecraft_version=1.13 minecraft_version_toml=13 -forge_version=24.0.61-1.13-pre +forge_version=24.0.64-1.13-pre forge_version_toml=24 forge_group=net.minecraftforge.test mappings_version=20181221-1.13.1 diff --git a/src/main/java/biomesoplenty/api/item/BOPItems.java b/src/main/java/biomesoplenty/api/item/BOPItems.java index 9c396b7b6..36e0fe062 100644 --- a/src/main/java/biomesoplenty/api/item/BOPItems.java +++ b/src/main/java/biomesoplenty/api/item/BOPItems.java @@ -22,7 +22,6 @@ public class BOPItems public static Item mudball; public static Item ash; public static Item mud_brick; - public static Item other_slab; public static Item boat_cherry; public static Item boat_umbran; @@ -48,8 +47,5 @@ public class BOPItems public static Item jacaranda_door; public static Item mahogany_door; - public static Item wood_slab_0; - public static Item wood_slab_1; - public static Item record_wanderer; } diff --git a/src/main/java/biomesoplenty/api/sound/BOPSounds.java b/src/main/java/biomesoplenty/api/sound/BOPSounds.java new file mode 100644 index 000000000..7995656af --- /dev/null +++ b/src/main/java/biomesoplenty/api/sound/BOPSounds.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2014-2019, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ +package biomesoplenty.api.sound; + +import net.minecraft.util.SoundEvent; + +public class BOPSounds +{ + public static SoundEvent records_wanderer; +} diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPRecord.java b/src/main/java/biomesoplenty/common/item/ItemBOPRecord.java new file mode 100644 index 000000000..49f0ca1fa --- /dev/null +++ b/src/main/java/biomesoplenty/common/item/ItemBOPRecord.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2014-2019, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ +package biomesoplenty.common.item; + +import biomesoplenty.common.util.inventory.ItemGroupBOP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemRecord; +import net.minecraft.util.SoundEvent; + +public class ItemBOPRecord extends ItemRecord +{ + public ItemBOPRecord(SoundEvent record) + { + super(0, record, new Item.Builder().group(ItemGroupBOP.instance)); + } +} diff --git a/src/main/java/biomesoplenty/core/BiomesOPlenty.java b/src/main/java/biomesoplenty/core/BiomesOPlenty.java index 2104bac86..4542f47df 100644 --- a/src/main/java/biomesoplenty/core/BiomesOPlenty.java +++ b/src/main/java/biomesoplenty/core/BiomesOPlenty.java @@ -10,6 +10,7 @@ package biomesoplenty.core; import biomesoplenty.init.ModBlocks; import biomesoplenty.init.ModItems; +import biomesoplenty.init.ModSounds; import net.minecraft.init.Bootstrap; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @@ -30,6 +31,7 @@ public class BiomesOPlenty FMLModLoadingContext.get().getModEventBus().addListener(this::preInit); FMLModLoadingContext.get().getModEventBus().addListener(this::init); + ModSounds.init(); ModItems.init(); ModBlocks.init(); } diff --git a/src/main/java/biomesoplenty/init/ModItems.java b/src/main/java/biomesoplenty/init/ModItems.java index f748a4178..5b38e741b 100644 --- a/src/main/java/biomesoplenty/init/ModItems.java +++ b/src/main/java/biomesoplenty/init/ModItems.java @@ -9,7 +9,9 @@ package biomesoplenty.init; import static biomesoplenty.api.item.BOPItems.*; +import biomesoplenty.api.sound.BOPSounds; import biomesoplenty.common.item.ItemBOPFood; +import biomesoplenty.common.item.ItemBOPRecord; import biomesoplenty.common.util.inventory.ItemGroupBOP; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; @@ -33,7 +35,7 @@ public class ModItems fleshchunk = registerItem(new Item(new Item.Builder().group(ItemGroupBOP.instance)), "fleshchunk"); // TODO: This needs to be ItemBOPRecord and/or registered with its sounds - record_wanderer = registerItem(new Item(new Item.Builder().group(ItemGroupBOP.instance)), "record_wanderer"); + //record_wanderer = registerItem(new ItemBOPRecord(BOPSounds.records_wanderer), "record_wanderer"); // TODO: These all need to be associated with their entities boat_fir = registerItem(new Item(new Item.Builder().group(ItemGroupBOP.instance)), "boat_fir"); diff --git a/src/main/java/biomesoplenty/init/ModSounds.java b/src/main/java/biomesoplenty/init/ModSounds.java new file mode 100644 index 000000000..dd1e09006 --- /dev/null +++ b/src/main/java/biomesoplenty/init/ModSounds.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2014-2019, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ +package biomesoplenty.init; + +import biomesoplenty.core.BiomesOPlenty; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundEvent; +import net.minecraftforge.registries.ForgeRegistries; + +import static biomesoplenty.api.sound.BOPSounds.records_wanderer; + +public class ModSounds +{ + public static void init() + { + records_wanderer = registerSound("records.wanderer"); + } + + private static SoundEvent registerSound(String soundName) + { + ResourceLocation location = new ResourceLocation(BiomesOPlenty.MOD_ID, soundName); + SoundEvent event = new SoundEvent(location); + event.setRegistryName(location); + ForgeRegistries.SOUND_EVENTS.register(event); + return event; + } +}