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

Terrails

Members
  • Posts

    186
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Terrails

  1. There's an issue on this matter already. We're just waiting for someone to make a PR for it. It will probably take some time since it needs quite a bit of patches.
  2. META-INF file is used for ATs, doesn't have to do anything with Maven. If you're using IntelliJ just add the .jar files to the libs folder and it will work, you will probably have to refresh gradle by using that button in gradle module, If you're using Eclipse you have to add something to your gradle.build file for it to work dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) // For all .jar files in folder compile files('libs/file_name.jar') // For one .jar file in folder } The mod will be ran with the client too, adding it again to the mods folder will just cause a duplicate mods error. NOTE: Make sure to use deobfuscated jar files.
  3. If you use @EventBusSubscriber you have to make the event method static
  4. What even... 1. your modid is "fm" out of the sudden now? Don't use a short modid like that, use "fishoverload" like you used before. 2. Your whole assets folder is a mess. The json is pointing at something entirely different. Why is "assets:" inside the resource location, you should only use the modid as the resource domain, in your case "fishoverload:texture_location", and lastly you're missing the texture.
  5. I'm guessing its the json, since its missing a bracket at the start and the end
  6. Your file is fishoverload:models/item/FishBowl.json With that we have problematic code #13 The name is wrong and its not lower case. It has to be like the exception says Caused by: java.io.FileNotFoundException: fishoverload:models/item/fish_bowl.json
  7. I meant when you override a method for your custom block/item... some of them have World as parameter
  8. using Minecraft will only work on client, you'll crash when you run a dedicated server... you should probably use world instance from the parameters of a method in case of Block/Item, Events.... and from the class in case of TileEntity... etc. Look at sides for more info
  9. To see if the server is dedicated or integrated just use MinecraftServer#isDedicatedServer... for LAN world I think maybe checking if the server is integrated and MinecraftServer#getPlayerList has 2 or more players. I think you will have to use packets to do something on the client for the change dimension and respawn events. For checking the minecraft version use ForgeVersion.mcVersion (I use that but you can also use MinecraftForge.MC_VERSION or Loader.MC_VERSION since it connects to the same thing)
  10. You should learn more about sides... for example you're using server side in onBlockAdded for TileEntityPlasmaCannon#getstate which means that data isn't stored on the client, if you need it on the client you have to send a packet to the client or just get rid of if (!worldIn.isRemote) and make TileEntityPlasmaCannon#getstate be started on both sides. You're also updating the TileEntityPlasmaCannon.powerfactor on server side only... thats why there's nothing on client side (its always 0)... also you're just making your code 4 times bigger because you're not using I know this is gonna be kind of annoying but you should learn more java... trust me I've been where you are now 2 years ago but now I'm a lot better.
  11. its something with your fireplasma method then... need a crash report. Tile gets created together with the block. what you’re doing with World#getTileEntity is just getting the tile entity that is on that pos
  12. You're not calling this method anywhere. The tile wasn't even registered, also you should probably update forge since that GameRegistry#registerTileEntity method was deprecated... you should use the one with ResourceLocation parameter instead of string... or just make the string be like this "modid:tilename"
  13. it will not crash the game... you're just getting the tile from that location, the tile was already created before onBlockAdded, onBlockActivated... etc
  14. You are still using instance fields... you need something like this... all local variables TileEntityPlasmaCannon tile = (TileEntityPlasmaCannon) worldIn.getTileEntity(pos); tile.getstate(state); I'll try to explain singletons a bit... I don't know if everything will be correct but basically... a singleton is only one instance of a class, which means that all blocks only use that one instance instead of a new instance for each block, so all instance fields (the variables of the class) are shared between blocks, for example in your code... you're assigning the tile entity of only one block to the field... which means all the other blocks would use that same tile entity since they share all instance fields, thats why you have to do everything in the methods you override. So when you place another block, that tile entity field would be changed and the block placed before wouldn't function correctly.
  15. Use World#getTileEntity in onBlockActivated... don't use instance fields
  16. Don't use fields like these TileEntity tileentity; TileEntityPlasmaCannon plasmacannon; in your block to assign a tile.... blocks are singletons so all blocks will use the same tile then... just use World#getTileEntity and cast it to TileEntityPlasmaCannon...
  17. Look into BlockBreakable class (BlockSlime extends it)... you have to override isOpaqueCube to not see the air
  18. You're trying to load a class that contains CLIENT only code on SERVER which is why you're getting this crash. I think annotating your ModKeys class with SideOnly should fix it but make sure to not access that class from anywhere else except your ClientProxy
  19. This is all you need... like for real: @SubscribeEvent public static void hurtEvent(LivingHurtEvent event) { if (event.getEntityLiving() instanceof EntityPlayerMP) { EntityPlayerMP player = (EntityPlayerMP) event.getEntityLiving(); PlayerList playerList = player.getEntityWorld().getMinecraftServer().getPlayerList(); playerList.transferPlayerToDimension(player, <dimension>, new TeleporterVoid((WorldServer) player.getEntityWorld())); } }
  20. You shouldn't be using that world in your class (what are you even doing with it).... Use the world you get from the event event.getEntityLiving().getEntityWorld() also make sure to check this if (event.getEntityLiving() instanceof EntityPlayerMP) { } you don't need world.isRemote then since you already know its on server since its the server player.
  21. Make sure to the the world is on server... if (!world.isRemote) { // Code } If that doesn't still do it (which it should) try something like this: if (!world.isRemote) { ((WorldServer) world).getMinecraftServer().getPlayerList().transferPlayerToDimension( (EntityPlayerMP) player.getEntity(), 100, new TeleporterVoid(world.getMinecraftServer().getWorld(100))); } Also you should probably use the entity world for the teleporter
  22. the portal doesn't get created actually, it only just teleports the player if you use my example of placeInPortal.
  23. Just tried it myself and it crashes me when it starts placeInExistingPortal(Entity entityIn, float rotationYaw); in placeInPortal method. If you want to use that you need to override it and make it work for you... also I suggest adding BlockPos to the constructor and then accessing it in placeInPortal(Entity entity, float rotationYaw); I do something like this (You could also use Entity#setLocationAndAngles, but I prefer it this way): @Override public void placeInPortal(Entity entity, float rotationYaw) { entity.setPosition(this.pos.getX() + 0.5, this.pos.getY(), this.pos.getZ() + 0.5); entity.motionX = 0.0f; entity.motionY = 0.0f; entity.motionZ = 0.0f; } Also don't forget to add @Override to your methods
×
×
  • Create New...

Important Information

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