From 188c8897372d8095169c6a11a66540d20e3f71e3 Mon Sep 17 00:00:00 2001 From: RyanTLG <78032176+RyanTLG@users.noreply.github.com> Date: Sat, 3 Sep 2022 14:57:24 +0200 Subject: [PATCH] bones --- CHANGELOG | 5 +++- gradle.properties | 2 +- .../arcmods/ryantlg/blockClasses/Damon.java | 14 ---------- .../ryantlg/blockClasses/WeemCropBlock.java | 15 ---------- .../arcmods/ryantlg/blockClasses/elon.java | 14 ---------- src/main/java/net/arcmods/ryantlg/sounds.java | 28 ++++++++++--------- 6 files changed, 20 insertions(+), 58 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 76a3d12..3e9f5c7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ # Changes: ## 1.19-1.0.0-stable -- updating is despicable \ No newline at end of file +- updating is despicable + +## 1.19-1.1.0-stable +- fixed an issue where the game crashes when right clicking on weem, Matt Damon, Elon Musk \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c1e9449..60df7f0 100755 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx6G loader_version=0.14.8 # Mod Properties - mod_version = 1.19-1.0.0-stable + mod_version = 1.19-1.1.0-stable maven_group = ryantlg.GamerItems.mod archives_base_name = GamerItems diff --git a/src/main/java/net/arcmods/ryantlg/blockClasses/Damon.java b/src/main/java/net/arcmods/ryantlg/blockClasses/Damon.java index a5fc89a..802782f 100755 --- a/src/main/java/net/arcmods/ryantlg/blockClasses/Damon.java +++ b/src/main/java/net/arcmods/ryantlg/blockClasses/Damon.java @@ -17,18 +17,4 @@ public class Damon extends Block{ super(settings); } - @Override - public ActionResult onUse(BlockState blockState, World world, BlockPos blockPos, PlayerEntity placedBy, Hand hand, BlockHitResult blockHitResult) { - if (!world.isClient) { - world.playSound( - null, // Player - if non-null, will play sound for every nearby player *except* the specified player - blockPos, // The position of where the sound will come from - sounds.MATT_SOUND_EVENT, // The sound that will play - SoundCategory.BLOCKS, // This determines which of the volume sliders affect this sound - 1f, //Volume multiplier, 1 is normal, 0.5 is half volume, etc - 1f // Pitch multiplier, 1 is normal, 0.5 is half pitch, etc - ); - } - return ActionResult.FAIL; - } } diff --git a/src/main/java/net/arcmods/ryantlg/blockClasses/WeemCropBlock.java b/src/main/java/net/arcmods/ryantlg/blockClasses/WeemCropBlock.java index 4793a05..063460f 100755 --- a/src/main/java/net/arcmods/ryantlg/blockClasses/WeemCropBlock.java +++ b/src/main/java/net/arcmods/ryantlg/blockClasses/WeemCropBlock.java @@ -40,21 +40,6 @@ public class WeemCropBlock extends CropBlock { return AGE_TO_SHAPE[(Integer)state.get(this.getAgeProperty())]; } - @Override - public ActionResult onUse(BlockState blockState, World world, BlockPos blockPos, PlayerEntity placedBy, Hand hand, BlockHitResult blockHitResult) { - if (!world.isClient) { - world.playSound( - null, // Player - if non-null, will play sound for every nearby player *except* the specified player - blockPos, // The position of where the sound will come from - sounds.SNIFF_SOUND_EVENT, // The sound that will play - SoundCategory.BLOCKS, // This determines which of the volume sliders affect this sound - 1f, //Volume multiplier, 1 is normal, 0.5 is half volume, etc - 1f // Pitch multiplier, 1 is normal, 0.5 is half pitch, etc - ); - } - return ActionResult.FAIL; - - } } \ No newline at end of file diff --git a/src/main/java/net/arcmods/ryantlg/blockClasses/elon.java b/src/main/java/net/arcmods/ryantlg/blockClasses/elon.java index 4658f17..9011e2e 100755 --- a/src/main/java/net/arcmods/ryantlg/blockClasses/elon.java +++ b/src/main/java/net/arcmods/ryantlg/blockClasses/elon.java @@ -17,18 +17,4 @@ public class elon extends Block{ super(settings); } - @Override - public ActionResult onUse(BlockState blockState, World world, BlockPos blockPos, PlayerEntity placedBy, Hand hand, BlockHitResult blockHitResult) { - if (!world.isClient) { - world.playSound( - null, // Player - if non-null, will play sound for every nearby player *except* the specified player - blockPos, // The position of where the sound will come from - sounds.ELON_SOUND_EVENT, // The sound that will play - SoundCategory.BLOCKS, // This determines which of the volume sliders affect this sound - 1f, //Volume multiplier, 1 is normal, 0.5 is half volume, etc - 1f // Pitch multiplier, 1 is normal, 0.5 is half pitch, etc - ); - } - return ActionResult.FAIL; - } } diff --git a/src/main/java/net/arcmods/ryantlg/sounds.java b/src/main/java/net/arcmods/ryantlg/sounds.java index 9c074bf..c3f3b86 100755 --- a/src/main/java/net/arcmods/ryantlg/sounds.java +++ b/src/main/java/net/arcmods/ryantlg/sounds.java @@ -5,20 +5,22 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; public class sounds { - - public static final Identifier SNIFF = new Identifier("gameritems:sniff"); - public static SoundEvent SNIFF_SOUND_EVENT = new SoundEvent(SNIFF); - public static final Identifier MATT = new Identifier("gameritems:matt"); - public static SoundEvent MATT_SOUND_EVENT = new SoundEvent(MATT); - public static final Identifier ELON = new Identifier("gameritems:elon"); - public static SoundEvent ELON_SOUND_EVENT = new SoundEvent(ELON); - public static void register() { - gameritems.LOGGER.info("Sounds Loaded"); + // THIS IS BROKEN DO NOT TOUCH - Registry.register(Registry.SOUND_EVENT, sounds.SNIFF, SNIFF_SOUND_EVENT); - Registry.register(Registry.SOUND_EVENT, sounds.MATT, MATT_SOUND_EVENT); - Registry.register(Registry.SOUND_EVENT, sounds.ELON, ELON_SOUND_EVENT); - } + // public static final Identifier SNIFF = new Identifier("gameritems:sniff"); + // public static SoundEvent SNIFF_SOUND_EVENT = new SoundEvent(SNIFF); + // public static final Identifier MATT = new Identifier("gameritems:matt"); + // public static SoundEvent MATT_SOUND_EVENT = new SoundEvent(MATT); + // public static final Identifier ELON = new Identifier("gameritems:elon"); + // public static SoundEvent ELON_SOUND_EVENT = new SoundEvent(ELON); + + // public static void register() { + // gameritems.LOGGER.info("Sounds Loaded"); + + // Registry.register(Registry.SOUND_EVENT, sounds.SNIFF, SNIFF_SOUND_EVENT); + // Registry.register(Registry.SOUND_EVENT, sounds.MATT, MATT_SOUND_EVENT); + // Registry.register(Registry.SOUND_EVENT, sounds.ELON, ELON_SOUND_EVENT); + // } }