Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Sep 2, 2024
1 parent b3a786a commit 0d73534
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,14 @@ public void entityInside(BlockState state, Level world, BlockPos pos, Entity ent
int blockY = pos.getY();
int blockZ = pos.getZ();

if (!entity.isShiftKeyDown() && Config.ALLOW_FAST_TRAVEL.get() && !entity.getType().is(ModTags.QUICK_TRAVEL_BlACKLIST))
if (!entity.isShiftKeyDown() && Config.ALLOW_FAST_TRAVEL.get() && !entity.getType().is(ModTags.QUICK_TRAVEL_BLACKLIST))
entity.setSwimming(true);

if ((entityY < blockY + 0.98 && entityY > blockY + 0.02)
&& (entityX < blockX + 0.98 && entityX > blockX + 0.02)
&& (entityZ < blockZ + 0.98 && entityZ > blockZ + 0.02)
&& !entity.isShiftKeyDown() && Config.ALLOW_FAST_TRAVEL.get()
&& !entity.getType().is(ModTags.QUICK_TRAVEL_BlACKLIST)) {
&& !entity.getType().is(ModTags.QUICK_TRAVEL_BLACKLIST)) {
this.moveEntityInPipe(entity);

if (!world.isClientSide) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/wenxin2/warp_pipes/init/ModTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
public class ModTags {
public static final TagKey<Block> DYEABLE_WARP_PIPE_BLOCKS = blockTags(WarpPipes.MODID, "dyeable_warp_pipes");
public static final TagKey<Block> WARP_PIPE_BLOCKS = blockTags(WarpPipes.MODID, "warp_pipes");
public static final TagKey<Block> WRENCH_EFFIECIENT = blockTags(WarpPipes.MODID, "wrench_efficient");
public static final TagKey<Block> WRENCH_EFFICIENT = blockTags(WarpPipes.MODID, "wrench_efficient");
public static final TagKey<Item> DYEABLE_WARP_PIPE_ITEMS = itemTags(WarpPipes.MODID, "dyeable_warp_pipes");
public static final TagKey<Item> WARP_PIPE_ITEMS = itemTags(WarpPipes.MODID, "warp_pipes");
public static final TagKey<EntityType<?>> WARP_BlACKLIST = entityTypeTags(WarpPipes.MODID, "warp_blacklist");
public static final TagKey<EntityType<?>> QUICK_TRAVEL_BlACKLIST = entityTypeTags(WarpPipes.MODID, "quick_travel_blacklist");
public static final TagKey<EntityType<?>> WARP_BLACKLIST = entityTypeTags(WarpPipes.MODID, "warp_blacklist");
public static final TagKey<EntityType<?>> QUICK_TRAVEL_BLACKLIST = entityTypeTags(WarpPipes.MODID, "quick_travel_blacklist");

public static TagKey<Block> blockTags(String id, String name) {
return TagKey.create(Registries.BLOCK, new ResourceLocation(id, name));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/wenxin2/warp_pipes/items/WrenchItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public boolean canAttackBlock(BlockState state, Level world, BlockPos pos, Playe
}

public static Tool createToolProperties() {
return new Tool(List.of(Tool.Rule.overrideSpeed(ModTags.WRENCH_EFFIECIENT, 1.5F)), 1.0F, 2);
return new Tool(List.of(Tool.Rule.overrideSpeed(ModTags.WRENCH_EFFICIENT, 1.5F)), 1.0F, 2);
}

public static ItemAttributeModifiers createAttributes(Tier tier, int attackDamage, float attackSpeed) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/wenxin2/warp_pipes/mixin/EntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void baseTick(CallbackInfo ci) {
int blockZ = pos.getZ();

if (!stateAboveEntity.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE && warpPipeBE.getLevel() != null
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)) {
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)) {
warpPos = warpPipeBE.destinationPos;
int entityId = this.getId();

Expand Down Expand Up @@ -176,7 +176,7 @@ else if (warpPipeBE.getUuid() != null && warpPipeBE.getWarpUuid() != null && War
int blockZ = pos.getZ();

if (!state.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE
&& !warpPipeBE.preventWarp && Config.TELEPORT_NON_MOBS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)) {
&& !warpPipeBE.preventWarp && Config.TELEPORT_NON_MOBS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)) {
warpPos = warpPipeBE.destinationPos;
int entityId = this.getId();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void baseTick(CallbackInfo ci) {
int blockZ = pos.getZ();

if (!stateAboveEntity.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE && warpPipeBE.getLevel() != null
&& !warpPipeBE.preventWarp && this.getType() != EntityType.PLAYER && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)
&& !warpPipeBE.preventWarp && this.getType() != EntityType.PLAYER && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)
&& !this.getPersistentData().getBoolean("warp_pipes:prevent_warp")) {
warpPos = warpPipeBE.destinationPos;
int entityId = this.getId();
Expand Down Expand Up @@ -155,7 +155,7 @@ else if (warpPipeBE.getUuid() != null && warpPipeBE.getWarpUuid() != null && War
int blockZ = pos.getZ();

if (!state.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE && this.getType() != EntityType.PLAYER
&& !warpPipeBE.preventWarp && Config.TELEPORT_MOBS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)
&& !warpPipeBE.preventWarp && Config.TELEPORT_MOBS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)
&& !this.getPersistentData().getBoolean("warp_pipes:prevent_warp")) {
warpPos = warpPipeBE.destinationPos;
int entityId = this.getId();
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/wenxin2/warp_pipes/mixin/PlayerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void baseTick() {
int blockZ = pos.getZ();

if (!stateAboveEntity.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE && warpPipeBE.getLevel() != null
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)
&& !this.getPersistentData().getBoolean("warp_pipes:prevent_warp")) {
warpPos = warpPipeBE.destinationPos;
int entityId = this.getId();
Expand Down Expand Up @@ -148,7 +148,7 @@ else if (warpPipeBE.getUuid() != null && warpPipeBE.getWarpUuid() != null && War
int blockZ = pos.getZ();

if (!state.getValue(WarpPipeBlock.CLOSED) && blockEntity instanceof WarpPipeBlockEntity warpPipeBE && warpPipeBE.getLevel() != null
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BlACKLIST)
&& !warpPipeBE.preventWarp && Config.TELEPORT_PLAYERS.get() && !this.getType().is(ModTags.WARP_BLACKLIST)
&& !this.getPersistentData().getBoolean("warp_pipes:prevent_warp")) {
// WarpData warpData = WarpProxy.getInstance().getWarp(warpPipeBE.warpUuid);
warpPos = warpPipeBE.destinationPos;
Expand Down Expand Up @@ -216,7 +216,7 @@ else if (warpPipeBE.getUuid() != null && warpPipeBE.getWarpUuid() != null && War
} /* else if (this.getWarpCooldown() <= 10)
displayDestinationMissingMessage(); */ else this.warpPipes$displayCooldownMessage();
}
} else if (!state.getValue(WarpPipeBlock.CLOSED) && (!Config.TELEPORT_PLAYERS.get() || this.getType().is(ModTags.WARP_BlACKLIST))) {
} else if (!state.getValue(WarpPipeBlock.CLOSED) && (!Config.TELEPORT_PLAYERS.get() || this.getType().is(ModTags.WARP_BLACKLIST))) {
if (state.getValue(WarpPipeBlock.FACING) == Direction.UP && this.isShiftKeyDown() && (entityY + this.getBbHeight() >= blockY - 1)
&& (entityX < blockX + 1 && entityX > blockX) && (entityZ < blockZ + 1 && entityZ > blockZ)) {
this.warpPipes$displayNoTeleportMessage();
Expand Down Expand Up @@ -261,7 +261,7 @@ else if (warpPipeBE.getUuid() != null && warpPipeBE.getWarpUuid() != null && War

@Unique
public void warpPipes$displayNoTeleportMessage() {
if (!Config.TELEPORT_PLAYERS.get() || this.getType().is(ModTags.WARP_BlACKLIST)) {
if (!Config.TELEPORT_PLAYERS.get() || this.getType().is(ModTags.WARP_BLACKLIST)) {
this.displayClientMessage(Component.translatable("display.warp_pipes.players_cannot_teleport")
.withStyle(ChatFormatting.RED), true);
}
Expand Down

0 comments on commit 0d73534

Please sign in to comment.