Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gm4/plugins/resource_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

JsonType = dict[str,Any]

MINECRAFT_REFERENCE_VERSION = "26.1-rc-3"
MINECRAFT_REFERENCE_VERSION = "26.1"

parent_logger = logging.getLogger("gm4.resource_pack")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4292,3 +4292,21 @@ data modify storage gm4_blossoming_pots:decorated_pots minecraft:potato set valu
}\
]\
}

data modify storage gm4_blossoming_pots:decorated_pots minecraft:golden_dandelion set value {\
place_sound:"minecraft:item.bone_meal.use",\
maximum:1,\
1:[\
{\
block_state:{\
Name:"minecraft:golden_dandelion"\
},\
transformation:{\
translation:[-0.5f,0.681f,-0.5f],\
left_rotation:[0f,0f,0f,1f],\
scale:[1f,1f,1f],\
right_rotation:[0f,0f,0f,1f]\
}\
}\
]\
}
3 changes: 0 additions & 3 deletions gm4_calling_bell/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ data_pack:
pipeline:
- gm4.plugins.extend.module

require:
- bolt

meta:
gm4:
versioning:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

advancement revoke @s only gm4_calling_bell:ring_bell

# TODO: remove raw and bolt require later
# fail if player already used today
raw execute store result score $day gm4_calling_bell run time query day repetition
execute store result score $day gm4_calling_bell run time query day repetition
execute if score @s gm4_calling_bell = $day gm4_calling_bell run return run playsound entity.wandering_trader.no neutral @a[distance=..16] ~ ~ ~ 1 1 0.6

execute store result score $ray gm4_calling_bell run attribute @s minecraft:block_interaction_range get 10
Expand Down
2 changes: 1 addition & 1 deletion gm4_disassemblers/generate_disassembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
def beet_default(ctx: Context):
"""Creates a loot table for dropping the 9 result items when disassembling an item."""
vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
recipes = vanilla.data.recipes

for item, durability in ITEMS.items():
Expand Down
2 changes: 1 addition & 1 deletion gm4_double_doors/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def beet_default(ctx: Context):
# prepare list of door materials
door_materials = [
door.removeprefix("minecraft:").removesuffix("_door")
for door in resolve_blocktag(ctx, "26.1-rc-3", "minecraft:mob_interactable_doors")
for door in resolve_blocktag(ctx, "26.1", "minecraft:mob_interactable_doors")
]
# make list of wood types accessible for bolt
ctx.meta['door_materials'] = door_materials
Expand Down
6 changes: 3 additions & 3 deletions gm4_guidebook/generate_guidebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def generate_lectern_header(book: Book) -> list[dict[Any, Any]|str]:
"""
def item_to_display(item: str, components: dict[str, Any] | None, ctx: Context) -> tuple[TextComponent, TextComponent]:
vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
if item == "air":
# show empty slot
slot = {
Expand Down Expand Up @@ -947,7 +947,7 @@ def generate_recipe_display(recipe: str, ctx: Context) -> list[TextComponent]:
ingr = ingr[0]
elif ingr.startswith("#"):
vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
ingr = get_item_from_tag(ctx, ingr, vanilla)
ingredients.append(ingr)

Expand Down Expand Up @@ -980,7 +980,7 @@ def generate_recipe_display(recipe: str, ctx: Context) -> list[TextComponent]:
ingr = ingr[0]
elif ingr.startswith("#"):
vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
ingr = get_item_from_tag(ctx, ingr, vanilla)
ingredients.append(ingr)
while len(ingredients) < 9:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ from bolt.contrib.defer import Defer
from gm4.utils import add_namespace

from gm4_liquid_tanks.mcmeta_stacksize import retrieve_stacksizes
unstackables, stackable_16, _ = retrieve_stacksizes(ctx.cache, "26.1-rc-3")
unstackables, stackable_16, _ = retrieve_stacksizes(ctx.cache, "26.1")

# function that generates no mcfunction
def emptyfunc():
Expand Down
2 changes: 1 addition & 1 deletion gm4_metallurgy/shamir_model_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def beet_default(ctx: Context):
# bind context object to a ClassVar so it can be accessed later during template processing
ShamirTemplate.bound_ctx = ctx
vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
ShamirTemplate.vanilla_models_jar = vanilla.mount("assets/minecraft/items")
merge_policy(ctx)

Expand Down
3 changes: 0 additions & 3 deletions gm4_mysterious_midnights/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ pipeline:
- gm4.plugins.extend.module
- gm4.plugins.include.lib_forceload

require:
- bolt

meta:
gm4:
versioning:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# at 29999998 1 7134 (forceloaded chunk)
# run from gm4_mysterious_midnights:start_midnight

# TODO: remove raw and bolt require later
# generate random number from 0 to 15
raw execute store result storage gm4_mysterious_midnights:temp day int 1 run time query day repetition
execute store result storage gm4_mysterious_midnights:temp day int 1 run time query day repetition
function gm4_mysterious_midnights:roll_difficulty with storage gm4_mysterious_midnights:temp
scoreboard players set 16 gm4_mm_data 16
scoreboard players operation difficulty gm4_mm_data %= 16 gm4_mm_data
Expand Down
3 changes: 3 additions & 0 deletions gm4_soul_glass/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ id: gm4_soul_glass
name: Soul Glass
version: 1.7.X

require:
- bolt

data_pack:
load: .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

execute as @e[type=marker,tag=gm4_soul_glass] at @s run function gm4_soul_glass:process

execute as @e[type=marker,tag=gm4_soul_glass] at @s if block ~ ~-1 ~ beacon if predicate gm4_soul_glass:has_beam positioned ~-50 ~-51 ~-50 if entity @a[dx=100,dy=356,dz=100,limit=1] at @s run function gm4_soul_glass:effect/check
execute in minecraft:overworld as @e[type=marker,tag=gm4_soul_glass,x=0] at @s if block ~ ~-1 ~ beacon if predicate gm4_soul_glass:has_beam_overworld positioned ~-50 ~-51 ~-50 if entity @a[dx=100,dy=356,dz=100,limit=1] at @s run function gm4_soul_glass:effect/check
execute in minecraft:the_nether as @e[type=marker,tag=gm4_soul_glass,x=0] at @s if block ~ ~-1 ~ beacon if predicate gm4_soul_glass:has_beam_nether positioned ~-50 ~-51 ~-50 if entity @a[dx=100,dy=356,dz=100,limit=1] at @s run function gm4_soul_glass:effect/check
execute in minecraft:the_end as @e[type=marker,tag=gm4_soul_glass,x=0] at @s if block ~ ~-1 ~ beacon if predicate gm4_soul_glass:has_beam_end positioned ~-50 ~-51 ~-50 if entity @a[dx=100,dy=356,dz=100,limit=1] at @s run function gm4_soul_glass:effect/check
function #gm4_soul_glass:run_beacon_check

schedule function gm4_soul_glass:beacon_clock 80t
1 change: 0 additions & 1 deletion gm4_soul_glass/data/gm4_soul_glass/predicate/has_beam.json

This file was deleted.

71 changes: 71 additions & 0 deletions gm4_soul_glass/data/gm4_soul_glass/predicate/has_beam_end.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
block_checks = []

MIN = 1
MAX = 256

for y in range(MIN, MAX):
block_checks.append({
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"y": {
"min": y
}
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"blocks": "#gm4_soul_glass:beacon_passable"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"extended": "true"
},
"blocks": "#gm4_soul_glass:piston"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "bottom"
},
"blocks": "#minecraft:slabs"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "top"
},
"blocks": "#minecraft:slabs"
}
}
}
]
})

{
"condition": "minecraft:all_of",
"terms": block_checks
}
71 changes: 71 additions & 0 deletions gm4_soul_glass/data/gm4_soul_glass/predicate/has_beam_nether.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
block_checks = []

MIN = 1
MAX = 256

for y in range(MIN, MAX):
block_checks.append({
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"y": {
"min": y
}
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"blocks": "#gm4_soul_glass:beacon_passable"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"extended": "true"
},
"blocks": "#gm4_soul_glass:piston"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "bottom"
},
"blocks": "#minecraft:slabs"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "top"
},
"blocks": "#minecraft:slabs"
}
}
}
]
})

{
"condition": "minecraft:all_of",
"terms": block_checks
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
block_checks = []

MIN = -63
MAX = 320

for y in range(MIN, MAX):
block_checks.append({
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"y": {
"min": y
}
}
}
},
Comment on lines +10 to +19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this location check is doing in the predicate?
I don't fully understand its purpose here or in the current nightmare-fuel predicate, but in this current implementation, this check succeeding would be enough for it to not check the remaining conditions, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait ok, i understand this location check now, its to exclude blocks under the beacon. This should be true AND the following block checks. The current version is OR and will succeed regardless of the block checks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean current version as in the one that's in master right now, that was made before all_of (AND) was added, and thus needed to use DeMorgan's to derive an all_of (AND) using inverted (OR) and any_of (OR). The current version does the same thing as this one.

Copy link
Copy Markdown
Contributor

@runcows runcows Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No in that message, current was referring to this PR. For each block in the predicate in this PR, the condition is any_of and so the min block position check will cause each block position to succeed if above the execution position.

Edit: I did not understand the predicate fully, it is complicated

{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"blocks": "#gm4_soul_glass:beacon_passable"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"extended": "true"
},
"blocks": "#gm4_soul_glass:piston"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "bottom"
},
"blocks": "#minecraft:slabs"
}
}
},
{
"condition": "minecraft:location_check",
"offsetY": MAX-y,
"predicate": {
"block": {
"state": {
"type": "top"
},
"blocks": "#minecraft:slabs"
}
}
}
]
})

{
"condition": "minecraft:all_of",
"terms": block_checks
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
2 changes: 1 addition & 1 deletion gm4_standard_crafting/generate_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def beet_default(ctx: Context):
"""

vanilla = ctx.inject(Vanilla)
vanilla.minecraft_version = '26.1-rc-3'
vanilla.minecraft_version = '26.1'
item_tags = vanilla.mount("data/minecraft/tags/item").data.item_tags
recipes = vanilla.mount("data/minecraft/recipe").data.recipes

Expand Down
3 changes: 0 additions & 3 deletions gm4_survival_refightalized/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ data_pack:
resource_pack:
load: .

require:
- bolt

pipeline:
- gm4.plugins.extend.module
- gm4.plugins.include.lib_forceload
Expand Down
Loading
Loading