Skip to content

Commit

Permalink
Merged 1.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Dec 10, 2023
2 parents 6dd1734 + 571c14b commit 4a4902a
Show file tree
Hide file tree
Showing 102 changed files with 848 additions and 425 deletions.
22 changes: 21 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
- changed required Majrusz Library version from 6.1.7+ to 7.0.0+
- added new item type `Card`, which applies one time effect on accessories
- added Gambling Card
- added Reverse Card
- added Removal Card
- added new advancement for 69% efficiency bonus
- added 25% chance for Swimmer Guide to spawn in buried treasures (suggested by @Ladocterus)
- added Haste and Strength effects to Dream Catcher
- removed Jadeite
- reworked Wandering Trader trades for accessories and boosters
- updated Chinese translation (thanks to @Fiocher)
- increased Tamed Potato Bettle drop chances from 0.2%/0.5% to 0.25%/0.5%
- increased Lucky Ruck drop chance from 0.05% to 0.075%
- decreased Secret Ingredient drop chance from 3.34% to 2%
- optimized accessory checks
- fixed compatibility crash with MineColonies (reported by @Ryus Lightworks)
- fixed bug with Onyx not granting advancement
- fixed bug with current loot bonus displaying invalid value
- fixed bug with Secret Ingredient not working properly with Splash Potions and Lingering Potions
- fixed bug with Certificate of Taming bonuses not being applied on children of boosted animals
- fixed bug with Metal Lure extra items only being fishes
- fixed compatibility issue with accessories having range bonus after using crafting table
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@
import com.majruszlibrary.registry.RegistryGroup;
import com.majruszlibrary.registry.RegistryObject;
import com.majruszsaccessories.accessories.components.MoreChestLoot;
import com.majruszsaccessories.cards.GamblingCard;
import com.majruszsaccessories.cards.RemovalCard;
import com.majruszsaccessories.cards.ReverseCard;
import com.majruszsaccessories.config.Config;
import com.majruszsaccessories.integration.ISlotPlatform;
import com.majruszsaccessories.items.AccessoryItem;
import com.majruszsaccessories.items.BoosterItem;
import com.majruszsaccessories.items.BoosterOverlay;
import com.majruszsaccessories.items.CreativeModeTabs;
import com.majruszsaccessories.items.*;
import com.majruszsaccessories.particles.BonusParticle;
import com.majruszsaccessories.particles.BonusParticleType;
import com.majruszsaccessories.recipes.AccessoryRecipe;
import com.majruszsaccessories.recipes.BoostAccessoriesRecipe;
import com.majruszsaccessories.recipes.BoostAccessoryRecipe;
import com.majruszsaccessories.recipes.CombineAccessoriesRecipe;
import com.majruszsaccessories.recipes.UseCardRecipe;
import net.minecraft.core.particles.ParticleType;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -45,6 +46,9 @@ public class MajruszsAccessories {
public static final RegistryGroup< RecipeSerializer< ? > > RECIPES = HELPER.create( BuiltInRegistries.RECIPE_SERIALIZER );
public static final RegistryGroup< ParticleType< ? > > PARTICLES = HELPER.create( BuiltInRegistries.PARTICLE_TYPE );

// Network
public static final NetworkObject< MoreChestLoot.BonusInfo > MORE_CHEST_LOOT = HELPER.create( "more_chest_loot", MoreChestLoot.BonusInfo.class );

// Items (Accessories)
public static final RegistryObject< AccessoryItem > ADVENTURER_KIT = ITEMS.create( "adventurer_kit", AccessoryItem.tier1() );
public static final RegistryObject< AccessoryItem > ADVENTURER_RUNE = ITEMS.create( "adventurer_rune", AccessoryItem.tier2() );
Expand Down Expand Up @@ -73,29 +77,31 @@ public class MajruszsAccessories {
public static final RegistryObject< BoosterItem > GOLDEN_DICE = ITEMS.create( "golden_dice", BoosterItem.rare() );
public static final RegistryObject< BoosterItem > GOLDEN_HORSESHOE = ITEMS.create( "golden_horseshoe", BoosterItem.rare() );
public static final RegistryObject< BoosterItem > HORSESHOE = ITEMS.create( "horseshoe", BoosterItem.basic() );
public static final RegistryObject< BoosterItem > JADEITE = ITEMS.create( "jadeite", BoosterItem.basic() );
public static final RegistryObject< BoosterItem > ONYX = ITEMS.create( "onyx", BoosterItem.basic() );
public static final RegistryObject< BoosterItem > OWL_FEATHER = ITEMS.create( "owl_feather", BoosterItem.basic() );

// Items (Cards)
public static final RegistryObject< CardItem > GAMBLING_CARD = ITEMS.create( "gambling_card", GamblingCard::new );
public static final RegistryObject< CardItem > REMOVAL_CARD = ITEMS.create( "removal_card", RemovalCard::new );
public static final RegistryObject< CardItem > REVERSE_CARD = ITEMS.create( "reverse_card", ReverseCard::new );

// Items (Fake)
public static final RegistryObject< BoosterOverlay > BOOSTER_OVERLAY_SINGLE = ITEMS.create( "booster_overlay_single", BoosterOverlay::new );
public static final RegistryObject< BoosterOverlay > BOOSTER_OVERLAY_DOUBLE = ITEMS.create( "booster_overlay_double", BoosterOverlay::new );
public static final RegistryObject< BoosterOverlay > BOOSTER_OVERLAY_TRIPLE = ITEMS.create( "booster_overlay_triple", BoosterOverlay::new );

// Recipes
public static final RegistryObject< RecipeSerializer< ? > > ACCESSORY_RECIPE = RECIPES.create( "crafting_accessory", AccessoryRecipe.create() );
public static final RegistryObject< RecipeSerializer< ? > > BOOST_ACCESSORY_RECIPE = RECIPES.create( "crafting_boost_accessory", BoostAccessoryRecipe.create() );
public static final RegistryObject< RecipeSerializer< ? > > COMBINE_ACCESSORIES_RECIPE = RECIPES.create( "crafting_combine_accessories", CombineAccessoriesRecipe.create() );
public static final RegistryObject< RecipeSerializer< ? > > BOOST_ACCESSORIES_RECIPE = RECIPES.create( "crafting_boost_accessories", BoostAccessoriesRecipe.create() );
public static final RegistryObject< RecipeSerializer< ? > > USE_CARD_RECIPE = RECIPES.create( "crafting_use_card", UseCardRecipe.create() );

// Particles
public static final RegistryObject< BonusParticleType > BONUS_PARTICLE = PARTICLES.create( "bonus_normal", BonusParticleType::new );

// Creative Mode Tabs
public static final RegistryObject< CreativeModeTab > CREATIVE_MODE_TAB = CREATIVE_MODE_TABS.create( "primary", CreativeModeTabs.primary() );

// Network
public static final NetworkObject< MoreChestLoot.BonusInfo > MORE_CHEST_LOOT = HELPER.create( "more_chest_loot", MoreChestLoot.BonusInfo.class );

// Integration
public static final ISlotPlatform SLOT_INTEGRATION = Services.load( ISlotPlatform.class );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.MoreChestLoot;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -19,7 +19,7 @@ public AdventurerKit() {

this.add( MoreChestLoot.create( 1.2f ) )
.add( AnyChestDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class AnyChestDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.majruszsaccessories.accessories.components.BrushingExtraItem;
import com.majruszsaccessories.accessories.components.MoreChestLoot;
import com.majruszsaccessories.accessories.components.SwimmingSpeedBonus;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;

@AutoInstance
Expand All @@ -15,7 +14,6 @@ public AdventurerRune() {

this.add( MoreChestLoot.create( 1.5f ) )
.add( BrushingExtraItem.create( 0.2f ) )
.add( SwimmingSpeedBonus.create( 0.25f ) )
.add( TradeOffer.create( 17 ) );
.add( SwimmingSpeedBonus.create( 0.25f ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.BrushingExtraItem;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
Expand All @@ -26,7 +26,7 @@ public AncientScarab() {

this.add( BrushingExtraItem.create( 0.16f ) )
.add( SuspiciousBlocksDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class SuspiciousBlocksDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.majruszsaccessories.accessories.components.FishingExtraItems;
import com.majruszsaccessories.accessories.components.FishingLuckBonus;
import com.majruszsaccessories.accessories.components.FishingLureBonus;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;

@AutoInstance
Expand All @@ -15,7 +14,6 @@ public AnglerRune() {

this.add( FishingLuckBonus.create( 3 ) )
.add( FishingLureBonus.create( 0.25f ) )
.add( FishingExtraItems.create( 0.25f, 3 ) )
.add( TradeOffer.create( 17 ) );
.add( FishingExtraItems.create( 0.25f, 3 ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import com.majruszlibrary.registry.Registries;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.FishingLuckBonus;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;
import net.minecraft.resources.ResourceLocation;

Expand All @@ -26,7 +26,7 @@ public AnglerTrophy() {

this.add( FishingLuckBonus.create( 3 ) )
.add( FishingDropChance.create( 0.01f ) )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

public static class FishingDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.TamingStrongerAnimals;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -20,7 +20,7 @@ public CertificateOfTaming() {

this.add( TamingStrongerAnimals.create( 0.2f ) )
.add( TamingDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class TamingDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import com.majruszlibrary.math.AnyPos;
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.accessories.components.TradingDiscount;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -21,7 +21,7 @@ public DiscountVoucher() {

this.add( TradingDiscount.create( 0.12f ) )
.add( TradingDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class TradingDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.SleepingBonuses;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -21,7 +21,7 @@ public DreamCatcher() {

this.add( SleepingBonuses.create( 1, 300 ) )
.add( SleepingDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class SleepingDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.SleepingBonuses;
import com.majruszsaccessories.accessories.components.StrongerPotions;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.accessories.components.TradingDiscount;
import com.majruszsaccessories.common.AccessoryHandler;

Expand All @@ -15,7 +14,6 @@ public HouseholdRune() {

this.add( TradingDiscount.create( 0.15f ) )
.add( SleepingBonuses.create( 1, 360 ) )
.add( StrongerPotions.create( 0.5f, 1 ) )
.add( TradeOffer.create( 17 ) );
.add( StrongerPotions.create( 0.5f, 1 ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.BreedingTwins;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -21,7 +21,7 @@ public IdolOfFertility() {

this.add( BreedingTwins.create( 0.25f ) )
.add( BreedingDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class BreedingDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.MiningExtraItem;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -19,11 +19,11 @@ public LuckyRock() {

this.add( MiningExtraItem.create( 0.03f ) )
.add( MiningDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class MiningDropChance extends BonusComponent< AccessoryItem > {
float chance = 0.0005f;
float chance = 0.00075f;

public static ISupplier< AccessoryItem > create() {
return MiningDropChance::new;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.majruszlibrary.annotation.AutoInstance;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.FishingExtraItems;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.components.TradeOffer;

@AutoInstance
public class MetalLure extends AccessoryHandler {
Expand All @@ -13,6 +13,6 @@ public MetalLure() {

this.add( FishingExtraItems.create( 0.2f, 2 ) )
.add( AnglerTrophy.FishDropChance.create( 0.01f ) )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import com.majruszlibrary.math.Range;
import com.majruszsaccessories.MajruszsAccessories;
import com.majruszsaccessories.accessories.components.MiningSpeedBonus;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;
import com.majruszsaccessories.common.BonusComponent;
import com.majruszsaccessories.common.BonusHandler;
import com.majruszsaccessories.contexts.base.CustomConditions;
import com.majruszsaccessories.common.components.TradeOffer;
import com.majruszsaccessories.events.base.CustomConditions;
import com.majruszsaccessories.items.AccessoryItem;

@AutoInstance
Expand All @@ -20,7 +20,7 @@ public MinerGuide() {

this.add( MiningSpeedBonus.create( 0.1f ) )
.add( UndergroundChestDropChance.create() )
.add( TradeOffer.create( 7 ) );
.add( TradeOffer.create() );
}

static class UndergroundChestDropChance extends BonusComponent< AccessoryItem > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.majruszsaccessories.accessories.components.MiningDurabilityBonus;
import com.majruszsaccessories.accessories.components.MiningExtraItem;
import com.majruszsaccessories.accessories.components.MiningSpeedBonus;
import com.majruszsaccessories.accessories.components.TradeOffer;
import com.majruszsaccessories.common.AccessoryHandler;

@AutoInstance
Expand All @@ -15,7 +14,6 @@ public MinerRune() {

this.add( MiningExtraItem.create( 0.04f ) )
.add( MiningSpeedBonus.create( 0.12f ) )
.add( MiningDurabilityBonus.create( 0.12f ) )
.add( TradeOffer.create( 17 ) );
.add( MiningDurabilityBonus.create( 0.12f ) );
}
}
Loading

0 comments on commit 4a4902a

Please sign in to comment.