
Wicked1
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by Wicked1
-
I made a Dimension (or two), and they look ok. If you hang out, the day cycles to night and back to day just fine as time passes. If you try to use a bed to sleep to the next day, it will let you sleep - dims and fades and waits... and then you wake up. But it is still dark. If you then warp back to Overworld and sleep the overworld turns to day just fine. Quick warp back to Dimension and its day (the bed in Overworld works the cycle for both). Doing a command ~ Time Set 0 ~ will change the time in both worlds. How do I get the beds to work in my Dimension? I tried forcing some overrides in my WorldProvider, worth a shot, but no joy. public class DimensionProv extends WorldProvider{ @Override public String getDimensionName() { return "Bimbieville"; } @Override public double getMovementFactor() { return 4.0; } @Override public boolean canRespawnHere() { return true; } @Override public boolean isSurfaceWorld() { return true; } public boolean isHellWorld = false; @Override public int getRespawnDimension(EntityPlayerMP player){ return modinfo.DimensoinID +1 ; } I very much doubted pulling the boolean IsHell would help, but I was running out of ideas. I tried tracking something called UpdateAllPlayersSleeping laying around a few classes in Minecraft, but got lost as to where I could do something about that
-
[1.7.2] Teleporting to where your cursor is at?
Wicked1 replied to MegaGEN50's topic in Modder Support
using the CoolAlias ~shoot something there & tp~ way you could (like a bow) fire a ghosty hi-speed-fwoosh modelBiped across to where you look and then tp when it collides ... I'd think that would be a cool effect -
I had a similar situation when doing colored stairs.. I could meta the color, OR the facing, and I didnt want to TE because a ton of them would be in a chunk or 2 when building a castle / player home town. I cheesed out and went with vanilla stairs meta for a bunch of colored stairblocks. (I am using meta subtypes for my ore blocks, and again for some deco blocks, so I feel a little better about trying not to make a gajllion blocks) Good to hear the reminder about CanUpdate() will definitely put that to use later... may even rethink my colored stairs configuration with that in mind- Maybe a couple hundred dataTE wont lag so bad if they get no ticks
-
public class RedstoneClothItem extends ItemBlock idk if this is related to the names problem, but shouldnt that be ItemBlockWithMetadata for the subtyping of the items? I was having issues with block subtypes not long ago and after reading a CoolAlias post elsewhere about IBWMD a bunch of my problems cleared up with proper metadata passing between Block form and Item form of the thing maybe this will help, maybe not but it sounds like you are having Subtype issues (name in particular) and the IBWMD helps take care of meta/subtype issues
-
[Solved] [1.7.2] Custom Recipes For Custom Furnace
Wicked1 replied to tiffit's topic in Modder Support
@Override public int computeHashCode(ItemStack stack) { // not the most efficient hashCode probably int result = stack.getItem().hashCode(); result = 31 * result + stack.getItemDamage(); return result; } Why the 31x in the packing? I would have figured a bitshift to pack the two values, which would be a 2power multiplier, but with that 31 you have the low 5 bits all set, but followed with a + instead of an AND to pack.... also, while block Metadata has the 16 limit, cant Items have far more 'damage' subtypes than would fit in a 31x& pack? I am not using the code, I just want to understand it better. If you just picked 31x cause it looked good, ok, I can live with that, but I am wondering if there is some reason, some significance to using 31x that I am missing -
onBlockActivated opengui i got tilenentity = null
Wicked1 replied to KururuLABO's topic in Modder Support
Just had a similar problem with Null TE in guihandler. I did register the TE, I did set MyTE as the block te, but I didnt set the blocks HasTileEntity... once I told the block HasTileEntity the nulls stopped for me -
Got my No-Portal DIMtp working with a stripped tiny "Extends Teleporter" subclass in my block class.... using OnActivated() for my code atm, but will change that to the onWalkedOn() trigger probably. Cutting out all the portal stuff got it to work good, only features are a single block get to get the new dimension to gen the destination chunk PRIOR to calling the transfer, and the CoolAlias/CJCutrone9 code for the transfer and post-elevation-fix. Dont have to worry about slow world gens anymore if(pWorld.isRemote) return false; if (pEPlayer instanceof EntityPlayerMP) { EntityPlayerMP EMPlayer = (EntityPlayerMP) pEPlayer; int goDim = (pEPlayer.dimension == 0)? modinfo.DimensoinID : 0; WorldServer ws = EMPlayer.mcServer.worldServerForDimension(goDim); Teleporter telep = new Teleporto(ws);//ws.getDefaultTeleporter(); if (goDim != 0) { // dummy grab a block to maybe gen destination Dim chunk aj.ajOut("++BimBug+++ DimTP: grabbed world block- " // aj.out() is my simple console println +ws.getBlock( (int)EMPlayer.posX, 4, (int)EMPlayer.posZ).getUnlocalizedName() ); } EMPlayer.mcServer.getConfigurationManager().transferPlayerToDimension( EMPlayer, goDim, telep); // CoolAlias - CJCutrone9 forum post code +++++++++++ //get the height value so you don't get stuck in solid blocks or worse, in the void double dy = EMPlayer.worldObj.getHeightValue( MathHelper.floor_double(EMPlayer.posX), MathHelper.floor_double(EMPlayer.posZ)); // still seem to need to set the position, +1 so you don't get in the void EMPlayer.setPositionAndUpdate(EMPlayer.posX, dy + 1, EMPlayer.posZ); // ++++++++++++++++++++++++++++++++++++++++++++++++++ } return true; } //================================================= //======== subclass inside myblock file====== public class Teleporto extends Teleporter{ private final WorldServer worldServerInstance; public Teleporto(WorldServer par1WorldServer) { super(par1WorldServer); this.worldServerInstance = par1WorldServer; } @Override public void placeInPortal(Entity pEntity, double p2, double p3, double p4, float p5) { int i = MathHelper.floor_double(pEntity.posX); int j = MathHelper.floor_double(pEntity.posY); int k = MathHelper.floor_double(pEntity.posZ); this.worldServerInstance.getBlock(i, j, k); //dummy load to maybe gen chunk int height = this.worldServerInstance.getHeightValue(i, k); pEntity.setPosition( i, height, k ); return; } // dont do ANY portal junk, just grab a dummy block then SHOVE the player setPosition() at height } [code]
-
using the CoolAlias code, when the generation takes too long I still end up in the nether, because I still have that Nether Portal being built around me as the gen churns
-
ohhh, I like that goal.... Once my mod gets 1000 dl, then I will pursue the FORGE MODDER title. Until then, arent we really just FORGE HOBBYIST. I can live without status symbols till then. As for the SubForum.. isnt that really just a matter of how much traffic is going on in your existing thread.
-
Think of it this way- STACKS get damaged & repaired, not items. so you want to add info to the stack inside AddInfo(), not the item of the class.
-
wasnt there another example though... at bottom page1 of http://www.minecraftforge.net/forum/index.php/topic,15403.msg81874.html#msg81874 Noppes did an alternative to the DynamicClassPacket netty handler in the Tutorials . I am not running it, I'm doing the NettyTut dynamic class, but the alternative from Noppes looks like the old way jazzed up for 17x
-
[1.7.2]what to use instead of onInventoryChanged() method
Wicked1 replied to WH-Reaper's topic in Modder Support
Tried MarkDirty() my TE Inv works and its hard to argue with success -
if you are concerned about the OBJ format, I had problems until I stopped it from exporting Material info. The UVs are ok, but not Material info lines in the file. My OBJs load ok with V VT VN S off F types of lines
-
[1.7.2]what to use instead of onInventoryChanged() method
Wicked1 replied to WH-Reaper's topic in Modder Support
I too wonder what to use. I was following a tutorial ( curse:MrrGingerNinja TE inv) and onInventoryChange() was called to commit the stuff done in 2 of the required TE IInv methods. ex derived from tut: @Override public void setInventorySlotContents(int pSlot, ItemStack pStack) { inventory[pSlot] = pStack; if(pStack != null && pStack.stackSize > getInventoryStackLimit()) { pStack.stackSize = getInventoryStackLimit(); } onInventoryChanged(); } it seems like it is just committing the change, and the choices of remaining talk about chunkloading and refreshing from read etc (I want to commit, not read) MarkDirty sounded like it will do stuff at some later point beyond this control ... no, Commit Now! whats the way other folks are committing setInventorySlotContents() TE IInv changes now, if not onInventoryChanged()? -
[1.7.2]Sending a packet to the server with the new netty system
Wicked1 replied to Miclebrick's topic in Modder Support
Forge rookie here- I am going to use the NOPPES basic netty approach first. The dynamic packet way is just a bit of information overload, and I would rather use a basic method for a mod or 2 (or many) to get a real understanding of what its doing and why it does it.... I want to LEARN netty, not just use it. Then, later when I have a fancy mod doing a lot of stuff with a bunch of packets, once I understand Nopes basic netty I can tackle the fancy Wiki-Sirgingalot advanced netty thats just my 2cents The Noppes basic netty is a smaller lesson to learn, I avoid InfoOverload Mindfry from having to learn all this 172 stuff at once to get my mod up from 164 -
I just added lore to my SubType by damage item class.. I have 3 subitems on that ID atm. I chose to use a single LoreLib static library to keep all the lore centralized and easy for config file to deal with later. in the subtyped item I added the method for addInformation(,,,) but then immediately just passed it along to my library to actually process public void addInformation(ItemStack pStack, EntityPlayer pPlayer, List pList, boolean pBool) { LoreLib.getLore( pStack, pList); } and the LoreLib class with teh actual strings public class LoreLib { public static void getLore( ItemStack pStack, List pList){ int thing = pStack.itemID; int subtype = pStack.getItemDamage(); String stx = ""; if ( thing == Itemz.bimBows.itemID){ switch (subtype){ case 0: stx = "Lore for BimBows-0: First of the metabows"; break; case 1: stx = "Lore for BimBows-1: Second of the metabows"; break; case 2: stx = "Lore for BimBows-2: Third of the metabows"; break; default: } } pList.add(stx); return; } I'm not saying this is any better, but its another way to do it if you're into this kind of thing. I would have liked to use another SWITCH on the ItemID, but it wasnt cooperating. I might be consolidating the text to strings so I will be able to load them from config file. Also, I havent vandal proofed it yet with null checks and whatnot
-
ty for the reply well, Like I said in post1, timing is everything.. seems when I found nothing when I started looking wednesday is because a beautiful series of 1.62 tuts at curse were posted later that day. Had I taken my vacation just 1 day later I could have avoided days of frustration by finding them within the first 3 places I looked heh even the basic headery type stuff of a empty mod was confusing... @Preinit and eventhandler and such made old tuts a harder learning curve when you type verbatim and error out... while some recent help assumes you already know what a @Preinit is and where it goes in order to replace it with Eventhandler re Java I did write an unpublished SSP mod last year using Modloader, but my friend said to get into Forge this time.. and it does seem like the right choice. I had made an item with a texture, and coded it to giu input upto 1k of text music notation MML into the NBT, and parse that MML into a midi object complete with GM midi instrument selection.. then next use play that midi song on the clavichord or violin or distorted guitar or slapbass... whatever the player put for instrument patch. The curse forum was VERY helpful for a programmer of other languages to figure out java syntax / conventions, lots of links to java tuts/examples
-
Vacation frustration: take 10 days off work in July to spend that vacation to learn Forge... just to find the day my vacation started was a new build release and many tutorials, vids, and examples are out of date. Are all of them obsoleted? IDK, but as a newb I have noticed a lot of help materials I have found just dont work when I type it in 162b789. I mention the build because I got Forge at night and couldnt get it to install, whilst my friend got it in the morning and it installed... seems I got the 'recommended' b784 which couldnt finish doing its DLs while my friend got 'latest' b789. Even vids/tuts posted as late as this week ( called 'current' ) dont work / have depreciated calls. Its frustrating I do not blame the team for new versions, making new stuff is what they are supposed to do. I do not blame the community for not having tutorials up to date when the release was the day before I got here. Nor am i whining / begging / demanding help. I am sharing my frustration at an astonishingly poorly timed vacation. I get the feeling this would have been a non-problem if I took vacation in late August instead, that folks would have had the time to post more up to date help materials and the code settle down So Should I just ignore 1.6 and try to learn 1.52 off the help materials for that version tier, or should I do the begging in the support forum that I would rather avoid ?