Skip to content

Commit

Permalink
updated flan compat, gold tags, cleanups before release
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed May 28, 2024
1 parent b04fe90 commit 8124b43
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 14 deletions.
10 changes: 6 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
- Added Beach Villager Type (module)
- Magnets not have shiny new particles
- Iron Golems and Minecarts can be pushed by magnets
- Manetic falling blocks and item entities can also be pushed
- Magnets have shiny new particles!
- Iron Golems and minecarts can be pushed by magnets (plus other tagged entities)
- Magnetic falling blocks and item entities can also be pushed
- Player having some iron armor are also pushable
- Magnets can now push and pull blocks through breakable blocks (like tall grass)
- Improved trowel item logic, now works with more complex block items
- Improved ITroweable interface and also added a blacklist and whitelist tag for it
- Cleaned up FoxHound model and fixed some visual inconsistencies with it (such as baby model being offset)
- Possivly fixed some issue with magnets hopper interaction not working well
- Possibly fixed some issue with magnets hopper interaction not working well
- Feeding through GUI texture can now be customized
- Updated flan compat
- Added some missing gold blocks from piglin_loved and guarded_by_piglins tags
2 changes: 1 addition & 1 deletion dependencies.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ forge=47.1.3
zeta=1.0-15.72
jei=4712868
terrablender=1.20.1-3.0.0.169
flan=4819286
flan=5290172
lootr=4608503
emi=1.0.24+1.20.1
spark=4738952
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.DispenserMenu;
import org.violetmoon.quark.base.Quark;
import org.violetmoon.quark.base.handler.ContributorRewardHandler;

public class TroughScreen extends DispenserScreen {

private static final ResourceLocation CONTAINER_LOCATION = Quark.asResource("textures/gui/container/feeding_troughi.png");
private static final ResourceLocation CONTAINER_LOCATION = Quark.asResource("textures/gui/container/feeding_trough.png");

public TroughScreen(DispenserMenu pMenu, Inventory pPlayerInventory, Component pTitle) {
super(pMenu, pPlayerInventory, pTitle);
}

@Override
protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) {
int i = (this.width - this.imageWidth) / 2;
int j = (this.height - this.imageHeight) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public void render(GuiGraphics guiGraphics, Window window, Player player, boolea
if(ourSide != primary && !player.getItemInHand(InteractionHand.OFF_HAND).isEmpty())
barWidth += 58;

Minecraft mc = Minecraft.getInstance();
x += (barWidth / 2f) * mul + index * 20;
if(ourSide == HumanoidArm.LEFT) {
x -= slots * 20;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.violetmoon.quark.integration.claim;

import io.github.flemmli97.flan.api.permission.BuiltinPermission;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
Expand All @@ -11,7 +12,6 @@
import org.violetmoon.quark.base.Quark;

import io.github.flemmli97.flan.api.data.IPermissionContainer;
import io.github.flemmli97.flan.api.permission.PermissionRegistry;
import io.github.flemmli97.flan.claim.ClaimStorage;

public final class FlanIntegration implements IClaimIntegration {
Expand All @@ -23,7 +23,7 @@ public boolean canBreak(@NotNull Player player, @NotNull BlockPos pos) {
try {
ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level());
IPermissionContainer claim = storage.getForPermissionCheck(pos);
return claim.canInteract((ServerPlayer) player, PermissionRegistry.BREAK, pos, true);
return claim.canInteract((ServerPlayer) player, BuiltinPermission.BREAK, pos, true);
} catch (Exception e) {
Quark.LOG.error("Failed call break block event: [Player: {}, Pos: {}]", player, pos, e);
return true;
Expand All @@ -37,7 +37,7 @@ public boolean canPlace(@NotNull Player player, @NotNull BlockPos pos) {
try {
ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level());
IPermissionContainer claim = storage.getForPermissionCheck(pos);
return claim.canInteract((ServerPlayer) player, PermissionRegistry.PLACE, pos);
return claim.canInteract((ServerPlayer) player, BuiltinPermission.PLACE, pos);
} catch (Exception e) {
Quark.LOG.error("Failed call place block event: [Player: {}, Pos: {}]", player, pos, e);
return true;
Expand All @@ -51,7 +51,7 @@ public boolean canReplace(@NotNull Player player, @NotNull BlockPos pos) {
try {
ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level());
IPermissionContainer claim = storage.getForPermissionCheck(pos);
return claim.canInteract((ServerPlayer) player, PermissionRegistry.PLACE, pos);
return claim.canInteract((ServerPlayer) player, BuiltinPermission.PLACE, pos);
} catch (Exception e) {
Quark.LOG.error("Failed call replace block event: [Player: {}, Pos: {}]", player, pos, e);
return true;
Expand All @@ -65,7 +65,7 @@ public boolean canAttack(@NotNull Player player, @NotNull Entity victim) {
try {
ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level());
IPermissionContainer claim = storage.getForPermissionCheck(victim.blockPosition());
return claim.canInteract((ServerPlayer) player, PermissionRegistry.HURTANIMAL, victim.blockPosition());
return claim.canInteract((ServerPlayer) player, BuiltinPermission.HURTANIMAL, victim.blockPosition());
} catch (Exception e) {
Quark.LOG.error("Failed call attack entity event: [Player: {}, Victim: {}]", player, victim, e);
return true;
Expand All @@ -79,7 +79,7 @@ public boolean canInteract(@NotNull Player player, @NotNull BlockPos targetPos)
try {
ClaimStorage storage = ClaimStorage.get((ServerLevel) player.level());
IPermissionContainer claim = storage.getForPermissionCheck(targetPos);
return claim.canInteract((ServerPlayer) player, PermissionRegistry.INTERACTBLOCK, targetPos);
return claim.canInteract((ServerPlayer) player, BuiltinPermission.INTERACTBLOCK, targetPos);
} catch (Exception e) {
Quark.LOG.error("Failed call interact event: [Player: {}, Pos: {}]", player, targetPos, e);
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"replace": false,
"values": [
"minecraft:light_weighted_pressure_plate",
"#forge:chests",
"quark:azalea_chest",
"quark:azalea_trapped_chest",
"quark:blossom_chest",
"quark:blossom_trapped_chest",
"quark:ancient_chest",
"quark:ancient_trapped_chest"
"quark:ancient_trapped_chest",
"quark:raw_gold_bricks",
"quark:raw_gold_bricks_slab",
"quark:raw_gold_bricks_stairs",
"quark:raw_gold_bricks_vertical_slab",
"quark:raw_gold_bricks_wall",
"quark:golden_apple_crate",
"quark:golden_carrot_crate",
"quark:gold_bars"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"quark:gold_button",
"quark:gold_bars",
"quark:golden_apple_crate",
"quark:golden_carrot_crate",
"quark:raw_gold_bricks",
"quark:raw_gold_bricks_slab",
"quark:raw_gold_bricks_stairs",
Expand Down

0 comments on commit 8124b43

Please sign in to comment.