Skip to content

Commit

Permalink
Merge branch 'main' into mp
Browse files Browse the repository at this point in the history
  • Loading branch information
Dqu1J authored Feb 12, 2024
2 parents 21bef7d + ee72a68 commit ebc9616
Show file tree
Hide file tree
Showing 25 changed files with 69 additions and 53 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'io.github.juuxel.loom-quiltflower' version '1.7.1'
id 'maven-publish'
}
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
minecraft_version=1.20.4
loader_version=0.14.4
# Mod Properties
mod_version=6.0.1
mod_version=6.0.2
maven_group=AdditionalAdditions
archives_base_name=AdditionalAdditions
# Dependencies
fabric_version=0.85.0+1.20.1
modmenu_version=7.1.0
libgui_version=8.0.1+1.20
fabric_version=0.96.0+1.20.4
modmenu_version=9.0.0
libgui_version=9.2.2+1.20.2
lambdynamiclights_version=2.3.1+1.20.1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package dqu.additionaladditions.block;

import com.mojang.serialization.MapCodec;
import dqu.additionaladditions.registry.AdditionalItems;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.AnvilBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.FallingBlock;
import net.minecraft.world.level.block.state.BlockState;
Expand All @@ -16,12 +18,18 @@
public class GlowStickBlock extends FallingBlock {
public static final VoxelShape shape = Block.box(2, 0, 2,14, 2, 14);
public static final BooleanProperty FLIPPED = BooleanProperty.create("flipped");
public static final MapCodec<GlowStickBlock> CODEC = simpleCodec(GlowStickBlock::new);

public GlowStickBlock(Properties settings) {
super(settings);
registerDefaultState(getStateDefinition().any().setValue(FLIPPED, false));
}

@Override
protected MapCodec<? extends FallingBlock> codec() {
return CODEC;
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
stateManager.add(FLIPPED);
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/dqu/additionaladditions/block/PatinaBlock.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
package dqu.additionaladditions.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.world.level.block.FallingBlock;

public class PatinaBlock extends FallingBlock {
public static final MapCodec<PatinaBlock> CODEC = simpleCodec(PatinaBlock::new);

@Override
protected MapCodec<? extends FallingBlock> codec() {
return CODEC;
}

public PatinaBlock(Properties properties) {
super(properties);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/dqu/additionaladditions/gui/ConfigGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.contents.LiteralContents;
import net.minecraft.network.chat.contents.PlainTextContents;
import net.minecraft.network.chat.contents.TranslatableContents;

public class ConfigGui extends LightweightGuiDescription {
private static final Component OPTION_DONE = MutableComponent.create(new TranslatableContents("gui.done", null, new String[]{}));
private static final Component SCREEN_TITLE = MutableComponent.create(new LiteralContents("Additional Additions ")).withStyle(ChatFormatting.BOLD).append(MutableComponent.create(new LiteralContents("options.title")));
private static final Component SCREEN_TITLE = MutableComponent.create(new PlainTextContents.LiteralContents("Additional Additions ")).withStyle(ChatFormatting.BOLD).append(MutableComponent.create(new PlainTextContents.LiteralContents("options.title")));

public ConfigGui() {
WGridPanel root = (WGridPanel) rootPanel;
Expand All @@ -27,12 +27,12 @@ public ConfigGui() {

for (ConfigValues value : ConfigValues.values()) {
if (value.getType() == ConfigValueType.BOOLEAN) {
WToggleButton button = new WToggleButton(MutableComponent.create(new LiteralContents(value.getProperty().key())));
WToggleButton button = new WToggleButton(MutableComponent.create(new PlainTextContents.LiteralContents(value.getProperty().key())));
button.setToggle(Config.getBool(value));
button.setOnToggle(on -> Config.set(value, on));
box.add(button);
} else {
WLabel text = new WLabel(MutableComponent.create(new LiteralContents(value.getProperty().key() + " | Unable to manage ingame. Edit in file instead.")));
WLabel text = new WLabel(MutableComponent.create(new PlainTextContents.LiteralContents(value.getProperty().key() + " | Unable to manage ingame. Edit in file instead.")));
box.add(text);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dqu/additionaladditions/gui/ConfirmGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.contents.LiteralContents;
import net.minecraft.network.chat.contents.PlainTextContents;
import net.minecraft.network.chat.contents.TranslatableContents;

public class ConfirmGui extends LightweightGuiDescription {
private static final Component SCREEN_TITLE = MutableComponent.create(new LiteralContents("Additional Additions ")).withStyle(ChatFormatting.BOLD);
private static final Component SCREEN_TITLE = MutableComponent.create(new PlainTextContents.LiteralContents("Additional Additions ")).withStyle(ChatFormatting.BOLD);
private static final Component OPTION_DONE = MutableComponent.create(new TranslatableContents("gui.done", null, new String[]{}));
private static final Component DESCRIPTION = MutableComponent.create(new TranslatableContents("additionaladditions.gui.config.restart", null, new String[]{}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public InteractionResultHolder<ItemStack> use(Level world, Player player, Intera
fluid.getPickupSound().ifPresent((sound) -> player.playSound(sound, 1.0F, 1.0F));
if (!world.isClientSide()) {
stack.setDamageValue(100);
fluid.pickupBlock(world, pos, state);
fluid.pickupBlock(player, world, pos, state);
player.swing(hand);
}
return InteractionResultHolder.success(stack);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dqu/additionaladditions/mixin/AxeItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

@Mixin(AxeItem.class)
public class AxeItemMixin {
@Inject(method = "useOn", at = @At(value = "FIELD", target = "Lnet/minecraft/sounds/SoundEvents;AXE_SCRAPE:Lnet/minecraft/sounds/SoundEvent;"), locals = LocalCapture.CAPTURE_FAILSOFT)
private void spawnCopperPatina(UseOnContext iuc, CallbackInfoReturnable<InteractionResult> cir, Level world, BlockPos blockPos, Player playerEntity, BlockState blockState, Optional optional, Optional optional2, Optional optional3, ItemStack itemStack, Optional optional4) {
@Inject(method = "evaluateNewBlockState", at = @At(value = "FIELD", target = "Lnet/minecraft/sounds/SoundEvents;AXE_SCRAPE:Lnet/minecraft/sounds/SoundEvent;"), locals = LocalCapture.CAPTURE_FAILSOFT)
private void spawnCopperPatina(Level world, BlockPos blockPos, Player player, BlockState blockState, CallbackInfoReturnable<Optional<BlockState>> cir, Optional optional, Optional optional2) {
if (!Config.getBool(ConfigValues.COPPER_PATINA)) return;
ItemStack stack = new ItemStack(AdditionalBlocks.COPPER_PATINA);
ItemEntity itemEntity = new ItemEntity(world, blockPos.getX(), blockPos.getY(), blockPos.getZ(), stack);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockSource;
import net.minecraft.core.Registry;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -112,7 +112,7 @@ private static void registerLootTables() {
.when(LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.025f, 0.01f))
.add(LootItem.lootTableItem(CHICKEN_NUGGET))
);
LootHandler.register(BuiltInLootTables.PIGLIN_BARTERING, () -> Config.getBool(ConfigValues.GILDED_NETHERITE), LootPool.lootPool()
LootHandler.register(BuiltInLootTables.PIGLIN_BARTERING, () -> Config.getBool(ConfigValues.GILDED_NETHERITE, "enabled"), LootPool.lootPool()
.setRolls(ConstantValue.exactly(1))
.when(LootItemRandomChanceCondition.randomChance(0.015f))
.add(LootItem.lootTableItem(GOLD_RING))
Expand All @@ -125,11 +125,11 @@ private static void registerOther() {
public ItemStack execute(BlockSource pointer, ItemStack stack) {
WrenchItem wrench = (WrenchItem) stack.getItem();

BlockState dstate = pointer.getBlockState();
BlockPos pos = pointer.getPos().relative(dstate.getValue(BlockStateProperties.FACING));
BlockState state = pointer.getLevel().getBlockState(pos);
BlockState dstate = pointer.state();
BlockPos pos = pointer.pos().relative(dstate.getValue(BlockStateProperties.FACING));
BlockState state = pointer.level().getBlockState(pos);

wrench.dispenserUse(pointer.getLevel(), pos, state, stack);
wrench.dispenserUse(pointer.level(), pos, state, stack);
return stack;
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/cs_cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Železné Vybavení",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Přidej železnou zbroj, zbraň nebo nástroj",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Slitina Růžového Zlata",
"upgrade.additionaladditions.rose_gold_upgrade": "Růžově Zlaté Vylepšení",
"item.additionaladditions.rose_gold_upgrade": "Růžově Zlaté Vylepšení",
"item.additionaladditions.wrench": "Klíč",
"item.additionaladditions.fried_egg": "Smažené Vejce",
"item.additionaladditions.trident_shard": "Úlomek Trojzubce",
Expand All @@ -35,7 +35,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netheritové Vybavení",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Přidej Netheritovou Zbroj, Zbraň nebo Nástroj",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Zlatý Prsten",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Pozlacené Netheritové Vylepšení",
"item.additionaladditions.gilded_netherite_upgrade": "Pozlacené Netheritové Vylepšení",
"item.additionaladditions.music_disc_0308": "Gramofonová Deska",
"item.additionaladditions.music_disc_1007": "Gramofonová Deska",
"item.additionaladditions.music_disc_1507": "Gramofonová Deska",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/de_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Schraubenschlüssel",
"item.additionaladditions.fried_egg": "Spiegelei",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Schallplatte",
"item.additionaladditions.music_disc_1007": "Schallplatte",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Wrench",
"item.additionaladditions.fried_egg": "Fried Egg",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Music Disc",
"item.additionaladditions.music_disc_1007": "Music Disc",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/es_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Llave de tuerca",
"item.additionaladditions.fried_egg": "Huevo frito",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Disco de música",
"item.additionaladditions.music_disc_1007": "Disco de música",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/id_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Kunci",
"item.additionaladditions.fried_egg": "Telur Mata Sapi",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Cakram Musik",
"item.additionaladditions.music_disc_1007": "Cakram Musik",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/ko_kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "철 장비",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "철 갑옷이나 무기, 도구를 놓으세요",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "로즈 골드 합금",
"upgrade.additionaladditions.rose_gold_upgrade": "로즈 골드 강화",
"item.additionaladditions.rose_gold_upgrade": "로즈 골드 강화",

"item.additionaladditions.wrench": "렌치",
"item.additionaladditions.fried_egg": "계란 프라이",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "네더라이트 장비",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "네더라이트 갑옷이나 무기, 도구를 놓으세요",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "금 고리",
"upgrade.additionaladditions.gilded_netherite_upgrade": "황금이 박힌 네더라이트 강화",
"item.additionaladditions.gilded_netherite_upgrade": "황금이 박힌 네더라이트 강화",

"item.additionaladditions.music_disc_0308": "음반",
"item.additionaladditions.music_disc_1007": "음반",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/pl_pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Klucz francuski",
"item.additionaladditions.fried_egg": "Jajko sadzone",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Płyta muzyczna",
"item.additionaladditions.music_disc_1007": "Płyta muzyczna",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/additionaladditions/lang/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"item.additionaladditions.smithing_template.rose_gold_upgrade.applies_to": "Iron Equipment",
"item.additionaladditions.smithing_template.rose_gold_upgrade.base_slot_description": "Add iron armor, weapon, or tool",
"item.additionaladditions.smithing_template.rose_gold_upgrade.ingredients": "Rose Gold Alloy",
"upgrade.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",
"item.additionaladditions.rose_gold_upgrade": "Rose Gold Upgrade",

"item.additionaladditions.wrench": "Chave inglesa",
"item.additionaladditions.fried_egg": "Ovo frito",
Expand All @@ -40,7 +40,7 @@
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.applies_to": "Netherite Equipment",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.base_slot_description": "Add netherite armor, weapon, or tool",
"item.additionaladditions.smithing_template.gilded_netherite_upgrade.ingredients": "Gold Ring",
"upgrade.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",
"item.additionaladditions.gilded_netherite_upgrade": "Gilded Netherite Upgrade",

"item.additionaladditions.music_disc_0308": "Disco musical",
"item.additionaladditions.music_disc_1007": "Disco musical",
Expand Down
Loading

0 comments on commit ebc9616

Please sign in to comment.