• Posts

    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • This cord gets 2 different values of player.distanceWalkedModified from Render Thread and Server Thread. How do I get only one of these? @SubscribeEvent public static void getDistanceWalked(TickEvent.PlayerTickEvent event) { float walkDistance = (float)(event.player.distanceWalkedModified / 0.6); LOGGER.debug("now: " + event.player.distanceWalkedModified / 0.6 + "blocks"); }  
    • I wrote this cord, but it is worked only when player hold items. Moreover blocks render on player. @SubscribeEvent public static void onRenderPlayerPre(RenderPlayerEvent.Pre event) { GlStateManager.pushMatrix(); GlStateManager.scalef(2.0f, 1.0f, 1.0f); } @SubscribeEvent public static void onRenderPlayerPost(RenderPlayerEvent.Post event) { GlStateManager.popMatrix(); } Then, how does GlStateManager.scalef work? I want to change Player's scaleX(depth) to 1.2X and scaleZ(width) to 2.0Z. GlStateManager.scalef(2.0f, 1.0f, 1.0f) makes a player fat, but depth doesn't change. GlStateManager.scalef(1.0f, 1.0f, 2.0f) shrinks a player's height.
    • Hi, I am kind of new in Minecraft modding. I was following a video on how to create a custom Axe and shield for minecraft 1.12. It worked great. But when I realized the latest version of minecraft is 1.15, it seems like the code in 1.12 is completely broken in 1.15. And there isn't a good documentation    Below is the code that is working in 1.12, but not in 1.15 import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityLargeFireball; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumHand; import net.minecraft.world.World; public class CustomAxe extends ItemAxe { public int power = 3; public String axeName = "my_axe"; public CustomAxe(ToolMaterial material) { super(material, 1, 1); this.setUnlocalizedName(axeName); this.setRegistryName(axeName); this.setCreativeTab(CreativeTabs.COMBAT); this.setMaxDamage(power); } @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if(!world.isRemote) { world.spawnEntity(createFireball(world, player, power)); } return super.onItemRightClick(world, player, hand); } public static EntityLargeFireball createFireball(World world, EntityPlayer player, int power){ EntityLargeFireball fireball =new EntityLargeFireball(world,player.posX,player.posY+2,player.posZ, player.getLookVec().x,player.getLookVec().y,player.getLookVec().z); fireball.explosionPower = power; fireball.shootingEntity = player; fireball.rotationPitch = player.rotationPitch; fireball.rotationYaw = player.rotationYaw; return fireball; } }   Any idea how to convert above 1.12 code to 1.15? Any 1.15 guide / documentation / tutorial?
    • I want to call this function when player logins first or every time player dies.
  • Topics

  • Who's Online (See full list)