fix glock stuff
This commit is contained in:
parent
2274852c9b
commit
8bbecbf135
@ -116,9 +116,9 @@ public class Shitmod implements ModInitializer {
|
||||
|
||||
public static final ToolItem COPPER_HOE = new copperHoe(copperMaterial.INSTANCE, -3, -1f, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(250));
|
||||
|
||||
public static final Item GLOCK = new glock(new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(1000));
|
||||
public static final Item GLOCK = new glock(new FabricItemSettings().group(Shitmod.TOOLS_GROUP).maxDamage(1000).rarity(Rarity.EPIC));
|
||||
|
||||
public static final SoundEvent GLOCK_NOISE = new SoundEvent(new Identifier("shitmod:glock"));
|
||||
public static final SoundEvent GLOCK_NOISE = new SoundEvent(new Identifier("shitmod:glock_noise"));
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
|
@ -22,8 +22,11 @@ public class glock extends Item{
|
||||
arro.setVelocity(playerEntity, playerEntity.getPitch(), playerEntity.getHeadYaw(), 0f, 100, 0);
|
||||
arro.setOwner(playerEntity);
|
||||
world.spawnEntity(arro);
|
||||
world.playSound(playerEntity.getX(), playerEntity.getY(), playerEntity.getZ(), Shitmod.GLOCK_NOISE, SoundCategory.PLAYERS, 1f, 1f, true);
|
||||
if (!world.isClient()) {
|
||||
world.playSound(null, playerEntity.getX(), playerEntity.getY(), playerEntity.getZ(), Shitmod.GLOCK_NOISE, SoundCategory.NEUTRAL, 1f, 1f, 1);
|
||||
}
|
||||
playerEntity.getMainHandStack().damage(1,playerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||
playerEntity.getItemCooldownManager().set(this, 20);
|
||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerEntity.getStackInHand(hand));
|
||||
}
|
||||
|
||||
|
@ -42,5 +42,5 @@
|
||||
"itemGroup.shitmod.general": "Shitmod Misc",
|
||||
"itemGroup.shitmod.tools": "Shitmod Tools",
|
||||
"item.shitmod.glock": "Glock",
|
||||
"subtitles.shitmod.glock": "Glock Fires"
|
||||
"subtitles.shitmod.glock_noise": "Glock Fires"
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"glocknoise": {
|
||||
"subtitle": "subtitles.shitmod.glock",
|
||||
"shitmod": [
|
||||
"shitmod:glock"
|
||||
"glock_noise": {
|
||||
"subtitle": "subtitles.shitmod.glock_noise",
|
||||
"sounds": [
|
||||
"shitmod:glock_noise"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user