Jump to content

worldwidewoogie

Forge Modder
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

worldwidewoogie's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. I'm using Forge 11.14.4.1563 with Fedora Linux's OpenJDK 1.8.0_65-b17 (64 bit). I do the following with no files in my mods directory: [*]Create a new world and immediately exit Minecraft after joining the world [*]Using NBTEdit, change the player's dimension to 2 in both level.data and the playerdata directory [*]Start Minecraft again and join the world I see the following in the fml-client-latest.log: ... [14:17:45] [server thread/INFO] [FML/]: [server thread] Server side modded connection established [14:17:45] [server thread/INFO] [sTDERR/]: [net.minecraftforge.common.DimensionManager:initDimension:239]: Cannot Hotload Dim: Could not get provider type for dimension 2, does not exist [14:17:45] [server thread/INFO] [sTDERR/]: [net.minecraftforge.common.DimensionManager:initDimension:239]: Cannot Hotload Dim: Could not get provider type for dimension 2, does not exist [14:17:45] [Client thread/DEBUG] [FML/]: Overriding dimension: using 2 [14:17:45] [Client thread/FATAL] [FML/]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Could not get provider type for dim ension 2, does not exist java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Could not get provider type for dimension 2, does not exist at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_65] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_65] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:715) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1018) [bsu.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:345) [bsu.class:?] at net.minecraft.client.main.Main.main(SourceFile:120) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_65] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_65] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.IllegalArgumentException: Could not get provider type for dimension 2, does not exist at net.minecraftforge.common.DimensionManager.getProviderType(DimensionManager.java:148) ~[DimensionManager.class:?] at net.minecraftforge.common.DimensionManager.createProviderFor(DimensionManager.java:303) ~[DimensionManager.class:?] at net.minecraft.world.WorldProvider.func_76570_a(WorldProvider.java:144) ~[bgd.class:?] at net.minecraft.client.multiplayer.WorldClient.<init>(WorldClient.java:54) ~[cen.class:?] at net.minecraft.client.network.NetHandlerPlayClient.func_147282_a(NetHandlerPlayClient.java:250) ~[cee.class:?] at net.minecraft.network.play.server.S01PacketJoinGame.func_148833_a(SourceFile:76) ~[jw.class:?] at net.minecraft.network.play.server.S01PacketJoinGame.func_148833_a(SourceFile:13) ~[jw.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[ih.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_65] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?] ... 9 more Then this exception just repeats until I close Minecraft: [14:17:45] [Client thread/FATAL] [FML/]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_65] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_65] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:715) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1018) [bsu.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:345) [bsu.class:?] at net.minecraft.client.main.Main.main(SourceFile:120) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_65] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_65] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.func_147240_a(NetHandlerPlayClient.java:1697) ~[cee.class:?] at net.minecraft.network.play.server.S3FPacketCustomPayload.func_180734_a(S3FPacketCustomPayload.java:58) ~[ji.class:?] at net.minecraft.network.play.server.S3FPacketCustomPayload.func_148833_a(S3FPacketCustomPayload.java:69) ~[ji.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[ih.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_65] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?] ... 9 more
  2. I have a mod where dimensions can be created and deleted dynamically. So it is possible that user can disconnect when in a dimension, but that dimension will not exist when they log in again. The behavior is that the first time they attempt this they will get an exception and minecraft will exit, but then the 2nd time they will be able to log in fine and will be put in the overworld. I'd like to handle this more cleanly, but haven't been able to figure out how to do that. Is there an event I could write a handler for that would let me update the player's dimension at login time if their save dimension does not exist?
  3. Mod Download: https://github.com/worldwidewoogie/extraDimensions8/blob/master/releases/extraDimensions-1.8.0.jar'>https://github.com/worldwidewoogie/extraDimensions8/blob/master/releases/extraDimensions-1.8.0.jar Mod Source: https://github.com/worldwidewoogie/extraDimensions8 Extra Dimensions Minecraft Mod Allows dynamic creation and deletion of dimensions via commands (restricted to ops in multiplayer). Adds the following commands: /xdcreate <Dimension Name> <Game Type> <World Type> <World Options> <World Seed> create a new ExtraDimension <Dimension Name> - required. String with no spaces <Game Type> - optional. creative or survival (defaults to creative) <World Type> - optional. World type for new dimension: flat default largeBiomes amplified default_1_1 custom <World Options> - optional. Options for the above world type (See below), or '-' if you would like to provide a seed without providing any customized options. <World Seed> - optional. The seed used in world generation. /xddelete <Dimension Name> delete existing ExtraDimension <Dimension Name> - required. Name or ID of dimension to delete /xdlist list existing ExtraDimensions /xdrename <Dimension Name> <New Dimension Name> rename existing ExtraDimension <Dimension Name> - required. Name of dimension to rename <New Dimension Name> - required. New name for dimension /xdtp <target player name> <destination dimension name> teleport to an ExtraDimension. If teleporting from survival to creative, the survival inventory is saved, and the creative inventory (if it exists) is restored. If teleporting from creative to survival, the creative inventory is saved, and the survival inventory (if it exists) is restored. World Options World options can be of 2 forms: Minecraft option strings - The full option string used by Minecraft to generate the world Presets A short string that ExtraDimensions translates into a Minecraft option strings The 2 World Types that support options are flat custom The following flat presets are supported: classicflat overworld dessert tunnelersdream snowykingdom redstoneready waterworld bottomlesspit thevoid A tool for generating Minecraft option strings can be found here: http://minecraft.tools/en/flat.php The following custom presets are supported: default isleland mountainmadness caveofchaos waterworld caversdelight drought goodluck A tool for generating Minecraft option strings can be found here: http://minecraft.tools/en/custom.php Note: There is a limit to the length of commands you can enter in the Minecraft command line. Minecraft option strings are almost guaranteed to go over this limit. You can use command blocks to issue the commands to get around this limitation.
  4. I was trying some things and accidentally left it that way when I posted the code. Thanks again for your help.
  5. I've put back the debugging code, so it now looks like this: package net.woogie.extraDimensions; import java.util.Set; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; import net.minecraftforge.common.util.Constants; public class ExtraDimensionsPlayerCreativeInventoryProperties implements IExtendedEntityProperties { private final EntityPlayer player; private static final String identifier = "ExtraDimensionsCreativeInventory"; private InventoryPlayer creativeInventory; public ExtraDimensionsPlayerCreativeInventoryProperties(EntityPlayer player) { this.player = player; this.creativeInventory = new InventoryPlayer(player); } public static ExtraDimensionsPlayerCreativeInventoryProperties get(EntityPlayer player) { return (ExtraDimensionsPlayerCreativeInventoryProperties) player.getExtendedProperties(identifier); } public static void register(EntityPlayer player) { player.registerExtendedProperties(identifier, new ExtraDimensionsPlayerCreativeInventoryProperties(player)); } public void setCreativeInventory(InventoryPlayer inventory) { this.creativeInventory.clear(); for (int i = 0; i < inventory.getSizeInventory(); ++i) { ItemStack stack = inventory.getStackInSlot(i); this.creativeInventory.setInventorySlotContents(i, (stack == null ? null : stack.copy())); } } public InventoryPlayer getCreativeInventory() { return this.creativeInventory; } @Override public void saveNBTData(NBTTagCompound compound) { int i; NBTTagCompound nbttagcompound; NBTTagList creativeInventoryNBT = new NBTTagList(); for (i = 0; i < this.creativeInventory.mainInventory.length; ++i) { if (this.creativeInventory.mainInventory[i] != null) { nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte) i); this.creativeInventory.mainInventory[i].writeToNBT(nbttagcompound); creativeInventoryNBT.appendTag(nbttagcompound); } } for (i = 0; i < this.creativeInventory.armorInventory.length; ++i) { if (this.creativeInventory.armorInventory[i] != null) { nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte) (i + 100)); this.creativeInventory.armorInventory[i].writeToNBT(nbttagcompound); creativeInventoryNBT.appendTag(nbttagcompound); } } compound.setTag(identifier, creativeInventoryNBT); } @Override public void loadNBTData(NBTTagCompound compound) { this.creativeInventory.mainInventory = new ItemStack[36]; this.creativeInventory.armorInventory = new ItemStack[4]; for (String key : (Set<String>) compound.getKeySet()) { System.out.println("Found tags: " + key + " tagtype: " + compound.getTagType(key)); } if (compound.hasKey(identifier)) { System.out.println("Found key " + identifier); } if (compound.hasKey(identifier, Constants.NBT.TAG_LIST)) { System.out.println("Found key " + identifier + " with type " + Constants.NBT.TAG_LIST); } NBTTagList tagList = compound.getTagList(identifier, Constants.NBT.TAG_LIST); if (tagList == null) { System.out.println("tagList is null!!!"); } System.out.println("tagList is type " + tagList.getTagType()); System.out.println("tagList has " + tagList.tagCount() + " entries"); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound itemStackNBT = tagList.getCompoundTagAt(i); int slot = itemStackNBT.getByte("Slot") & 255; ItemStack itemstack = ItemStack.loadItemStackFromNBT(itemStackNBT); if (itemstack != null) { if (slot >= 0 && slot < this.creativeInventory.mainInventory.length) { this.creativeInventory.mainInventory[slot] = itemstack; } if (slot >= 100 && slot < this.creativeInventory.armorInventory.length + 100) { this.creativeInventory.armorInventory[slot - 100] = itemstack; } } } } @Override public void init(Entity entity, World world) { } } Here is the output from the console: [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: HurtByTimestamp tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Spawns tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: SleepTimer tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Attributes tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Invulnerable tagtype: 1 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: PortalCooldown tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: AbsorptionAmount tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: abilities tagtype: 10 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: FallDistance tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: DeathTime tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: XpSeed tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: ExtraDimensionsSurvivalInventory tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: HealF tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: XpTotal tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: playerGameType tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: SelectedItem tagtype: 10 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Motion tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: UUIDLeast tagtype: 4 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Health tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: foodSaturationLevel tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Air tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: OnGround tagtype: 1 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Dimension tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Rotation tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: XpLevel tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Score tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: UUIDMost tagtype: 4 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Sleeping tagtype: 1 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Pos tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Fire tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: XpP tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: EnderItems tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: foodLevel tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: foodExhaustionLevel tagtype: 5 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: HurtTime tagtype: 2 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: SelectedItemSlot tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: ExtraDimensionsCreativeInventory tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: Inventory tagtype: 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:81]: Found tags: foodTickTimer tagtype: 3 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:85]: Found key ExtraDimensionsCreativeInventory [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:89]: Found key ExtraDimensionsCreativeInventory with type 9 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:98]: tagList is type 0 [10:46:21] [server thread/INFO] [sTDOUT]: [net.woogie.extraDimensions.ExtraDimensionsPlayerCreativeInventoryProperties:loadNBTData:99]: tagList has 0 entries Here is a screenshot of NBTExplorer taken just before starting Minecraft:
  6. Can anyone give me some pointers as to what is wrong with loadNBTData() in the following code? I can tell that saveNBTData() is saving the proper data by opening the player.dat file with NBTExplorer, however, tagList.tagCount() is always 0 in loadNBTData(), and I can't figure out what is wrong with the code. package net.woogie.extraDimensions; import java.util.Set; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.world.World; import net.minecraftforge.common.IExtendedEntityProperties; import net.minecraftforge.common.util.Constants; public class ExtraDimensionsPlayerCreativeInventoryProperties implements IExtendedEntityProperties { private final EntityPlayer player; private static final String identifier = "ExtraDimensionsCreativeInventory"; private InventoryPlayer creativeInventory; public ExtraDimensionsPlayerCreativeInventoryProperties(EntityPlayer player) { this.player = player; this.creativeInventory = new InventoryPlayer(player); } public static ExtraDimensionsPlayerCreativeInventoryProperties get(EntityPlayer player) { return (ExtraDimensionsPlayerCreativeInventoryProperties) player.getExtendedProperties(identifier); } public static void register(EntityPlayer player) { player.registerExtendedProperties(identifier, new ExtraDimensionsPlayerCreativeInventoryProperties(player)); } public void setCreativeInventory(InventoryPlayer inventory) { this.creativeInventory.clear(); for (int i = 0; i < inventory.getSizeInventory(); ++i) { ItemStack stack = inventory.getStackInSlot(i); this.creativeInventory.setInventorySlotContents(i, (stack == null ? null : stack.copy())); } } public InventoryPlayer getCreativeInventory() { return this.creativeInventory; } @Override public void saveNBTData(NBTTagCompound compound) { int i; NBTTagCompound nbttagcompound; NBTTagList creativeInventoryNBT = new NBTTagList(); for (i = 0; i < this.creativeInventory.mainInventory.length; ++i) { if (this.creativeInventory.mainInventory[i] != null) { nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte) i); this.creativeInventory.mainInventory[i].writeToNBT(nbttagcompound); creativeInventoryNBT.appendTag(nbttagcompound); } } for (i = 0; i < this.creativeInventory.armorInventory.length; ++i) { if (this.creativeInventory.armorInventory[i] != null) { nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte) (i + 100)); this.creativeInventory.armorInventory[i].writeToNBT(nbttagcompound); creativeInventoryNBT.appendTag(nbttagcompound); } } compound.setTag(identifier, creativeInventoryNBT); } @Override public void loadNBTData(NBTTagCompound compound) { this.creativeInventory.mainInventory = new ItemStack[36]; this.creativeInventory.armorInventory = new ItemStack[4]; NBTTagList tagList = compound.getTagList(identifier, Constants.NBT.TAG_COMPOUND); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound itemStackNBT = tagList.getCompoundTagAt(i); int slot = itemStackNBT.getByte("Slot") & 255; ItemStack itemstack = ItemStack.loadItemStackFromNBT(itemStackNBT); if (itemstack != null) { if (slot >= 0 && slot < this.creativeInventory.mainInventory.length) { this.creativeInventory.mainInventory[slot] = itemstack; } if (slot >= 100 && slot < this.creativeInventory.armorInventory.length + 100) { this.creativeInventory.armorInventory[slot - 100] = itemstack; } } } } @Override public void init(Entity entity, World world) { } } Thanks!
  7. https://github.com/worldwidewoogie/demomod demomod is my attempt at making mod that new modders can customize to quickly and easily get started with modding. The mod currently includes the following: A custom biome with custom ore generation A custom bush that grows in the custom biome which produces seeds for a food crop A custom ingot dropped by the ore A custom sword, bow, pickaxe, axe, hoe, and shovel A custom set of armor A custom hostile mob entity A custom tameable mob entity Preliminary instructions for getting the development environment set up are here: https://github.com/worldwidewoogie/demomod/blob/master/INSTALL.txt Once you have a working mod, you can build it with the following command on OSX/Linux: ./gradlew build or Windows: gradlew build demomod has been built and tested on both single player and multi player server. All the attributes of the mod can be changed by editing the following: https://github.com/worldwidewoogie/demomod/blob/master/src/main/java/net/woogie/demomod/Config.java https://github.com/worldwidewoogie/demomod/blob/master/src/main/resources/assets/demomod/lang/en_US.lang the texture files under https://github.com/worldwidewoogie/demomod/tree/master/src/main/resources/assets/demomod/textures
  8. I've fixed some issues and done more testing, so I created a new jar file: https://github.com/worldwidewoogie/extraDimensions/blob/master/releases/extraDimensions-0.99.0.jar
  9. I've just posted my first mod to GitHub: https://github.com/worldwidewoogie/extraDimensions It's not been thoroughly tested, so I'm sure there are bugs, but I'd appreciate any feedback. You can get the latest jar here: https://github.com/worldwidewoogie/extraDimensions/blob/master/releases/extraDimensions-0.0.2.jar Extra Dimensions Minecraft Mod Allows dynamic creation and deletion of dimensions via commands (restricted to ops in multiplayer). Adds the following commands: xdbiomes list all biomes supported by ExtraDimensions xdcreate <Dimension Name> <Biomes> <World Type> create a new ExtraDimension <Dimension Name> - required. String with no spaces <Biomes> - optional. Comma separated list of biome IDs without spaces <World Type> - optional. World type for new dimension: xdMultiBiome - ExtraDimensions Default BOP - Biomes O'Plenty (if installed) flat - Minecraft flat world default - Minecraft overworld largeBiomes - Minecraft large biomes (as used on Minecraft servers) amplified - Minecraft amplified default_1_1 - Minecraft xddelete <Dimension Name or ID> delete existing ExtraDimension <Dimension Name or ID> - required. Name or ID of dimension to delete xdlist <Dimension name or ID or '.'> list dimension information <Dimension name or ID or '.'> - optional. If included, list information for dimension name/ID. "." will list current dimension xdrename <Dimension Name or ID> <New Dimension Name> rename existing ExtraDimension <Dimension Name or ID> - required. Name or ID of dimension to rename <New Dimension Name> - required. New name for dimension xdtp <target player name> <destination player name> -or- xdtp <target player name> <destination dimension (name or ID)> <x> <y> <z> teleport to an ExtraDimensions <target player name> - optional. Player to teleport. If not specified will act on player who sent commands <destination player name> - required. Teleport to position of player, regarless of what dimensions <destination dimension (name or ID)> - required. ExtraDimension to teleport to. 0 or overworld will go to overworld <x> <y> <z> - optional. Position to teleport to
×
×
  • Create New...

Important Information

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