Updated in preparation for 1.19.1

This commit is contained in:
quiqueck 2022-06-24 20:36:56 +02:00
parent fcb91b25e0
commit cdbc6a6fcb
2 changed files with 8 additions and 3 deletions

View file

@ -6,7 +6,12 @@ import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.item.RecordItem;
public class BaseDiscItem extends RecordItem implements ItemModelProvider {
@Deprecated(forRemoval = true)
public BaseDiscItem(int comparatorOutput, SoundEvent sound, Properties settings) {
super(comparatorOutput, sound, settings);
this(comparatorOutput, sound, settings, 30);
}
public BaseDiscItem(int comparatorOutput, SoundEvent sound, Properties settings, int lengthInSeconds) {
super(comparatorOutput, sound, settings, lengthInSeconds);
}
}

View file

@ -33,8 +33,8 @@ public class ItemRegistry extends BaseRegistry<Item> {
super(creativeTab, config);
}
public Item registerDisc(ResourceLocation itemId, int power, SoundEvent sound) {
BaseDiscItem item = new BaseDiscItem(power, sound, makeItemSettings().stacksTo(1));
public Item registerDisc(ResourceLocation itemId, int power, SoundEvent sound, int lengthInSeconds) {
BaseDiscItem item = new BaseDiscItem(power, sound, makeItemSettings().stacksTo(1), lengthInSeconds);
if (!config.getBoolean("musicDiscs", itemId.getPath(), true)) {
return item;