This commit is contained in:
SD 2022-01-14 13:37:06 +05:30
parent b5ae14b81c
commit 491ce05f06
4 changed files with 4 additions and 34 deletions

View file

@ -11,7 +11,7 @@ import net.minecraft.util.registry.Registry;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
@ -35,7 +35,7 @@ public class ModEntityTypes {
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public static void initClient() { public static void initClient() {
EntityRendererRegistry.INSTANCE.register(MONOLITH, MonolithRenderer::new); EntityRendererRegistry.register(MONOLITH, MonolithRenderer::new);
// EntityRendererRegistry.INSTANCE.register(MASK, MaskRenderer::new); // EntityRendererRegistry.INSTANCE.register(MASK, MaskRenderer::new);
} }

View file

@ -190,7 +190,7 @@ public class DimensionalDoorItemRegistrar {
public void transform(MatrixStack matrices) { public void transform(MatrixStack matrices) {
matrices.scale(0.55f, 0.55f, 0.6f); matrices.scale(0.55f, 0.55f, 0.6f);
matrices.translate(0.05, -0.05, 0.41); matrices.translate(0.05, -0.05, 0.41);
matrices.multiply(Quaternion.method_35823(new Vec3f(90, 0, 0))); matrices.multiply(Quaternion.fromEulerXyzDegrees(new Vec3f(90, 0, 0)));
} }
} }

View file

@ -1,42 +1,25 @@
package org.dimdev.dimdoors.item; package org.dimdev.dimdoors.item;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List; import java.util.List;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.item.TooltipContext; import net.minecraft.client.item.TooltipContext;
import net.minecraft.client.resource.language.I18n; import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText; import net.minecraft.text.TranslatableText;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult; import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import org.dimdev.dimdoors.api.util.EntityUtils;
import org.dimdev.dimdoors.block.entity.RiftBlockEntity;
//import org.dimdev.dimdoors.entity.MaskEntity;
import org.dimdev.dimdoors.entity.ModEntityTypes;
import org.dimdev.dimdoors.item.component.CounterComponent;
import org.dimdev.dimdoors.network.ServerPacketHandler;
import org.dimdev.dimdoors.rift.targets.IdMarker;
import static net.fabricmc.api.EnvType.CLIENT; import static net.fabricmc.api.EnvType.CLIENT;
import static net.minecraft.util.math.Direction.*;
public class MaskWandItem extends Item { public class MaskWandItem extends Item {
private static final Logger LOGGER = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();

View file

@ -118,17 +118,4 @@ public class StabilizedRiftSignatureItem extends Item { // TODO: common supercla
return null; return null;
} }
} }
@Override
@Environment(EnvType.CLIENT)
public void appendTooltip(ItemStack itemStack, World world, List<Text> list, TooltipContext tooltipContext) {
RotatedLocation transform = getTarget(itemStack);
if (transform != null) {
list.add(new TranslatableText(this.getTranslationKey() + ".bound.info0", transform.getX(), transform.getY(), transform.getZ(), transform.getWorldId().getValue()));
list.add(new TranslatableText(this.getTranslationKey() + ".bound.info1", transform.getWorldId().getValue()));
} else {
ToolTipHelper.processTranslation(list, this.getTranslationKey() + ".unbound.info");
}
}
} }