Skip to content

Commit

Permalink
Fixed rotation of blocks like pumkins and repeaters
Browse files Browse the repository at this point in the history
  • Loading branch information
SIsilicon committed Feb 6, 2024
1 parent 0c25541 commit 333401a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/server/modules/region_buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ export class RegionBuffer {
} else if (attachement != null && direction != null) {
const states = (this.transformMapping(mappings.bellMap, `${attachement}_${direction}`, ...rotFlip) as string).split("_");
block = withProperties({ "attachement": states[0], "direction": parseInt(states[1]) });
} else if (cardinalDir != null) {
const state = this.transformMapping(mappings.cardinalDirectionMap, cardinalDir, ...rotFlip);
block = block.withState("minecraft:cardinal_direction", state);
} else if (facingDir != null) {
const state = this.transformMapping(mappings.facingDirectionMap, facingDir, ...rotFlip);
block = block.withState("facing_direction", parseInt(state));
} else if (direction != null) {
const mapping = blockName.includes("powered_repeater") || blockName.includes("powered_comparator") ? mappings.redstoneMap : mappings.directionMap;
const state = this.transformMapping(mapping, direction, ...rotFlip);
block = block.withState("direction", parseInt(state));
} else if (cardinalDir != null) {
const state = this.transformMapping(mappings.cardinalDirectionMap, cardinalDir, ...rotFlip);
block = block.withState("minecraft:cardinal_direction", state);
} else if (groundSignDir != null) {
const state = this.transformMapping(mappings.groundSignDirectionMap, groundSignDir, ...rotFlip);
block = block.withState("ground_sign_direction", parseInt(state));
Expand Down
3 changes: 2 additions & 1 deletion src/server/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export function blockHasNBTData(block: Block) {
"minecraft:skull",
"minecraft:snow_layer",
"minecraft:end_gateway", // TEST
"minecraft:beacon"
"minecraft:beacon",
"minecraft:bed"
];
return components.some(component => !!block.getComponent(component)) || nbt_blocks.includes(block.typeId);
}
Expand Down
7 changes: 7 additions & 0 deletions tools/process_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ def process(key, value):
'version': rp_manifest['header']['version']
})

if not 'dependencies' in rp_manifest:
rp_manifest['dependencies'] = []
rp_manifest['dependencies'].append({
'uuid': bp_manifest['header']['uuid'],
'version': bp_manifest['header']['version']
})

if args.target == 'debug':
bp_manifest['header']['name'] += ' [DEBUG]'
rp_manifest['header']['name'] += ' [DEBUG]'
Expand Down

0 comments on commit 333401a

Please sign in to comment.