Updated Forge, added sounds
This commit is contained in:
parent
50cf0f59e1
commit
68fa0aad3c
7 changed files with 74 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
15
src/main/java/biomesoplenty/api/sound/BOPSounds.java
Normal file
15
src/main/java/biomesoplenty/api/sound/BOPSounds.java
Normal file
|
@ -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;
|
||||
}
|
21
src/main/java/biomesoplenty/common/item/ItemBOPRecord.java
Normal file
21
src/main/java/biomesoplenty/common/item/ItemBOPRecord.java
Normal file
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
32
src/main/java/biomesoplenty/init/ModSounds.java
Normal file
32
src/main/java/biomesoplenty/init/ModSounds.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue