Jump to content

brandon3055

Forge Modder
  • Posts

    444
  • Joined

  • Last visited

Everything posted by brandon3055

  1. Override "isBeaconBase" in the block class and return true. This is very simple and only took me 30 seconds to find out for you so in the future i suggest you do some research and see what methods are available before you ask for help.
  2. Not true you can place renstone on a top slab (slab that is placed in the top half of the block space) Im not sure how vanilla dose it but you may be able to make it work by overriding "isSideSolid" and returning true if side = up and the block is the top slab version.
  3. you can find the redstone flux api for 1.7.2 here https://github.com/CoFH
  4. you are not setting the creative tab so it is in game you just cant get it (unless you use the give command)
  5. I keep finding more and more reasons to switch to Intellij... Good thing i already did
  6. Ok so i understood most of what you just said and a lot of it i already knew from the java tutorials i have read. It seems to me from everything you have told me the Redstone flux api isnt like most apis its just a universal energy system that mods can implement in order to be compatible with each other.
  7. maby im confused because the redstone flux api isnt specifically designed to allow mods to interact with Thermal Expansion it allows any mod to interact with any other mod using the api even if there are no cofh mods installed. I guess i will just have to do some research and try to wrap my head around it starting with the links you provided. Edit: What do you mean by "building" I am i am implementing the apis interfaces I am using is as the power system for my mod and it dose not in any way dependent on any other mod but it wont function without the api so i am dependent on the api itself not the mod it belongs to.
  8. Ok i must ask is an interface considered an api? because the redstone flux api dosnt contain any methods just a set of interfaces. Edit: i just realized that was a stupid question "Application Programming Interface"
  9. maby im missing something but all of the mods i have looked at include the apis they use e.g. Extra utills uses the the cofh energy api and the api is included in the extra utills jar. Also not including the api would make your mod dependent on the mod it belongs wouldn't it?
  10. Actually all you have to do is update the block when you want the texture to change using worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); Just make sure you are also synchronising the client tile data with the server using @Override public Packet getDescriptionPacket() { NBTTagCompound tagCompound = new NBTTagCompound(); this.writeToNBT(tagCompound); return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tagCompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); }
  11. you seem to be missing a chunk of the log. I may be mistaken but most of that looks like errors that are unrelated to the crash.
  12. Hmm......... notice that "stack" that is given to you by the method? that is the itemstack that the player right clicked so you can just use stack.getItem().equals(new ItemStack(Cm.sigilGiarcOff)) Or better yet get rid of sigilGiarcOff and sigilGiarcOn and use the damage value to determine if it is on or off. Edit: Disregard the first part of this post i was confused because you are using 3 separate items when you only need 1. Edit2: Oh and the reason its not doing anything as it is is because the item you are using is SigilGiarc but the two items you are checking for are sigilGiarcOff and sigilGiarcOn. Edit3: And one last thing the players hotbar slots are 0-8 not 1-9.
  13. override onNeighborBlockChange and check if the 6 blocks around it are air and if so destroy the block and drop it as an item
  14. go here https://github.com/CoFH/RedstoneFlux-API download the zip and extract it.
  15. another option is to make your own tool material which essentially dose the same thing except it also allows you to set the damage, enchantability and if you also want to use it for tools mining level and mining speed. To create a custom tool material use the following. public static ToolMaterial MY_MATERIAL= EnumHelper.addToolMaterial("MY_MATERIAL", 4, -1, 12.0F, 11.0F, 35); //("Name", Mining level, durability, mining speed, attack damage, enchantability)
  16. Nope... I got nothing will have to let the professionals help you out with this one.
  17. aren't api classes supposed to be included in your mod?
  18. in src/main/java add cofh/api i am currently using the redstone flux api so i have src/main/java/cofh/api/energy and in energy i have all of the api classes
  19. You dont have to wait i think what diesieben07 was saying is you just have to create a custom item that places a vanilla mob spawner of the type you want. e.g. @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { world.setBlock(x, y+1, z, Blocks.mob_spawner); TileEntityMobSpawner spawner = (TileEntityMobSpawner)world.getTileEntity(x, y+1, z); spawner.func_145881_a().setEntityName("Zombie"); player.inventory.consumeInventoryItem(player.getCurrentEquippedItem().getItem()); return true; } That will place a spawner above the block you click set its type to Zombie then consume the item.
  20. there are a couple of ways but one is to set up an event handler and use something like this. @SubscribeEvent public void onLivingUpdateEvent(LivingUpdateEvent event) { if (event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.entity; ItemStack heldItem = player.getHeldItem(); if (heldItem != null && heldItem.isItemEqual(new ItemStack(Items.arrow))) { System.out.println("True"); } } }
  21. normal blocks dont have any additional data that needs to be synchronized...
  22. sorry ether my Internet or the forum stopped working half way through my post.
  23. Try the following List<Entity> entities = mc.theWorld.getEntitiesWithinAABBExcludingEntity(mc.thePlayer, mc.thePlayer.boundingBox.expand(19.0D, 19.0D, 19.0D), EntityGrunt.mobSelector); Entity entity; boolean foundTarget = false; Iterator<EntityLiving> i = entities.iterator(); while(i.hasNext()){ entity = (Entity)i.next(); if(entity instanceof EntityGrunt){ foundTarget = true; } //break; <-- Why did you have this? } if(foundTarget) { mc.thePlayer.addChatComponentMessage(new ChatComponentText("ON")); }else { mc.thePlayer.addChatComponentMessage(new ChatComponentText("OFF")); }
  24. you need to create and register an event handler for your mod and then you can use the following in said event handler. @SubscribeEvent public void loginEvent(EntityJoinWorldEvent event){ if (event.entity instanceof EntityPlayer && event.world.isRemote) ((EntityPlayer)event.entity).addChatComponentMessage(new ChatComponentText("Welcome to the world!!!!")); } if you dont know how to setup an event handler i can give you instructions.
×
×
  • Create New...

Important Information

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