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

Acrogenous

Members
  • Posts

    28
  • Joined

  • Last visited

Acrogenous's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. so I created a "makeBook" method that adds a written book with information in it to a players inventory; public static void makeBook(EntityPlayer player, String title, String author,String... pages) { NBTTagList pagesTag = new NBTTagList(); NBTTagCompound compound = new NBTTagCompound(); compound.setString("author",author); compound.setString("title",title); for(int i = 0; i < pages.length; ) { pagesTag.appendTag(new NBTTagString(pages[i])); i++; } compound.setTag("pages",pagesTag); ItemStack book = new ItemStack(Items.WRITTEN_BOOK); book.setTagCompound(compound); player.addItemStackToInventory(book); } and then I pass this line of code in another class: makeBook(player,"title","author","CHAPTER 1 In this world, all around us there is a force"); and no matter if I add \n or any other thing like that the book always looks like this (the title and author work however) any ideas how I make it A; display all the text and B; format it thanks in advance ~Acro
  2. thank you @Choonster it wasn't being activated, and fair point @jabelar it was not printing anything, that's what I meant to say, I probably didn't word it correctly thank you all that helped!
  3. Nope, didn't work, I didn't think it had anything to do with the itemstack (otherwise the latter statement wouldn't work either) public boolean onBlockActivated(World world, BlockPos blockpos, IBlockState p_onBlockActivated_3_, EntityPlayer player, EnumHand hand, EnumFacing p_onBlockActivated_6_, float p_onBlockActivated_7_, float p_onBlockActivated_8_, float p_onBlockActivated_9_) { if(player.getHeldItem(hand) != ItemStack.EMPTY) { ItemStack stack = player.getHeldItem(hand); if (stack.hasTagCompound() && stack.getItem() == ModItems.logiCard && player.isSneaking() ) { NBTTagCompound card = stack.getTagCompound(); card.setInteger("xpos", blockpos.getX()); card.setInteger("ypos", blockpos.getY()); card.setInteger("zpos", blockpos.getZ()); } if (stack.hasTagCompound() && stack.getItem() == ModItems.logiCard && !player.isSneaking()) { direction(stack, player, world, blockpos); } } return super.onBlockActivated(world, blockpos, p_onBlockActivated_3_,player,hand, p_onBlockActivated_6_, p_onBlockActivated_7_, p_onBlockActivated_8_, p_onBlockActivated_9_); }
  4. I tried that, from that I gauged that it was the actual ifSneaking() statment that wasn't working
  5. so are we reckoning isSneaking() isn't working because I haven't checked if the ItemStack is null?
  6. I have legitimately simplified this code as much as possible to see if this was a parenthesis error, but to no avail @Override public boolean onBlockActivated(World world, BlockPos blockpos, IBlockState p_onBlockActivated_3_, EntityPlayer player, EnumHand hand, EnumFacing p_onBlockActivated_6_, float p_onBlockActivated_7_, float p_onBlockActivated_8_, float p_onBlockActivated_9_) { ItemStack stack = player.getHeldItem(hand); if (stack.hasTagCompound() && stack.getItem() == ModItems.logiCard && player.isSneaking()) { NBTTagCompound card = stack.getTagCompound(); card.setInteger("xpos", blockpos.getX()); card.setInteger("ypos", blockpos.getY()); card.setInteger("zpos", blockpos.getZ()); } if (stack.hasTagCompound() && stack.getItem() == ModItems.logiCard && !player.isSneaking()) { direction(stack, player, world, blockpos); } return super.onBlockActivated(world, blockpos, p_onBlockActivated_3_,player,hand, p_onBlockActivated_6_, p_onBlockActivated_7_, p_onBlockActivated_8_, p_onBlockActivated_9_); } it is fine with detecting if the player is not sneaking, but it does absolutely nothing when the player is sneaking (there is already a compound tag on the item i am using, this was created originally but the code is greatly simplified, as said above) . A further point is when I invert the statements still only the !isSneaking works. thanks in advance ~Acro
  7. Ah, I thought that only applied to TextComponent! Thank you all!
  8. this isn't the lang file this is Lore.add(1,"§2Bound Entropy: "+String.valueOf(a.getTagCompound().getInteger("entropy"))); how would you suggest to go about using string interpolation to achieve the same result? (I am not particularly familiar with interpolation)
  9. On the lore of one of my Items there is this string: but in minecraft it is displayed with what I believe is an Å at the start of it: any idea to how I remove this rogue character but keep the formatting? Thanks in advanced
  10. So Im making a tas ticksaver for minecraft speedrunning. its meant to "record" the players position every tick and play back at the same speed but for some reason, on timing it, it appears to play back twice as fast? public void onUpdate(ItemStack p_onUpdate_1_, World world, Entity player, int p_onUpdate_4_, boolean p_onUpdate_5_) { i++; if(this.startRec) { loc.add(player.getPosition()); pitch.add(player.rotationPitch); yaw.add(player.rotationYaw); } if(this.startPlay) { if(i <= loc.size()) { player.setNoGravity(true); System.out.println(i); //player.setPositionAndRotation(loc.get(i-1).getX(),loc.get(i-1).getY(),loc.get(i-1).getZ(),yaw.get(i-1),pitch.get(i-1)); player.moveToBlockPosAndAngles(loc.get(i-1),yaw.get(i-1),pitch.get(i-1)); player.setPositionAndUpdate(player.posX,player.posY,player.posZ); //this is to make textures load } else { this.startPlay = false; player.setNoGravity(false); } } super.onUpdate(p_onUpdate_1_, world, player, p_onUpdate_4_, p_onUpdate_5_); } thanks in advanced
  11. So, Thaumcraft stops being maintained for perfectly acceptable reasons and then, a previous addon becomes standalone and takes the reigns! much like my previous addon Greater Druidry this is the first addon for this specific mod. This was a test mainly to see if I could work on the LT api and see if I could add some of the Thaumic Tinkerer stuff we all knew and loved, albeit in a slightly different fashion (I'm no Vazkii xD) so far we have: Ichor, Ichorium and Ichorcloth your favorite OTT end game items Ichorium Pickaxe you can mine normally, really fast, or if you right click (or shift-right click to reverse) you can modify its AOE effect and then if you shift-left click you can mine in an area, really fast. To reduce the tears from server owners when 1331 block's become entities (yes, the maximum is 11x11x11) it only mines stone (all variants) and gives you the equivalent amount of cobblestone, so no more rogue stacks of granite for you. RESULT! Ichorium Sword WIP but still Owch Ethereal Ladder Block (from Ethereal Platform) very simply, you right click it, your now on top of it. Black Hole Charm (from Black Hole Talisman (I Think)) when it is on (It has the enchantment effect activated by right click deactivated by shift-right click) it absorbs all entities within a 15 block radius. As an added bonus it converts every stack of cobblestone in your inventory into an Ultra Dense Gem, which can be simply uncrafted) Ichorcloth Strapped Ichorium Capped Silverwood Wand (and all the components) It's an OP wand. Sceptres (Freezing, Dislocation and Uprising) Wand Foci did not exist in thaumcraft 2. here's my equivilant. Sceptres. they all have 200 durability Freezing: Everything that doesn't jump, doesn't move. (in a radius) Dislocation: you were here, now your there. Uprising: ZOOOM! (like sword of the Zephyr, but spamable) XP Charm (from XP Talisman) It stores XP. Go figure Ichorcloth Armour It's OP. Boots work like the Uprising Sceptre but infinitely. leggings make you run fast, chest allows you to fly and helmet gives you night vision and saturation. More stuff will be added as more stuff is added to Lost Thaumaturgy and like Pengu, I plan on adding more unusual stuff myself Unless it is in fact to do with Lost Thaumaturgy don't complain to Pengu. These mods are very separate entities. (and same vice versa) Suggestions in the comments, Complaints to Github. Feedback is much appreciated It would also be very appreciated if someone could make me a better logo, thanks. Also please could some people submit translations on github? DOWNLOAD LINK you could also subscribe to my youtube. I explain my mods when I get the chance and do awesome speedruns
  12. thank you Draco18s; I know for loops are a thing, but don't both my method and your method have roughly the same amount of characters? I can see it is neater however so I will try and use this in the future. I wasn't aware of negative variables (Java isn't my main language but it probably exists in other languages I've just never known) this is my problem, thanks I didn't know this, it would make the code neater. My code isn't generally neat, (which are effectively points 1 and 3 here) and I will try and work on this aspect, so thanks for the advice!
  13. public boolean onBlockDestroyed(ItemStack p_onBlockDestroyed_1_, World world, IBlockState blockstate, BlockPos block, EntityLivingBase player) { if(player.isSneaking()) { int x = 0-aoe; int y = 0-aoe; int z = 0-aoe; while(z != aoe) { while(y != aoe) { while(x != aoe) { if(world.getBlockState(new BlockPos(x,y,z)).getBlock()== Blocks.STONE) { world.destroyBlock(new BlockPos(block.getX() +x, block.getY() +y, block.getZ() +z), true); } x++; } x= 0-aoe; y++; } y= 0-aoe; z++; } } return super.onBlockDestroyed(p_onBlockDestroyed_1_, world, blockstate, block, player); } so when you shift mine something it is suppose to mine all blocks around it in "aoe" radius, there are 2 problems however; 1 it still mines things that aren't stone and 2 it doesn't mine all the stone, thanks in advanced.
×
×
  • Create New...

Important Information

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