-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
11 changes: 0 additions & 11 deletions
11
src/main/java/uk/protonull/civ/chesttracker/CivChestTracker.java
This file was deleted.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
src/main/java/uk/protonull/civ/chesttracker/CivChestTrackerPlugin.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,73 @@ | ||
package uk.protonull.civ.chesttracker; | ||
|
||
import net.minecraft.client.gui.screens.inventory.BeaconScreen; | ||
import net.minecraft.client.gui.screens.inventory.CartographyTableScreen; | ||
import net.minecraft.client.gui.screens.inventory.EffectRenderingInventoryScreen; | ||
import net.minecraft.client.gui.screens.inventory.EnchantmentScreen; | ||
import net.minecraft.client.gui.screens.inventory.GrindstoneScreen; | ||
import net.minecraft.client.gui.screens.inventory.ItemCombinerScreen; | ||
import net.minecraft.client.gui.screens.inventory.LoomScreen; | ||
import net.minecraft.client.gui.screens.inventory.StonecutterScreen; | ||
import net.minecraft.resources.ResourceLocation; | ||
import org.jetbrains.annotations.NotNull; | ||
import red.jackf.chesttracker.api.ChestTrackerPlugin; | ||
import red.jackf.chesttracker.api.gui.ScreenBlacklist; | ||
import red.jackf.chesttracker.api.providers.ProviderUtils; | ||
import red.jackf.chesttracker.api.providers.ServerProvider; | ||
import red.jackf.chesttracker.api.providers.context.ScreenCloseContext; | ||
import red.jackf.chesttracker.api.providers.context.ScreenOpenContext; | ||
import red.jackf.jackfredlib.client.api.gps.Coordinate; | ||
import uk.protonull.civ.chesttracker.gui.screens.ContainerLocationDeciderScreen; | ||
|
||
public final class CivChestTrackerPlugin implements ChestTrackerPlugin { | ||
/** | ||
* Pretty heavily based on {@link red.jackf.chesttracker.impl.DefaultChestTrackerPlugin} | ||
*/ | ||
@Override | ||
public void load() { | ||
ScreenBlacklist.add( | ||
// workstations with no item retention | ||
CartographyTableScreen.class, | ||
EnchantmentScreen.class, | ||
GrindstoneScreen.class, | ||
ItemCombinerScreen.class, | ||
LoomScreen.class, | ||
StonecutterScreen.class, | ||
BeaconScreen.class, | ||
// inventory (surv & creative) | ||
EffectRenderingInventoryScreen.class | ||
); | ||
|
||
ProviderUtils.registerProvider(new Provider()); | ||
|
||
ContainerLocationDeciderScreen.setupPickerRendering(); | ||
} | ||
|
||
private static final class Provider extends ServerProvider { | ||
@Override | ||
public ResourceLocation id() { | ||
return ResourceLocation.fromNamespaceAndPath("civchesttracker", "provider"); | ||
} | ||
|
||
@Override | ||
public boolean appliesTo( | ||
final @NotNull Coordinate coordinate | ||
) { | ||
return true; // Apply to singleplayer, multiplayer, etc | ||
} | ||
|
||
@Override | ||
public void onScreenOpen( | ||
final @NotNull ScreenOpenContext context | ||
) { | ||
|
||
} | ||
|
||
@Override | ||
public void onScreenClose( | ||
final ScreenCloseContext context | ||
) { | ||
|
||
} | ||
} | ||
} |
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