Skip to content

Commit

Permalink
Metabolism compat
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Jan 4, 2024
1 parent 0103fb8 commit cfc46fb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void serialize(JsonObject json, TempestWeatherCheck value, JsonSerializat
});

@Override
public LootItemConditionType getType() {
public @NotNull LootItemConditionType getType() {
return TYPE;
}

Expand All @@ -60,6 +60,10 @@ public boolean test(LootContext lootContext) {
return false;
}
var blockPos = new BlockPos((int) Math.round(pos.x()), (int) Math.round(pos.y()), (int) Math.round(pos.z()));
var data = Services.PLATFORM.getChunkData(level.getChunkAt(blockPos));
if (!level.canSeeSky(blockPos) || !data.canSeeWind(blockPos)) {
return false;
}
var weather = WeatherStatus.atPosition(level, blockPos);
if (weather == null) {
return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"conditions": [
{
"condition": "tempest:tempest_weather_check",
"kind": "hail"
}
],
"is_additive": true,
"heat_target": -4.0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"conditions": [
{
"condition": "tempest:tempest_weather_check",
"kind": "sleet"
}
],
"is_additive": true,
"heat_target": -6.0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"conditions": [
{
"condition": "tempest:tempest_weather_check",
"kind": "snow"
}
],
"is_additive": true,
"heat_target": -8.0
}

0 comments on commit cfc46fb

Please sign in to comment.