1.0.24
All checks were successful
RelicCraft/pipeline/head This commit looks good

Fix Teleportation Restrictor only affecting living entities
This commit is contained in:
TheBrokenRail 2020-04-16 12:17:12 -04:00
parent feac2483bb
commit e77c6bff2e
4 changed files with 8 additions and 9 deletions

View File

@ -1,5 +1,8 @@
# Changelog
**1.0.24**
* Fix Teleportation Restrictor only affecting living entities
**1.0.23**
* Remove Max Count Limit From The Creative Relic Generator

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.7.10+build.191
# Mod Properties
mod_version = 1.0.23
mod_version = 1.0.24
maven_group = com.thebrokenrail
archives_base_name = reliccraft

View File

@ -53,11 +53,7 @@ public abstract class AbstractDragonEggHolderBlock extends Block implements Bloc
ItemStack stack = user.getStackInHand(hand);
if (inventory.isValidInvStack(0, stack) && inventory.getInvStack(0).isEmpty()) {
if (user.isCreative()) {
inventory.setInvStack(0, stack.copy().split(1));
} else {
inventory.setInvStack(0, stack.split(1));
}
inventory.setInvStack(0, stack.split(1));
if (!world.isClient()) {
grantAdvancement(user);

View File

@ -4,7 +4,7 @@ import com.thebrokenrail.reliccraft.RelicCraft;
import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventory;
import net.minecraft.server.network.ServerPlayerEntity;
@ -29,8 +29,8 @@ public class TeleportationRestrictorBlock extends AbstractDragonEggHolderBlock {
public void tick(World world, BlockPos pos, Inventory inventory) {
int radius = !inventory.getInvStack(0).isEmpty() ? 128 : 0;
Box box = new Box(pos).expand(radius);
List<LivingEntity> list = world.getNonSpectatingEntities(LivingEntity.class, box);
for (LivingEntity entity : list) {
List<Entity> list = world.getNonSpectatingEntities(Entity.class, box);
for (Entity entity : list) {
((TeleportingEntity) entity).resetTeleportCooldown();
}
}