Seems like a really awesome idea! I am currently working on my own magic mod(I haven't finished it to the point where it is ready to make a post yet) and I'm glad that other people are making magic mods that are innovative and different.
Thanks for the help, though that wasn't the problem. The problem was that I subscribed to the wrong event *facepalm*... I subscribed to the join event instead of the EntityConstructing event. Thank you for trying to help and im sorry i wasted your time.
I am making a mod, where the player can join different factions like fire water and others and the faction will save upon logging out. I have used every tutorial I can find, but for some reason the faction wont save.
public class ExtendedPlayer implements IExtendedEntityProperties
{
public final static String name="magicalfactions";
private final EntityPlayer player;
private String faction;
public ExtendedPlayer(EntityPlayer player){
this.player=player;
this.faction="none";
}
public static final void register(EntityPlayer player){
player.registerExtendedProperties(name, new ExtendedPlayer(player));
}
public static final ExtendedPlayer get(EntityPlayer player){
return (ExtendedPlayer) player.getExtendedProperties(name);
}
@Override
public void loadNBTData(NBTTagCompound compound) {
this.faction=compound.getString("faction");
}
@Override
public void init(Entity entity, World world) {
// TODO Auto-generated method stub
}
public String getFaction(){
return this.faction;
}
public void setFaction(String faction){
this.faction=faction;
}
}
OnEntityConstructing Subscribe Event
Put your spoiler here.@SubscribeEvent
public void onEntityConstructing(EntityJoinWorldEvent event)
{
if(event.entity instanceof EntityPlayerMP){
if(event.entity.getExtendedProperties(ExtendedPlayer.name)==null){
EntityPlayer player =(EntityPlayer) event.entity;
System.out.println("Data added for new player");
ExtendedPlayer.register(player);
}else{
System.out.println("Data loaded from player");
}
}
}
If you can help,I would really appreciate it
I followed the tutorial here and couldn't get it to work.
My brother and I are making a modpack. We need this mod for the Archmagus mod to work. On the Archmagus page it says we can use it in our modpack. On this page it says nothing about modpacks. Can we use it?
Hi, my brother and I are working on a mod pack. This mod is super awesome and I really would like it in the pack. We we will follow the terms listed in the original post if you allow us to use this mod.
---- Minecraft Crash Report ----
// Quite honestly, I wouldn't worry myself about that.
Time: 3/14/15 6:26 AM
Description: Rendering screen
java.lang.NullPointerException: Rendering screen
at com.iconmaster.aec.aether.AVRegistry.getAV(AVRegistry.java:77)
at com.iconmaster.aec.client.gui.GuiAetherCondenser.func_146976_a(GuiAetherCondenser.java:86)
at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1061)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:989)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
0
Seems like a really awesome idea! I am currently working on my own magic mod(I haven't finished it to the point where it is ready to make a post yet) and I'm glad that other people are making magic mods that are innovative and different.
0
Thanks for the help, though that wasn't the problem. The problem was that I subscribed to the wrong event *facepalm*... I subscribed to the join event instead of the EntityConstructing event. Thank you for trying to help and im sorry i wasted your time.
0
Plz help me if you can ALL help is appreciated!
0
I am making a mod, where the player can join different factions like fire water and others and the faction will save upon logging out. I have used every tutorial I can find, but for some reason the faction wont save.
ExtendedPlayer.class
package com.machinespray.magfac;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;
public class ExtendedPlayer implements IExtendedEntityProperties
{
public final static String name="magicalfactions";
private final EntityPlayer player;
private String faction;
public ExtendedPlayer(EntityPlayer player){
this.player=player;
this.faction="none";
}
public static final void register(EntityPlayer player){
player.registerExtendedProperties(name, new ExtendedPlayer(player));
}
public static final ExtendedPlayer get(EntityPlayer player){
return (ExtendedPlayer) player.getExtendedProperties(name);
}
@Override
public void saveNBTData(NBTTagCompound compound) {
compound.setString("faction", this.faction);
System.out.println("Data Saved...");
}
@Override
public void loadNBTData(NBTTagCompound compound) {
this.faction=compound.getString("faction");
}
@Override
public void init(Entity entity, World world) {
// TODO Auto-generated method stub
}
public String getFaction(){
return this.faction;
}
public void setFaction(String faction){
this.faction=faction;
}
}
OnEntityConstructing Subscribe Event
Put your spoiler here.@SubscribeEvent
public void onEntityConstructing(EntityJoinWorldEvent event)
{
if(event.entity instanceof EntityPlayerMP){
if(event.entity.getExtendedProperties(ExtendedPlayer.name)==null){
EntityPlayer player =(EntityPlayer) event.entity;
System.out.println("Data added for new player");
ExtendedPlayer.register(player);
}else{
System.out.println("Data loaded from player");
}
}
}
If you can help,I would really appreciate it
I followed the tutorial here and couldn't get it to work.
0
Looks Cool! May I please do a mod review for my channel?
0
Any chance of a 1.7.10 version my brother and I are working on a modpack and I would love to include this mod.
0
My brother and I are making a modpack. We need this mod for the Archmagus mod to work. On the Archmagus page it says we can use it in our modpack. On this page it says nothing about modpacks. Can we use it?
0
0
My brother and I are making a modpack. Can we use this in our modpack? This is one of my brothers favorite mods.
0
Hi, I'm making a modpack that contains my brother's and I's favorite mods. This is my brothers favorite mod. Can I please use it in the modpack?
0
Hi I'm making a modpack that includes me and my brother's favorite mods. My brother loves this mod. Can we use it in our modpack?
0
Recording the review now. Should be up in a few days.
EDIT: Ill post a link when i'm done.
0
---- Minecraft Crash Report ----
// Quite honestly, I wouldn't worry myself about that.
Time: 3/14/15 6:26 AM
Description: Rendering screen
java.lang.NullPointerException: Rendering screen
at com.iconmaster.aec.aether.AVRegistry.getAV(AVRegistry.java:77)
at com.iconmaster.aec.client.gui.GuiAetherCondenser.func_146976_a(GuiAetherCondenser.java:86)
at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1061)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:989)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at com.iconmaster.aec.aether.AVRegistry.getAV(AVRegistry.java:77)
at com.iconmaster.aec.client.gui.GuiAetherCondenser.func_146976_a(GuiAetherCondenser.java:86)
at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78)
-- Screen render details --
Details:
Screen name: com.iconmaster.aec.client.gui.GuiAetherCondenser
Mouse location: Scaled: (230, 123). Absolute: (691, 375)
Screen size: Scaled: (456, 249). Absolute: (1366, 746). Scale factor of 3
-- Affected level --
Details:
Level name: MpServer
All players: 3 total; [EntityClientPlayerMP['machinespray'/360564, l='MpServer', x=521.53, y=70.62, z=387.04], EntityOtherPlayerMP['PolterPup'/222, l='MpServer', x=596.69, y=59.00, z=364.31], EntityOtherPlayerMP['PolterPup'/222, l='MpServer', x=596.69, y=59.00, z=364.31]]
Chunk stats: MultiplayerChunkCache: 121, 121
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (452,64,331), Chunk: (at 4,4,11 in 28,20; contains blocks 448,0,320 to 463,255,335), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 1312871 game time, 1651973 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 46 total; [EntityClientPlayerMP['machinespray'/360564, l='MpServer', x=521.53, y=70.62, z=387.04], EntityEnderman['Enderman'/349579, l='MpServer', x=586.50, y=44.00, z=430.50], EntityZombie['Zombie'/349578, l='MpServer', x=588.50, y=44.00, z=428.50], EntitySquid['Squid'/344979, l='MpServer', x=463.50, y=50.69, z=436.63], EntityOtherPlayerMP['PolterPup'/222, l='MpServer', x=596.69, y=59.00, z=364.31], EntityItem['item.item.egg'/346914, l='MpServer', x=565.22, y=64.13, z=412.16], EntitySquid['Squid'/345135, l='MpServer', x=490.28, y=52.31, z=441.38], EntitySquid['Squid'/345134, l='MpServer', x=492.25, y=52.97, z=444.31], EntityBat['Bat'/360873, l='MpServer', x=598.75, y=47.00, z=417.28], EntitySquid['Squid'/345131, l='MpServer', x=501.38, y=52.84, z=438.84], EntitySquid['Squid'/345141, l='MpServer', x=484.94, y=53.38, z=434.50], EntitySquid['Squid'/345140, l='MpServer', x=492.44, y=53.34, z=436.66], EntitySquid['Squid'/345142, l='MpServer', x=486.94, y=52.13, z=434.69], EntitySquid['Squid'/345137, l='MpServer', x=496.91, y=52.31, z=436.44], EntitySquid['Squid'/345136, l='MpServer', x=488.59, y=52.88, z=442.34], EntityXPOrb['Experience Orb'/364092, l='MpServer', x=516.97, y=67.25, z=393.31], EntityCreeper['Creeper'/342200, l='MpServer', x=453.50, y=19.00, z=442.50], EntityXPOrb['Experience Orb'/364090, l='MpServer', x=513.84, y=67.25, z=388.84], EntityBat['Bat'/362310, l='MpServer', x=507.75, y=35.82, z=328.53], EntityBat['Bat'/362317, l='MpServer', x=507.78, y=38.37, z=321.41], EntityBat['Bat'/362316, l='MpServer', x=507.50, y=35.19, z=329.06], EntityBat['Bat'/362313, l='MpServer', x=508.13, y=36.51, z=329.13], EntityBat['Bat'/362325, l='MpServer', x=575.31, y=31.00, z=450.84], EntityAspectOrb['Aspect Orb'/363989, l='MpServer', x=519.06, y=67.06, z=394.66], EntityAspectOrb['Aspect Orb'/363988, l='MpServer', x=512.59, y=66.06, z=390.47], EntityAspectOrb['Aspect Orb'/363991, l='MpServer', x=517.44, y=67.06, z=391.72], EntityBat['Bat'/362326, l='MpServer', x=571.59, y=42.48, z=405.09], EntityAspectOrb['Aspect Orb'/363990, l='MpServer', x=515.16, y=66.06, z=393.19], EntitySpider['Spider'/339667, l='MpServer', x=589.72, y=83.88, z=367.38], EntitySpider['Spider'/363615, l='MpServer', x=555.50, y=68.00, z=438.50], EntityChicken['Chicken'/91, l='MpServer', x=564.47, y=64.00, z=414.41], EntityAspectOrb['Aspect Orb'/363992, l='MpServer', x=516.41, y=67.06, z=390.31], EntityOtherPlayerMP['PolterPup'/222, l='MpServer', x=596.69, y=59.00, z=364.31], EntityCreeper['Creeper'/363616, l='MpServer', x=555.50, y=68.67, z=438.50], EntityZombie['Zombie'/341475, l='MpServer', x=450.69, y=42.00, z=433.70], EntityBat['Bat'/349805, l='MpServer', x=511.78, y=43.10, z=325.22], EntitySkeleton['Skeleton'/360685, l='MpServer', x=593.50, y=15.00, z=415.50], EntityAspectOrb['Aspect Orb'/363893, l='MpServer', x=516.75, y=67.06, z=386.66], EntityAspectOrb['Aspect Orb'/363892, l='MpServer', x=516.72, y=67.06, z=384.28], EntityAspectOrb['Aspect Orb'/363895, l='MpServer', x=516.72, y=67.06, z=387.44], EntityAspectOrb['Aspect Orb'/363894, l='MpServer', x=516.72, y=67.06, z=388.06], EntityZombie['Zombie'/358390, l='MpServer', x=547.50, y=15.00, z=307.50], EntityZombie['Zombie'/358396, l='MpServer', x=591.50, y=32.00, z=414.50], EntityItem['item.item.string'/340478, l='MpServer', x=551.91, y=71.13, z=377.66], EntityAspectOrb['Aspect Orb'/363896, l='MpServer', x=516.72, y=67.06, z=384.16], EntitySkeleton['Skeleton'/360699, l='MpServer', x=464.50, y=40.00, z=416.50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Non-integrated multiplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:373)
at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2432)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:909)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 272138440 bytes (259 MB) / 595668992 bytes (568 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 31 mods loaded, 31 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
FML{7.10.85.1291} [Forge Mod Loader] (forge-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
Forge{10.13.2.1291} [Minecraft Forge] (forge-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
<CoFH ASM>{000} [CoFH ASM Data Initialization] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
NotEnoughItems{1.0.3.74} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.3.74-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ThaumicTinkerer-preloader{0.1} [Thaumic Tinkerer Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
AetherCraft{1.5.0.82} [AetherCraft] (AetherCraft-1.7.10-1.5.0.82.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
Baubles{1.0.1.10} [Baubles] (Baubles-1.7.10-1.0.1.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
Artifacts{1.1.1} [Artifacts] (Artifacts-1.1.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
BattleTowers{1.5.1} [Battle Towers] (BattleTowers-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
BiblioCraft{1.9.2} [BiblioCraft] (BiblioCraft[v1.9.2][MC1.7.10].jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
Thaumcraft{4.2.3.5} [Thaumcraft] (Thaumcraft-1.7.10-4.2.3.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
chisel{2.3.7.34} [Chisel 2] (Chisel2-2.3.7.34.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
CoFHCore{1.7.10R3.0.0RC3} [CoFH Core] (CoFHCore-[1.7.10]3.0.0RC3-203.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ComputerCraft{1.73} [ComputerCraft] (ComputerCraft1.73.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ThermalFoundation{1.7.10R1.0.0RC4} [Thermal Foundation] (ThermalFoundation-[1.7.10]1.0.0RC4-58.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ExtraUtilities{1.2.2} [Extra Utilities] (extrautilities-1.2.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
extvil{1.7.10-2.4} [Extended_Villages] (extvil-1.7.10-2.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
InfernalMobs{1.6.0} [Infernal Mobs] (InfernalMobs-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
journeymap{5.0.1} [JourneyMap] (JourneyMap5.0.1_Unlimited_MC1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
Mantle{1.7.10-0.3.2.jenkins184} [Mantle] (Mantle-1.7.10-0.3.2 (1).jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
cfm{3.4.7} [§9MrCrayfish's Furniture Mod] (MrCrayfishFurnitureModv3.4.7(1.7.10).jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
necromancy{1.7.1} [Necromancy] (Necromancy-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ThermalExpansion{1.7.10R4.0.0RC3} [Thermal Expansion] (ThermalExpansion-[1.7.10]4.0.0RC3-132.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
RedstoneArsenal{1.7.10R1.1.0RC3} [Redstone Arsenal] (RedstoneArsenal-[1.7.10]1.1.0RC3-50.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
AS_Ruins{14.7} [Ruins Spawning System] (Ruins-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
TConstruct{1.7.10-1.8.2.build858} [Tinkers' Construct] (TConstruct-1.7.10-1.8.2a.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ThaumicTinkerer{unspecified} [Thaumic Tinkerer] (ThaumicTinkerer-2.5-1.7.10-162.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
ThermalDynamics{1.7.10R1.0.0RC3} [Thermal Dynamics] (ThermalDynamics-[1.7.10]1.0.0RC3-90.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
TMechworks{0.2.13.96} [Tinkers' Mechworks] (TMechworks-1.7.10-0.2.13.96 (1).jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
CoFHCore: -[1.7.10]3.0.0RC3-203
ThermalFoundation: -[1.7.10]1.0.0RC4-58
Mantle Environment: Environment healthy.
ThermalExpansion: -[1.7.10]4.0.0RC3-132
RedstoneArsenal: -[1.7.10]1.1.0RC3-50
TConstruct Environment: Environment healthy.
ThermalDynamics: -[1.7.10]1.0.0RC3-90
Launched Version: 1.7.10-Forge10.13.2.1291
LWJGL: 2.9.1
OpenGL: AMD Radeon(TM) HD 6480G GL version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
After opening up the condenser's GUI
0
0
I would gladly do a review for such an epic mod.