chore: Port to 1.21.5 + some additional fixes. #18
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Modding/silicate!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/1.21.5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Copypaste of CHANGELOG.md)
Breaking Changes
silicate:entity_vehicle
must now use thesilicate:vehicle_entity
param type to reference the vehicle entity, with other fields remaining the exact same.silicate:entity_passenger
must now use thesilicate:passenger_entity
param type to reference the passenger entity, with other fields remaining the exact same.silicate:entity_tame_owner
must now use thesilicate:owner_entity
param type to reference the owner entity, with other fields remaining the exact same.silicate:entity_projectile_owner
must now use thesilicate:owner_entity
param type to reference the owner entity, with other fields remaining the exact same.Added
Fixed
entity_vehicle
,entity_passenger
,entity_tame_owner
,entity_projectile_owner
conditions overriding the original field with the target entity within their inner conditions' context.Another little note is that I've updated parts of the Gradle build script to my own preferences.
In a future PR, we should make this configurable.
Absolutely.
We need to get this out for ModFest: Toybox, so we can fix the nitpicks later.
@ -39,1 +39,3 @@
.xmap(name -> new ContextParamType<>(name, clazz), ContextParamType::name);
.flatXmap(name -> {
ContextParamType<?> paramType = SilicateBuiltInRegistries.CONTEXT_PARAM_TYPE.getValue(name);
if (paramType != null) {
We can move all of this logic to
TypedGameCondition#validate
and use abyName
Codec.@ -40,0 +43,4 @@
return DataResult.success((ContextParamType<T>)paramType);
if (clazz.isAssignableFrom(paramType.clazz())) // If the paramType extends the specified class...
return DataResult.success(new ContextParamType<>(name, clazz)); // Create a new ContextParamType that may be used in place of the old one.
return DataResult.error(() -> paramType + " is not of the proper parameter"); // Remapping is the reason why we don't tell which class.
We should remove unbraced if-statements, this could be ambiguous.
@ -40,0 +52,4 @@
@Override // Makes sure that values return the correct value within the context when clazz is cast.
public boolean equals(Object obj) {
if (obj == this)
return true;
We should remove this if it's not used anywhere, and I don't think this comment has anything to do with anything here.
@ -0,0 +125,4 @@
.build();
}
private static ContextParamMap createParamMap(BlockState state, BlockPos origin, Entity entity, Entity entity2, BlockState entityBlock, ServerPlayer fakePlayer, Projectile projectile, GameTestHelper helper) throws InvalidContextParameterException {
We should probably name
entity
andentity2
something more specific, like "chicken" or whatever mob name they are.