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


  • Posts

  • Joined

  • Last visited


  • Gender
  • Location
    Ma House

SenpaiSubaraki's Achievements

Creeper Killer

Creeper Killer (4/8)



  1. if you're looking to change the model's rotation, you cannot. apart from that, try to use renderlayers. you can add those to vanilla renderers like the player, and they take their mainmodel as an argument. you could experiment with that.
  2. You may not be that advanced in coding, but that doesn't mean you need to resort to unreliable sources that tend to rather be poop. use the full force, use forge, try to look up an Item tutorial on youtube or the interwebs, learn about metadata for minecraft items. come back whenever with questions. good luck !
  3. a thing I did once to make an entity circle another entity, was spawn the first, immobile entity, that would rotate its view around every tick. rotationYawHead += 2f; then you can get the vector frow its view Vec3d vec = getVectorForRotation(0, rotationYawHead); and from that vector, you can get the x and z coordinates, + the position of the immobile entity to set the position of the rotating entity. myentity.setPosition(imobileEntity.x+vec.xcoord, [...] ); feel free to devide the vec.xcoord by 5 or any other number to adjust distance to the entity
  4. mod file : //preinit new AddButtonToGuiEvent(); //custom class public class AddButtonToGuiEvent{ public AddButtonToGuiEvent(){ MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onGuiEvent(TheEventIwantToUse event){ event.getbuttonlist.add(new guibutton(stuff,foo,bar,things); } } very rudamentary implementation. for example only.
  5. (I think the Hint to take here is to not make or update current outdated versions. people need to move on and code for the latest versions. people coding for older versions is why the modding community, (mostly the end users), has problems moving on.)
  6. You're not missing anything. There's no event for that ... yet ! I have made a PR for that. you could add a comment if you support it. it might make it trough ! https://github.com/MinecraftForge/MinecraftForge/pull/3334
  7. https://github.com/ArtixAllMighty/Rpg-Addon-BerserkMageArcher/tree/master/subaraki/BMA/capability you cannot go any simpler. I'm only storing two integers here, so the rest stays really basic. attach on attachcapabilityevent, and register with new MyDataCapability().register(); in the mod's preinit
  8. i think your opaque has to be true ? if i understand correctly, your block is a glass block and glass itself only has isFullCube set to false
  9. Once you have got the basics down for the Capability stuff, it is actually just really easy. As diesieben07 said, nbt is clunky and shouldn't be used for runtime storage. so yes, upgrading is the best option. some aid if needed : Read The Docs : Capabilities Good luck. It will be a chore, but in the end, the compatibilty with other mods, and ease of updating to latter versions will be easier !
  10. then the problem most likely isn't your tile entity. your tile entity looks really fine. i'm going to read trough the classes now. look 1: you most likely would want to do world.notifyblock as well when you are placing the block -2 most certainly after calling the readNbt to copy over the itemstack data. also, why are you reading the entire itemstack data ? I might be wrong here, but wouldn't it be better to append a tag to the stack tag so you write your entire TE to a nbttagcompound that you append to the stack tag compound ? if other mods, or even vanilla?, write data to the itemstack, stuff might get funky. short conclusion : you will want to call world.blocknotify whenever you make a change to the TE. you will want to do this server side. -when placing a block next to it -when changing RF by use of items -when sending a packet to the server (most of these are already done. just verify) the biggest problem about breaking block and re-placing it is most likely reading the nbt from the stack, and writing it to the stack. double check on those. do not know where the NPE is comming from, but you can trace it down with a break point on NPE exceptions (yes, that does exist). it is most likely comming from a packet error and something that has to do with threads ? "java.util.concurrent.ExecutionException, handleUpdateTileEntity, SPacketUpdateTileEntity.processPacket" unrelated : -you might want to rename some of your classes. Gui's start with the Gui prefix, so GuiMessageHandler would be inapropriate. PacketSyncServerTestBlock and PacketSyncServertestBlockHandler would be more appropriate. -BlockPos can be written to long, which can be written by ByteBufers, and BlockPos.fromLong(long) is also a thing. no need to explicetly write the coords out to the packet.
  11. if(ownerName.equals("UNIVERSAL") && !telepadname.equals("Universal Pad")){ this.telepadname = "Universal Pad"; } if(worldObj.isRemote){//client only AxisAlignedBB aabb = this.getRenderBoundingBox().copy().expand(-0.5, 0.5, -0.5); List<EntityPlayer> playerInAabb = worldObj.getEntitiesWithinAABB(EntityPlayer.class, aabb); if(isStandingOnPlatform){ if(playerInAabb.isEmpty() || !playerInAabb.contains(playerStandingOnPad)){ changePlatformState(false); } } for(EntityPlayer p : playerInAabb){ if(p!=null){ if(isStandingOnPlatform == false)//check to prevent packet from spamming changePlatformState(true); if(counter >=0) counter --; } if(counter <= 0){ if(p != null && Minecraft.getMinecraft().currentScreen == null){ if(p.inventory.hasItem(mod_telepads.padLocator.itemID)){ for(int i = 0; i < p.inventory.getSizeInventory(); i++){ if(p.inventory.getStackInSlot(i) != null && p.inventory.getStackInSlot(i).getItem() instanceof ItemPadLocations){ ItemStack stack = p.inventory.getStackInSlot(i);//the telepad register //for nitwits that put in a new list from creative or trough 'cheating' if(!stack.hasTagCompound()){ ResetAndNotify("Damn, that's not the right TelePad Register..."); break; }else{ if(p.username.equals(ownerName) || ownerName.equals("UNIVERSAL")){ allCoords = new ArrayList<int[]>(); allNames = new ArrayList<String>(); allDims = new ArrayList<Integer>(); int size = stack.getTagCompound().getInteger(ItemPadLocations.SIZE); for(int c =0; c < size; c++){ int[] ray = new int[3]; ray[0] = stack.getTagCompound().getIntArray(ItemPadLocations.LOCATION_+c)[0]; ray[1] = stack.getTagCompound().getIntArray(ItemPadLocations.LOCATION_+c)[1]; ray[2] = stack.getTagCompound().getIntArray(ItemPadLocations.LOCATION_+c)[2]; String padName = stack.getTagCompound().getString("TelePadName_"+c); int dim = stack.getTagCompound().getInteger(ItemPadLocations.DIM_+c); allCoords.add(ray); allNames.add(padName); allDims.add(dim); } setRegisterToPad(stack); // setMCGuiSettingToRegister(stack); stack.getTagCompound().setInteger("originalGUIScale", Minecraft.getMinecraft().gameSettings.guiScale); // ... and open gui //SEND a packet to open gui. openng a gui client side only will result in all players //having the gui open on LAN. //p.openGui(mod_telepads.instance, 0, worldObj, xCoord, yCoord, zCoord); //FMLNetworkHandler.openGui(p, mod_telepads.instance, 0, worldObj, xCoord, yCoord, zCoord); updatePlayerInPad(p.username, 0); // playerNameOnPad = p.username; // CanTeleportNow = true; break; }else{ ResetAndNotify("Oops, this is not my TelePad."); break; } } } } }else{ if(p.username.equals(ownerName)) updatePlayerInPad(p.username ,2); //p.openGui(mod_telepads.instance, 2, worldObj, xCoord, yCoord, zCoord); ResetAndNotify("Damn, I forgot my TelePad Register..."); break; } } } } } } getRenderBoundingBox is client side only.
  12. as stated above, i use it to detect with AABB if a player is standing on the block. without using AABB, I can't check for the player, and I don't have a player to open a gui. unless i can check for the player differently.
  13. SO, I'm going to break it down without code, fast and easy. I'm using an AABB to detect the player standing on my block (AABB is client side only) The tile entity from the block starts a counter and when it reaches 0 it opens a gui. On LAN however, this gui is opened for all players because (i think) it is done client side only (i dont have that when i use like right click on a block to open it, which is both sides) if i send a packet to the server to open the gui, the screen wont show, because it's not send client side. Anyone got any advice ? Or needs more info ? Thank you very much; Subaraki
  14. So, i made a mod with a keyhandler. I'd like to point out that everything is working fine up to here. But how do I make a childmod use the same keybinds ? whenever i register a new keybinding with the same keys (even if that key is a static field, common to both keyhandlers), vanilla minecraft registers it twice, creating a conflict. here's a picture : (with 2childmods) i'd apreciate any help. thank you very much
  15. that worked ! now i seem to have problems with crouching and some size stuff, but i'll fix that myself. its not that hard thank you very much coolAlias !!
  • Create New...

Important Information

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