remove unstackable blocks

This commit is contained in:
Sen 2025-07-06 18:20:30 +02:00
parent dd1b9c5e52
commit 575015abd6
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
3 changed files with 4 additions and 2 deletions

View file

@ -234,6 +234,6 @@ public class BlockCake extends Block
} }
protected Item getItemToRegister() { protected Item getItemToRegister() {
return new ItemSmallBlock(this).setMaxAmount(1).setDisplay("Kuchen").setTab(CheatTab.DECORATION); return new ItemSmallBlock(this).setDisplay("Kuchen").setTab(CheatTab.DECORATION);
} }
} }

View file

@ -165,6 +165,8 @@ public abstract class ItemRegistry {
if(item != null) { if(item != null) {
if(item.getTab() == null || !item.getTab().isBlockTab()) if(item.getTab() == null || !item.getTab().isBlockTab())
throw new IllegalArgumentException("Gegenstand für " + BlockRegistry.getName(block) + " muss einen Block-Tab besitzen"); throw new IllegalArgumentException("Gegenstand für " + BlockRegistry.getName(block) + " muss einen Block-Tab besitzen");
if(item.getItemStackLimit() == 1)
throw new IllegalArgumentException("Gegenstand für " + BlockRegistry.getName(block) + " muss stapelbar sein");
ITEMS.add(item); ITEMS.add(item);
ITEM_MAP.put(BlockRegistry.getName(block), item); ITEM_MAP.put(BlockRegistry.getName(block), item);
ITEM_IDS.put(item, ITEMS.size()); ITEM_IDS.put(item, ITEMS.size());

View file

@ -20,7 +20,7 @@ public class ItemBed extends Item
{ {
this.bedBlock = bedBlock; this.bedBlock = bedBlock;
this.setTab(CheatTab.DECORATION); this.setTab(CheatTab.DECORATION);
this.setMaxAmount(1); this.setMaxAmount(32);
} }
public Block getBlock() public Block getBlock()