Jwosty
Forge Modder-
Posts
128 -
Joined
-
Last visited
Converted
-
Gender
Male
-
Personal Text
Because I'm a potato
Jwosty's Achievements
Creeper Killer (4/8)
9
Reputation
-
0.3.0 Alpha is released, which adds a very simple Goa'uld base worldgen (a stargate, some transporter rings, appropriate loot, lots of gold), as well as a couple of minor tweaks.
-
Even thought there's only a slow trickle of subforum requests, it's still a trickle. IMO, this thread still belongs.
-
How to make the OnRightClick Method point to the crosshair?
Jwosty replied to MyNameIsSilver's topic in Modder Support
If you intend to do something whenever a player right-clicks a block, use PlayerInteractEvent. -
Also try using a simple working mcmod.info file from some other mod (i.e. one that doesn't have dependencies). If it still crashes... well, we'll cross that bridge if we come to it.
-
How would I check for a type of block at a specific location?
Jwosty replied to Althonos's topic in Modder Support
I might use world.getTileEntity(x,y,z) instanceof TileEntityChest -
tileEntity does not save data and not Refresh render..
Jwosty replied to Kwasti's topic in Modder Support
That updates the block, not any entities. -
tileEntity does not save data and not Refresh render..
Jwosty replied to Kwasti's topic in Modder Support
If I understand your problem correctly, I've had this exact problem before, too. My issue was that the entity's tracking range (specified in EntityRegistry.registerModEntity) wasn't big enough; changing it to a large value like 80 fixed it -- this means that players 80 blocks away will receive updates. In SP, it will just pause updating if the player leaves that range. -
how to detect if a class implements an interface
Jwosty replied to memcallen's topic in Modder Support
What happens when you print the TE's class? e.g. ...println(world.getTileEntity(...).getClass()) -
Detect all nearby entities to player and then shoot lightning at them
Jwosty replied to Xile's topic in Modder Support
Do you mean like just vanilla lightning raining down from the sky, or zaps coming from the player to mobs? If the latter, you'll have to create your own entity. -
how to detect if a class implements an interface
Jwosty replied to memcallen's topic in Modder Support
Have you set up your tile entity properly? Try putting a print statement in all of its constructors. -
Just released 0.2.0_alpha, which adds transporter rings, naquadah items, controller crystals, and crafting recipes for everything. Also, the MP no longer crashes but still doesn't work quite right.
-
Yeah, but don't forget to register the instance with MinecraftForge.EVENT_BUS.register. It should then work.
-
There are some great tutorials out there to get you started (e.g. Havvy's tutorials), as well as this board in general, and Google is your friend. The IRC channel #minecraftforge is always pretty active and friendly, so try there too! Have fun modding
-
Read up on events; you're going about it in the totally wrong manner. To use an event, you don't subclass Event, you just have to write an instance method to take an event as a paremeter (e.g. EntityJoinWorldEvent or MinecartCollisionEvent), add the EventHandler annotation to it, and register an instance of said class with MinecraftForge.EVENT_BUS.register. For example, this logs every time a player goes to bed: // Just a normal Object subclass public class MyAwesomeClass { @SubscribeEvent public sleepyTime(PlayerSleepInBedEvent sleepEvent) { System.out.println("Goodnight!"); } } // Main mod class @Mod( ... ) public class AwesomeMod { // ... @SubscribeEvent public void init(FMLInitializationEvent) { FMLCommonHandler.instance().bus().register(new MyAwesomeClass()); } } That should be enough to get you started.