-
Posts
3284 -
Joined
-
Last visited
-
Days Won
62
Everything posted by ChampionAsh5357
-
[1.15.2] Add spawn conditions to MobEntity
ChampionAsh5357 replied to QuantumSoul's topic in Modder Support
Fun fact: that method is used inside of a different method that encompasses all mobs to see if they can spawn. The method is called MobEntity#canSpawn. -
java.lang.NullPointerException: Ticking entity
ChampionAsh5357 replied to Uebbels's topic in Modder Support
Actually, the problem I described is wrong, so apologies. I missed a single line of code. First, the actual problem is that your global variable of your tile entity is not initialized since you decided to make a local variable in your constructor instead (lines 28 and 34). For your method, my understanding is that you should not mix methods outside the realm of the reference holder with the variables inside. You can, but it might lead to a problem later on when dealing with some client server syncing. I'm not sure, but I just tend to avoid it. Second, calling that method inside your tileentity class is just redundant when you are already literally in your instance of a tileentity. You can literally pass in your tileentity by simply using 'this' instead of passing in two variables you only use once. -
java.lang.NullPointerException: Ticking entity
ChampionAsh5357 replied to Uebbels's topic in Modder Support
You know it tells you your error. Your tile entity is throwing a null value on the server at a specific line in a specific class. I think you should write your get method for the reference holder correctly. You also realize this is completely redundant. Why are you getting the current tile entity in the container from the world rather than passing in the tile entity? These two should tell you exactly how to solve your problem. -
[1.15.2] How to create 3D item models with attachments?
ChampionAsh5357 replied to ken2020's topic in Modder Support
You either do one of two things: you create a json model that contains both the gun and scope combined or you json model holds a parent location to one model and the adds elements to create the other portion of the model. -
Depends on which block since most do not have an event when the block is randomly ticked.
-
Read the source code and notice that there is a event hook from forge called ProjectileImpactEvent#Throwable.
-
[1.15.2] How to create 3D item models with attachments?
ChampionAsh5357 replied to ken2020's topic in Modder Support
I thought I just explained that using some combination of capabilities and item property overrides. My guess is you haven't read the documentation on either. -
[1.15.2] How to create 3D item models with attachments?
ChampionAsh5357 replied to ken2020's topic in Modder Support
Capabilities and Item Property Overrides You would need to use a ISTER (ItemStackTileEntityRenderer) for that. However, it seems pointless since you're not using any data that requires a part of some other existing item or block to render in your scene. Stick to using json models. -
[1.15.2] How to create 3D item models with attachments?
ChampionAsh5357 replied to ken2020's topic in Modder Support
You can store variables onto itemstacks by either using nbt data or capabilities. Choose one of the two systems you wish to use and run with it. If the data is correctly synced with the client then you can also use a property override to update the model. -
Custom runClient launch window size? (1.15.2 - Mac)
ChampionAsh5357 replied to Xombifier's topic in Modder Support
Look at options.txt within the run folder and you will find overrideWidth and overrideHeight. Set these to the values you want I believe. -
(SOLVED) Custom Crafting Table recipes not working
ChampionAsh5357 replied to TheThorneCorporation's topic in Modder Support
First, extending an interface is arbitrary the way you are doing it. IRecipeType does not need to be extended and can be just declared a static final variable using IRecipeType#register. Second, IRecipeSerializer needs to be extended on a ForgeRegistryEntry class. The reason I say this is even though you might have already done it is that if you looked at the original class, you can see it extends a basic implementation of a registry. So yes, you do need a RegistryEvent using the old method or could update to using DeferredRegister and RegistryObject. -
Break it down. IForgeContainerType#create returns an instance of ContainerType based on its IContainerFactory. IContainerFactory has two create methods. One method contains three variables (the window id, the player inventory, and a packet buffer) while the other one returns the packet buffer as null. Because of this, one of your Container constructors must contain only the window id and player inventory or include the packet buffer as well. Similar to the tile entity, this is the default constructor being used to declare the type and will be updated when called correctly. For myself, I just use a new constructor instance of a container type with diamond syntax to assume the generic and then using a method reference operator on the correct class. Otherwise, you could just simply use the standard interface for your class.
-
[1.15.2] [Solved] Stuck while loading custom dimension
ChampionAsh5357 replied to Budschie's topic in Modder Support
My guess is that you just used the standard Minecraft Teleporter assuming that it works for all dimensions. Note: you can't do that as the teleporter handles logic specifically for teleporting to and from the nether. My knowledge on the matter however is a bit outdated. However, you can verify this by debugging your code at the method you have selected and watch it return null. -
You would need to have your own custom implementation of IRecipe. When you are setting the IRecipeType, make sure its the same as the vanilla system you would like to use. From there, you can write your own IRecipeSerializer which is basically just writing a deserializer to read data from a json file. If you want examples, take a look at the item.crafting folder inside the Minecraft source. That should provide plenty of reference on how to execute this.
-
[1.15.2] Using Non-potion items as Potion Ingredients [Resolved]
ChampionAsh5357 replied to izofar's topic in Modder Support
No, I replicated the same process and it works fine. The item that you chose may not be the honey bottle, or you're call of the registry is not on both the client and server. -
[1.15.2] Using Non-potion items as Potion Ingredients [Resolved]
ChampionAsh5357 replied to izofar's topic in Modder Support
I would recommend looking at BrewingRecipeRegistry#addRecipe. -
If you're talking about within the GUI, you just create another rectangle with the overlay texture that changes based on how much fluid is in the tank.
-
How to prevent player from sending a message from the client side
ChampionAsh5357 replied to saist's topic in Modder Support
If it's a client side mod, it will only appear for the client the mod is downloaded on. -
[1.15.2] How to add item tooltips from lang json's
ChampionAsh5357 replied to QuantumSoul's topic in Modder Support
TranslationTextComponent, Item#onItemUseFinish -
It has its own custom properties that are unique to that block.
-
It makes no sense if the block is an extension of OreBlock. That's coded for the sole purpose of programming all ores into a single class. Most mods just use a standard Block instance or have their own single class handler for ores.
-
That should work fine
-
[solved] Detecting key inputs from render event? - 1.15
ChampionAsh5357 replied to Turtledove's topic in Modder Support
Assuming you are checking the values on the logical client side, get the current instance of Minecraft running (if the event doesn't support it use Minecraft#getInstance) and then call GameSettings#keyBindLeft or GameSettings#keyBindRight from the instance within Minecraft. -
You do realize you have to create your own optional dependency for every mod you want to add support for? Minecraft you can just check if the block is an instance of OreBlock. However, every other mod you would need to check individually as there is likely no centralization.
-
[solved] Detecting key inputs from render event? - 1.15
ChampionAsh5357 replied to Turtledove's topic in Modder Support
Why would this override vanilla keybinds? You are calling a method from those already declared KeyBindings to see if that KeyBinding is pressed.