Skip to content

Commit b2f67a0

Browse files
committed
Inventory api overhaul and more server auth impl
1 parent 119b6b3 commit b2f67a0

File tree

222 files changed

+8749
-1470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+8749
-1470
lines changed

api/src/main/java/module-info.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
open module org.cloudburstmc.api {
2+
requires static lombok;
23
requires static org.checkerframework.checker.qual;
3-
requires tools.jackson.core;
4-
requires tools.jackson.databind;
54
requires com.fasterxml.jackson.annotation;
6-
requires tools.jackson.dataformat.properties;
7-
requires tools.jackson.dataformat.yaml;
85
requires com.google.common;
96
requires com.google.guice;
107
requires jakarta.inject;
118
requires java.desktop;
12-
requires static lombok;
9+
requires java.sql;
1310
requires org.cloudburstmc.math.immutable;
1411
requires org.slf4j;
15-
requires java.sql;
12+
requires tools.jackson.core;
13+
requires tools.jackson.databind;
14+
requires tools.jackson.dataformat.properties;
15+
requires tools.jackson.dataformat.yaml;
1616

1717
exports org.cloudburstmc.api;
1818
exports org.cloudburstmc.api.block;
@@ -41,7 +41,8 @@
4141
exports org.cloudburstmc.api.event.redstone;
4242
exports org.cloudburstmc.api.event.server;
4343
exports org.cloudburstmc.api.event.vehicle;
44-
exports org.cloudburstmc.api.container;
44+
exports org.cloudburstmc.api.inventory;
45+
exports org.cloudburstmc.api.inventory.view;
4546
exports org.cloudburstmc.api.item;
4647
exports org.cloudburstmc.api.item.behavior;
4748
exports org.cloudburstmc.api.item.data;
@@ -61,6 +62,4 @@
6162
exports org.cloudburstmc.api.util;
6263
exports org.cloudburstmc.api.util.behavior;
6364
exports org.cloudburstmc.api.util.data;
64-
exports org.cloudburstmc.api.container.screen;
65-
exports org.cloudburstmc.api.container.view;
6665
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
4-
5-
public interface Barrel extends BlockEntity, BlockContainerView {
3+
import org.cloudburstmc.api.inventory.view.BlockStorageView;
64

5+
/**
6+
* A barrel block entity with 27 storage slots.
7+
*/
8+
public interface Barrel extends BlockEntity, BlockStorageView {
79
}

api/src/main/java/org/cloudburstmc/api/blockentity/BlockEntityTypes.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
import lombok.experimental.UtilityClass;
44

5+
/**
6+
* Registry of {@link BlockEntityType} constants for all built-in block entity types.
7+
*/
58
@SuppressWarnings("RedundantModifiersUtilityClassLombok")
69
@UtilityClass
710
public class BlockEntityTypes {
8-
911
public static final BlockEntityType<Banner> BANNER = BlockEntityType.from("banner", Banner.class);
1012
public static final BlockEntityType<Barrel> BARREL = BlockEntityType.from("barrel", Barrel.class);
1113
public static final BlockEntityType<Beacon> BEACON = BlockEntityType.from("beacon", Beacon.class);
@@ -18,13 +20,14 @@ public class BlockEntityTypes {
1820
public static final BlockEntityType<Chest> CHEST = BlockEntityType.from("chest", Chest.class);
1921
public static final BlockEntityType<CommandBlock> COMMAND_BLOCK = BlockEntityType.from("command_block", CommandBlock.class);
2022
public static final BlockEntityType<Comparator> COMPARATOR = BlockEntityType.from("comparator", Comparator.class);
23+
public static final BlockEntityType<Crafter> CRAFTER = BlockEntityType.from("crafter", Crafter.class);
2124
public static final BlockEntityType<DaylightDetector> DAYLIGHT_DETECTOR = BlockEntityType.from("daylight_detector", DaylightDetector.class);
2225
public static final BlockEntityType<Dispenser> DISPENSER = BlockEntityType.from("dispenser", Dispenser.class);
2326
public static final BlockEntityType<Dropper> DROPPER = BlockEntityType.from("dropper", Dropper.class);
2427
public static final BlockEntityType<EnchantingTable> ENCHANTING_TABLE = BlockEntityType.from("enchanting_table", EnchantingTable.class);
25-
public static final BlockEntityType<EnderChest> ENDER_CHEST = BlockEntityType.from("ender_chest", EnderChest.class);
2628
public static final BlockEntityType<EndGateway> END_GATEWAY = BlockEntityType.from("end_gateway", EndGateway.class);
2729
public static final BlockEntityType<EndPortal> END_PORTAL = BlockEntityType.from("end_portal", EndPortal.class);
30+
public static final BlockEntityType<EnderChest> ENDER_CHEST = BlockEntityType.from("ender_chest", EnderChest.class);
2831
public static final BlockEntityType<FlowerPot> FLOWER_POT = BlockEntityType.from("flower_pot", FlowerPot.class);
2932
public static final BlockEntityType<Furnace> FURNACE = BlockEntityType.from("furnace", Furnace.class);
3033
public static final BlockEntityType<Hopper> HOPPER = BlockEntityType.from("hopper", Hopper.class);
@@ -42,5 +45,4 @@ public class BlockEntityTypes {
4245
public static final BlockEntityType<Skull> SKULL = BlockEntityType.from("skull", Skull.class);
4346
public static final BlockEntityType<Smoker> SMOKER = BlockEntityType.from("smoker", Smoker.class);
4447
public static final BlockEntityType<StructureBlock> STRUCTURE_BLOCK = BlockEntityType.from("structure_block", StructureBlock.class);
45-
4648
}
Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
4-
import org.cloudburstmc.api.item.ItemStack;
3+
import org.cloudburstmc.api.inventory.view.BlockBrewingStandView;
54

6-
public interface BrewingStand extends BlockEntity, BlockContainerView {
7-
8-
short getCookTime();
9-
10-
void setCookTime(int cookTime);
11-
12-
short getFuelAmount();
13-
14-
void setFuelAmount(int fuelAmount);
15-
16-
ItemStack getIngredient();
17-
18-
void setIngredient(ItemStack ingredient);
19-
20-
ItemStack getFuel();
21-
22-
void setFuel(ItemStack fuel);
5+
/**
6+
* A brewing stand block entity that brews potions from an ingredient and up to three bottles.
7+
*/
8+
public interface BrewingStand extends BlockEntity, BlockBrewingStandView {
239
}

api/src/main/java/org/cloudburstmc/api/blockentity/Chest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
3+
import org.cloudburstmc.api.inventory.view.BlockStorageView;
44

5-
public interface Chest extends BlockEntity, BlockContainerView {
5+
/**
6+
* A chest block entity with 27 storage slots. Two adjacent chests can be paired to form a double chest.
7+
*/
8+
public interface Chest extends BlockEntity, BlockStorageView {
69

710
boolean isFindable();
811

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.cloudburstmc.api.blockentity;
2+
3+
import org.cloudburstmc.api.inventory.view.BlockCrafterView;
4+
5+
/**
6+
* A crafter block entity with a 9-slot crafting grid and per-slot disable flags for automated crafting.
7+
*/
8+
public interface Crafter extends BlockEntity, BlockCrafterView {
9+
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
3+
import org.cloudburstmc.api.inventory.view.BlockDispenserView;
44

5-
public interface Dispenser extends BlockEntity, BlockContainerView {
5+
/**
6+
* A dispenser block entity with a 9-slot inventory that fires or uses items when powered by redstone.
7+
*/
8+
public interface Dispenser extends BlockEntity, BlockDispenserView {
69
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
3+
import org.cloudburstmc.api.inventory.view.BlockDropperView;
44

5-
public interface Dropper extends BlockEntity, BlockContainerView {
5+
/**
6+
* A dropper block entity with a 9-slot inventory that ejects items into the world or an adjacent container when powered by redstone.
7+
*/
8+
public interface Dropper extends BlockEntity, BlockDropperView {
69
}
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
4-
import org.cloudburstmc.api.item.ItemStack;
3+
import org.cloudburstmc.api.inventory.view.BlockFurnaceView;
54

6-
public interface Furnace extends BlockEntity, BlockContainerView {
7-
8-
ItemStack getResult();
9-
10-
void setResult(ItemStack item);
11-
12-
ItemStack getFuel();
13-
14-
void setFuel(ItemStack item);
15-
16-
ItemStack getSmelting();
17-
18-
void setSmelting(ItemStack item);
5+
/**
6+
* A furnace block entity with ingredient, fuel, and result slots that smelts items over time.
7+
*/
8+
public interface Furnace extends BlockEntity, BlockFurnaceView {
199
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cloudburstmc.api.blockentity;
22

3-
import org.cloudburstmc.api.container.view.BlockContainerView;
3+
import org.cloudburstmc.api.inventory.view.BlockHopperView;
44

5-
public interface Hopper extends BlockEntity, BlockContainerView {
5+
/**
6+
* A hopper block entity with 5 slots that automatically pulls items from containers above and pushes items into containers below.
7+
*/
8+
public interface Hopper extends BlockEntity, BlockHopperView {
69
}

0 commit comments

Comments
 (0)