pici szar

This commit is contained in:
2026-03-09 11:27:09 +01:00
parent 26ab8e0576
commit 485b15082e
12 changed files with 126 additions and 15 deletions

View File

@@ -40,9 +40,9 @@ public class RouletteBlockEntity extends BlockEntity {
"red", "black", "red", "black", "red", // 1-5
"black", "red", "black", "red", "black",// 6-10
"black", "red", "black", "red", "black",// 11-15
"red", "black", "red", "black", "black",// 16-20
"red", "black", "red", "red", "black",// 16-20
"red", "black", "red", "black", "red", // 21-25
"black", "red", "red", "black", "red", // 26-30
"black", "red", "black", "black", "red", // 26-30
"black", "red", "black", "red", "black",// 31-35
"red" // 36
};

View File

@@ -13,8 +13,8 @@ public class RouletteScreenHandler extends ScreenHandler {
public final RouletteBlockEntity blockEntity;
public static final int SLOT_SIZE = 18;
public static final int GRID_START_X = 60;
public static final int GRID_START_Y = 8;
public static final int GRID_START_X = 50;
public static final int GRID_START_Y = 7;
private static int gx(int col) { return GRID_START_X + (col - 1) * SLOT_SIZE; }
private static int gy(int row) { return GRID_START_Y + (row - 1) * SLOT_SIZE; }
@@ -87,7 +87,7 @@ public class RouletteScreenHandler extends ScreenHandler {
this.addSlot(new BetSlot(inv.thirds, 2, gx(14), gy(3)));
// === Player inventory ===
int playerInvY = GRID_START_Y + 5 * SLOT_SIZE + 14;
int playerInvY = GRID_START_Y + 5 * SLOT_SIZE + 60;
for (int y = 0; y < 3; y++)
for (int x = 0; x < 9; x++)
this.addSlot(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, playerInvY + y * 18));

View File

@@ -876,8 +876,8 @@ public class Szar implements ModInitializer {
Registries.BLOCK,
new Identifier(MOD_ID, "roulette"),
new RouletteBlock(
AbstractBlock.Settings
.copy(Blocks.IRON_BLOCK)
FabricBlockSettings.create()
.strength(2.0f, 3.0f)
)
);
public static final BlockEntityType<RouletteBlockEntity> ROULETTE_BLOCKENTITY = Registry.register(
@@ -1001,8 +1001,8 @@ public class Szar implements ModInitializer {
Registries.BLOCK,
new Identifier(MOD_ID, "slot_machine"),
new SlotMachineBlock(
AbstractBlock.Settings
.copy(Blocks.IRON_BLOCK)
FabricBlockSettings.create()
.strength(2.0f, 3.0f)
)
);
public static final BlockEntityType<SlotMachineBlockEntity> SLOT_MACHINE_BLOCKENTITY = Registry.register(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,6 @@
{
"values": [
"szar:roulette",
"szar:slot_machine"
]
}

View File

@@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "szar:roulette"
}
]
}
]
}

View File

@@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "szar:slot_machine"
}
]
}
]
}

View File

@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"BGR",
"WSW",
" W "
],
"key": {
"R": {
"item": "minecraft:red_wool"
},
"B": {
"item": "minecraft:black_wool"
},
"G": {
"item": "minecraft:lime_wool"
},
"S": {
"item": "minecraft:redstone_block"
},
"W": {
"tag": "minecraft:logs"
}
},
"result": {
"item": "szar:roulette",
"count": 1
}
}

View File

@@ -0,0 +1,26 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"WRW",
"SSL",
"WRW"
],
"key": {
"R": {
"item": "minecraft:redstone_block"
},
"L": {
"item": "minecraft:lever"
},
"S": {
"tag": "szar:lucky_items"
},
"W": {
"item": "minecraft:red_wool"
}
},
"result": {
"item": "szar:slot_machine",
"count": 1
}
}

View File

@@ -0,0 +1,14 @@
{
"values": [
"minecraft:deepslate_emerald_ore",
"minecraft:bell",
"minecraft:apple",
"minecraft:sweet_berries",
"minecraft:glow_berries",
"minecraft:melon_slice",
"minecraft:chorus_fruit",
"minecraft:golden_apple",
"minecraft:enchanted_golden_apple",
"minecraft:rabbit_foot"
]
}