Merge branch 'master' into 1.17
This commit is contained in:
commit
3ff7e1d4cb
3 files changed
+39
-2
No files matched your search
@@ -30,7 +30,7 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
|
|||||||
|
|
||||||
private ThreadLocal<List<BlockEntity>> list1_BlockEntities = new ThreadLocal<>(); //Unneccessary ThreadLocal if client and server use different PistonBlock instances
|
private ThreadLocal<List<BlockEntity>> list1_BlockEntities = new ThreadLocal<>(); //Unneccessary ThreadLocal if client and server use different PistonBlock instances
|
||||||
|
|
||||||
@Inject(method = "isMovable", at = @At(value = "RETURN", ordinal = 3, shift = At.Shift.BEFORE))
|
@Inject(method = "isMovable", cancellable = true, at = @At(value = "RETURN", ordinal = 3, shift = At.Shift.BEFORE))
|
||||||
private static void movableCMD(BlockState blockState_1, World world_1, BlockPos blockPos_1,
|
private static void movableCMD(BlockState blockState_1, World world_1, BlockPos blockPos_1,
|
||||||
Direction direction_1, boolean boolean_1, Direction direction_2, CallbackInfoReturnable<Boolean> cir)
|
Direction direction_1, boolean boolean_1, Direction direction_2, CallbackInfoReturnable<Boolean> cir)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import net.minecraft.util.StringIdentifiable;
|
|||||||
import net.minecraft.util.dynamic.GlobalPos;
|
import net.minecraft.util.dynamic.GlobalPos;
|
||||||
import net.minecraft.util.math.BlockBox;
|
import net.minecraft.util.math.BlockBox;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.ColumnPos;
|
import net.minecraft.util.math.ColumnPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.util.math.Vec3i;
|
import net.minecraft.util.math.Vec3i;
|
||||||
@@ -302,6 +303,21 @@ public class ValueConversions
|
|||||||
new StringValue(uuid.toString())
|
new StringValue(uuid.toString())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
public static Value of(Box box)
|
||||||
|
{
|
||||||
|
return ListValue.of(
|
||||||
|
ListValue.fromTriple(box.minX, box.minY, box.minZ),
|
||||||
|
ListValue.fromTriple(box.maxX, box.maxY, box.maxZ)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Value of(BlockBox box)
|
||||||
|
{
|
||||||
|
return ListValue.of(
|
||||||
|
ListValue.fromTriple(box.minX, box.minY, box.minZ),
|
||||||
|
ListValue.fromTriple(box.maxX, box.maxY, box.maxZ)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static Value of(BlockBox box)
|
public static Value of(BlockBox box)
|
||||||
{
|
{
|
||||||
@@ -404,6 +420,8 @@ public class ValueConversions
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Value guess(ServerWorld serverWorld, Object o) {
|
public static Value guess(ServerWorld serverWorld, Object o) {
|
||||||
|
if (o == null)
|
||||||
|
return Value.NULL;
|
||||||
if (o instanceof List)
|
if (o instanceof List)
|
||||||
return ListValue.wrap(((List<?>) o).stream().map(oo -> guess(serverWorld, oo)).collect(Collectors.toList()));
|
return ListValue.wrap(((List<?>) o).stream().map(oo -> guess(serverWorld, oo)).collect(Collectors.toList()));
|
||||||
if (o instanceof BlockPos)
|
if (o instanceof BlockPos)
|
||||||
@@ -414,6 +432,10 @@ public class ValueConversions
|
|||||||
return of((Vec3d)o);
|
return of((Vec3d)o);
|
||||||
if (o instanceof Vec3i)
|
if (o instanceof Vec3i)
|
||||||
return of(new BlockPos((Vec3i)o));
|
return of(new BlockPos((Vec3i)o));
|
||||||
|
if (o instanceof Box)
|
||||||
|
return of((Box)o);
|
||||||
|
if (o instanceof BlockBox)
|
||||||
|
return of((BlockBox) o);
|
||||||
if (o instanceof ItemStack)
|
if (o instanceof ItemStack)
|
||||||
return of((ItemStack)o);
|
return of((ItemStack)o);
|
||||||
if (o instanceof Boolean)
|
if (o instanceof Boolean)
|
||||||
|
|||||||
@@ -282,6 +282,21 @@ global_functions = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'despawn_timer' -> {
|
||||||
|
'*' -> [
|
||||||
|
_(arg) -> _(e) -> (
|
||||||
|
despawn_timer = e~'despawn_timer';
|
||||||
|
if (despawn_timer,
|
||||||
|
[[], [], [['despawn', 'despawn timer:', despawn_timer]]]
|
||||||
|
,
|
||||||
|
[[], [], []]
|
||||||
|
)
|
||||||
|
),
|
||||||
|
,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
'health' -> {
|
'health' -> {
|
||||||
'*' -> [
|
'*' -> [
|
||||||
_(arg) -> _(e) -> (
|
_(arg) -> _(e) -> (
|
||||||
@@ -368,7 +383,7 @@ __config() ->{
|
|||||||
'transparency <alpha>'->_(alpha)->global_opacity = alpha
|
'transparency <alpha>'->_(alpha)->global_opacity = alpha
|
||||||
},
|
},
|
||||||
'arguments'->{
|
'arguments'->{
|
||||||
'display'->{'type'->'term','options'->['item_pickup','velocity','portal_cooldown','health','pathfinding','xpstack','drowning']},
|
'display'->{'type'->'term','options'->['item_pickup','velocity','portal_cooldown','despawn_timer','health','pathfinding','xpstack','drowning']},
|
||||||
'aspect'->{'type'->'term','options'->['iron_golem_spawning','buddy_detection','hostile_detection','breeding']},
|
'aspect'->{'type'->'term','options'->['iron_golem_spawning','buddy_detection','hostile_detection','breeding']},
|
||||||
'ticks'->{'type'->'int','min'->0,'max'->100},
|
'ticks'->{'type'->'int','min'->0,'max'->100},
|
||||||
'alpha'->{'type'->'int','min'->0,'max'->255},
|
'alpha'->{'type'->'int','min'->0,'max'->255},
|
||||||
|
|||||||
Reference in new issue
Block a user