generated from JamCoreModding/multi-loader-template-mod
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Dragon-Seeker/1.21-StateMangerSideness
[1.21] Adjust for sideness by requiring level or player when side is unknown or in common code area
- Loading branch information
Showing
16 changed files
with
170 additions
and
105 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
common/src/main/java/io/github/jamalam360/utility_belt/EmptyStateManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package io.github.jamalam360.utility_belt; | ||
|
||
import com.mojang.logging.LogUtils; | ||
import net.minecraft.world.entity.player.Player; | ||
import org.slf4j.Logger; | ||
|
||
import java.util.List; | ||
|
||
final class EmptyStateManager extends StateManager { | ||
|
||
static final EmptyStateManager INSTANCE = new EmptyStateManager(); | ||
|
||
private static final Logger LOGGER = LogUtils.getLogger(); | ||
|
||
@Override | ||
public boolean isInBelt(Player player) { | ||
LOGGER.warn("[UtilityBelt] Unable to tell if its in the belt as only a empty manger was found!"); | ||
|
||
return false; | ||
} | ||
|
||
@Override | ||
public void setInBelt(Player player, boolean inBelt) { | ||
LOGGER.warn("[UtilityBelt] Unable to set the given such in belt as only a empty manger was found!"); | ||
} | ||
|
||
@Override | ||
public int getSelectedBeltSlot(Player player) { | ||
LOGGER.warn("[UtilityBelt] Unable to get the given selected Belt slot as only a empty manger was found!"); | ||
|
||
return 0; | ||
} | ||
|
||
@Override | ||
public void setSelectedBeltSlot(Player player, int slot) { | ||
LOGGER.warn("[UtilityBelt] Unable to set the given selected Belt slot as only a empty manger was found!"); | ||
} | ||
|
||
@Override | ||
public UtilityBeltInventory getInventory(Player player) { | ||
LOGGER.warn("[UtilityBelt] Unable to get given Belt Inventory as only a empty manger was found!"); | ||
|
||
return new UtilityBeltInventory(List.of()); | ||
} | ||
|
||
@Override | ||
public void setInventory(Player player, UtilityBeltInventory.Mutable inventory) { | ||
LOGGER.warn("[UtilityBelt] Unable to set given Belt Inventory as only a empty manger was found!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...ain/java/io/github/jamalam360/utility_belt/client/ClientDelegatingServerStateManager.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.