Skip to content

Commit

Permalink
Merge branch 'pr/2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcarter11 committed Mar 15, 2022
2 parents 1c7bfd5 + fbc00e7 commit 9e07063
Show file tree
Hide file tree
Showing 46 changed files with 222 additions and 588 deletions.
3 changes: 2 additions & 1 deletion Copyrights.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Copyrights of the content of this folder:
- Creator & Developer: K-bai (minecraft name: K_bai)
- Developer: mattcarter11 (minecraft name: YouKnowWhen)
- XOR algorithm: xwjcool

All rights reserved.

Please, do not sell it, if sharing this datapack attribute the work to the team, and if possible add a link.
Please, do not sell it, if sharing this datapack attribute the work to the team, and if possible add a link.
14 changes: 5 additions & 9 deletions data/mrcd/functions/private/calculate/hashcode.mcfunction
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# 函数参数: #var0, #var1
# var0-1: int值,xz坐标
# 返回值: #var0
# var0: 哈希值

# params: #var0, #var1
# var0-1: int value, x and z position
# return values: #var0
# var0: hashcode
# args: x and z position
# #var0 (int)
# #var1 (int)
# return: hashcode
# #var0 (int)

execute store result score #var_hc_x mrcd_system run scoreboard players get #var0 mrcd_system
execute store result score #var_hc_z mrcd_system run scoreboard players get #var1 mrcd_system
Expand Down
15 changes: 6 additions & 9 deletions data/mrcd/functions/private/calculate/offset.mcfunction
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# 函数参数: #var0, #var1
# var0-1: int值,xz坐标
# 返回值: #var0, #var1
# var0-1: int值,xz坐标偏移量

# params: #var0, #var1
# var0-1: int value, x and z position
# return values: #var0, #var1
# var0-1: int value, x and z position offset
# args: x and z position
# #var0 (int)
# #var1 (int)
# return: x and z position offset
# #var0 (int)
# #var1 (int)

function mrcd:private/calculate/hashcode
execute store result score #var_ofs_hc mrcd_system run scoreboard players get #var0 mrcd_system
Expand Down
23 changes: 6 additions & 17 deletions data/mrcd/functions/private/calculate/x.mcfunction
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
# 方程联立
## 直线方程 (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## 平面方程 x=#target_x
# 计算线面交点
## 若x0!=0
### 方程整理得 y=(#target_x-x1)y0/x0+y1
### 方程整理得 z=(#target_x-x1)z0/x0+z1
## 若x0=0,无交点

## Line equation: (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## Plane equation: x=#target_x
# Line equation: (x-x1)/x0 = (y-y1)/y0 = (z-z1)/z0
# Plane equation: x = #target_x
# Calculate the intersection point coordinate
## if x0!=0
### The equation can be arranged to: y=(#target_x-x1)y0/x0+y1
### The equation can be arranged to: z=(#target_x-x1)z0/x0+z1
## if x0=0, no intersection point

# if x0!=0
# The equation can be arranged to: y = (#target_x-x1)y0/x0+y1
# The equation can be arranged to: z = (#target_x-x1)z0/x0+z1
# if x0=0, no intersection point

# x


# y
execute store result score #target_y mrcd_system run scoreboard players get #target_x mrcd_system
scoreboard players operation #target_y mrcd_system -= #block_x mrcd_system
Expand Down
468 changes: 107 additions & 361 deletions data/mrcd/functions/private/calculate/xor.mcfunction

Large diffs are not rendered by default.

22 changes: 6 additions & 16 deletions data/mrcd/functions/private/calculate/y.mcfunction
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# 方程联立
## 直线方程 (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## 平面方程 y=#target_y
# 计算线面交点
## 若y0!=0
### 方程整理得 x=(#target_y-y1)x0/y0+x1
### 方程整理得 z=(#target_y-y1)z0/y0+z1
## 若y0=0,无交点

## Line equation: (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## Plane equation: y=#target_y
# Line equation: (x-x1)/x0 = (y-y1)/y0 = (z-z1)/z0
# Plane equation: y = #target_y
# Calculate the intersection point coordinate
## if y0!=0
### The equation can be arranged to: x=(#target_y-y1)x0/y0+x1
### The equation can be arranged to: z=(#target_y-y1)z0/y0+z1
## if y0=0, no intersection point

# if y0!=0
# The equation can be arranged to: x = (#target_y-y1)x0/y0+x1
# The equation can be arranged to: z = (#target_y-y1)z0/y0+z1
# if y0=0, no intersection point

# x
execute store result score #target_x mrcd_system run scoreboard players get #target_y mrcd_system
Expand Down
21 changes: 6 additions & 15 deletions data/mrcd/functions/private/calculate/z.mcfunction
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# 方程联立
## 直线方程 (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## 平面方程 z=#target_z
# 计算线面交点
## 若z0!=0
### 方程整理得 x=(#target_z-z1)x0/z0+x1
### 方程整理得 y=(#target_z-z1)y0/z0+y1
## 若z0=0,无交点

## Line equation: (x-x1)/x0=(y-y1)/y0=(z-z1)/z0
## Plane equation: z=#target_z
# Line equation: (x-x1)/x0 = (y-y1)/y0 = (z-z1)/z0
# Plane equation: z = #target_z
# Calculate the intersection point coordinate
## if z0!=0
### The equation can be arranged to: x=(#target_z-z1)x0/z0+x1
### The equation can be arranged to: y=(#target_z-z1)y0/z0+y1
## if z0=0, no intersection point
# if z0!=0
# The equation can be arranged to: x = (#target_z-z1)x0/z0+x1
# The equation can be arranged to: y = (#target_z-z1)y0/z0+y1
# if z0=0, no intersection point



Expand Down
3 changes: 3 additions & 0 deletions data/mrcd/functions/private/category/pcp_117.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ small_dripleaf run function mrcd:private/types/small_dripleaf
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ big_dripleaf_stem run function mrcd:private/types/big_dripleaf_stem/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ spore_blossom run function mrcd:private/types/spore_blossom
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ twisting_vines run funct
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ twisting_vines_plant run function mrcd:private/types/twisting_vines_plant
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ nether_sprouts run function mrcd:private/types/sprouts
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ soul_fire run function mrcd:private/types/soul_fire
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ small_dripleaf run function mrcd:private/types/small_dripleaf
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ big_dripleaf_stem run function mrcd:private/types/big_dripleaf_stem/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ spore_blossom run function mrcd:private/types/spore_blossom

execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #wall_signs run function mrcd:private/types/wall_sign
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #buttons run function mrcd:private/types/button
Expand All @@ -46,3 +43,5 @@ execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:pressure_plate_lik
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:mushroom run function mrcd:private/types/mushroom
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:fungus run function mrcd:private/types/fungus
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:roots run function mrcd:private/types/roots

function mrcd:private/category/pcp_117
9 changes: 2 additions & 7 deletions data/mrcd/functions/private/category/solid.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ bell run function mrcd:p
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ hopper run function mrcd:private/types/hopper
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ lectern run function mrcd:private/types/lectern
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ chorus_plant run function mrcd:private/types/chorus_plant
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ big_dripleaf run function mrcd:private/types/big_dripleaf/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ candle_cake run function mrcd:private/types/candle_cake

execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #walls run function mrcd:private/types/wall
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #fences run function mrcd:private/types/fence
Expand All @@ -36,11 +34,6 @@ execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ cake run function mrcd:p
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ ender_chest run function mrcd:private/types/chest
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ bamboo run function mrcd:private/types/bamboo
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ chain run function mrcd:private/types/chain
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ small_amethyst_bud run function mrcd:private/types/small_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ medium_amethyst_bud run function mrcd:private/types/medium_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ large_amethyst_bud run function mrcd:private/types/large_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ amethyst_cluster run function mrcd:private/types/amethyst_cluster/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ pointed_dripstone run function mrcd:private/types/pointed_dripstone/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ turtle_egg run function mrcd:private/types/turtle_egg/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ sculk_sensor run function mrcd:private/types/sculk_sensor

Expand All @@ -59,3 +52,5 @@ execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:skull_like run fun
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:wall_skull_like run function mrcd:private/types/wall_skull
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:grass_path_like run function mrcd:private/types/grass_path
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ #mrcd:rod_like run function mrcd:private/types/rod/main

function mrcd:private/category/solid_117
8 changes: 8 additions & 0 deletions data/mrcd/functions/private/category/solid_117.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ big_dripleaf run function mrcd:private/types/big_dripleaf/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ candle_cake run function mrcd:private/types/candle_cake

execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ small_amethyst_bud run function mrcd:private/types/small_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ medium_amethyst_bud run function mrcd:private/types/medium_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ large_amethyst_bud run function mrcd:private/types/large_amethyst_bud/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ amethyst_cluster run function mrcd:private/types/amethyst_cluster/main
execute if entity @s[tag=!mrcd_detected] if block ~ ~ ~ pointed_dripstone run function mrcd:private/types/pointed_dripstone/main
8 changes: 4 additions & 4 deletions data/mrcd/functions/private/complex_cube/convert.mcfunction
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# 寻找最近实体 Find the nearnest block marker
# Find the nearnest block marker
tag @e[tag=mrcd_touch_mark,sort=nearest,limit=1] add mrcd_temp
# 标记碰撞面 Copy the tag on the nearest block marker
# Copy the tag on the nearest block marker
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_x_plus] run tag @s add mrcd_touch_x_plus
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_x_minus] run tag @s add mrcd_touch_x_minus
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_y_plus] run tag @s add mrcd_touch_y_plus
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_y_minus] run tag @s add mrcd_touch_y_minus
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_z_plus] run tag @s add mrcd_touch_z_plus
execute if entity @e[tag=mrcd_temp,tag=mrcd_touch_z_minus] run tag @s add mrcd_touch_z_minus
# 获取目标在方块内的坐标 Get the position of the nearest block marker
# Get the position of the nearest block marker
execute store result score #target_x mrcd_system run data get entity @e[tag=mrcd_temp,limit=1] Pos[0] 1000
execute store result score #target_y mrcd_system run data get entity @e[tag=mrcd_temp,limit=1] Pos[1] 1000
execute store result score #target_z mrcd_system run data get entity @e[tag=mrcd_temp,limit=1] Pos[2] 1000
scoreboard players operation #target_x mrcd_system %= #const_1000 mrcd_system
scoreboard players operation #target_y mrcd_system %= #const_1000 mrcd_system
scoreboard players operation #target_z mrcd_system %= #const_1000 mrcd_system
# 删除标记 Kill all the block markers
# Kill all the block markers
kill @e[tag=mrcd_touch_mark]
1 change: 0 additions & 1 deletion data/mrcd/functions/private/complex_cube/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# 根据朝向决定检测哪个面
# Choose a side to detect based on direction
execute unless entity @e[tag=mrcd_touch_cube_edge] if score @s mrcd_x0 matches 1.. if score #block_x mrcd_system <= #box_x0 mrcd_system run function mrcd:private/complex_cube/x0
execute unless entity @e[tag=mrcd_touch_cube_edge] if score @s mrcd_x0 matches ..-1 if score #block_x mrcd_system >= #box_x1 mrcd_system run function mrcd:private/complex_cube/x1
Expand Down
2 changes: 1 addition & 1 deletion data/mrcd/functions/private/complex_cube/move.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 移动到碰撞点 Move to #targetx,y,z
# Move to #targetx,y,z
scoreboard players operation #target_x mrcd_system += #block_corner_x mrcd_system
scoreboard players operation #target_y mrcd_system += #block_corner_y mrcd_system
scoreboard players operation #target_z mrcd_system += #block_corner_z mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/x0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 x=#box_x0
## 相交条件 #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: x=#box_x0
## Condition of crossing: #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1
# Plane equation: x = #box_x0
# Condition of crossing: #box_y0 <= y <= #box_y1 #box_z0 <= z <= #box_z1


execute store result score #target_x mrcd_system run scoreboard players get #box_x0 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/x1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 x=#box_x1
## 相交条件 #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: x=#box_x1
## Condition of crossing: #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1
# Plane equation: x = #box_x1
# Condition of crossing: #box_y0 <= y <= #box_y1 #box_z0 <= z <= #box_z1


execute store result score #target_x mrcd_system run scoreboard players get #box_x1 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/y0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 y=#box_y0
## 相交条件 #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: y=#box_y0
## Condition of crossing: #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1
# Plane equation: y = #box_y0
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_z0 <= z <= #box_z1


execute store result score #target_y mrcd_system run scoreboard players get #box_y0 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/y1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 y=#box_y1
## 相交条件 #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: y=#box_y1
## Condition of crossing: #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1
# Plane equation: y = #box_y1
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_z0 <= z <= #box_z1


execute store result score #target_y mrcd_system run scoreboard players get #box_y1 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/z0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 z=#box_z0
## 相交条件 #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1

# Calculate the intersection point coordinate
## Plane equation: z=#box_z0
## Condition of crossing: #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1
# Plane equation: z = #box_z0
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_y0 <= y <= #box_y1


execute store result score #target_z mrcd_system run scoreboard players get #box_z0 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/complex_cube/z1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 z=#box_z1
## 相交条件 #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1

# Calculate the intersection point coordinate
## Plane equation: z=#box_z1
## Condition of crossing: #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1
# Plane equation: z = #box_z1
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_y0 <= y <= #box_y1


execute store result score #target_z mrcd_system run scoreboard players get #box_z1 mrcd_system
Expand Down
1 change: 0 additions & 1 deletion data/mrcd/functions/private/cube/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# 根据朝向决定检测哪个面
# Choose a side to detect based on direction
execute if score @s[tag=!mrcd_touch_edge] mrcd_x0 matches 1.. if score #block_x mrcd_system <= #box_x0 mrcd_system run function mrcd:private/cube/x0
tag @s[tag=mrcd_touch_x_minus] add mrcd_touch_edge
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/x0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 x=#box_x0
## 相交条件 #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: x=#box_x0
## Condition of crossing: #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1
# Plane equation: x = #box_x0
# Condition of crossing: #box_y0 <= y <= #box_y1 #box_z0 <= z <= #box_z1

execute store result score #target_x mrcd_system run scoreboard players get #box_x0 mrcd_system
function mrcd:private/calculate/x
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/x1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 x=#box_x1
## 相交条件 #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: x=#box_x1
## Condition of crossing: #box_y0<=y<=#box_y1 #box_z0<=z<=#box_z1
# Plane equation: x = #box_x1
# Condition of crossing: #box_y0 <= y <= #box_y1 #box_z0 <= z <= #box_z1

execute store result score #target_x mrcd_system run scoreboard players get #box_x1 mrcd_system
function mrcd:private/calculate/x
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/y0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 y=#box_y0
## 相交条件 #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: y=#box_y0
## Condition of crossing: #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1
# Plane equation: y = #box_y0
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_z0 <= z <= #box_z1

execute store result score #target_y mrcd_system run scoreboard players get #box_y0 mrcd_system
function mrcd:private/calculate/y
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/y1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 y=#box_y1
## 相交条件 #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1

# Calculate the intersection point coordinate
## Plane equation: y=#box_y1
## Condition of crossing: #box_x0<=x<=#box_x1 #box_z0<=z<=#box_z1
# Plane equation: y = #box_y1
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_z0 <= z <= #box_z1


execute store result score #target_y mrcd_system run scoreboard players get #box_y1 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/z0.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 z=#box_z0
## 相交条件 #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1

# Calculate the intersection point coordinate
## Plane equation: z=#box_z0
## Condition of crossing: #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1
# Plane equation: z = #box_z0
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_y0 <= y <= #box_y1


execute store result score #target_z mrcd_system run scoreboard players get #box_z0 mrcd_system
Expand Down
8 changes: 2 additions & 6 deletions data/mrcd/functions/private/cube/z1.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# 计算线面交点
## 平面方程 z=#box_z1
## 相交条件 #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1

# Calculate the intersection point coordinate
## Plane equation: z=#box_z1
## Condition of crossing: #box_x0<=x<=#box_x1 #box_y0<=y<=#box_y1
# Plane equation: z = #box_z1
# Condition of crossing: #box_x0 <= x <= #box_x1 #box_y0 <= y <= #box_y1


execute store result score #target_z mrcd_system run scoreboard players get #box_z1 mrcd_system
Expand Down
4 changes: 2 additions & 2 deletions data/mrcd/functions/private/entity.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 一条线实体检测 Test entities on the sight
# Test entities on the sight
execute at @s[tag=!mrcd_touch_entity] run function mrcd:private/entity_detect
execute at @s[tag=!mrcd_touch_entity] positioned ^ ^ ^.2 run function mrcd:private/entity_detect
execute at @s[tag=!mrcd_touch_entity] positioned ^ ^ ^.4 run function mrcd:private/entity_detect
Expand All @@ -10,7 +10,7 @@ execute at @s[tag=!mrcd_touch_entity] positioned ^ ^ ^1.4 run function mrcd:priv
execute at @s[tag=!mrcd_touch_entity] positioned ^ ^ ^1.6 run function mrcd:private/entity_detect
execute at @s[tag=!mrcd_touch_entity] positioned ^ ^ ^1.7 run function mrcd:private/entity_detect

# 加tag Add tags
# Add tags
execute if entity @s[tag=mrcd_touch_entity] run tag @s add mrcd_touch_edge
tag @e[tag=mrcd_target_entity_temp] add mrcd_target_entity
tag @e[tag=mrcd_target_entity_temp] remove mrcd_target_entity_temp
Loading

0 comments on commit 9e07063

Please sign in to comment.