Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Mathew!

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Mathew!'s Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Small update, the mod is now on 1.7.10 That and a small insight into the dungeons :
  2. I like the idea of this mod, I will try it at some point.
  3. A small update the testing phase has now moved to 1.7.10, I am currently fixing the crystal render code, only a minor issue. Rendering issue is now fixed, all functionality has been restored. I plan to release the source code for the prior 1.6.4 code base, this would be for others to learn from, it is a mix of own code(rendering for custom stuff) and dissected vanilla code(had to make a fix for an issue with using block IDs above 255 on 1.6.x, 1.7.x uses block handles and hence the problem was fixed). Note : I will be releaseing the IVMC loader code when the feature set is complete but again if there is enough Interest I am willing to also share this. src @ https://github.com/mathew653/Underrealm/tree/1.6.4-prebuild/Prealpha/UnderRealm_src
  4. Hey, I am probably just being daft, but after porting some of my code I had made a section to access a variable now private in 1.7.10 but for some reason the boolean in this segment is always false, I managed to work out that it is something to do with this part of the code: int previousGLRenderType = 0; boolean FoundVar=false; //drawMode if (FoundVar == false) { try { Field f=Tessellator.instance.getClass().getDeclaredField("drawMode"); f.setAccessible(true); previousGLRenderType=f.getInt(Tessellator.instance.getClass()); FoundVar=true; } catch (Exception e) { FoundVar=false; } } //Build time var name field_78409_u - 1.7.10 if (FoundVar == false) { try { Field f=Tessellator.instance.getClass().getDeclaredField("field_78409_u"); f.setAccessible(true); previousGLRenderType=f.getInt(Tessellator.instance.getClass()); FoundVar=true; } catch (Exception e) { FoundVar=false; } } if (FoundVar == false) { System.out.println("[iVMC loader]Did not find drawMode var."); return false; } Again thanks to anyone whom can help.
  5. As it is a trendy thing to do I have setup a github repository and uploaded an early prealpha during this phase builds will target 1.6.4 and is advised to use mystcraft to access the new dimension as there is currently no means to otherwise get there for now items may also be accessed via the creative tab. You will need two mods in order to test the prealpha, but i do warn prealpha status will mean that there is not a full implementation and things should be excepted to be missing: IVMCLoader_prealpha_0001.jar UnderRealm_prealpha_0001.jar For those wondering why this mod is in two parts, the IVMC loader is a model loader at this time only one block uses it, but this will change as mobs and other blocks are created.
  6. The underrealm The underrealm is the spirit world what lies between, inhabited by the souls that nore demon or angel want, the place is a vague purgatory of infinite caves within the dark travelers can find many things, dangerous or revealing, gift or a curse. There are many features of this mod, some are : Implemented blocks and their functionality(spoilers for those who want to play blind) Some screenshots so far: And finally some test screenshots demonstrating various elements: Note : Test builds are being developed under 1.6.4 but the release builds will be 1.7.10, the code will be modeled in such a way that porting it to different client versions will be as easy as possible. Test builds are now on 1.7.10 23/10/2015 An insight to how one will enter the underrealm(WIP) I will update this post over time. Any feedback would be great!
  7. Hello, me and some friends have been trying out modded minecraft and my friends have encountered a rather bizarre bug, The text bugs out randomly when connected to the server. A screenshot of the problem can be seen here https://www.dropbox.com/s/8ws38dhod4ekmf7/IMG_27062014_033100.png Our server and client are setup as follows Mods Archimedes' Ships 1.4.5 autoutils 1.0.1 Chocolate quest 2.05 BiblioCraft 1.5.5 BiomesOPlenty 1.2.1.418 buildcraft 4.2.1 chisel 1.5.0 CoFHCore 2.0.0.0 CraftGuide 1.6.7.3 CraftingManager 0.1.4 CustomMobSpawner 2.3.1 DrZharks MoCreatures v6.1.0 Dyeable Cobblestone v210 MCA v3.5.4 Ruins 11.0 ThermalExpansion 3.0.0.0 TombStone 0.8.1 twilightforest 1.20.3 Server MCPC+ (forge 1.6.4-R2.1-forge965-B251) plugins Multiverse-Core-2.4 Multiverse-Portals-2.4 WorldBorder Anyone seen this before?
  8. Thanks that put me on the right track, I decided to use a tag I know would persist(the custom name tag). made the following tweaks in the code like this : if (this.Slave == null && this.SlaveName.equals("")) { this.Slave = EntityList.createEntityByName(this.SlaveID, this.getWorldObj()); double d0 = (double)this.xCoord + (this.getWorldObj().rand.nextDouble() - this.getWorldObj().rand.nextDouble()) * (double)this.spawnRange; double d3 = (double)(this.yCoord + this.getWorldObj().rand.nextInt(3) - 1); double d4 = (double)this.zCoord + (this.getWorldObj().rand.nextDouble() - this.getWorldObj().rand.nextDouble()) * (double)this.spawnRange; EntityLiving entityliving = this.Slave instanceof EntityLiving ? (EntityLiving)this.Slave : null; this.Slave.setLocationAndAngles(d0, d3, d4, this.getWorldObj().rand.nextFloat() * 360.0F, 0.0F); if (this.Slave.worldObj != null) { this.Slave.worldObj.spawnEntityInWorld(this.Slave); this.SlaveName = "123"; //this.Slave.getEntityData().setString("Enslaved", this.SlaveName); if (this.Slave instanceof EntityLiving) { EntityLiving LivingSlave=(EntityLiving)this.Slave; LivingSlave.setCustomNameTag(this.SlaveName); } } } if (this.Slave == null && !this.SlaveName.equals("")) { EntityPlayerMP player=(EntityPlayerMP)this.worldObj.playerEntities.get(0); player.addChatMessage("Searching for slave"); for (int i=0; i < Minecraft.getMinecraft().theWorld.loadedEntityList.size(); i++) { Entity ent=(Entity)Minecraft.getMinecraft().theWorld.loadedEntityList.get(i); //Compares the refrence not the string //if (ent.getUniqueID().toString() == this.SlaveName) /* //String comparision. String EnslavementTag=ent.getEntityData().getString("Enslaved"); //if (EnslavementTag.equals(this.SlaveName)) if (EnslavementTag.length() > 0) { player.addChatMessage("Found slave"); this.Slave=ent; } */ if (ent instanceof EntityLiving) { EntityLiving LivingEnt=(EntityLiving)ent; if (LivingEnt.getCustomNameTag().equals(this.SlaveName)) { player.addChatMessage("Found slave"); this.Slave=ent; } } } } Now that works and tells me that with a custom mob I would have to add in a special NBT tag but I am now wondering if I want to use this with a vanilla mob, how do i store data on it in places other then the name tag as that shows up when the player looks over it and would look pretty ugly to the player if i store a tracking ID there or such(using the entity's spawned X,Y,Z as a unique reference and/or simular).
  9. Hey there modders, I come from a background of coding in quite a few different coding/scripting languages I am not entirely familiar with java but my understanding of general code and oop concepts has helped me enough(that and dissecting the built in mojang code), unfortunately i have ran into a snag with a TileEntity behavior. The idea is that the tile entity spawns a mob and it will need to track this mob, so far I have gotten the TileEntity to spawn the mob and remember a value to track it with all will work fine unless, I reload the world, then it'll stick unable to find the entity, I first tried saving the entity's UUID assuming this may be a unique persistent value for the mob, later finding that i can store custom data on the enslaved entity's NBT table i switched to this thinking it was more flexible, still it would not play ball. I did splice some code from the mob base spawner logic but that was to save time when making it detect a player and spawn the mob, i will be adding more conditions once the basics are working(persisting tracking of the `enslaved` entity) Here is my implementation so far(Sorry it is a mess, it is prototype code and i usually tidy up after it all works): public class TileEntityRiftAlterEntity extends TileEntity { /** The delay to spawn. */ public int spawnDelay = 20; /** */ private int FixedTime = 20; /** The distance from which a player activates the spawner. */ private int activatingRangeFromPlayer = 16; /** The entity that is 'enslaved' to this alter */ private Entity Slave=null; /** Name to track enslaved entity by */ private String SlaveName=""; /** Slave object(PigZombie is temp) */ private String SlaveID = "PigZombie"; /** The range coefficient for spawning entities around. */ private int spawnRange = 4; /** * Returns true if there's a player close enough to this mob spawner to activate it. */ public boolean canRun() { return this.getWorldObj().getClosestPlayer((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D, (double)this.activatingRangeFromPlayer) != null; } /** * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count * ticks and creates a new spawn inside its implementation. */ public void updateEntity() { if (this.canRun() == true) { if (this.spawnDelay == -1) { this.spawnDelay=this.FixedTime; } if (this.spawnDelay > 0) { --this.spawnDelay; return; } if (this.getWorldObj().isRemote) { double d1 = (double)((float)this.xCoord + 0.5f); double d2 = (double)((float)this.yCoord + 0.6f); double d0 = (double)((float)this.zCoord + 0.5f); //this.getWorldObj().spawnParticle("smoke", d1, d2, d0, 0.0D, 0.0D, 0.0D); this.getWorldObj().spawnParticle("flame", d1, d2, d0, 0.0D, 0.0D, 0.0D); } else { //TODO : Slave detection is not perfect(persistence is not yet handled) if (this.Slave == null && this.SlaveName.equals("")) { this.Slave = EntityList.createEntityByName(this.SlaveID, this.getWorldObj()); double d0 = (double)this.xCoord + (this.getWorldObj().rand.nextDouble() - this.getWorldObj().rand.nextDouble()) * (double)this.spawnRange; double d3 = (double)(this.yCoord + this.getWorldObj().rand.nextInt(3) - 1); double d4 = (double)this.zCoord + (this.getWorldObj().rand.nextDouble() - this.getWorldObj().rand.nextDouble()) * (double)this.spawnRange; EntityLiving entityliving = this.Slave instanceof EntityLiving ? (EntityLiving)this.Slave : null; this.Slave.setLocationAndAngles(d0, d3, d4, this.getWorldObj().rand.nextFloat() * 360.0F, 0.0F); if (this.Slave.worldObj != null) { this.Slave.worldObj.spawnEntityInWorld(this.Slave); this.SlaveName = "123"; this.Slave.getEntityData().setString("Enslaved", this.SlaveName); } } if (this.Slave == null && !this.SlaveName.equals("")) { EntityPlayerMP player=(EntityPlayerMP)this.worldObj.playerEntities.get(0); player.addChatMessage("Searching for slave"); for (int i=0; i < Minecraft.getMinecraft().theWorld.loadedEntityList.size(); i++) { Entity ent=(Entity)Minecraft.getMinecraft().theWorld.loadedEntityList.get(i); //Compares the refrence not the string //if (ent.getUniqueID().toString() == this.SlaveName) //String comparision. String EnslavementTag=ent.getEntityData().getString("Enslaved"); //if (EnslavementTag.equals(this.SlaveName)) if (EnslavementTag.length() > 0) { player.addChatMessage("Found slave"); this.Slave=ent; } } } if (this.Slave != null) { if (!this.Slave.isEntityAlive()) { this.Slave=null; this.SlaveName=""; } } } } } public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.SlaveName=par1NBTTagCompound.getString("SlaveName"); } public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setString("SlaveName", this.SlaveName); } } Again I am sorry this code looks like a warzone.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.