mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
commit
73b5ef8b52
@ -47,6 +47,7 @@
|
||||
* Fixed #2906
|
||||
* Fixed #2903
|
||||
* Fixed #2913
|
||||
* Fixed #2914
|
||||
|
||||
## Release Candidate 21 (14 Mar 2021)
|
||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
||||
|
@ -54,6 +54,9 @@ public class GEOMiner extends AContainer implements RecipeDisplayItem, HologramO
|
||||
super(category, item, recipeType, recipe);
|
||||
|
||||
addItemHandler(onPlace(), onBreak());
|
||||
|
||||
// Unregister the Block handler from AContainer (Fixes #2914)
|
||||
registerBlockHandler(getId(), null);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@ -87,26 +90,31 @@ public class GEOMiner extends AContainer implements RecipeDisplayItem, HologramO
|
||||
};
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getMachineIdentifier() {
|
||||
return "GEO_MINER";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getProgressBar() {
|
||||
return new ItemStack(Material.DIAMOND_PICKAXE);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public int[] getInputSlots() {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public int[] getOutputSlots() {
|
||||
return OUTPUT_SLOTS;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<ItemStack> getDisplayRecipes() {
|
||||
List<ItemStack> displayRecipes = new LinkedList<>();
|
||||
@ -120,13 +128,14 @@ public class GEOMiner extends AContainer implements RecipeDisplayItem, HologramO
|
||||
return displayRecipes;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getLabelLocalPath() {
|
||||
return "guide.tooltips.recipes.miner";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void constructMenu(BlockMenuPreset preset) {
|
||||
protected void constructMenu(@Nonnull BlockMenuPreset preset) {
|
||||
for (int i : BORDER) {
|
||||
preset.addItem(i, new CustomItem(Material.GRAY_STAINED_GLASS_PANE, " "), (p, slot, item, action) -> false);
|
||||
}
|
||||
@ -154,7 +163,7 @@ public class GEOMiner extends AContainer implements RecipeDisplayItem, HologramO
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tick(Block b) {
|
||||
protected void tick(@Nonnull Block b) {
|
||||
BlockMenu inv = BlockStorage.getInventory(b);
|
||||
|
||||
if (isProcessing(b)) {
|
||||
@ -183,7 +192,7 @@ public class GEOMiner extends AContainer implements RecipeDisplayItem, HologramO
|
||||
}
|
||||
}
|
||||
|
||||
private void start(Block b, BlockMenu inv) {
|
||||
private void start(@Nonnull Block b, @Nonnull BlockMenu inv) {
|
||||
for (GEOResource resource : SlimefunPlugin.getRegistry().getGEOResources().values()) {
|
||||
if (resource.isObtainableFromGEOMiner()) {
|
||||
OptionalInt optional = SlimefunPlugin.getGPSNetwork().getResourceManager().getSupplies(resource, b.getWorld(), b.getX() >> 4, b.getZ() >> 4);
|
||||
|
Loading…
Reference in New Issue
Block a user