This commit is contained in:
RyanTLG
2022-09-03 14:57:24 +02:00
parent 5eb78fbbd2
commit 188c889737
6 changed files with 20 additions and 58 deletions

View File

@@ -1,3 +1,6 @@
# Changes:
## 1.19-1.0.0-stable
- 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

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -6,19 +6,21 @@ 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);
// THIS IS BROKEN DO NOT TOUCH
public static void register() {
gameritems.LOGGER.info("Sounds Loaded");
// 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);
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 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);
// }
}