Jump to content

joeisawesome35

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by joeisawesome35

  1. Could someone help me with this, I don't know why this is happening.
  2. I got it to let me be in my dimension, but when I changed it to generate my biome instead of a desert, I get teleported to the Nether again.
  3. Can someone help me, I don't know why this is happening. Here is my World Provider Class public void registerWorldChunkManager() { this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.desert, 0.1f); this.dimensionId = MyMod.dimensioId; } @Override public IChunkProvider createChunkGenerator() { return new ChunkProviderMyMod(worldObj, worldObj.getSeed(), true, null); } @Override public String getDimensionName() { return "MyDimension"; } @Override public String getInternalNameSuffix() { return null; } @Override public boolean canRespawnHere() { return true; }
  4. The player respawn works, but only if i kill myself not on joining the world, and it loads my dimension, but I spawn in the nether, then in the console it says my dimension unloaded. EDIT: Also what chunk manager should I use? EDIT #2: My createChunkGenereator was misspelled.... oops, but now I get teleported into void world and I can't move. It is like the terrain is there, I just can't see it or interact with it....
  5. While I'm here, could someone tell me how I could load obj into my mod. I've googled stuff, but I can't figure out how to apply the obj to my item. It is probably simple, but I'm a noob.
  6. So, I'm not getting an error anymore, but I still can't get it to work. This is my player respawn event @SubscribeEvent public void onPlayerRespawn(PlayerRespawnEvent event) { if(event.player.dimension==0) { event.player.travelToDimension(; } } and this is how im creating the handler MinecraftForge.EVENT_BUS.register(new MyEventHandler()); and yet I still can't get the onPlayerRespawn event to actually run. This is my entity constructing class @SubscribeEvent public void onEntityConstructing(EntityConstructing event) { if(event.entity instanceof EntityPlayer && ExtendedPlayer.get((EntityPlayer) event.entity)==null) { ExtendedPlayer.register((EntityPlayer) event.entity); } if(event.entity instanceof EntityPlayer && event.entity.getExtendedProperties(ExtendedPlayer.DIM)==null) { event.entity.registerExtendedProperties(ExtendedPlayer.DIM, new ExtendedPlayer((EntityPlayer) event.entity)); } } and this is my IEEP class public class ExtendedPlayer implements IExtendedEntityProperties{ public final static String DIM = "dimension"; private final EntityPlayer player; private int currDim; public ExtendedPlayer(EntityPlayer player) { this.player=player; currDim = player.dimension; } public static final void register(EntityPlayer player) { player.registerExtendedProperties(ExtendedPlayer.DIM, new ExtendedPlayer(player)); } public static final ExtendedPlayer get(EntityPlayer player) { return (ExtendedPlayer) player.getExtendedProperties(DIM); } @Override public void saveNBTData(NBTTagCompound compound) { NBTTagCompound properties = new NBTTagCompound(); properties.setInteger("Current Dimension", currDim); compound.setTag(DIM, properties); } @Override public void loadNBTData(NBTTagCompound compound) { NBTTagCompound properties = (NBTTagCompound) compound.getTag(DIM); this.currDim = properties.getInteger("Current Dimension"); } @Override public void init(Entity entity, World world) { } }
  7. I added the extended properties that stores the dimension stuff, but every time I try to use the .travelToDimension, I get a NullPointerException. Could you explain where I need to put this. I have an Event Handler class, but what event should it go into? Sorry, I'm pretty new to modding, but even more of a noob at EventHandlers.
  8. so, what would you say is the best way to change the entityplayers dimension id and store it?
  9. How could I make it so that I spawn in my own dimension instead of the overworld. Or at least change the overworld to be completely my biomes.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.