Giter Site home page Giter Site logo

knokko / custom-items-gradle Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 3.0 5.43 MB

Knokko's Custom Items: Add custom items to your server, completely free of charge

License: MIT License

Java 99.79% CSS 0.08% GLSL 0.14%
bukkit java minecraft spigot spigot-plugin

custom-items-gradle's People

Contributors

knokko avatar techwizzart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-items-gradle's Issues

Add a JSON format that is allowed to be used instead of .cis files

Currently, the plug-in can only load binary configuration files. This means that it is nearly impossible to do minor modifications to the item set without running the Editor. Some people complained that this is inconvenient for doing small quick changes. To solve this, we could generate a JSON file alongside the CIS and TXT file that can be used instead (and is properly human-readable). The drawback of this is that it allows people to skip validation checks. Besides, it will be a lot of work to implement and maintain.

Improve commands

Currently, the commands feature of custom items are not so great: they rely on the server admin to ensure players have the right permissions, and nothing prevents players from executing these commands without holding the custom item in their hand. We should rework this system and turn it into something better. For instance, we could use things like the /execute command to work around the op problem. Or we could even give players op briefly (but make sure not to destroy permissions when doing that...)

Minor glitches when custom tools are manipulated in anvils

Custom tools work quite well in anvils, but there are still some glitches that can cause players to be kicked out of the anvil in some situations. Luckily, they won't lose or get any items, and it doesn't happen so often. Nevertheless, it would be nice if this could be fixed. Unfortunately, it looks like the minecraft client is the bottleneck...

Add some kind of indicators for wand recharge time and cooldown in-game

Currently, players can't see how long they need to wait until the cooldown or recharge time of their wand expires (when they can use it again). It would be nice if there was some kind of indicator for this.

Possibly helpful resources:

This will require quite some time for research and implementation.

Customize the damage cause/source for basic attacks with a custom item

Currently, the attack damage of custom items can be manipulated with attribute modifiers. However, the damage cause/source is always physical. It would be nice to make this customizable as well. Unfortunately, I'm not sure how to do this.

Note: make sure it works well alongside custom attack ranges

Allow custom enchantment names

Currently, the default enchantments of custom items must be vanilla enchantments. But, there are some plug-ins that add custom enchantments. It would be nice to make it possible to add default enchantments that have a custom enchantment with a given name.

Improve stackability of custom items

It would be nice to improve the stacking support of custom items in-game. For instance, ensure that shift-clicking custom items has the same effect as shift clicking regular items. Also, let the collect-to-cursor action work properly on stackable custom items.

Include Mr Crayfish Model Creator in the Editor

Currently, custom models for custom items are supported, but the Editor provides little help with actually making those models: the users have to use a third party model editor like Blockbench or the Mr Crayfish model creator to create those models. Also, the user will have to do manual modifications to the JSON files generated by these programs to adjust them for the Editor.

This situation could be improved by including a slightly modified version of one of these two in the Editor. Luckily for us, both of them are open source. Including the Mr Crayfish would be easiest because it is a plain runnable JAR file (just like the Editor itself). Blockbench is an Electron app and is thus probably harder to include.

Add custom blocks by sacrificing other blocks

Implementing custom blocks would be a lot easier if we could just sacrifice vanilla blocks for it. This could be quite useful for servers that for instance don't have the End or the Nether.

Add a tutorial for custom wands and guns

Currently, custom wands and projectiles have documentation, but not a tutorial that shows the 'common' way of using them. It would be nice to add such a tutorial. EDIT: We should also include guns in that tutorial, since they are quite related to wands.

Think about automated testing

Currently, the plug-in and the Editor have little automatic testing: testing is mostly done manually, which is suboptimal. The current Editor tester is also not so nice and outdated. I'm not sure what is best to do...

Prevent obtaining custom items in some regions

Currently, custom items can be obtained and crafted in all worlds of a server. For some servers, this is not desirable. It would be nice if it were possible to add a whitelist or blacklist of worlds in which custom items can be crafted or dropped.

Allow ingredients to have a remaining item

Currently, all the ingredients will be cleared when a crafting or container recipe is done. But, this makes it impossible to add ingredients like lava buckets where you would want to consume the lava, but keep the bucket.

Add support for item animations

Currently, the Editor doesn't support animations for custom items: if people want to use it, they need to manually change the generated resourcepack. It would be ideal if players don't need to write the animation files themselves, but could just edit them with a simple GUI in the Editor, and let the Editor do the dirty work of actually generating the required MCMETA files.

Make it possible to hide the enchantment glow

Whenever custom items are enchanted, they will have some kind of glow effect. But for custom items that only have their default enchantments, this is not always desirable. Unfortunately, I don't think this will be very easy to implement.

Add custom food

It would be nice to add custom items that can be eaten or drunk, and restore hunger or give potion effects when that happens. Also make the required drinking/eating time configurable.

Prevent custom block drops if the block was placed by a player

Currently, custom block drops can be dropped whenever the player breaks the right block (under the right circumstances). But for some purposes, this is undesirable. It would be nice to add a new option to custom block drops that ensures it won't be dropped if the block was placed by a player.

This will be quite complex to implement because we will need to keep track of which blocks were and were not placed by players. Simply remembering all coordinates where any player has placed a block might drain too much memory...

Support minecraft 1.9 to minecraft 1.11

Currently, minecraft 1.12 is the oldest minecraft version that we support. However, resourcepack predicates were introduced in minecraft 1.9, so it should be possible to support minecraft 1.9, 1.10, and 1.11 as well. I have received a couple of requests to actually do this.

Currently, the biggest blockage is the crafting system: the plug-in uses a quite dirty trick to overrule the default crafting system using the PrepareItemCraftEvent. Unfortunately, that event is not often fired in minecraft 1.11 and earlier, which breaks the system on those minecraft versions. Perhaps, I could work around it, but this will probably require even more usage of the InventoryClickEvent, which is not so nice...

Add templates for crafting recipe creation

When someone wants to add a recipe for a custom chestplate, he needs to manually assign ingredients to these 8 slots. It would be convenient if there were quick templates for common shapes like helmet, chestplate, leggings, boots, swords... For instance, there would be a separate menu for adding a sword recipe that would only require the user to select the stick material, blade material, and the output item.

Add proper back-up control

Whenever the Editor saves or exports the item set, it creates a backup of the saved .cis file and puts it in the back-ups folder. When item sets are saved often and start getting bigger, this could start draining disk space. We should add a proper system to ensure this doesn't escalate too much.

Implement proper error checking for item replacement

When treating the HASITEM condition, a NullPointerException shows up as a method may return NULL but it is not explicitly checked. Should review this in all replacement code snippets. For the original error, see the following console output:

[10:58:01] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to CustomItems v8.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:235) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:202) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:198) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:991) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:26) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at nl.knokko.customitems.plugin.CustomItemsEventHandler.handleReplacement(CustomItemsEventHandler.java:493) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor121.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
... 18 more

Add custom crossbows

Currently, we have custom bows, but not custom crossbows. It would be nice to add crossbows (and the plug-in would feel a bit more complete). I haven't tried this yet, so I'm not sure how hard this would be. But obviously, this will not work in all supported minecraft versions.

Protect custom containers in WorldGuard regions

Currently, custom containers are never protected from players, not even when located inside protected WorldGuard regions. Since WorldGuard is a very popular plug-in, some integration with it would be nice.

Add proper permission support

Currently, the customitems command can be used if and only if the executor is a server operator. It would be nice to add proper permission support (so that the command can be used by all players with the right permission).

Add command completion

Most commands from vanilla minecraft and other plug-ins allow players to do meaningful completions when the player presses the tab key. But, the commands from this plug-in don't. It would be nice to add this.

Use different mechanism for custom textures in different minecraft versions

Currently, the plug-in will always use the Unbreakable + Damage trick to assign textures to custom items. When I started this plug-in, this was the only trick available, but new tricks were introduced in later minecraft versions. The current trick has some limitations, so upgrading would be nice for the users that use minecraft 1.13 or later. However, I don't want to just drop the current system because that would stop the plug-in from supporting minecraft 1.12.

The best solution would be to use different texture tricks in different minecraft versions.

Integration with scripting plug-ins

Currently, there is little space for actions that should happen when a player right-clicks with a custom item in hand. It would be nice to add some integration with a scripting plug-in: the user would write scripts via that plug-in and this plug-in would make sure these scripts would be called when a player right-clicks with a custom item in hand.

Wiki generator

Currently, the server admins have to find a nice way to inform the players about all the custom items and containers of his item set. It would be nicer if the Editor could generate some kind of wiki that the admin can make available to the players. Or perhaps an in-game wiki handled by the plug-in would be better.

This will clearly be quite some work to design and implement...

Add custom elytras

This plug-in adds custom items, tools, bows, tridents..., but still misses custom elytras. It would be nice to add those as well. Unfortunately, I haven't looked into that at all.

Add custom guns

In Custom Items 6.0, I planned to add guns and wands. Unfortunately, it took me more time than expected, so I decided to postpone guns. It would be nice to finally add guns as well. The basic idea is that are similar to wands, but require ammo to fire custom projectiles. This ammo system is supposed to be configurable: perhaps just pick ammo items from player inventory, or require the player to explicitly load the gun.

Add custom shield mechanics

(Custom) shields are somewhat boring: they can simply block almost all attacks. It would be cool to make the (custom) shield combat mechanics more advanced. For instance, a maximum number of attacks that can be blocked every X seconds, or a maximum amount of damage that can be blocked every X seconds.

Add player head custom items

It would be nice to have player heads that can have the same properties as custom items (except for the textures). When implementing this, carefully thing about what should happen when such heads are placed as blocks.

Add a tutorial for custom containers

Currently, custom containers have a documentation page, but not a nice tutorial that demonstrates the common way to use custom containers. It would be nice to add such a tutorial.

Stacking custom items in creative mode

Currently, custom items can stack in survival mode (and adventure mode), but not in creative mode. It would be nice if this could be fixed, but I'm afraid this is not possible due to minecrafts questionable inventory system in creative mode.

Add custom blocks

There have been quite some requests to add custom blocks to this plug-in. Unfortunately, it seems quite hard to actually implement this, and some tricks are not available for all minecraft versions and/or have unacceptable performance problems.

If we were to implement this, it would involve quite some research to determine the best strategy, and quite some work to implement it.

Add more impact effects for custom projectiles

Currently, custom projectiles are quite nice, but they still miss some effects. The most obvious feature that I miss is giving potion effects to entities hit by the custom projectile (or that are close to the impact location).

Add custom arrows

It would be cool to add custom arrows that can be fired by both regular bows and custom bows. Texturing such arrows while they fly is probably impossible, but we could texture them in the inventory. A long time ago, I did a small attempt to implement this, but there were quite some problems, and I was blocked by the problem that the minecraft client won't start pulling a bow unless the player has a regular arrow in this inventory.

Perhaps some kind of fake arrow system could solve this, but that would be nasty to implement because the inventory of the player would be full, and we would have to make sure that fake arrow will actually be removed. I think this attempt would be a dead end, but the custom texture systems introduced in later minecraft versions could be a solution: we can represent such arrows by regular arrow items.

Add two-handed weapons

Currently, all weapons are one-handed: when a player equips them in his main hand, he can hold a bow or shield in his off hand. It would be cool to add two-handed weapons where this is impossible: they can only be equipped in the main hand, but only when the off hand of the player is empty. Also, it should not be possible to put items in the off hand slot while a two-handed weapon is equipped in the maind hand.

Use the Bukkit API to send resourcepacks

Currently, the server resourcepack is handled by letting the server owner upload a resourcepack to a third-party site like Dropbox and letting him point the resource-pack url to the Dropbox url. This system usually works, but also causes problems:

  • It is some effort
  • Webcaches can be annoying
  • I don't like relying on third parties
  • It is impossible to update the resourcepack without a server restart
  • This won't work for servers where people can join with different minecraft client versions (since each client would need a different resourcepack...)

We could improve this by using the Bukkit API to send resourcepacks to players rather than relying on server.properties. But, the hardest part is that we still need to upload the resourcepack to some public url. For this, I have a dirty solution in mind: we could finish my work-in-progress https://github.com/knokko/Multi-Purpose-Server to use the server itself as the resourcepack host. This will require quite some experimentation and is generally a big change of flow, so it won't be quick or easy.

Combine custom resourcepack with another resourcepack

Whenever, the Editor exports an item set, it creates a new resourcepack that contains everything it needs for the custom items of the item set. However, since servers can have only 1 server resourcepack, servers can't combine the custom resourcepack with another resourcepack. Currently, the server admin will have to merge the resourcepacks manually each time he exports.

We might be able to improve the situation by letting admins assign a regular resourcepack to his item set. Whenever the item set is exported, the Editor would automatically merge the custom resourcepack with that regular resourcepack. Unfortunately, this could get quite complicated in some situations (for instance when the regular resourcepack needs to touch item models of tools...).

Netherite custom items in smithing table

It looks like netherite custom tools can be changed into (at least take on the texture) of real netherite tools by upgrading them in a smithing table. I should obviously stop that!

Support minecraft 1.8

For some reason, minecraft 1.8 is still used on some servers, and it would be nice if we could support this version. But, since resourcepack predicates were introduced in 1.9, this is not possible for vanilla minecraft. Luckily, the popular Optifine mod has its own system of resourcepack predicates, which might even be present in its version for minecraft 1.8.

Still, this would be quite some work since we need to look into this system, and do #2 first. Also, only players who installed Optifine will see the textures, so it's quite limited.

Bring this plug-in to Spigot

Currently, this plug-in is only available at BukkitDev, but we could reach more people of we would also create a page at Spigot.

Add custom enchanting and upgrading

Currently, custom containers can only consume the ingredients of its recipes and output the results of its recipes. It would be interesting to also allow recipes to upgrade the ingredients rather than replacing them.

With upgrades, I mean improving some of the stats of a custom item stack and incrementing some counters in its NBT to keep track of which upgrades it has had so far. The user would be able to add upgrade slots to custom container recipes. The user will be able to select which items are allowed in that slot, and under which conditions (preferable use some kind of NBT variables as input for the condition). And of course, what changes should be made when the recipe is executed (turn the item into a different item, upgrade attribute modifiers, change the values of the NBT variables...).

This task sounds very promising to implement, but also a lot of work.

Breaking multiple blocks at the same time

Currently, even the most powerful custom pickaxes have the limitation that they can only break 1 block at a time. It would be cool to add a feature that allows some tools to also break blocks that are close or adjacent to the broken block.

If we would implement this, we should be careful because the block adjacent could be protected and might have custom drops.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.