Abastro
Forge Modder-
Posts
1075 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Abastro
-
You can make one entity class and one render class handle all the entity types and the models. That would be the main point of 'can switch ModelBases based on an entity's state'.
-
Why do you implement your own Scrolls? You can just use GuiScrollingList or GuiListExtended.
-
What? Dont you have your own renderer for the entities? That cant be..
-
[1.8] Make Custom Fire Break Like Vanilla Fire in Creative
Abastro replied to Jedispencer21's topic in Modder Support
And that message is another problem. Do you have proper model for your fire? -
What I'm saying is for Entity. You should have a renderer for the entity, select appropriate model there!
-
Then just select appropriate model on the renderer...
-
[1.8] Make Custom Fire Break Like Vanilla Fire in Creative
Abastro replied to Jedispencer21's topic in Modder Support
I think you should call block.onBlockClicked(theWorld, pos, thisPlayerMP); after extinguishFire, and do not click the block when there was no fire there. -
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
Ill admit that. But aside from compatibility, there are many problems with the 'tick delay method'. First, as I mentioned earlier, it easily gets complicated when the fraction is complex. Yes this issue is specific too, but should be considered in any case because fraction can be needed to get appropriate day length. Second, sky animation would break with the method. As 20TPS is not enough to be shown naturally, minecraft uses partial ticks for the animation. so actually the celestial sphere is calculated on tick+partialTicks. So when tick is delayed by a mod, the animation jerks from tick to tick-1. Note that on vanilla doDaylightCycle, partialTicks is always set to 0 so there is no issue with that. -
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
Yes. Anyway it is really not good. Also, when you want to change day length from 24000 to 49000, how would you do that? It easily gets complicated when the fraction is complex. I described that there is another way, it is not that incompatible. The cause that my mod is incompatible with the way is that My mod changes the day length, too. I had not seen any other cases that require replacing WorldProvider; So compatibility is not an issue here. + I think it is obvious that day length changing mods should be incompatible together. -
GUI Error (Custom Furnace) - Updating screen events
Abastro replied to BreezerTwo's topic in Modder Support
What slot are you putting the iron in when the minecraft crashes? -
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
It would break some time checking mods, which should be updated in some duration. Some could use worldTime for those purpose. Also it is really bad approach for this issue.. So is there any problem with modifying the calculateCelestialAngle way? -
So is it problem with your mod? Then you should describe what your mod does.
-
GuiScreen#updateScreen.
-
I know this behavior too. I think this should be on bug report. (Or is this intended feature? I want to know) Anyway, the mechanism would be in calling Minecraft#displayGuiScreen(null); while world is not loaded so Minecraft#theWorld is null.
-
Since minecraft modding is mainly focused on the blocks, items, entities, and GUIs, The simple celestial mechanism of the minecraft is largely unknown. So I'd like to introduce the celestial model of minecraft, on how it controls and manages the celestial motion. I'll start from the fact that everyone playing minecraft would know. 1. Basic Model of Universe of Minecraft 2. The holy, Celestial Angle 3. Phase of the Moon 4. Rendering mechanism of Sun and Moon 5. Rendering mechanism of Stars
-
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
.So there is no way without replacing the Overworld WorldProvider or Base Edits. How to change the length of day, in detailed: 1. Replace the WorldProvider on FMLInitializationEvent: DimensionManager.unregisterDimension(0); DimensionManager.unregisterProviderType(0); DimensionManager.registerProviderType(0, StellarWorldProvider.class, true); DimensionManager.registerDimension(0, 0); (StellarWorldProvider is my custom WorldProvider. You should implement your own WorldProvider) 2. Override the #calculateCelestialAngle on your own WorldProvider. Vanilla implementation of the calculateCelestialAngle is like this: public float calculateCelestialAngle(long par1, float par3) { int j = (int)(p_76563_1_ % 24000L); float f1 = ((float)j + p_76563_3_) / 24000.0F - 0.25F; if (f1 < 0.0F) { ++f1; } if (f1 > 1.0F) { --f1; } float f2 = f1; f1 = 1.0F - (float)((Math.cos((double)f1 * Math.PI) + 1.0D) / 2.0D); f1 = f2 + (f1 - f2) / 3.0F; return f1; } You can change the length of day by just changing the 24000L and 24000.0F to custom value. If you want it to be 3 times longer, just use 72000L and 72000.0F So, you changed the length of day! * About the hardcoding issue, using CommandEvent would work. -
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
Oh that is bad, really bad, but you can override that using CommandEvent. So no worries. (+You can make the only-night dimension, which /time day should not work. So I think the 'hard-coding' is reasonable enough) Anyway: You can change it with DimensionManager with #un/#registerProviderType and #un/#registerDimension. You can simply unregister the vanilla WorldProvider, and register your own WorldProvider. (Which my Stellarium mod does, too) Besides, why do you want to change the length of day? Maybe I should just make some API with celestial movement management with vanilla dimensions.. -
I think, loading the chunk with some mod tickets will be more safe and better than that.
-
[1.8] Editing day lenght - can it be unsafe? (+question)
Abastro replied to Ernio's topic in Modder Support
This is something that I can explain best. @Failender That is really bad idea, and that will break tons of mods.. @Ernio There is nothing specifying the length of day and night; Actually, The only meaning of the length of day(which is 24000 minecraft tick) is the period. You can change not only the length of day, but also the motion of the sun! Do you know the World#getCelestialAngle(..)? It gives the position angle of the sun for the specific World. (In radians I remember) What it does is just calling WorldProvider#calculateCelestialAngle(..). So if you can override the method, you can take full control on the sun's movement! If you want to change the length of day on your custom You can just override the method! If you want to change the length of day on overworld, then You should change the WorldProvider for dimension Id 0...;; (That WorldProvider changing mod will be incompatible with mine. Very sad u.u) EDIT: the unit was not Radians. The angle varies from 0.0 to 1.0 -
[1.8]Portals that transports both entities AND players?
Abastro replied to NovaViper's topic in Modder Support
...... You should set Entity#timeUntilPortal to Entity#getPortalCooldown() when an entity is teleported, and only teleport the entity when the counter is smaller than 0. Then make the counter of the colliding entity decrease. Please learn how to construct logic.. -
So you want to know the world save directory? Then use DimensionManager#getCurrentSaveRootDirectory().
-
The error message already let you know what is the problem and how to solve it. Configure your Java Environment Variables.
-
[1.8] Get Info About ItemStacks in Crafting Table Inventory
Abastro replied to cclloyd9785's topic in Modder Support
Use IRecipe for that. You can make your IRecipe consume any piece of the custom armor and any potion, and give the potion-ed armor. After creating the recipe, register the recipe with GameRegistry#addRecipe(IRecipe). EDIT: Also giving potion as parameter in constructor would be no use. Instead save the potion id to the NBT of the armor, and get the Potion instance from Potion class whenever you want. -
[1.8]Making configurations for Biome and Dimension IDs
Abastro replied to NovaViper's topic in Modder Support
1. I think adding heading comments is done by adding comments to the general category using Configuration#setCategoryComment(category, comment) 2. Updating config file is automatically done by forge, why do you want to do it yourself?