
Everything posted by Cadiboo
-
[1.12] Using an image generated at startup as a block's texture
Can you back up and explain why you’re doing all of this? From what I understand you’re 1) saving the texture of a model to a file 2) using that texture in the next game, when the texture already exists in the texture map from the model you originally got it from 3) Ignoring resource pack changes in between runs (using the old texture when the pack has changed)
-
[Solved][1.12.2]How I can transfer energy using FE from a generator?
The code I gave you transfers energy from a storage to the storage of nearby tile. I use it for my wires and my generators and my entities
-
Line drawing function?
You never tell the BufferBuilder Tessellator to draw
-
[Solved][1.12.2]How I can transfer energy using FE from a generator?
I’m sorry, I can’t read that code it’s got too many (empty) if statements. Switch statements and for loops are a thing. Heres how I do it https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/capability/energy/IEnergyUserAdvanced.java#L52-L58
-
Calculate size of worldborder based on zone center and map center?
I would recommend posting a visual to describe your problem
-
Line drawing function?
GlStateManager does a bunch of caching and optimisation of the gl methods. If you don’t use it, those caches stop being accurate and you break all other rendering. Aside from this they’re the exact same. If you want to draw in world space you need to do the proper translations. I would use a different event too
-
Disabling JSON Recipe Files
You remove recipes by overriding them with your own empty json recipes. Not with code Edit: didn’t read the question properly
-
Rendering custom beams
You didn’t post your code, so we can’t help. Please post your code (preferably as a git repository) and an accurate description of your issue including a picture.
-
[Solved][1.12.2]How I can transfer energy using FE from a generator?
We can’t help without code. The basic idea is get the tiles capability, check how much you can give and it can receive and transfer it that amount.
-
[1.12] Recipes not registering
Make your own thread with your code, your json and a detailed description of your problem
-
Custom Water. Darkening does not work
Did you make a new world/load new chunks? Lighting doesn’t update automatically IIRC
-
Item that has to disappears over time
1) download GitHub desktop or another git client 2) create a repository in the root directory of your mod (the one with /run/, /src/ build.gradle in it) 3) click the publish the repository to github button 4) post the link
-
Calculate size of worldborder based on zone center and map center?
I would recommend writing out what you’re trying to do on paper (or in a image editor on your computer) and finding the maths you need to understand that way
-
[1.12.2] How to make a config with a GuiFactory
What specifically are you trying to do? You can have Forge handle everything for you with @Config or you can use the old Configuration + GuiFactory system
-
How to make a 3x3 tile entity?
Can you post your code for future people? This concept is often badly implemented
-
Custom Water. Darkening does not work
Override getLightOpacity and return something nonzero
-
[1.12.2] Help rotating block
And
-
[1.13] Source code does not match bytecode
I believe he means you need to refresh the gradle project again. On IntelliJ go to the gradle tab and hit the ? button
-
[1.12] Using an image generated at startup as a block's texture
Use the TextureStitchEvent to add the texture to the TextureMap. You could load a dummy model (who’s parent is block/cube_all) in the ModelBakeEvent, then copy the dummy model, retexture & bake the copy and apply the copies to your blocks. I haven’t dealt with custom models for a while and that approach may not be the best, but it’s how I would do it.
-
Custom Entity Becomes Dark When in Water
This is probably related to your rendering code. Can you please post it? (Preferably as a GitHub repository)
-
my mod cannot run on a server
What: Not using a “common” proxy Why: Proxies exist to seperate side-specific code, if there is code that is common, it should not be in a proxy Consequences: Issues with physical sides, hard to read code. A “common” proxy goes against fundamental OOP and logical concepts How: Have an interface (usually called IProxy, Proxy, ISidedProxy or IDistributionSidedProxy) and have your client and sever proxies implement this class. Your interface should be in a common package (usually util) and your sever and client proxies should be in their respective packages What: Not using an interface to register models Why: This interface (commonly called IHasModel) is unnecessary. All items need models and nothing about model registration requires private or protected data. Consequences: This interface makes you write 4 lines of code in each class and 2+ lines of code in your registry event, when 1 or 2 lines of code could accomplish the exact same thing. It also leads to weird bugs when you forget to make your object implement the interface. How: Simply register each model in the registry event (1 line of code for each model) or write a loop that does it for you (1 or 2 lines depending on the implementation). For example: Write out registerModel(item, meta, variant) for each item and variant or write a loop like this for (Item item : allModItemsAndItemBlocks) registerModel(item, meta, variant); A list of all your items can be acquired in many ways, such as looping over registries and checking domain, keeping your own list, looping over registries and using an instanceof check etc.
-
Crash after updating mappings
How did you solve it? Please post how to help people with the same problem in the future
-
[1.13] Source code does not match bytecode
This usually only happens to me if I venture deep into the launch(wrapper) code. How did you set up your workspace?
-
my mod cannot run on a server
Side only removes classes from a side, your error is caused by referencing a class (that has been removed by side only) from common code. Make sure your client registration does not happen in common code
-
Custom crafting machines w/custom recipes
You need an IRecipe implementation to parse and create your recipes, then you need a _factories.json to specify what class will parse your recipes (the IRecipe implementation) and then you need to define your recipes in JSON
IPS spam blocked by CleanTalk.