I'm curious as to what this is used for. Do you have any examples?
Simply items with more damage values, item with storages, item with tile entity functions, item with guis, item with containers. Infinite possibilities!
Rollback Post to RevisionRollBack
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
Simply items with more damage values, item with storages, item with tile entity functions, item with guis, item with containers. Infinite possibilities!
Cool, I haven't looked at the tutorial yet so i'll be sure to check it out.
Could you do a tutorial about making a weapon with longer attack range? I've looked around a bit (which included writing a post here), but I haven't figured out how to do this yet. I know it's possible, though, because Mount & Blade: Battlegear 2 implements the same system (the reason I haven't used their code is because I find it difficult to navigate).
Could you do a tutorial about making a weapon with longer attack range? I've looked around a bit (which included writing a post here), but I haven't figured out how to do this yet. I know it's possible, though, because Mount & Blade: Battlegear 2 implements the same system (the reason I haven't used their code is because I find it difficult to navigate).
I tried that tutorial, but Eclipse keeps throwing errors for some reason. This is the problem class (everything else works just fine, but I'm still working on the handler):
package io.github.tntftw21.thuumcraft.handler;
import io.github.tntftw21.thuumcraft.ThuumCraft;
import io.github.tntftw21.thuumcraft.item.tool.IExtendedReach;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
public class MessageExtendedReachAttack implements IMessage {
private int entityId;
public MessageExtendedReachAttack() {
}
public MessageExtendedReachAttack(int entityId) {
this.entityId = entityId;
}
@Override
public void fromBytes(ByteBuf buf) {
entityId = ByteBufUtils.readVarInt(buf, 4);
}
@Override
public void toBytes(ByteBuf buf) {
ByteBufUtils.writeVarInt(buf, entityId, 4);
}
public static class Handler implements IMessageHandler<MessageExtendedReachAttack, IMessage> {
public IMessage onMessage(final MessageExtendedReachAttack message, MessageContext context) {
final EntityPlayerMP player = (EntityPlayerMP) context.getServerHandler().playerEntity;
player.getServerForPlayer().addScheduledTask(
new Runnable() {
@Override
public void run() {
Entity entity = player.worldObj.getEntityByID(message.entityId);
if (player.getCurrentEquippedItem() == null) {
return;
}
if (player.getCurrentEquippedItem().getItem() instanceof IExtendedReach) {
IExtendedReach weapon = (IExtendedReach) player.getCurrentEquippedItem().getItem();
double distanceSq = player.getDistanceSqToEntity(entity);
double reachSq = weapon.getReach() * weapon.getReach();
if (reachSq >= distanceSq) {
player.attackTargetEntityWithCurrentItem(entity);
}
}
return;
}
}
);
}
}
}
The problem is that `player.getServerForPlayer().addScheduledTask(new Runnable())` isn't defined for WorldServer (which getServerForPlayer() returns).
As I said, I've run into problems with this tutorial before, and I think it was this exact problem. My Forge build is 10.13.4.1448 (Yes, I'm still modding towards 1.7.10, but I really don't think much of 1.8 just yet). I've no idea why this is happening, because nobody else seems to have had this problem, and WorldServer doesn't have any methods for scheduling tasks (the only scheduling it does is for blocks and TileEntities).
I tried that tutorial, but Eclipse keeps throwing errors for some reason. This is the problem class (everything else works just fine, but I'm still working on the handler):
package io.github.tntftw21.thuumcraft.handler;
import io.github.tntftw21.thuumcraft.ThuumCraft;
import io.github.tntftw21.thuumcraft.item.tool.IExtendedReach;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
public class MessageExtendedReachAttack implements IMessage {
private int entityId;
public MessageExtendedReachAttack() {
}
public MessageExtendedReachAttack(int entityId) {
this.entityId = entityId;
}
@Override
public void fromBytes(ByteBuf buf) {
entityId = ByteBufUtils.readVarInt(buf, 4);
}
@Override
public void toBytes(ByteBuf buf) {
ByteBufUtils.writeVarInt(buf, entityId, 4);
}
public static class Handler implements IMessageHandler<MessageExtendedReachAttack, IMessage> {
public IMessage onMessage(final MessageExtendedReachAttack message, MessageContext context) {
final EntityPlayerMP player = (EntityPlayerMP) context.getServerHandler().playerEntity;
player.getServerForPlayer().addScheduledTask(
new Runnable() {
@Override
public void run() {
Entity entity = player.worldObj.getEntityByID(message.entityId);
if (player.getCurrentEquippedItem() == null) {
return;
}
if (player.getCurrentEquippedItem().getItem() instanceof IExtendedReach) {
IExtendedReach weapon = (IExtendedReach) player.getCurrentEquippedItem().getItem();
double distanceSq = player.getDistanceSqToEntity(entity);
double reachSq = weapon.getReach() * weapon.getReach();
if (reachSq >= distanceSq) {
player.attackTargetEntityWithCurrentItem(entity);
}
}
return;
}
}
);
}
}
}
The problem is that `player.getServerForPlayer().addScheduledTask(new Runnable())` isn't defined for WorldServer (which getServerForPlayer() returns).
As I said, I've run into problems with this tutorial before, and I think it was this exact problem. My Forge build is 10.13.4.1448 (Yes, I'm still modding towards 1.7.10, but I really don't think much of 1.8 just yet). I've no idea why this is happening, because nobody else seems to have had this problem, and WorldServer doesn't have any methods for scheduling tasks (the only scheduling it does is for blocks and TileEntities).
I have not read that tutorial yet. Perhaps you want to create a thread on mod development forums, or ask jabelar himself.
Rollback Post to RevisionRollBack
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
Hey! This isn't just for you but I found a fix for everyone who is stuck at the 44% on decompileMC. You have to use this link (http://files.minecraftforge.net/minecraftforge/) instead and download the latest src version. (It's from 03/21/2015). Then follow the rest of the steps!
I also just noticed this in the crash report (line 25)
GradleStart.main(Unknown Source)
Does that have any thing to do with it? ( I have imported the forge source)
I also have two monitors and i run everything except for Minecraft on my second monitor, not my main one. (Second used for everything, Main used for Minecraft.)
Is there anyway where could get a walk through how to make a multiblock item in game?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumA new tutorial, again!
https://emxtutorials.wordpress.com/exporting-your-mod/
A short one, about exporting your mod into a JAR ready for shipping, with Forge Gradle.
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
I'm curious as to what this is used for. Do you have any examples?
Youtube Channel: www.youtube.com/zoomturd
Mod: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2551790-mythical-minecraft-monsters-weapons-and-other-lore
Map: http://www.minecraftforum.net/forums/mapping-and-modding/maps/2578483-gladiator-arena-map
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSimply items with more damage values, item with storages, item with tile entity functions, item with guis, item with containers. Infinite possibilities!
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
Cool, I haven't looked at the tutorial yet so i'll be sure to check it out.
Youtube Channel: www.youtube.com/zoomturd
Mod: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2551790-mythical-minecraft-monsters-weapons-and-other-lore
Map: http://www.minecraftforum.net/forums/mapping-and-modding/maps/2578483-gladiator-arena-map
Could you do a tutorial about making a weapon with longer attack range? I've looked around a bit (which included writing a post here), but I haven't figured out how to do this yet. I know it's possible, though, because Mount & Blade: Battlegear 2 implements the same system (the reason I haven't used their code is because I find it difficult to navigate).
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumExists already. http://jabelarminecraft.blogspot.co.id/p/minecraft-modding-extending-reach-of.html
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
I tried that tutorial, but Eclipse keeps throwing errors for some reason. This is the problem class (everything else works just fine, but I'm still working on the handler):
package io.github.tntftw21.thuumcraft.handler; import io.github.tntftw21.thuumcraft.ThuumCraft; import io.github.tntftw21.thuumcraft.item.tool.IExtendedReach; import io.netty.buffer.ByteBuf; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class MessageExtendedReachAttack implements IMessage { private int entityId; public MessageExtendedReachAttack() { } public MessageExtendedReachAttack(int entityId) { this.entityId = entityId; } @Override public void fromBytes(ByteBuf buf) { entityId = ByteBufUtils.readVarInt(buf, 4); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeVarInt(buf, entityId, 4); } public static class Handler implements IMessageHandler<MessageExtendedReachAttack, IMessage> { public IMessage onMessage(final MessageExtendedReachAttack message, MessageContext context) { final EntityPlayerMP player = (EntityPlayerMP) context.getServerHandler().playerEntity; player.getServerForPlayer().addScheduledTask( new Runnable() { @Override public void run() { Entity entity = player.worldObj.getEntityByID(message.entityId); if (player.getCurrentEquippedItem() == null) { return; } if (player.getCurrentEquippedItem().getItem() instanceof IExtendedReach) { IExtendedReach weapon = (IExtendedReach) player.getCurrentEquippedItem().getItem(); double distanceSq = player.getDistanceSqToEntity(entity); double reachSq = weapon.getReach() * weapon.getReach(); if (reachSq >= distanceSq) { player.attackTargetEntityWithCurrentItem(entity); } } return; } } ); } } }The problem is that `player.getServerForPlayer().addScheduledTask(new Runnable())` isn't defined for WorldServer (which getServerForPlayer() returns).
As I said, I've run into problems with this tutorial before, and I think it was this exact problem. My Forge build is 10.13.4.1448 (Yes, I'm still modding towards 1.7.10, but I really don't think much of 1.8 just yet). I've no idea why this is happening, because nobody else seems to have had this problem, and WorldServer doesn't have any methods for scheduling tasks (the only scheduling it does is for blocks and TileEntities).
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI have not read that tutorial yet. Perhaps you want to create a thread on mod development forums, or ask jabelar himself.
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
--DELETED--
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumProbably, after I learn quite a bit about them. But first, a prerequisite would be functioning tile entities first.
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOf course! Just PM me anytime, or comment in my tutorials website
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
Hey! This isn't just for you but I found a fix for everyone who is stuck at the 44% on decompileMC. You have to use this link (http://files.minecraftforge.net/minecraftforge/) instead and download the latest src version. (It's from 03/21/2015). Then follow the rest of the steps!
when i started it after following all the steps in starting to mod i crashed
http://pastebin.com/L50bW7E4
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThat error is most likely caused by outdated drivers. Please update your graphics card drivers. More info: https://help.mojang.com/customer/en/portal/articles/928791-problematic-frame-or-pixel-format-not-accelerated
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
That did not work, I have the latest graphics card drivers installed and i am getting the same crash report (except for the date and time).
I also just noticed this in the crash report (line 25)
GradleStart.main(Unknown Source)
Does that have any thing to do with it? ( I have imported the forge source)
I also have two monitors and i run everything except for Minecraft on my second monitor, not my main one. (Second used for everything, Main used for Minecraft.)