Skip to content

Commit

Permalink
Merged 7.0.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Apr 26, 2024
2 parents e8bdc83 + 377e4ed commit 6332d19
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 45 deletions.
10 changes: 5 additions & 5 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- fixed random crashes when starting the game (reported by @Kazuya)
- fixed bug with spawn point features not working properly with Respawn Anchors
- fixed bug with item damage modifications not working properly (reported by @Camawama)
- fixed compatibility issue that caused 1 item to be taken from the stack when hitting mobs (reported by @Camawama)
- optimized spawn point features
- added compatibility with Aquaculture 2 for fishing related features (reported by @JinKhya, @Ladocterus)
- added compatibility with MC Dungeons Weapons for damage related features (reported by @mochalit)
- fixed crash `Accessing LegacyRandomSource from multiple threads` (reported by @Luigi delle Bicocche, @davey)
- fixed compatibility crash `java.lang.IndexOutOfBoundsException` (reported by @GermanArtur, @memphismc)
- fixed long game loading time when GitHub cannot be accessed without proxy (reported by @SettingDust)
2 changes: 1 addition & 1 deletion common/src/main/java/com/majruszlibrary/math/Random.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Random {
thread safe and can be accessed on both server and client at the same time.
*/
public static RandomSource getThreadSafe() {
return Side.isLogicalClient() ? CLIENT : SERVER;
return Side.isClient() ? CLIENT : SERVER;
}

public static float nextFloat() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import java.util.Map;

@Mixin( LivingEntity.class )
@Mixin( value = LivingEntity.class, priority = 1100 )
public abstract class MixinLivingEntity implements IMixinLivingEntity {
private @Shadow int useItemRemaining;
float majruszlibrary$lastDamage = 0.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public VersionChecker( ModHelper helper ) {
}

public void register() {
Thread thread = new Thread( VersionChecker.this::findAvailableUpdates );
thread.start();
}

private void findAvailableUpdates() {
Optional< URL > update = Integration.getUpdateURL( this.helper.getModId() );
if( update.isEmpty() ) {
this.helper.logError( "Missing update url" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TimeHelper {
private static final int TICKS_IN_MINUTE = TICKS_IN_SECOND * 60;
private static final LogicalSafe< List< IDelayedExecution > > PENDING_EXECUTIONS = LogicalSafe.of( ArrayList::new );
private static final LogicalSafe< List< IDelayedExecution > > EXECUTIONS = LogicalSafe.of( ArrayList::new );
private static LogicalSafe< Long > TICKS_COUNTER = LogicalSafe.of( ()->-1L );
private static LogicalSafe< Long > TICKS_COUNTER = LogicalSafe.of( ()->1L );

static {
OnServerTicked.listen( data->TimeHelper.update() )
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.majruszlibrary.events;

import com.majruszlibrary.events.base.Events;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.event.entity.player.ItemFishedEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber
public class OnItemFishedForge {
@SubscribeEvent
public static void onItemFished( ItemFishedEvent event ) {
Player player = event.getEntity();

Events.dispatch( new OnItemFished( player, event.getHookEntity(), player.getItemInHand( player.getUsedItemHand() ), event.getDrops() ) );
}
}

This file was deleted.

1 change: 0 additions & 1 deletion forge/src/main/resources/majruszlibrary-forge.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
],
"mixins": [
"MixinEnchantment",
"MixinFishingHook",
"MixinLootTable"
],
"injectors": {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ minecraft_version=1.20.1
# Mod
mod_id=majruszlibrary
mod_archives_name=majrusz-library
mod_version=7.0.5
mod_version=7.0.6
mod_display_name=Majrusz Library
mod_description=Library with common code for my other modifications.
mod_authors=Majrusz
Expand Down

0 comments on commit 6332d19

Please sign in to comment.