Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Narlecks

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Narlecks

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. in the first instance it worked, but for some reason when hitting it keeps getting different id's on server / client. Did I made a mistake while implementing IEntityAdditionalSpawnData? @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } @Override public void writeSpawnData(PacketBuffer buffer) { int[] id = new int[getAllParts().length]; for(int i=0;i<getAllParts().length;i++) { getAllParts()[i].setEntityId(i+this.getEntityId()); id[i] = i+this.getEntityId(); } buffer.writeVarIntArray(id); } @
  2. Any idea where Minecraft does that? or i put it in the same place using packets?
  3. The problem is, it only works in clientside, the id's on serverside are not the same
  4. one thing I forgot to say is that following the EnderDragon's code i came across this: public void handleSpawnMob(SSpawnMobPacket packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, (ClientPlayNetHandler) (Object)this, this.client); double d0 = packetIn.getX(); double d1 = packetIn.getY(); double d2 = packetIn.getZ(); float f = (float)(packetIn.getYaw() * 360) / 256.0F; float f1 = (float)(packetIn.getPitch() * 360) / 256.0F; LivingEntity livingentity = (LivingEntity)EntityType.create(packetIn.getEntityType(), this.client.world); if (livingentity != null) { livin
  5. Thanks for the suggestion!, i solved that problem but i found another.. The problem is, the entity parts have different IDs on client and server So, for example.. when i hit the head, in client-side the hit is received by the head but in server-side is received by the body bc the ids collide Do you have an idea why that can happen? Tell me if u need specific information
  6. It never reaches AttackEntityFrom because the other hitboxes even though they exist, I can't hit them.
  7. You are right, my bad. When I hit the entity, in the console I don't get any messages
  8. Version: 1.15.2 I'm trying to make a mob that has multiple hitboxes, i take a look on Ender Dragon's code but when i hit the entity, it just dont works. (in debug mode(f3) it shows me the hitboxes correctly) NewEntity.class public class NewEntity extends MultiPartEntity { protected final MultiPartEntityPart[] bodyParts; public final MultiPartEntityPart headPart; public final MultiPartEntityPart bodyPart; public NewEntity(EntityType<? extends MultiPartEntity> type, World worldIn) { super(type, worldIn); this.bodyPart = new MultiPartEntityPart(this, "body"
  9. I'm trying to use a dependency for my mod, but i need it to be deobfuscated (to use it in the dev environment) i tried adding the dependency with fg.deobf in the build.gradle but when i refresh gradle it throws me "Error getting artifact" I'm doing it wrong? build.gradle: buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.mine
  10. Hello, it's my first time using Reflections and i want to know if i am doing it correctly. (In my mod i have to change the player eyeHeight several times, which is private) So, i stored the reflected field in a private static Field and then, when i need to use it i call it. I already try it and works but my question is, is the correct way to do it?
  11. public class KeyHandler { private static final String CATEGORY = "mod-test"; public static KeyBinding test; public KeyHandler() { test = new KeyBinding("", GLFW.GLFW_KEY_H, CATEGORY); ClientRegistry.registerKeyBinding(test); } @SubscribeEvent public void keyEvent(ClientTickEvent event) { if(event.phase.equals(Phase.END) && mc.isGameFocused()) { if(test.isPressed()) { System.out.println("test"); } } } }
  12. Hi, i have an issue with a keybind, when i use myKey.isPressed always returns true(works like isKeyDown), when should "Returns true on the initial key press" My "KeyHandler" class: public class KeyHandler { private static final String CATEGORY = "mod-test"; public static KeyBinding test; public KeyHandler() { test = new KeyBinding("", GLFW.GLFW_KEY_H, CATEGORY); ClientRegistry.registerKeyBinding(test); } @SubscribeEvent public void keyEvent(InputEvent.KeyInputEvent event) { if(mc.isGameFocused()) { if(test.isPressed()) { System.out.println("test"); }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.