-
Posts
1830 -
Joined
-
Last visited
-
Days Won
13
Everything posted by DavidM
-
It doesn’t “feel like” cheating. It is cheating. TNT should be the way to go, as primed TNT duplication is easy to setup and very efficient.
-
Having an issues giving the player an item (1.14)
DavidM replied to Babelincoln1809's topic in Modder Support
You are having a syntax error. Please learn basic Java before attempting to make a mod. -
How to make items use up your XP bar? (1.14.4)
DavidM replied to Babelincoln1809's topic in Modder Support
1. This will always be true. Single equal ( = ) sign is for assignment, not comparison. 2. You've never called xpSwing() at all. It will never be used, therefore not reducing the experience bar (or make anything happen). 3. If you want to make a sword, extend SwordItem. There is no reason to copy-paste everything from vanilla classes. -
Forge is just an API in Java. You can do anything in Forge as long as you can do it in Java. Use java.util.Random.
-
How to make items use up your XP bar? (1.14.4)
DavidM replied to Babelincoln1809's topic in Modder Support
Post your updated code. -
How to make items use up your XP bar? (1.14.4)
DavidM replied to Babelincoln1809's topic in Modder Support
That basically sums up Java (or any object-oriented programming). If you are struggling to do this, then you might want to get more familiar with Java before making a mod. Check out LivingAttackEvent. You can check if the player has enough XP (and remove it). If not, cancel the event. -
the name of a block has been registered twice issue
DavidM replied to Falision's topic in Support & Bug Reports
Please read the EAQ and post the appropriate log. -
You are doing something wrong then. Post your code. BlockItem is an Item. To instantiate one, simply pass in the instance of your block. OP is using MCreator, which might screw around with asset files. Just checked, and it seems that MCreator does not do anything about model files. My bad. In that case, the problem is probably caused by the incorrect texture file path as Animefan8888 mentioned. They are not. What you put in the path is what ends up into the ResourceLocation.
-
1. Do not use MCreator. 2. Pretty sure there are a lot out there. BlockItem is just an implementation of Item; you can treat it (register, etc) like an instance of Item. 3. Check out Forge’s multi-layer model. An example: https://github.com/McJtyMods/DeepResonance/blob/105c7d3ec6b479b6a0b0f0612b824b6ae874c049/src/main/resources/assets/deepresonance/blockstates/crystalizer.json
-
99% chance that you do not have the same problem. Please create your own thread.
-
I believe this has been brought up many times in previous threads, and the answer in those threads is no. There are many reasons mentioned, such as you can never know whether the states should be reloaded (if If should have changed), and whether the state of the game should be the same even if mod list, config, etc remains the same.
-
I think another approach to this would be to subscribe to RenderLivingEvent and draw the circle at the given position from the event. This might be easier to implement, and can be a bit more flexible.
-
Deferred Registry BlockItem Current Method?
DavidM replied to BaconBombing's topic in Modder Support
You are passing in an ItemGroup instead of Item.Properties in the second parameter. -
Please elaborate. I am having difficulties in understanding what you are trying to achieve. To see if a string contains a substring, use String#contains. To obtain the message from ClientChatReceivedEvent, use ClientChatReceivedEvent#getMessage (the specific method name may be a bit off).
-
I am porting my mod to 1.15.2. One of my block was using BlockRenderLayer.CUTOUT prior to 1.15. I realized that BlockRenderLayer no longer exists. After removing override for Block#getRenderLayer, my block now looks like this: The see-through part of the block is opaque, while the dropped item renders fine. How would I fix this? The code for my block is at: https://github.com/davidmaamoaix/TinyMobFarm/blob/1.15.2/src/main/java/cn/davidma/tinymobfarm/common/block/BlockMobFarm.java
-
Need help with an error that keeps occuring
DavidM replied to Babelincoln1809's topic in Modder Support
As far as I know Apple has not provided any proper methods of disabling these “features”, and one has to disable certain system properties via console to stop the generation of these files, which would affect the system globally (you cannot disable .DS_Store under a specific directory), and might cause problems in the system later on. Note that Apple still insists on having .DS_Store, and the hacky way of disabling system properties to remove .DS_Store might be removed in the future. There are still some third-party applications that moves all the .DS_Store to a more non-obtrusive location (or remove them completely) though. -
Is there a function or way to load a Forge mod during runtime?
DavidM replied to jumpak's topic in Modder Support
I don’t think this will ever be possible (or at least not in the way Forge is currently). Mods have a lot of capabilities. Although some mods only add content into the game (which still relies on the registry events at startup), there are mods whose functionality relies on doing stuff during FML setups or during game startups, and others that alters the entire game (and have to be loaded from startup). By not restarting the game, these mods will not work properly. -
Need help with an error that keeps occuring
DavidM replied to Babelincoln1809's topic in Modder Support
Every time you edit a directory in Mac with the system navigator (Finder), a .DS_Store is generated if there hasn’t been one already. I avoided this by finding and deleting all .DS_Store under a directory with find <PATH> -name ".DS_store" -delete -
Same problem. i dont care. Game wont start
DavidM replied to LaserSpirit's topic in Support & Bug Reports
Your previous thread was a thread asking about 1.12, and did not mention 1.15 at all. Therefore the moderator assumed that you are working with 1.12 specifically. You are posting a 1.12 log. 1.12.2 is no longer supported on this forum. If you need help with 1.15.2, please post your 1.15 log. -
There is no need to decompile the mod, as its source is public: https://github.com/Glitchfiend/SereneSeasons.