<<Prev Next>> Scroll to Bottom
Stuff goes here
L1[00:00:32] ⇨ Joins: Zyferus (~Zyferus@172-3-154-217.lightspeed.mssnks.sbcglobal.net)
L2[00:00:55] ⇦ Quits: Doty1154 (~Doty1154@2601:648:8000:134f:f470:c6aa:738a:2ac4) (Read error: Connection reset by peer)
L3[00:00:56] *** TTFTCUTS is now known as TTFT|Away
L4[00:09:00] *** fry|sleep is now known as fry
L5[00:12:10] ⇦ Quits: Umbraco (~Umbraco@113x37x12x233.ap113.ftth.ucom.ne.jp) ()
L6[00:18:49] ⇨ Joins: terribleperson (~terriblep@75-139-139-229.dhcp.gwnt.ga.charter.com)
L7[00:28:05] ⇦ Quits: cpup (~cpup@32.218.113.255) (Ping timeout: 201 seconds)
L8[00:28:28] ⇨ Joins: cpup (~cpup@32.218.113.255)
L9[00:34:23] <terribleperson> So should I be setting up my proxies in my main mod class, like the examples in the TR wiki do? Or should I be setting up a separate class to hold them?
L10[00:34:45] ⇦ Quits: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net) (Ping timeout: 190 seconds)
L11[00:35:31] <terribleperson> rather, they always get their own classes
L12[00:36:12] <terribleperson> but the TR wiki says "if you want to register renderers and so on from your ClientProxy you should not do that as a subclass of your mainclass" while setting them up as a subclass of the main class.
L13[00:36:35] ⇨ Joins: lashtear (~lashtear@cpe-76-176-106-6.san.res.rr.com)
L14[00:37:09] <Corosus> i think its referring to the CommonProxy as the 'mainclass'
L15[00:37:21] <Corosus> i generally still have the references to the proxy in my main forge mod file
L16[00:38:10] <terribleperson> http://modwiki.temporal-reality.com/mw/index.php/Basic_Mod-1.9 so the example at the bottom of the page is sensible and sane?
L17[00:39:05] <McJty> Even though I made that wiki I don't actually recommend that approach
L18[00:39:10] <McJty> Best to keep the proxies seperate classes
L19[00:41:58] <terribleperson> ah i see
L20[00:42:14] <terribleperson> over in Deep resonance you have each proxy in its own java file in a Proxy folder
L21[00:46:15] <terribleperson> but the TR wiki says "To use it, you have to make the nested ServerProxy and ClientProxy class inside the class with the @SidedProxy annotation"
L22[00:46:29] <terribleperson> Am I just... misunderstanding that?
L23[00:47:45] ⇦ Quits: Genuine (~Genuine@104.200.154.104) (Ping timeout: 190 seconds)
L24[00:57:01] ⇦ Quits: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net) (Quit: Gaelan)
L25[00:58:32] ⇨ Joins: VikeStep (~VikeStep@192.43.96.58.static.exetel.com.au)
L26[01:03:49] ⇨ Joins: flappy (~flappy@a88-113-154-4.elisa-laajakaista.fi)
L27[01:12:14] <McJty> terribleperson, Sorry ran out of time. Have to go
L28[01:12:15] ⇦ Quits: McJty (~jorrit@94-224-152-81.access.telenet.be) (Quit: Leaving)
L29[01:17:38] <Denyol> How do I use tools with durability in my crafting recipes?
L30[01:18:34] ⇨ Joins: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net)
L31[01:25:29] ⇦ Quits: Brokkoli (~Brokkoli@p2E5B1949.dip0.t-ipconnect.de) (Quit: Die Sprache der Politik ist daf�r gemacht, dass L�gen wahr klingen und das T�ten angemessen wirkt. (George Orwell))
L32[01:37:36] ⇦ Quits: Hgrebnednav (~Hgrebnedn@d8d872a6e.access.telenet.be) (Ping timeout: 194 seconds)
L33[01:43:18] *** Darkevilmac is now known as DarkevilAway
L34[01:43:56] *** DarkevilAway is now known as Darkevilmac
L35[01:53:06] *** Darkevilmac is now known as DarkevilAway
L36[01:55:15] ⇨ Joins: Ashindigo_ (uid202308@2604:8300:100:200b:6667:7:3:1644)
L37[02:00:03] <MCPBot_Reborn> [TEST CSV] Pushing snapshot_20170225 mappings to Forge Maven.
L38[02:00:34] <MCPBot_Reborn> [TEST CSV] Maven upload successful for mcp_snapshot-20170225-1.11.zip (mappings = "snapshot_20170225" in build.gradle).
L39[02:03:03] ⇨ Joins: codahq (~codahq@c-73-65-219-228.hsd1.ut.comcast.net)
L40[02:08:37] ⇦ Quits: kinggoesgaming (uid23106@2604:8300:100:200b:6667:4:0:5a42) (Quit: Connection closed for inactivity)
L41[02:10:40] ⇨ Joins: Hunterz (~hunterz@62.182.234.189)
L42[02:12:18] ⇦ Quits: AstralSorcerer (~AstralSor@128.151.114.30) (Ping timeout: 201 seconds)
L43[02:15:14] *** Denyol is now known as Denyol[Away]
L44[02:19:37] ⇨ Joins: MoxieGrrl_ (~MoxieGrrl@173-23-172-139.client.mchsi.com)
L45[02:19:52] *** Denyol[Away] is now known as Denyol
L46[02:19:58] <Denyol> woot first mod submitted to curseforge
L47[02:20:04] ⇦ Quits: codahq (~codahq@c-73-65-219-228.hsd1.ut.comcast.net) (Ping timeout: 194 seconds)
L48[02:20:59] ⇨ Joins: ThePsionic (~Psi@ip5457f909.direct-adsl.nl)
L49[02:22:14] ⇦ Quits: MoxieGrrl (~MoxieGrrl@173-23-172-139.client.mchsi.com) (Ping timeout: 206 seconds)
L50[02:24:50] *** Denyol is now known as Denyol[Away]
L51[02:31:48] ⇨ Joins: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net)
L52[02:35:05] ⇨ Joins: Noppes (~Noppes@ip56530f2e.direct-adsl.nl)
L53[02:42:48] ⇨ Joins: Hgrebnednav (~Hgrebnedn@ptr-908g3ort0ou9hi3k2rd.18120a2.ip6.access.telenet.be)
L54[02:51:50] ⇦ Quits: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net) (Quit: Gaelan)
L55[03:15:33] ⇦ Quits: ThePsionic (~Psi@ip5457f909.direct-adsl.nl) (Read error: Connection reset by peer)
L56[03:15:56] ⇨ Joins: Genuine (~Genuine@104.200.154.102)
L57[03:16:49] ⇦ Quits: VikeStep (~VikeStep@192.43.96.58.static.exetel.com.au) (Quit: Leaving)
L58[03:27:03] <Ashindigo_> Woo
L59[03:30:06] ⇦ Quits: Thisguy_ (~Thisguy@cpe-75-183-18-230.triad.res.rr.com) (Remote host closed the connection)
L60[04:01:21] ⇨ Joins: TechnicianLP (~Technicia@p4FE562D6.dip0.t-ipconnect.de)
L61[04:30:19] ⇦ Quits: Lymia (~lymia@magical.girl.lyrical.lymia.moe) (Quit: Hugs~ <3)
L62[04:34:24] ⇨ Joins: quadraxis (~quadraxis@cpc77293-basf12-2-0-cust699.12-3.cable.virginm.net)
L63[04:37:14] ⇨ Joins: mallrat208 (~mallrat20@107-145-175-135.res.bhn.net)
L64[04:40:22] ⇨ Joins: Lymia (~lymia@magical.girl.lyrical.lymia.moe)
L65[04:54:56] ⇦ Quits: Hgrebnednav (~Hgrebnedn@ptr-908g3ort0ou9hi3k2rd.18120a2.ip6.access.telenet.be) (Ping timeout: 180 seconds)
L66[04:55:38] ⇨ Joins: Hgrebnednav (~Hgrebnedn@ptr-908g3orv0qnof6rcul0.18120a2.ip6.access.telenet.be)
L67[04:59:26] ⇦ Quits: Hgrebnednav (~Hgrebnedn@ptr-908g3orv0qnof6rcul0.18120a2.ip6.access.telenet.be) (Ping timeout: 180 seconds)
L68[04:59:50] ⇨ Joins: Hgrebnednav (~Hgrebnedn@d8d874662.access.telenet.be)
L69[05:09:36] *** diesieben|away is now known as diesieben07
L70[05:24:26] <Corosus> hngggggg so much gradle build stalling at 'resolving dependencies'
L71[05:24:35] <Corosus> damn web requests stop timing out so much
L72[05:27:52] <Corosus> bleh
L73[05:27:53] <Corosus> org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'http://files.minecraftforge.net/maven/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar'.
L74[05:32:02] ⇦ Quits: Shawn|i7-Q720M (~shawn156@c-50-170-156-102.hsd1.co.comcast.net) (Read error: Connection reset by peer)
L75[05:35:29] ⇨ Joins: KGS (~KGS@h-155-4-129-249.na.cust.bahnhof.se)
L76[05:44:52] *** amadornes[OFF] is now known as amadornes
L77[05:46:54] <Ashindigo_> Are web clients automatically quieted?
L78[05:47:37] <Corosus> i believe so
L79[05:48:00] <Ashindigo_> Ok
L80[05:48:40] <gigaherz> not all
L81[05:48:47] <gigaherz> just the ones that have webchat in the ident string
L82[05:53:17] <Corosus> yeah, mibbit for sure, webchat maybe...
L83[06:00:29] <kashike> /mode +q
L84[06:00:42] ⇦ Quits: immibis (~chatzilla@122-60-104-195.jetstream.xtra.co.nz) (Ping timeout: 206 seconds)
L85[06:03:59] ⇨ Joins: BlueMonster (~BlueMonst@cpc23-telf11-2-0-cust237.16-1.cable.virginm.net)
L86[06:26:27] *** MrKick|Away is now known as MrKickkiller
L87[06:28:50] ⇦ Quits: BlueMonster (~BlueMonst@cpc23-telf11-2-0-cust237.16-1.cable.virginm.net) (Quit: Goodbye)
L88[06:32:26] *** PaleOff is now known as PaleoCrafter
L89[07:03:32] *** diesieben07 is now known as diesieben|away
L90[07:12:45] ⇦ Quits: p455w0rd (p455w0rd@c-68-39-246-30.hsd1.in.comcast.net) (Ping timeout: 190 seconds)
L91[07:13:20] ⇨ Joins: Ipsis (~Ipsis@82-69-71-184.dsl.in-addr.zen.co.uk)
L92[07:19:03] ⇨ Joins: Necro (~Necro@p200300700D0D7DCC1901BCE8AF47A820.dip0.t-ipconnect.de)
L93[07:44:11] *** hipsterpig is now known as pig
L94[07:44:34] *** pig is now known as Minecraft
L95[07:44:41] *** Minecraft is now known as pig
L96[08:05:19] *** mumfrey is now known as Mumfrey
L97[08:23:06] ⇦ Quits: Ashindigo_ (uid202308@2604:8300:100:200b:6667:7:3:1644) (Quit: Connection closed for inactivity)
L98[08:48:08] ⇨ Joins: Hgreb (~Hgrebnedn@d8D874662.access.telenet.be)
L99[08:48:13] ⇨ Joins: Pihrra (~Pihrra@mbree.xyz)
L100[08:49:12] ⇦ Quits: Hgrebnednav (~Hgrebnedn@d8d874662.access.telenet.be) (Ping timeout: 194 seconds)
L101[08:49:13] ⇦ Quits: Hgreb (~Hgrebnedn@d8D874662.access.telenet.be) (Read error: Connection reset by peer)
L102[09:00:53] ⇦ Quits: Meronat (uid190493@id-190493.ealing.irccloud.com) (Quit: Connection closed for inactivity)
L103[09:02:11] ⇨ Joins: fscan (~fscan@shodan.chilicode.com)
L104[09:15:53] ⇨ Joins: ThePsionic (~Psi@ip5457f909.direct-adsl.nl)
L105[09:22:57] *** Denyol[Away] is now known as Denyol
L106[09:23:20] <Denyol> findp p_175929_4_
L107[09:28:48] <Denyol> !sp p_i46446_3_ woodMeta
L108[09:29:20] <Denyol> !sp p_i46446_5_ growVines
L109[09:30:32] *** diesieben|away is now known as diesieben07
L110[09:34:04] ⇦ Quits: ThePsionic (~Psi@ip5457f909.direct-adsl.nl) (Remote host closed the connection)
L111[09:34:25] ⇨ Joins: ThePsionic (~Psi@ip5457f909.direct-adsl.nl)
L112[09:35:19] <Denyol> ahh, why doesnt java support mutltiple inheritance :/
L113[09:35:27] ⇨ Joins: Vazkii (~Vazkii@144.134.37.188.rev.vodafone.pt)
L114[09:37:20] <diesieben07> Denyol, it does.
L115[09:37:29] <diesieben07> just not the terrible parts of it.
L116[09:37:37] <Denyol> ? You can extend multiple classes?
L117[09:37:41] <diesieben07> No.
L118[09:37:42] <diesieben07> interfaces
L119[09:37:45] <kashike> extend no, implement yes
L120[09:37:50] <diesieben07> you can inherit behavior from multiple interfaces
L121[09:37:56] <Denyol> But I want the methods from both classes
L122[09:37:57] <diesieben07> you can't inherit state from multiple classes
L123[09:38:03] <diesieben07> you can't.
L124[09:38:06] <Denyol> So I don't need to re write them
L125[09:38:09] <diesieben07> make the classes interfaces.
L126[09:38:14] <kashike> you should rethink your structure if you need to extend 2 classes
L127[09:39:04] <Denyol> Ill give my example, I have a Abstract BlockBase class that handles registering to the registry and textures, but now I want to extend BlockSapling in another class, but I still want BlockBase's methods
L128[09:39:18] <gigaherz> Denyol: yeah java can't do that
L129[09:39:19] <gigaherz> sorry ;p
L130[09:39:27] <diesieben07> The BlockBase class is a bad idea.
L131[09:39:31] <Denyol> If its an interface i end up re writing the code anyway
L132[09:39:32] <diesieben07> don't use inheritance to share code.
L133[09:39:47] <Denyol> its not exactly sharing
L134[09:39:58] <Denyol> its more utility methods that need to be done for each block anyway
L135[09:40:00] *** TTFT|Away is now known as TTFTCUTS
L136[09:40:02] <diesieben07> yes
L137[09:40:05] <diesieben07> that's called sharing code.
L138[09:40:15] <Denyol> Why shouldnt I?
L139[09:40:17] <diesieben07> and you can't put "textures" in the block class anyways wihtout crashing servers.
L140[09:40:30] <Denyol> its only called client side
L141[09:40:33] <Denyol> via proxy
L142[09:40:36] <diesieben07> doesn't matter.
L143[09:40:38] <diesieben07> it has to go in the proxy.
L144[09:41:00] <Denyol> The implementation is in the blockbase, but its only ever called in the proxy
L145[09:41:00] <diesieben07> as for why you shouldn't... there are plenty of articles on the web, this is the first one i found: http://www.blinkingcaret.com/2016/04/13/composition-superior-inheritance/
L146[09:41:08] <gigaherz> Denyol: that doesn't matter to java
L147[09:41:11] <diesieben07> yes. the server will load your blockbase class
L148[09:41:12] <gigaherz> the method is loaded regardless
L149[09:41:21] <diesieben07> the entire class.
L150[09:41:26] <Denyol> So I should use sideonly?
L151[09:41:29] <diesieben07> No.
L152[09:41:30] <gigaherz> no you should not
L153[09:41:31] <gigaherz> in fact
L154[09:41:32] <diesieben07> You should use your proxy.
L155[09:42:26] <gigaherz> the ONLY thing that should ever use @SideOnly, are overrides to *vanilla* methods, that reference @SideOnly classes in their parameters
L156[09:42:40] <diesieben07> ...or that have @SideOnly themselves.
L157[09:42:43] <gigaherz> note, only if they reference @SideOnly classes
L158[09:42:47] <gigaherz> if they just have @SideOnly
L159[09:42:47] <Denyol> Ik, but I dont exactly see an issue with having a method that isnt called
L160[09:42:53] <gigaherz> IMO, they should still use the proxy
L161[09:43:07] <gigaherz> diesieben07: no if you allow yourself to do that
L162[09:43:18] <gigaherz> then you allow yourself to put client-only code in your server classes
L163[09:43:23] ⇨ Joins: johnnyhostile (~irssi@castlevania.bhgdo.com)
L164[09:43:26] <gigaherz> it's a failure of consistency
L165[09:43:33] <diesieben07> you can't relaly help it if you have to override a vanilla method...
L166[09:43:45] <gigaherz> I use helpers on the proxy
L167[09:43:50] <Denyol> If you insist Ill move that part of code to my proxy, but so far it hasnt caused issues
L168[09:43:51] <diesieben07> e.g. Block::shouldSideBeRendererd
L169[09:43:55] <diesieben07> you MUST use @SideOnyl with taht
L170[09:43:57] <diesieben07> if you override it.
L171[09:44:11] <gigaherz> no you do not
L172[09:44:26] <gigaherz> the code will just not override
L173[09:44:27] <diesieben07> last time i checked there were some issues if you didn't.
L174[09:44:31] <gigaherz> the @Override annotation is only informational
L175[09:44:37] <diesieben07> i know that...
L176[09:44:41] <gigaherz> you either call client-only code, or you don't
L177[09:45:03] <gigaherz> Denyol: it's bad practice
L178[09:45:13] <Denyol> so the issue with sharing methods is what? I was always told to not repeat myself?
L179[09:45:19] <diesieben07> Denyol, anyways... as for your base block class, make a method like BlockUtils.register
L180[09:45:21] <diesieben07> or something
L181[09:45:24] <diesieben07> which does all the necessary stuff
L182[09:45:28] <gigaherz> Denyol: sharing code is good
L183[09:45:33] <gigaherz> you shouldn't base inheritance on that
L184[09:45:37] <gigaherz> that's the point
L185[09:45:40] <diesieben07> but since you should register your blocks in RegistryEvent.Register<Block> anyways...
L186[09:45:51] <diesieben07> the point of such a utility method is questionable
L187[09:46:03] <Denyol> my blocks are registered in the preinit
L188[09:46:08] <diesieben07> that's the old way.
L189[09:46:53] <gigaherz> Denyol: https://github.com/gigaherz/Ender-Rift/blob/master/src/main/java/gigaherz/enderRift/EnderRiftMod.java#L88
L190[09:46:56] <diesieben07> the "proper" way is to have a bunch of static final fields holding your blocks
L191[09:47:09] <diesieben07> and then in that event you do event.registerAll(MYBLOCK1, MYBLOCK2, ...)
L192[09:47:25] <Denyol> what is "RegistryEvent.Register<Block>" for?
L193[09:47:26] <diesieben07> ehh, event.getRegistry().registerAll
L194[09:47:29] <Denyol> never heard of it
L195[09:47:34] <diesieben07> it tells you when you should register yoru blocks.
L196[09:47:36] <gigaherz> it's called
L197[09:47:39] <gigaherz> when the registry is loaded
L198[09:47:50] <gigaherz> and ready to use
L199[09:47:54] <gigaherz> those events trigger BEFORE preinit
L200[09:47:57] <Denyol> Is there any use of that over in pre init
L201[09:48:00] <gigaherz> yes
L202[09:48:09] <gigaherz> it makes the code more organized
L203[09:48:17] <gigaherz> also enforces the fact that registration should not depend on config
L204[09:48:28] <gigaherz> since config filename is given in preinit, and that happens before preinit
L205[09:48:28] <Denyol> mine doesnt
L206[09:48:30] <diesieben07> it's a separation of concerns
L207[09:48:38] <diesieben07> you don't tell the registry what to register
L208[09:48:42] <diesieben07> the registry asks you when it's ready.
L209[09:48:53] <gigaherz> it also allows optional registries
L210[09:48:53] <gigaherz> like
L211[09:48:56] ⇦ Quits: Qball (Elite17280@ipv6.3.chi.elitebnc.org) (Ping timeout: 180 seconds)
L212[09:48:58] <gigaherz> mod-provided registries
L213[09:49:01] <gigaherz> with soft-dependencies
L214[09:49:08] <gigaherz> if a mod isn't present
L215[09:49:11] <Denyol> oh
L216[09:49:13] <gigaherz> the method will never run
L217[09:49:19] <gigaherz> so you won't attempt to register things on a missing registry
L218[09:49:49] <diesieben07> there is also ModelRegistryEvent for any ModelLoader.* calls
L219[09:49:55] <diesieben07> which you should use over preInit
L220[09:50:02] <gigaherz> forge ensures that <Block> runs before <Item> and <Item> runs before anything else
L221[09:50:26] <gigaherz> hence why I can do the createItemBlock calls in <Item> without crashing ;P
L222[09:51:02] <gigaherz> oh and
L223[09:51:10] <gigaherz> I'm guilty of the inheritance problem myself:
L224[09:51:10] <gigaherz> https://github.com/gigaherz/Commons/tree/master/src/main/java/gigaherz/common
L225[09:51:34] <Denyol> Im busy re-arranging all my code to fix it
L226[09:51:38] <gigaherz> however, I only use thosefor setRegistryName and setUnlocalizedName
L227[09:51:48] <gigaherz> never models or rendering ;P
L228[09:51:56] <diesieben07> registering stuff in constructors is a bad idea :P
L229[09:52:03] <Denyol> why?
L230[09:52:11] <diesieben07> ruins any ability to test your code
L231[09:52:14] <diesieben07> well, not any
L232[09:52:17] <diesieben07> but it makes it a LOT harder.
L233[09:52:22] <gigaherz> I'm not registering
L234[09:52:25] <Denyol> I used the code sharing for, https://github.com/Denyol/Spliced/blob/master/src/main/java/me/denyol/spliced/block/BlockBase.java#L33
L235[09:52:30] <gigaherz> only setRegistryName and setUnlocalizedName
L236[09:52:32] <Denyol> but I guess I could put that in a Util class
L237[09:52:40] <diesieben07> yeah that's ... not very good
L238[09:52:49] <diesieben07> setRegName and setUnlocalizedName are ok
L239[09:52:56] <fry> https://en.wikipedia.org/wiki/Liskov_substitution_principle
L240[09:53:18] <fry> "if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e. an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of T (correctness, task performed, etc.). "
L241[09:53:30] <diesieben07> ugh not that stupid "all my blocks as an enum" pattern
L242[09:53:39] <diesieben07> i want to choke that youtuber who invented taht so bad
L243[09:53:44] <Denyol> why not?
L244[09:53:52] <diesieben07> so much bloated unnecessary code.
L245[09:53:58] <diesieben07> that adds no value
L246[09:54:04] <gigaherz> xcept making you feel smug
L247[09:54:20] <Denyol> yeah, I can get the material, register and creative tab just from the enum
L248[09:54:23] <fry> I want to choke whoever invented "fields as duplicates for map keys" but I do see the value in doing that, so meh :P
L249[09:54:35] <diesieben07> whats wrong with public static final Block myBlock = new MyBlock("nameHere", materialHere)
L250[09:54:50] <Denyol> not much
L251[09:54:53] <diesieben07> instead of having the variables in an enum and then just referencing them from the block construction...
L252[09:54:56] <diesieben07> it adds no value
L253[09:54:59] ⇨ Joins: Qball (Elite17280@ipv6.3.chi.elitebnc.org)
L254[09:55:09] <gigaherz> diesieben07: you can't for(ModBlock block : ModBlocks.values()) with that ;P
L255[09:55:11] <fry> why use SomeClass.myBlock if I can use Blocks.get("myBlock")? :P
L256[09:55:13] <gigaherz> I have seen MANY people do it
L257[09:55:18] <gigaherz> fry: it's slower
L258[09:55:22] <fry> no it's not :P
L259[09:55:27] <gigaherz> you use SomeClass.myBlock MANY MANY times usually
L260[09:55:35] <diesieben07> yes it is...
L261[09:55:40] <fry> if I do, I create a local variable :P
L262[09:55:45] <gigaherz> map as a replacement for field access
L263[09:55:49] <gigaherz> is even worse than the opposite
L264[09:56:09] <fry> if the field is the only way to get the block, then it's fine
L265[09:56:18] <diesieben07> fry, also Blocks.myBlock is statically checked. nbot at runtime.
L266[09:56:34] <diesieben07> well, there is always Block.REGISTRY.get
L267[09:56:36] <fry> if we actually have a whole special thing for registering blocks with string names, I can't help but point out the redundancy :P
L268[09:56:40] <diesieben07> so if you want a map, use that.
L269[09:56:46] <gigaherz> IMO
L270[09:56:51] <gigaherz> the registration is just paperwork
L271[09:56:55] <gigaherz> to allow OTHERS to find my stuff
L272[09:57:01] <diesieben07> ^
L273[09:57:09] <TechnicianLP> what are Gameregistry.ObjectHolder and Gameregistry.ItemStackHolder for?
L274[09:57:15] <fry> except other use magic like @InjectWhatever to get the convenience of the field again
L275[09:57:20] <fry> yup, that
L276[09:57:26] <gigaherz> TechnicianLP: for automatically obtaining registrable objects
L277[09:57:34] <gigaherz> IMO
L278[09:57:38] <gigaherz> that's good for dependency objects
L279[09:57:39] <diesieben07> the main advantage is the static compiler checking.
L280[09:57:42] <gigaherz> soft-dependencies without crashing
L281[09:57:48] <diesieben07> MyBlocks.doesNotExist won't compile.
L282[09:58:01] *** RichardG_ is now known as RichardG
L283[09:58:02] <diesieben07> registry.get("doesNotExist") will jsut give you air... which is terrible
L284[09:58:03] <fry> if you only use Block, and not a subtype, then there's no need for compiler checking
L285[09:58:08] <gigaherz> I use it here:
L286[09:58:09] <gigaherz> https://github.com/gigaherz/Ender-Rift/blob/master/src/main/java/gigaherz/enderRift/EnderRiftMod.java#L84
L287[09:58:14] <diesieben07> nothing to do with types.
L288[09:58:17] <diesieben07> it's abotu the names existing
L289[09:58:20] <gigaherz> as a way to get a reference to the Guidebook item
L290[09:58:25] <fry> what if the mod is not there? :P
L291[09:58:26] <gigaherz> for use in recipes
L292[09:58:34] <diesieben07> i am talking about my own blcoks
L293[09:58:57] <TechnicianLP> can i put those annotations nywhere?
L294[09:59:05] <diesieben07> afiak yes
L295[09:59:08] <gigaherz> TechnicianLP: public statics
L296[09:59:50] <gigaherz> it wouldn't make sense on an instance field, it would require forge to intercept all class instantiation ;P
L297[10:00:17] <fry> I wouldn't use ObjectHolder for my own block, I would either get it from the registry or get it from the field, if I really needed it :P
L298[10:00:36] <diesieben07> of course
L299[10:00:40] <diesieben07> for your own blocks it's stupid
L300[10:00:47] <gigaherz> but then again, so is using the registry
L301[10:00:50] <diesieben07> (people still misuse this thing a lot...)
L302[10:01:02] <fry> but the fact that I need to have the instance of the subtype points to some issue with the encapsulation of the block logic :P
L303[10:01:33] <fry> ideally I would just ask for the "capability" instead :P
L304[10:01:58] <gigaherz> dynamic stuff: registry, soft-dependencies: @ObjectHolder, hard-dependencies: @OH or direct field access on their code, my own stuff: direct field access through my mod class
L305[10:02:11] <gigaherz> that's my opinion on it ;P
L306[10:02:20] <diesieben07> agreed
L307[10:03:37] <Denyol> gigaherz: what does event.getRegistry().registerAll( do?
L308[10:03:53] <TechnicianLP> register everything you give it ...
L309[10:04:14] <Denyol> but does the block need to call GameRegistry.register(this); and register its itemblocks?
L310[10:04:37] <gigaherz> Denyol: the event lets you register many things at once
L311[10:04:44] <gigaherz> it replaces all the GameRegistry.register(X) calls
L312[10:04:53] <gigaherz> with one single call to registerAll(block1, block2, block3, ...)
L313[10:05:03] <gigaherz> and similarly for items
L314[10:05:21] <Denyol> and it handles the itemblocks for you?
L315[10:05:26] <gigaherz> nope
L316[10:05:28] <gigaherz> not at all
L317[10:05:32] <gigaherz> hence why in the <Item> event
L318[10:05:34] <gigaherz> I have separate
L319[10:05:37] <gigaherz> .createItemBlock() calls
L320[10:05:39] <gigaherz> for my blocks
L321[10:05:49] <gigaherz> alongside with all the items
L322[10:06:08] <gigaherz> https://github.com/gigaherz/Ender-Rift/blob/master/src/main/java/gigaherz/enderRift/EnderRiftMod.java#L105
L323[10:06:10] <Denyol> where are those?
L324[10:06:17] <Denyol> oh
L325[10:06:52] <gigaherz> ntoe that itemblocks are OPTIONAL
L326[10:06:58] <gigaherz> that's whey forgestopped doing them automatically
L327[10:07:05] <gigaherz> because it's best for blocks that don't need an itemblock
L328[10:07:06] <gigaherz> to not have one
L329[10:07:33] <gigaherz> which is why it's good NOT to have a generic block base class
L330[10:07:43] <gigaherz> with an automatic itemblock registration
L331[10:07:52] <gigaherz> it helps do things right
L332[10:08:01] <Denyol> Im getting rid of it now
L333[10:08:22] <Denyol> so https://hastebin.com/cedavuwaka.cs would be how I use the registry event?
L334[10:08:39] <gigaherz> it's one way
L335[10:08:51] <gigaherz> not necessarily THE way
L336[10:08:56] <Denyol> well Im changing it this way now, so :P
L337[10:08:59] <gigaherz> like diesieben07 said
L338[10:09:01] <gigaherz> you could use
L339[10:09:10] <gigaherz> public staticfinal Block block1 = new Block1();
L340[10:09:14] <gigaherz> and then in the event just do
L341[10:09:19] <gigaherz> registerAll(block1, ...)
L342[10:09:25] <gigaherz> without having the constructor in it
L343[10:09:44] <Denyol> I have a https://hastebin.com/milidiluyo.cpp in another class
L344[10:09:45] <gigaherz> you gain the ability to use final, that way
L345[10:09:51] <Denyol> can i just call loadBlocks() in the event?
L346[10:09:53] <gigaherz> well
L347[10:10:06] <gigaherz> think about it
L348[10:10:16] <diesieben07> you could
L349[10:10:19] <gigaherz> if you have the fields initialized already, you don't need loadBlocks
L350[10:10:20] <gigaherz> ;P
L351[10:10:26] <diesieben07> but you should really separate instatiation and registration
L352[10:10:30] <gigaherz> in a way, your registry event would REPLACE loadBlocks
L353[10:10:31] <diesieben07> they are separate things.
L354[10:10:32] <Denyol> I am now
L355[10:10:54] <diesieben07> and then there is no point not moving the instatiation to the field initializer
L356[10:10:59] <diesieben07> which makes you able to use final
L357[10:11:02] <diesieben07> which is always nice
L358[10:11:55] <Denyol> ok ill do it with final
L359[10:12:03] <gigaherz> good
L360[10:12:09] <gigaherz> then you won't need loadBlocks at all
L361[10:12:10] <TechnicianLP> looks like @ObjctHolder can be used for any registry type ...
L362[10:12:18] <gigaherz> TechnicianLP: that's the idea
L363[10:12:31] <gigaherz> that's why it's @ObjectHolder
L364[10:12:37] <gigaherz> and not @BlockHolder and @ItemHolder
L365[10:12:37] <gigaherz> ;P
L366[10:12:39] <TechnicianLP> but its in gameregistry class
L367[10:12:52] <gigaherz> so?
L368[10:12:58] <gigaherz> GameRegistry.register(thing)
L369[10:13:01] <gigaherz> works for ALL registries too
L370[10:13:37] <gigaherz> all standard registries, that is
L371[10:13:49] <gigaherz> it excludes entities and tileentities ;P
L372[10:14:46] ⇨ Joins: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com)
L373[10:14:49] <TechnicianLP> because you only register the classes for those?
L374[10:15:04] <kashike> because they're done a different way :P
L375[10:15:21] <gigaherz> yeah
L376[10:15:24] <gigaherz> IMO,
L377[10:15:32] <gigaherz> there should be a standard registry of EntityFactory objects
L378[10:15:38] <gigaherz> with all the stuff you pass into registerModEntity
L379[10:15:45] <gigaherz> and IMO
L380[10:15:54] <Shambling> is there a way to invert the colors of a block without touching its default textures?
L381[10:16:01] <gigaherz> TileEntities shouldn't require a registry -- minecraft should always call block.createTileEntity
L382[10:16:17] <gigaherz> I think it's bad that it's possible to replace a block's TE without its knowledge
L383[10:17:10] <gigaherz> Shambling: not without a TESR
L384[10:17:14] <diesieben07> there is an entity registry now
L385[10:17:26] <diesieben07> but i don't think you can register directly do it wihtout things going wrong
L386[10:17:32] <gigaherz> yes but you can't use it directly
L387[10:17:38] <gigaherz> since forge needs extra data for the entities
L388[10:17:52] ⇨ Joins: Ashindigo_ (uid202308@id-202308.hathersage.irccloud.com)
L389[10:17:56] <gigaherz> so the registry is hidden away
L390[10:17:57] <Denyol> it doesnt like https://hastebin.com/icedeborap.cs
L391[10:18:19] <gigaherz> becuase you are in <Block>
L392[10:18:22] <gigaherz> and itemblocks are <Item>s
L393[10:18:24] <Denyol> nvm I mixed up the type
L394[10:18:27] <Shambling> ok I guess it would just be easier to create a new item based off of the parent then
L395[10:18:28] <Denyol> yeah sox
L396[10:18:39] <Shambling> was thinking of having several configs for my dyingworld mod
L397[10:19:08] <Shambling> exploding crops, crops that turn into mushrooms that give off wither effects, saplings that get converted into big puffballs that explode in a harm potion
L398[10:19:26] <Denyol> lets see if things broke now that ive moved all my code :P
L399[10:19:35] <Shambling> so I was thinking of using the chorus fruit thingy as a base
L400[10:21:16] <Shambling> gosh, realistic terrain generator deserts are pretty
L401[10:23:22] <Denyol> welp its crashing now
L402[10:25:07] <Ashindigo_> Yay
L403[10:27:12] <Denyol> https://hastebin.com/tucasutiqi.css, happens now when I try view my creative tab
L404[10:28:30] <Denyol> oh nvm i think I know why
L405[10:29:09] *** diesieben07 is now known as diesieben|away
L406[10:29:12] <Shambling> one thing I always screw up with minecraft, is Y or Z up and down?
L407[10:29:27] <Ashindigo_> Y right?
L408[10:29:40] <Shambling> I think its supposed to be Z, but with minecraft I think they use the wrong left hand rule or something
L409[10:29:53] <Shambling> but Y I think is what minecraft uses, I wanted to confirm
L410[10:29:55] <Shambling> off to google!
L411[10:30:35] <Shambling> yeah its Y, cheers
L412[10:31:33] <Ashindigo_> Cheers
L413[10:33:33] <gigaherz> regarding the up component
L414[10:33:41] <gigaherz> there's two frames of thought:
L415[10:33:54] <gigaherz> for CAD-like systems
L416[10:34:03] <gigaherz> you think of a work table, or a floor
L417[10:34:21] <gigaherz> so X,Y are the horizontal plane coords, and Z becomes the elevation
L418[10:34:26] <Shambling> how do you guys get a random block out of Blocks?
L419[10:34:54] <gigaherz> for movies, games, and other camera-based systems
L420[10:34:56] <Shambling> I thought I could do Blocks.randValue; but it seems like you need to feed the name
L421[10:35:02] <gigaherz> the X,Y is the "drawing surface" -- the canvas
L422[10:35:18] <gigaherz> and Z is the distance from the canvas (near plane)
L423[10:35:30] <gigaherz> so there's no "supposed to be"
L424[10:35:35] <Shambling> so that is how they explain it?
L425[10:35:39] <gigaherz> yes
L426[10:35:49] <gigaherz> so you choose Y-up or Z-up depending on how you see it
L427[10:35:51] <Shambling> sounds like artsy fartsy people just wanted to be different from engineers and architects
L428[10:35:58] <gigaherz> if you think of a moving camera object
L429[10:35:59] <Shambling> =P
L430[10:36:01] <gigaherz> you will use Y-up
L431[10:36:10] <gigaherz> if you think of a floor plan, you will use Z-up
L432[10:36:23] <gigaherz> and games are more often than not, Y-up
L433[10:36:43] <gigaherz> which makes terrain systems silly
L434[10:36:53] <gigaherz> lots of x,z around
L435[10:37:24] <Shambling> bbiab, gotta go to a farmers market meeting
L436[10:37:27] <Shambling> whoooo boy :|
L437[10:38:26] ⇦ Quits: secknv (~secknv@bl14-176-22.dsl.telepac.pt) (Ping timeout: 180 seconds)
L438[10:42:12] <Shambling> what is Blocks.DIRT considered? is that an array? some kind of hash table? what
L439[10:42:27] <Shambling> where blocks is what I'm asking about, DIRT just being a way to reference a part of Blocks
L440[10:42:39] <Denyol> gigaherz my registerBlocks are not being called
L441[10:42:40] <Shambling> I had a brain fart and can't remember the name of that java type :P
L442[10:42:52] <gigaherz> Denyol: @Mod.EventBusSubscriber
L443[10:42:55] <gigaherz> on the class
L444[10:43:10] <Denyol> oh yeah forgot that
L445[10:46:09] <Denyol> the registerBlocks isnt being called still
L446[10:46:34] <Denyol> all it has is "event.getRegistry().registerAll( splicer );" splicer being a public static final Block
L447[10:46:51] <gigaherz> does the method have @SubscribeEvent?
L448[10:46:55] <Denyol> yes
L449[10:46:58] <gigaherz> is it static?
L450[10:47:02] <Denyol> yes
L451[10:47:17] <gigaherz> and theclass has @Mod.Eventbussubscriber?
L452[10:47:21] <Denyol> yeah
L453[10:47:34] <gigaherz> then it should get called
L454[10:47:41] <Denyol> its not
L455[10:48:00] <Denyol> I dont thing, considering the block is also not showing up in my creative tab
L456[10:48:11] <gigaherz> public static void registerBlocks(RegistryEvent.Register<Block> event) ?
L457[10:48:22] <gigaherz> put a breakpoint kthx
L458[10:48:30] <Denyol> I have, it wasnt called
L459[10:48:33] <gigaherz> don't just go with things that may have other causes ;P
L460[10:48:43] <Denyol> the "registerItems(RegistryEvent.Register<Item> event)" breakpoint stopped
L461[10:48:56] <Denyol> but not on the registerBlocks
L462[10:49:01] <gigaherz> pastebin?
L463[10:49:08] <Denyol> the whole class?
L464[10:49:15] <gigaherz> the method should do
L465[10:49:38] <Denyol> https://hastebin.com/ubotikekuk.cs
L466[10:50:09] <gigaherz> are you SURE it doesn't get called?
L467[10:50:15] <Denyol> 100%
L468[10:50:24] <gigaherz> it looks right to me
L469[10:50:24] <Denyol> otherwise the breakpoint would have stopped there
L470[10:51:31] <Denyol> odd
L471[10:51:42] ⇨ Joins: Cooler (~CoolerExt@103.219.48.64)
L472[10:51:50] <Denyol> maybe it needs to be initialised in that event
L473[10:55:07] <Denyol> thats super odd, the event is not being called
L474[10:57:37] ⇨ Joins: Aurilux (~Aurilux@64-126-82-209.dyn.everestkc.net)
L475[11:00:14] ⇦ Quits: MikrySoft (~mikrysoft@89-76-18-43.dynamic.chello.pl) (Killed (NickServ (GHOST command used by mikryso0)))
L476[11:00:51] ⇨ Joins: AstralSorcerer (~AstralSor@128.151.114.80)
L477[11:08:00] ⇨ Joins: Brokkoli (~Brokkoli@p2E5B1949.dip0.t-ipconnect.de)
L478[11:24:09] *** DarkevilAway is now known as Darkevilmac
L479[11:31:00] ⇦ Quits: AstralSorcerer (~AstralSor@128.151.114.80) (Ping timeout: 201 seconds)
L480[11:31:50] *** Denyol is now known as Denyol[Away]
L481[11:44:44] ⇨ Joins: McJty (~jorrit@94-224-152-81.access.telenet.be)
L482[12:03:42] ⇦ Quits: fscan (~fscan@shodan.chilicode.com) (Quit: ZNC 1.6.4 - http://znc.in)
L483[12:04:50] ⇨ Joins: fscan (~fscan@shodan.chilicode.com)
L484[12:05:34] ⇨ Joins: Meronat (uid190493@id-190493.ealing.irccloud.com)
L485[12:06:06] ⇦ Quits: fscan (~fscan@shodan.chilicode.com) (Client Quit)
L486[12:11:54] ⇦ Quits: cpup (~cpup@32.218.113.255) (Ping timeout: 206 seconds)
L487[12:12:05] ⇨ Joins: cpup (~cpup@32.218.113.255)
L488[12:12:11] ⇨ Joins: fscan (~fscan@shodan.chilicode.com)
L489[12:13:15] ⇨ Joins: kinggoesgaming (uid23106@id-23106.tooting.irccloud.com)
L490[12:26:34] ⇨ Joins: AstralSorcerer (~AstralSor@u-of-rochester-128-151-150-18.wireless.rochester.edu)
L491[12:31:44] ⇦ Quits: McJty (~jorrit@94-224-152-81.access.telenet.be) (Quit: Leaving)
L492[12:43:38] ⇦ Quits: cpup (~cpup@32.218.113.255) (Ping timeout: 194 seconds)
L493[12:43:50] ⇨ Joins: cpup (~cpup@32.218.113.255)
L494[12:50:59] ⇨ Joins: founderio (~Thunderbi@p200300C4E3D4FE008758CF5275D10682.dip0.t-ipconnect.de)
L495[12:51:14] ⇦ Quits: founderio (~Thunderbi@p200300C4E3D4FE008758CF5275D10682.dip0.t-ipconnect.de) (Client Quit)
L496[12:51:23] ⇨ Joins: founderio (~Thunderbi@p200300C4E3D4FE008758CF5275D10682.dip0.t-ipconnect.de)
L497[12:56:34] ⇨ Joins: OrionOnline (~OrionOnli@dslb-092-073-107-198.092.073.pools.vodafone-ip.de)
L498[12:57:11] <OrionOnline> Good Day. I have an UUID from a player. Is there a way i can get the entity from that?
L499[13:01:14] ⇦ Quits: nallar (~nallar@cpc16-cani3-2-0-cust33.14-2.cable.virginm.net) (Quit: ZNC - http://znc.in)
L500[13:03:13] ⇨ Joins: nallar (~nallar@cpc16-cani3-2-0-cust33.14-2.cable.virginm.net)
L501[13:03:49] <gigaherz> OrionOnline: on the server, yes -- assuming the player is online
L502[13:03:56] <OrionOnline> Yeah
L503[13:04:01] <OrionOnline> It is for pathfinding
L504[13:04:14] <gigaherz> look for "getEntityFromUUID"
L505[13:04:21] <gigaherz> you should be able to figure out how to get to it
L506[13:06:31] ⇦ Quits: romibi (~quassel@cable-static-7-174.rsnweb.ch) (Ping timeout: 206 seconds)
L507[13:07:25] ⇨ Joins: MikrySoft (~mikrysoft@89-76-18-43.dynamic.chello.pl)
L508[13:11:46] <OrionOnline> @gigaherz, idea does not seem to find anything with regards to that method name
L509[13:13:32] <Alexbegt> MinecraftServer and WorldServer have that method
L510[13:16:27] ⇦ Quits: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com) (Quit: Leaving)
L511[13:16:38] <Alexbegt> FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(UUID) OrionOnline
L512[13:16:55] ⇨ Joins: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com)
L513[13:17:26] ⇦ Quits: TTFTCUTS (~ttftcuts@ns3366511.ovh.net) (Quit: boop)
L514[13:17:39] <Shambling> hmmmm only thing I can think of to do to get a random block from blocks is to make my own list from blocks.NAME that I want to use, and randomly pick from there
L515[13:18:03] <Shambling> does anyone have a cleaner method? I'd like to pick from a random selection from blocks to change one block to another when an event hits on that block.
L516[13:19:05] <Shambling> I suppose making my own wouldn't be bad, because then I could only have the ones I definitely want, and could even put my own method into the class like getRand() would return a random block from my class
L517[13:19:17] <OrionOnline> @Alexbegt, you are right. They are there....... Why would this not pop up in IDEA
L518[13:20:30] <Alexbegt> Don't know
L519[13:21:14] ⇨ Joins: romibi (~quassel@cable-static-7-174.rsnweb.ch)
L520[13:23:33] ⇨ Joins: immibis (~chatzilla@122-60-104-195.jetstream.xtra.co.nz)
L521[13:31:00] ⇨ Joins: codahq (~codahq@c-73-65-219-228.hsd1.ut.comcast.net)
L522[13:35:58] ⇨ Joins: TTFTCUTS (~ttftcuts@ns3366511.ovh.net)
L523[13:36:00] ⇦ Quits: Ipsis (~Ipsis@82-69-71-184.dsl.in-addr.zen.co.uk) (Ping timeout: 206 seconds)
L524[13:38:38] <terribleperson> @gigaherz: So I was re-reading all the messages that went by while I was away, and noticed the discussion about registering blocks. This was very helpful to me, because I thought you were supposed to register blocks in the preinit. That's not the case? Do https://mcforge.readthedocs.io/en/latest/concepts/registries/ and https://mcforge.readthedocs.io/en/latest/events/intro/ cover what I need to know?
L525[13:43:19] <gigaherz> terribleperson: you CAN do it in preinit
L526[13:43:27] <gigaherz> it's perfectly fine to do so
L527[13:43:31] <LexMobile> no its not
L528[13:43:37] <LexMobile> it's now considered bad practice
L529[13:43:42] <gigaherz> but, it's much more organized if you use the new events
L530[13:43:47] <gigaherz> so if you are writing new mod code
L531[13:43:47] <terribleperson> i mean, I'm writing a mod from scratch so it's not like I have the trouble of changing a big code base. I'd like to do everything right to start with.
L532[13:43:53] <gigaherz> or you want to cleanup existing code
L533[13:43:58] <gigaherz> it's recommended to switch to the new system
L534[13:44:18] <gigaherz> in that case
L535[13:44:42] <gigaherz> the best practices is to use public static final fields for storing your instances
L536[13:44:46] <gigaherz> and then register them in the events
L537[13:47:12] <gigaherz> that moment when you finish terraforming the terrain after removing a whole mountain, and it feels like it had never been there :3
L538[13:47:21] <gigaherz> landscaping*
L539[13:48:39] <LexMobile> static final null fields with @ObjectHolder tags'
L540[13:48:48] *** Darkevilmac is now known as DarkevilAway
L541[13:49:13] <gigaherz> eh I can't possibly agree with using objectholder for my own items & blocks
L542[13:49:48] <gigaherz> but /shrug
L543[13:50:26] <fry> ¯\_(ツ)_/¯
L544[13:51:00] <PaleoCrafter> it'd be really nice if there was something like Kotlin's lateinit with immutability in Java xD
L545[13:51:30] <gigaherz> some WriteOnce<T>?
L546[13:51:58] <PaleoCrafter> basically, only on a language level :P
L547[13:53:19] <Shambling> sometimes I feel like the new good practices are just there to confuse people :P
L548[13:53:50] <gigaherz> only the people who have trouble adapting to the new ideas
L549[13:53:50] <gigaherz> ;P
L550[13:53:58] <Shambling> does it make it easier for the mod to not crash other mods, or to call your objects if they are registered that way?
L551[13:54:13] <gigaherz> @ObjectHolder is awesome for getting hold of dependency items and lbocks
L552[13:54:24] <gigaherz> or if you want to avoid having public statics referenced in your code
L553[13:54:28] <TechnicianLP> Conventions>Loading Stages still mentions registering items/blocks in preinit
L554[13:54:29] <Shambling> because honestly, I'm still learning java, and that is about as far from C programming as my poor brain can adapt
L555[13:54:42] <gigaherz> then you can have auto-initialized instance fields only where you need them
L556[13:54:43] <LexMobile> if you can't agree then you're wrong
L557[13:55:07] <LexMobile> inializing them int he static constructor is bad and most likely will lead to issues because of using undefined state of the rest of the MC engine.
L558[13:55:15] <Shambling> I'm not saying its not good, just that it is so far away from programming in C and C++ from when I learned to program, that I have no bloody clue what you're even talking about now
L559[13:56:03] <PaleoCrafter> I usually go for register(field = new Class())
L560[13:56:09] <Shambling> I'll just need to look at someone's code tha is currently using it, and try to digest what you're referencing
L561[13:56:24] ⇦ Quits: romibi (~quassel@cable-static-7-174.rsnweb.ch) (Read error: Connection reset by peer)
L562[13:56:38] <LexMobile> thats fine paleo, as that isnt in the staic constructor
L563[13:56:49] ⇨ Joins: romibi (~quassel@cable-static-7-174.rsnweb.ch)
L564[13:57:25] ⇦ Quits: quadraxis (~quadraxis@cpc77293-basf12-2-0-cust699.12-3.cable.virginm.net) (Ping timeout: 190 seconds)
L565[13:57:27] <PaleoCrafter> yeah, it still isn't as nice as @ObjectHolder would be if there was some kind of "write once" modifier though :P
L566[13:58:38] <LexMobile> why do you need a write-once modifier?
L567[13:59:19] <LexMobile> and the point with ObjectHolder is even your shit can be replaced
L568[13:59:24] <terribleperson> @gigaherz okay so in your mods you... instantiate your blocks " public static BlockEnderRift rift;" and then you initialize them and pass them to event.getRegistry().registerAll
L569[13:59:24] <LexMobile> so you should use it in case it is
L570[13:59:45] ⇨ Joins: quadraxis (~quadraxis@cpc77293-basf12-2-0-cust699.12-3.cable.virginm.net)
L571[14:01:05] ⇦ Quits: Hunterz (~hunterz@62.182.234.189) (Quit: Leaving.)
L572[14:02:06] <Ordinastie> terribleperson, proper terms are important here : instanciating means creating a new instance, keyword being "new" here
L573[14:04:59] <LexMobile> *facepalm* http://www.minecraftforge.net/forum/topic/50854-registering-messages-1112/
L574[14:05:05] ⇦ Quits: romibi (~quassel@cable-static-7-174.rsnweb.ch) (Ping timeout: 190 seconds)
L575[14:05:36] <terribleperson> @ordinastie sorry, declared "rift" of type BlockEnderRift
L576[14:05:40] <terribleperson> yes?
L577[14:05:40] <PaleoCrafter> started working on the replacement for forgedevelop.com btw, Lex
L578[14:05:54] ⇨ Joins: romibi (~quassel@cable-static-7-174.rsnweb.ch)
L579[14:06:01] <gigaherz> terribleperson: that's how I did it
L580[14:06:05] <gigaherz> doesn't mean it's the best possible code ;P
L581[14:06:18] <gigaherz> as lex said, it's recommended to use @ObjectHolder for them
L582[14:06:21] <terribleperson> yeah there doesn't seem to be "best possible code" out there for me to examine
L583[14:06:31] <terribleperson> so I'm trying to piece together what I'm supposed to be doing.
L584[14:06:36] <gigaherz> sec
L585[14:07:49] <LexMobile> cool, also pretty sure i wrote some example code when the event was made
L586[14:08:21] <Ashindigo_> The new site is pretty nice looking on mobile
L587[14:10:02] <gigaherz> terribleperson: https://gist.github.com/gigaherz/ff01e9c8526bc949efdadd532707fe2f
L588[14:10:08] <gigaherz> that'd be it
L589[14:10:13] <gigaherz> note that
L590[14:10:19] <gigaherz> the @ObjectHolders do NOt need to be in your main mod class
L591[14:10:28] <gigaherz> the idea is that you can declare them in the places you need access to them
L592[14:11:12] <gigaherz> lex, to confirm, the block objectholders, get called before or after the item event?
L593[14:12:25] <LexMobile> before
L594[14:12:42] <gigaherz> :thumbsup:
L595[14:13:04] <LexMobile> those are the special cased ones, ive bounced the idea of definiging a dependancy system but ... meh
L596[14:13:15] <Akkarin> bounce it harder
L597[14:13:18] <Akkarin> pls q.q
L598[14:13:24] <Akkarin> I'll buy you a cookie!!!
L599[14:13:38] <terribleperson> okay so @ObjectHolder is a forge annotation that takes a... string? Placing @ObjectHolder before a field does.. what, gets you that registered object in the field?
L600[14:13:53] <LexMobile> IIRC it goes Block->Holders->Item->Holders->Others In Alphabetical->Holders
L601[14:14:00] * gigaherz nods
L602[14:14:15] <gigaherz> terribleperson: forge scans for fields using that annotation
L603[14:14:21] <gigaherz> then looks at the type of the field
L604[14:14:22] <gigaherz> so like
L605[14:14:27] <gigaherz> @ObjectHolder applied to Block
L606[14:14:32] <gigaherz> will look in the Blocks registry
L607[14:14:44] <LexMobile> Note it can also be on a class!
L608[14:14:52] <gigaherz> hm?
L609[14:15:00] <TechnicianLP> can @OBjectHolder handle subclasses of Item/BLock?
L610[14:15:01] <LexMobile> @ObjectHolder("minecraft")
L611[14:15:06] <Akkarin> It can cook you coffee!
L612[14:15:09] <gigaherz> hmmm
L613[14:15:10] <LexMobile> public class Blocks{
L614[14:15:10] <Akkarin> (it can do that, right?)
L615[14:15:16] <gigaherz> and it fills in all the fields based on name?
L616[14:15:21] <LexMobile> public static final Block dirt = null;
L617[14:15:27] <gigaherz> TechnicianLP: probably not, but no idea ;P
L618[14:15:28] <LexMobile> public static final Block grass = null;
L619[14:15:29] <LexMobile> }
L620[14:15:33] <LexMobile> is the same as:
L621[14:15:36] <gigaherz> oooh that's fancy
L622[14:15:40] <LexMobile> public class Blocks{
L623[14:15:52] <LexMobile> @ObjectHolder("minecraft:dirt")
L624[14:15:59] <LexMobile> public final Block dirt = null;
L625[14:16:08] <LexMobile> @ObjectHolder("minecraft:grass")
L626[14:16:10] <Shambling> do you cook coffee?
L627[14:16:19] <LexMobile> public final Block grass = null;
L628[14:16:20] <LexMobile> }
L629[14:16:44] <LexMobile> you can also mix and match, if the fields dont match the registry name
L630[14:17:27] <LexMobile> the way I personally recomend using it, is to have a single Block/Items class for your mod somewhere and just @ObjectHolder the class
L631[14:17:36] <LexMobile> cleanest, IMO
L632[14:18:44] <LexMobile> hell if you wanted to you could do something like this:
L633[14:19:39] <LexMobile> @mod MyClass { @ObjectHolder(MODID) public static Blocks {} @ObjectHolder(MODID) public static Items} and then reference everywhere else in your mo by doing MyMod.Blocks.SomeName
L634[14:20:33] <Akkarin> isn't that a little awkward to work with in your IDE considering that nothing is going to be defined unless the IDE is aware of the annotation?
L635[14:21:52] * fry still prefers doing WhateverRegistry.get("name")
L636[14:22:10] <Akkarin> pls full di is where it's at
L637[14:22:12] * Akkarin hides
L638[14:23:30] ⇨ Joins: primetoxinz (~primetoxi@ip68-107-226-229.hr.hr.cox.net)
L639[14:23:47] <Ashindigo_> Full di?
L640[14:24:07] <PaleoCrafter> DI = dependency injection :P
L641[14:24:11] <Akkarin> yep
L642[14:24:16] <LexMobile> this is dep injection
L643[14:24:32] <Ashindigo_> Ah
L644[14:24:35] <LexMobile> and you could do reg.get in your inializer if you want to shutup your IDE
L645[14:24:48] <LexMobile> but again as the registries are reloaded multiple times during the life of the game
L646[14:24:55] <Akkarin> so I could inject a Block into an Item type field or constructor? ;-)
L647[14:24:56] <LexMobile> doing anyhting in a static initalizer is bad
L648[14:25:01] <terribleperson> Okay so you can use @ObjectHolder to populate a field with something from some registry. anything that's been registered you can put into a field? If you put the annotation above a field, it uses the annotation string as the name that it's looking for in the registry. If you put the annotation above a class, it tries to populate all the fields in the class based on the... field names?
L649[14:25:33] <LexMobile> items are registered as domain:entry
L650[14:25:38] <fry> @ObjectHolder basically does reg.get for you with magic at appropriate times
L651[14:25:47] <LexMobile> so if you put it on a field you need to supply both
L652[14:25:53] <terribleperson> yeah, i see that
L653[14:26:02] <LexMobile> if you put it on a class it assumes the fields are under that domain with the entry name of the field name
L654[14:26:04] <Akkarin> ah ... well in that case it's pretty damn close to the DI concepts
L655[14:26:14] <Akkarin> much nicer than your usual static all the things
L656[14:26:49] <terribleperson> yeah I'm looking at https://mcforge.readthedocs.io/en/latest/concepts/registries/ and I see that. You can annotate a class with a domain and it tries to populate all the fields with the assumption that the names refer to an object in the domain
L657[14:26:56] <terribleperson> what happens if you get it wrong?
L658[14:26:57] <LexMobile> yup the magic, like i said is the fact that, atleast on the client, the registry can be reloaded multiple times in the life of a single minecraft process
L659[14:27:13] <LexMobile> so if you have a save that has substitutions enabled you don't have to do anything
L660[14:27:17] <LexMobile> it just magically works
L661[14:27:42] <LexMobile> if you get it wrong the field is nulled
L662[14:28:00] <terribleperson> 'cause you already set it to null?
L663[14:28:05] <terribleperson> or it just does that ANYWAYS
L664[14:28:20] <LexMobile> no cuz registry.get(name) returns null.
L665[14:28:27] <LexMobile> Atleast im pretty sure thats what it does...
L666[14:28:54] <Akkarin> Would be nice if it did actually gave you some indication unless, of course, it lets you grab third party mod instances as well
L667[14:29:11] <LexMobile> yup
L668[14:29:12] <terribleperson> Okay, so if you use @objectholder to populate fields, and can even use it inside your mod to get your own objects (is that recommended?)
L669[14:29:20] <LexMobile> yes
L670[14:30:51] <LexMobile> it doesn't give indication because getting a null is valid for soft dependancies, and yes you should use it to grab your own entries as well because it allows for magic handeling of substitutions automatically. and you shouldnt have issues with messing up the names because well you're the one registereing shit.
L671[14:31:59] <fry> I'd still go with doing reg.get exactly when you need the object as a starting point, without ever storing it in a field somewhere; if it becomes a performance problem - then you can think how to cache it :P
L672[14:32:46] <terribleperson> okay, I'm confused here. I think I understand @objectholder now (and I'll be using it to GET my own objects), but you recommended "static final null fields with @ObjectHolder tags" to pass to the registration event, at least that's what I thought you were saying
L673[14:33:00] <terribleperson> can't use object holder to get an object i haven't registered yet
L674[14:33:02] <terribleperson> ...right?
L675[14:33:12] ⇨ Joins: Dark (~MrDark@cpe-75-185-6-240.columbus.res.rr.com)
L676[14:33:37] ⇦ Quits: ThePsionic (~Psi@ip5457f909.direct-adsl.nl) (Quit: Leaving)
L677[14:34:51] ⇨ Joins: Bjorguv (~reidboyce@c-73-83-133-41.hsd1.wa.comcast.net)
L678[14:35:18] <terribleperson> or... the event runs first, so I... defined a field of some name, the type being one of my blocks, then the event runs, registers them, and then forge goes back and populates the field with the registered object...?
L679[14:36:26] <TechnicianLP> @ObjectHolder can handle subtypes as well ... /me likes it
L680[14:36:35] <gigaherz> terribleperson: did you see my example?
L681[14:37:00] <LexMobile> fry.. no
L682[14:37:01] <gigaherz> event runs -> object gets registered -> holder injection runs -> field gets assigned
L683[14:37:03] <LexMobile> thats fucking horrid
L684[14:37:12] <LexMobile> reg.get() is expensive as shit
L685[14:37:24] <terribleperson> gigaherz: Okay, so I've got the order right with my last tentative sentence?
L686[14:37:25] <fry> semantically, doing field access Blocks.someBlock (if it's annotated with ObjectHolder) field should be equivalent to doing reg.get("someBlock") instead (at the point of the call)
L687[14:37:35] <LexMobile> no.. its not
L688[14:37:47] <fry> note the word semantically
L689[14:37:49] <LexMobile> one if a pointer get
L690[14:38:00] <LexMobile> the toehr is a shitload of method calls and hashing lookups
L691[14:38:06] <fry> I'm not talking about performance
L692[14:38:07] <gigaherz> terribleperson: for practical purposes, yes
L693[14:38:07] <LexMobile> MASSIVLY slower
L694[14:38:30] <fry> when you're trying to understand ObjectHolder, thing about reg.get
L695[14:38:33] <LexMobile> Minecraft modding is a horrible nightmare performance wise
L696[14:38:45] <terribleperson> the event runs, the object is registered, forge goes back and gives you the registered object. and since the event and the holder injection run before ANYTHING else
L697[14:38:55] <terribleperson> anything else you do with that field is referencing the registered object
L698[14:39:05] <terribleperson> same as anything you or anyone else does later
L699[14:39:32] <fry> if you access the field before the object is registered, you get whatever's in the registry at that point (null)
L700[14:39:41] <fry> if you access after, you get your object
L701[14:39:53] <LexMobile> after the events are done*
L702[14:40:03] <fry> if you access it after some shenanigans with reloading, and the object is changed, you get the new object
L703[14:40:05] <LexMobile> so accessing the field in the event handler wont work
L704[14:40:27] <fry> yes, the only caveat is during that event
L705[14:40:47] <LexMobile> basically tho, if you use the registry events, preinit all object holders are valid
L706[14:41:12] <fry> so, think of object holders as more performant registry.get :P
L707[14:41:28] <fry> much more performant apparently :P
L708[14:41:37] <LexMobile> very much so
L709[14:42:07] <terribleperson> so if I were rewriting your OWN mod, instead of public static BlockEnderRift rift; I'd do public static final BlockEnderRift rift = null; and annotate it with @ObjectHolder("enderrift:rift")?
L710[14:42:25] <LexMobile> yes
L711[14:42:28] ⇨ Joins: osum4est (~osum4est@c-174-52-155-148.hsd1.ut.comcast.net)
L712[14:42:41] <terribleperson> ....awesome, guys. Thank you Lex and gigaherz
L713[14:42:52] <LexMobile> the final also prevents stupid people from diretly assigning it when they shouldn't
L714[14:42:56] <Akkarin> well setting it to null will probably cause your IDE to yell at you a bunch
L715[14:43:05] <LexMobile> depends on your IDE
L716[14:43:10] <fry> I don't think that's the way performance optimizations should be done (very magical special case for one specific thing), but meh :P
L717[14:43:10] <LexMobile> Mot dont care
L718[14:43:15] <Akkarin> IntelliJ does :P
L719[14:43:20] <terribleperson> Is Eclipse going to yell at me?
L720[14:43:28] <LexMobile> it shouldn't
L721[14:43:36] <terribleperson> I used to hate it but I don't now. Either it's gotten lighter, or it's just that I have a better computer.
L722[14:43:39] <Akkarin> but I guess non-final + no initialization does as well?
L723[14:43:46] <terribleperson> now I have to go because I have to be somewhere in 17 minutes and haven't even showered yet.
L724[14:43:50] <terribleperson> See y'all.
L725[14:44:29] <LexMobile> by one specific thing you mean an entire complex systemm... bu whatever dont feel like arguing that right now cuz its dumb
L726[14:44:44] <TechnicianLP> why arent capabilities in a normal registry?
L727[14:44:58] <PaleoCrafter> IDEA doesn't complain about non-final + no intialisation, even if you put @Nonnull on the field xD
L728[14:45:33] <osum4est> how would i go about rendering a different item instead of my own while holding it? I've got it working for regular minecraft blocks and items, but it doesn't work for items with custom renderers (ie. tinker's bows)
L729[14:45:34] <Akkarin> yeah since it essentially says "oh there is no value so it's probably intended to change at some point"
L730[14:45:45] <fry> I'm sure there ecists a combination of idea settings that will yell at you for it :P
L731[14:45:48] <fry> *exists
L732[14:45:52] <PaleoCrafter> probably
L733[14:45:54] <Akkarin> Well obviously
L734[14:45:58] <LexMobile> because caps dont need nearly as much complexity as a normal registry
L735[14:46:09] <LexMobile> they dont need to be synced across the network or in save files
L736[14:47:10] <LexMobile> there is also no such thing as substitutions in caps.. as that'd break the entire point
L737[14:47:14] ⇨ Joins: Mitch (~Mitch@host109-154-136-10.range109-154.btcentralplus.com)
L738[14:47:20] <TechnicianLP> osum4est: basically you create a IBakedModel for your item that just return the Quads of the IBaked Model of the item you want to mimic ... (you probably should support all subinterfaces of IBakedModel as well)
L739[14:47:58] ⇨ Joins: secknv (~secknv@bl14-176-22.dsl.telepac.pt)
L740[14:48:31] <Shambling> dang, I think I might be stuck out here for the next few hours if I don't want to get soaked
L741[14:48:37] <secknv> what do I use do display a chat message to just the player that used my item?
L742[14:48:45] <Mitch> Hey there - trying to run debug mode but getting this error: http://pastebin.com/7muU4v5c - this also occurs on standard run configuration and also on a fresh install, has anyone seen this before?
L743[14:49:14] <Mitch> Using eclipse ^^
L744[14:49:54] <PaleoCrafter> why are you using the runClient task?
L745[14:53:00] <osum4est> TechnicianLP, would this work for items without custom models? and can you think of any other mods that do this that are open source?
L746[14:55:19] <TechnicianLP> if it does not have a custom model it will most likely use the VanillaModelWrapper class
L747[14:56:45] <osum4est> ok got it. any examples you can think of?
L748[14:57:28] <TechnicianLP> not really ...
L749[14:58:45] ⇦ Quits: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com) (Read error: Connection reset by peer)
L750[15:00:32] ⇨ Joins: bilde2910 (bilde2910@178.51-174-170.customer.lyse.net)
L751[15:02:11] <TechnicianLP> will a call to World.getTileEntity load the chunk at that position?
L752[15:04:12] <Dark> I would assume yes, but I don't know if it changed in the new versions
L753[15:04:29] <TechnicianLP> any way to prevent that?
L754[15:04:37] <Dark> check if the chunk is loaded
L755[15:06:36] <Dark> https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/src/main/scala/com/builtbroken/mc/lib/transform/vector/AbstractLocation.java#L185
L756[15:06:44] <Mitch> using runClient to test the launch
L757[15:06:51] <Dark> its 1.7.10 code but might help
L758[15:07:23] <TechnicianLP> World#isBlockLoaded is what i added now
L759[15:07:33] <TechnicianLP> *use
L760[15:15:16] ⇨ Joins: airbreather_ (~airbreath@d149-67-99-43.nap.wideopenwest.com)
L761[15:16:04] <Mitch> Hey there - trying to run debug mode but getting this error: http://pastebin.com/7muU4v5c - this also occurs on standard run configuration and also on a fresh install, has anyone seen this before? Using eclipse/recommended 1.11.2 forge version
L762[15:16:11] ⇦ Quits: airbreather (~airbreath@d149-67-99-43.nap.wideopenwest.com) (Ping timeout: 194 seconds)
L763[15:18:00] <Mitch> I would make a forums post, but can't seem to register
L764[15:18:36] ⇨ Joins: Shawn|i7-Q720M (~shawn156@c-50-170-156-102.hsd1.co.comcast.net)
L765[15:21:48] ⇦ Quits: airbreather_ (~airbreath@d149-67-99-43.nap.wideopenwest.com) (Ping timeout: 194 seconds)
L766[15:29:20] ⇦ Quits: OrionOnline (~OrionOnli@dslb-092-073-107-198.092.073.pools.vodafone-ip.de) (Quit: Leaving)
L767[15:33:21] ⇦ Quits: jackmcbarn (jackmcbarn@gateway.insomnia247.nl) (Ping timeout: 192 seconds)
L768[15:44:04] ⇨ Joins: jackmcbarn (~jackmcbar@gateway02.insomnia247.nl)
L769[15:46:39] <LexMobile> cant register?
L770[15:46:43] <LexMobile> thats not descriptive
L771[15:47:43] ⇨ Joins: ThePsionic (~Psi@ip5457f909.direct-adsl.nl)
L772[15:51:52] * gigaherz facepalms
L773[15:52:03] <gigaherz> I auto-crafted an extra void resource miner, instead of a void ore miner XD
L774[15:53:31] <Mitch> Apologies, did send across a contact us form, getting 'You are not permitted to register an account on this site'
L775[15:55:21] ⇨ Joins: airbreather (~airbreath@d149-67-99-43.nap.wideopenwest.com)
L776[16:00:56] ⇦ Quits: Katrix (~Katrix@2a02:fe1:b001:f400:2cb7:2cdd:cc3a:f0d5) (Ping timeout: 180 seconds)
L777[16:02:10] ⇨ Joins: Katrix (~Katrix@2a02:fe1:b001:f400:3517:9a10:aa17:eb0a)
L778[16:07:05] <osum4est> how can i create and register a custom item renderer in 1.10? in 1.7 you could implement iitemrenderer and register it with the forgeclient. how can i do that for 1.10?
L779[16:09:18] *** fry is now known as fry|sleep
L780[16:09:37] ⇦ Quits: jackmcbarn (~jackmcbar@gateway02.insomnia247.nl) (Ping timeout: 192 seconds)
L781[16:16:43] <LexMobile> 0.o
L782[16:17:30] <LexMobile> i'll have flame look into that. what browser/site are you using?
L783[16:17:40] <LexMobile> also if possible can you get a screenshot
L784[16:18:09] *** DarkevilAway is now known as Darkevilmac
L785[16:18:52] ⇨ Joins: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com)
L786[16:23:10] <Shambling> ok so... I want to feed a modified position to setBlockState, why is there no setX :\
L787[16:23:42] <Shambling> do I really need to modify it with a vector simply to create a new position that is offset by 1 z? lol
L788[16:24:01] ⇨ Joins: jackmcbarn (~jackmcbar@gateway02.insomnia247.nl)
L789[16:24:11] <Ordinastie> pos.south() ?
L790[16:24:11] <Shambling> or does down(int) work for that?
L791[16:24:26] <Shambling> err meant y, not z
L792[16:24:31] <Ordinastie> maybe check the code ?
L793[16:24:45] <Shambling> I've scrolled through the methods, I guess down(int) is probably the easiest
L794[16:24:58] ⇨ Joins: VikeStep (~VikeStep@192.43.96.58.static.exetel.com.au)
L795[16:25:13] <Shambling> question though, is does that modify the code, or simply return the value?
L796[16:25:34] <Ordinastie> what does that mean ?
L797[16:25:35] <Shambling> guess it doesn't matter, if I'm only calling it once it will just modify an event position that has already been called
L798[16:25:52] <Ordinastie> just look at the actual code of the method
L799[16:25:53] <Shambling> well lets say I want to world.destroyBlock(event.getPos(), false)
L800[16:26:08] <Shambling> if I wanted to destroy the block under, would I just feed it world.destroyBlock(event.getPos().down(), false)
L801[16:26:31] <Shambling> external libraries in idea? I always just go through the source code in build source lol
L802[16:27:03] <Ordinastie> Ctrl+Click on the method should show you the source
L803[16:28:31] *** Darkhax_AFK is now known as Darkhax
L804[16:28:45] ⇨ Joins: TechnicianLP2 (~AndChat59@p4FE562D6.dip0.t-ipconnect.de)
L805[16:28:55] <Shambling> *facepalm*
L806[16:28:58] <Shambling> wow thats easy enough
L807[16:29:37] <Shambling> so question on vanilla, does mycelium destroy farmland and spread, or does it only replace dirt/grass?
L808[16:29:52] <Shambling> because if it can destroy farmland, I don't need to do any further block replacements
L809[16:30:10] <Shambling> otherwise I'll need to rand through the other 8 blocks and randomly change those to mycelium as well
L810[16:30:37] <Shambling> I 'think' it can replace farmland, I'll go test it
L811[16:30:56] <Shambling> dangit test world, why are you an ocean
L812[16:31:24] <drazuam> I thought it only replaced dirt
L813[16:31:30] <drazuam> pretty sure it doesn't even replace grass
L814[16:31:45] <Shambling> dang
L815[16:31:56] ⇦ Quits: TechnicianLP (~Technicia@p4FE562D6.dip0.t-ipconnect.de) (Ping timeout: 180 seconds)
L816[16:32:06] <Shambling> lets play waiting for spread ticks
L817[16:32:18] <Shambling> spreads only in darkness?
L818[16:32:26] <Shambling> hell let me just go look at the dang class itself, probably faster
L819[16:32:43] ⇦ Quits: johnnyhostile (~irssi@castlevania.bhgdo.com) (Quit: leaving)
L820[16:32:49] <drazuam> if (iblockstate.getBlock() == Blocks.DIRT && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && iblockstate1.getLightOpacity(worldIn, blockpos.up()) <= 2)
L821[16:32:52] <drazuam> there's the check
L822[16:34:11] <Shambling> ha you found it alot faster than me, thanks
L823[16:34:26] <Shambling> well I could always 'fix' it with a little override. But that would cause undesired behavior
L824[16:34:37] <Shambling> a good programmer would probably make their own clone block that had the behavior they wanted
L825[16:35:14] ⇨ Joins: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net)
L826[16:35:28] <Shambling> I could always kill the farmland by drying up water within a 5 block radius
L827[16:36:49] <Shambling> really is too bad mycelium doesn't kill grass, ah well
L828[16:37:07] <Shambling> guess my dream of having a mushroom death land spread across the world will require alot more work :P
L829[16:40:20] <gigaherz> make grass die off and turn into podzol, and then podzol into dirt? ;P
L830[16:40:35] <gigaherz> then dirt can turn int mycelium freely ;P
L831[16:40:39] ⇦ Quits: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net) (Quit: Gaelan)
L832[16:41:35] <Shambling> yeah it'll require learning alot more, because alot of this modpack uses biome's o plenty for the wasteland biomes
L833[16:42:06] <Shambling> and all the grass in that is BoP grass
L834[16:42:27] <Shambling> though I suppose if it inherits from base grass, I might be able to make calls on that and ignore the fact its from another mod
L835[16:48:13] ⇨ Joins: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net)
L836[16:48:45] ⇦ Quits: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net) (Ping timeout: 190 seconds)
L837[16:51:48] ⇦ Quits: King_Hual (adam@thefoxbox.xyz) (Quit: RIP pipe)
L838[16:53:09] ⇨ Joins: King_Hual (adam@thefoxbox.xyz)
L839[16:53:17] ⇨ Joins: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net)
L840[16:53:56] <Shambling> is there a simple way to see if a block is of base type dirt?
L841[16:54:06] <Shambling> I think I'm going through way too many levels here, and there must be a simpler way
L842[16:54:50] <Shambling> I was thinking I could use getDirtBlockState(state) somewhere, but I'm not sure where to apply that to the blockstate
L843[16:55:54] *** cpw|out is now known as cpw
L844[16:56:05] ⇦ Quits: AstralSorcerer (~AstralSor@u-of-rochester-128-151-150-18.wireless.rochester.edu) (Ping timeout: 190 seconds)
L845[16:57:50] <Shambling> dangit nm, that is probably from BoP api
L846[16:58:00] <Shambling> I'll go look at base grass and see how minecraft does it
L847[17:04:19] <mrkirby153> Hmm, not sure why, but my block isn't showing up in my creative tab
L848[17:05:26] ⇦ Quits: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net) (Ping timeout: 180 seconds)
L849[17:06:19] ⇨ Joins: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net)
L850[17:07:14] ⇦ Quits: drazuam (kiwiirc@75.188.100.64) (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
L851[17:08:35] <osum4est> how can i create and register a custom item renderer in 1.10? in 1.7 you could implement iitemrenderer and register it with the forgeclient. how can i do that for 1.10?
L852[17:08:47] <gigaherz> there's no such thing
L853[17:08:55] <gigaherz> what exactly do you need to customize?
L854[17:09:11] <gigaherz> there's other ways to do many of the things people did with custom renderers
L855[17:10:16] <osum4est> :/ dang. I need to make it look like you are holding a different block/item instead of mine. both in the hand and in the inventory. ideally i would also be able to draw a box around the item in the inventory as well
L856[17:12:16] ⇦ Quits: MrZoidbergMD (Zoidberg@2a01:4f8:d13:311::3) (Quit: PanicBNC account has been auto selected for removal due to login inactivity.)
L857[17:12:17] <osum4est> and the item rendered must be able to be changed at runtime
L858[17:12:25] <gigaherz> that you can do
L859[17:12:26] ⇦ Quits: ntzrmtthihu777 (ntzrmtthih@Join.The.DarkSide.We.Have.Coookies.PanicBNC.us) (Remote host closed the connection)
L860[17:12:56] <gigaherz> choosing an item at runtime is one of the easier parts of using custom models ;P
L861[17:13:09] <gigaherz> you have two choices
L862[17:13:30] <gigaherz> ItemMeshDefinition, or item overrides
L863[17:13:48] <gigaherz> given that you need to return the model of a different thing
L864[17:13:55] <gigaherz> I think overrides are your only choice
L865[17:14:40] <osum4est> ok, cool. where do i start? is there an example somewhere or is it pretty simple?
L866[17:16:35] <gigaherz> sec looking
L867[17:17:53] ⇨ Joins: sinkillerj (~sinkiller@nc-67-232-15-221.dhcp.embarqhsd.net)
L868[17:18:53] <mrkirby153> When adding a block, do I have to do anything special to get the block to show up in my inventory? because it isn't right now
L869[17:18:57] <gigaherz> eh
L870[17:18:59] <gigaherz> meh
L871[17:19:06] <gigaherz> osum4est: let me guide you through it.
L872[17:19:13] <gigaherz> the basis for using custom models
L873[17:19:16] <osum4est> gigaherz, awesome thanks
L874[17:19:24] <gigaherz> hmm
L875[17:19:29] <gigaherz> have you done normal models in 1.10.2?
L876[17:19:37] <gigaherz> as in, with the json files and all that stuff
L877[17:20:04] <osum4est> i've only done as item, and set "item/handheld" as its parent with texture
L878[17:20:06] <gigaherz> mrkirby153: in thecreative menu, or in general?
L879[17:20:10] <gigaherz> osum4est: okay
L880[17:20:14] <mrkirby153> Both
L881[17:20:16] <gigaherz> did you use a blockstates file, or just vanilla json?
L882[17:20:24] <mrkirby153> I am using a blockstate file
L883[17:20:30] <gigaherz> that was to osum4est ;P
L884[17:20:35] ⇨ Joins: ntzrmtthihu777 (ntzrmtthih@Join.The.DarkSide.We.Have.Coookies.PanicBNC.us)
L885[17:20:36] <mrkirby153> Oh sorry :P
L886[17:20:49] <osum4est> gigaherz, vanilla json
L887[17:20:51] <gigaherz> mrkirby153: errors in the log?
L888[17:21:06] <gigaherz> osum4est: okay so
L889[17:21:14] <gigaherz> as you may or may not know
L890[17:21:20] <gigaherz> you can use blockstates json files for both blocks and items
L891[17:21:30] <gigaherz> (vanilla allows it for blocks, forge allows it also for items)
L892[17:21:47] <gigaherz> now, this is important, because in order to use a custom model, you'll need to go through a blockstates file
L893[17:22:00] <gigaherz> so, the key for this
L894[17:22:08] <gigaherz> is to create your own simple ICustomModelLoader
L895[17:22:18] <gigaherz> this interface has two methods, accepts, and loadModel
L896[17:22:32] <gigaherz> in accepts, you want to compare the provided location, against a pattern
L897[17:23:15] <gigaherz> something like, "yourmod:custom/specialitem", which will show up in the accepts call, as "yourmod:models/block/custom/specialitem"
L898[17:23:28] <gigaherz> I like to use custom/ as a way to distinguish from normal models in the resources folder
L899[17:24:14] <gigaherz> now, in the blockstates file for your item, you'll have to reference "model":"yourmod:custom/specialitem"
L900[17:24:14] <osum4est> gigaherz, ok, so accepts basically just determines whether to call loadModel or not?
L901[17:24:20] <gigaherz> yes
L902[17:24:27] <gigaherz> the blockstates json + the accepts test
L903[17:24:40] <gigaherz> will determine that your item, and only your item, needs to get this custom model
L904[17:24:58] <gigaherz> then from loadModel, you'll want to return your own simple IModel
L905[17:25:24] <gigaherz> this IModel has getTextures and getDependencies, which can be used to tell forge that you require other models to be loaded
L906[17:25:37] <gigaherz> if you don't need anything specific, you can just return Collections.emptyList
L907[17:25:40] <mrkirby153> Huh, it decided to start working again
L908[17:25:56] <mrkirby153> Wait, I think I lied
L909[17:25:57] <gigaherz> the key of IModel
L910[17:25:57] ⇦ Quits: Mitch (~Mitch@host109-154-136-10.range109-154.btcentralplus.com) (Quit: Leaving)
L911[17:26:01] <gigaherz> is the bake method
L912[17:26:10] <gigaherz> from it
L913[17:26:19] <gigaherz> you will want to return a custom IBakedModel
L914[17:26:26] <gigaherz> in the baked model is where all the magic will happen
L915[17:26:49] <osum4est> so return the bakedmodel of the item i want to show?
L916[17:26:54] <gigaherz> nope
L917[17:26:56] <mrkirby153> gigaherz, Apparently the block isn't being registered
L918[17:26:59] ⇦ Quits: Vazkii (~Vazkii@144.134.37.188.rev.vodafone.pt) (Quit: seeya m8 thx 4 playin)
L919[17:26:59] <gigaherz> you need a custom IBakedModel
L920[17:27:08] <gigaherz> which will in turn return the right model
L921[17:27:10] <gigaherz> i'll get to it
L922[17:27:17] <mrkirby153> Even though I'm registering it
L923[17:27:34] <gigaherz> mrkirby153: give me a minute, it's annoying to switch conversations ;P
L924[17:27:40] <mrkirby153> Okay
L925[17:27:45] <gigaherz> osum4est: so,
L926[17:27:48] <gigaherz> in normal models
L927[17:27:58] <gigaherz> they would just have getQuadscalled
L928[17:28:08] <gigaherz> and the model would just return a bunch of quads to draw from there
L929[17:28:11] <gigaherz> but
L930[17:28:17] <gigaherz> mojang gave us getOverrides()
L931[17:28:29] <gigaherz> which is used to provide different models *dynamically*
L932[17:28:33] <gigaherz> based on the state of the item
L933[17:28:52] <gigaherz> the standard ItemOverrideList
L934[17:28:56] <gigaherz> handles some itemstates
L935[17:29:08] <gigaherz> and just applies the new model
L936[17:29:17] <gigaherz> but you can customize the ItemoverrideList
L937[17:29:33] <gigaherz> by overriding its applyOverride method
L938[17:29:40] <gigaherz> and returning a different resourcelocation
L939[17:29:43] <gigaherz> OR
L940[17:29:49] <gigaherz> alternatively, you can override handleItemState
L941[17:30:00] <gigaherz> and return a fully customized baked model from it
L942[17:30:59] <gigaherz> so in short: ICustomModelLoader -> IModel -> IBakedModel -> ItemOverrideList#handleItemState -> getQuads
L943[17:31:38] <gigaherz> ModelLoaderRegistry.registerLoader(new YourCustomModelLoader());
L944[17:31:50] <osum4est> ok, so how do i get the quads of an existing item?
L945[17:31:53] <gigaherz> remember to register the loader, otherwise it won't actually trigger
L946[17:32:29] <gigaherz> look at ItemOverrideList#handleItemState
L947[17:32:57] <gigaherz> you'll see it calls .....getModelManager().getModel
L948[17:33:00] <osum4est> got it
L949[17:33:04] <gigaherz> you'd have to do something similar
L950[17:33:14] <gigaherz> just making sure you return the right item's model
L951[17:33:26] <gigaherz> hence why I said it may be enough to work at the applyOverride level
L952[17:34:06] ⇦ Quits: ThePsionic (~Psi@ip5457f909.direct-adsl.nl) (Quit: Leaving)
L953[17:34:10] <gigaherz> if you have an ItemStack to get the model from
L954[17:34:19] <gigaherz> you can use getItemModelMesher().getItemModel(itemStack)
L955[17:35:18] <gigaherz> if ALL you need is to use some other item's model without changing it
L956[17:35:28] <gigaherz> you can just override handleItemStack, to call getItemModel
L957[17:35:36] <gigaherz> with an itemStack built from the data in your item
L958[17:35:36] <osum4est> ok cool. so will this define the model for all itemstacks of my item, or can i have a different model for each itemstack?
L959[17:35:54] <gigaherz> this gets called for each itemstack
L960[17:35:55] <gigaherz> each frame
L961[17:36:04] <osum4est> ok, perfect
L962[17:36:16] <gigaherz> or at least each "item change" ;P
L963[17:36:49] <gigaherz> no it must be each frame, otherwise the animation thing wouldn't work
L964[17:37:22] ⇨ Joins: johnnyhostile (~irssi@castlevania.bhgdo.com)
L965[17:38:00] <gigaherz> mrkirby153: can you show code?
L966[17:38:17] <osum4est> so in my mind i've always thought a model just defined the shape of a 3d object. in minecraft, a model is the shape, texture, inventory icon, etc. ?
L967[17:38:33] <mrkirby153> The block shows up in the world (I can setblock) but the item doesn't https://paste.mrkirby153.tk/wilamejabi.java and https://paste.mrkirby153.tk/vanofapero.java gigaherz
L968[17:38:33] <gigaherz> osum4est: there's no such thing as "inventory icon" anymore
L969[17:38:43] <gigaherz> mc uses 3d shapes even in the inventory
L970[17:39:00] <gigaherz> that is, they have that thick edge that you see when you hold them in your hand
L971[17:39:10] <gigaherz> it just happens to be seen exactly from the front, so it doesn't show
L972[17:39:19] <gigaherz> but yes
L973[17:39:21] <gigaherz> in games
L974[17:39:30] <gigaherz> the model usually has references to materials
L975[17:39:43] <gigaherz> although it doesn't need to be the case
L976[17:39:58] <gigaherz> generally
L977[17:40:09] <gigaherz> "model" means shape + materials + other properties
L978[17:40:16] <osum4est> gigaherz, oh, ok got it. how hard would it be to layer my own texture on top of the model i'm using in the inventory?
L979[17:40:50] <gigaherz> i'm not sure what you mean
L980[17:41:17] <gigaherz> you mean your own model, or one of the dynamic ones that you get from other items?
L981[17:41:42] <osum4est> gigaherz, basically if possible, i would like to show another border around the model that i got from another item. or i guess show my own model on top of theirs
L982[17:42:17] ⇨ Joins: BerciTheBeast (~BerciTheB@77.111.11.55.ipv4.telemach.net)
L983[17:42:19] <gigaherz> okay this is when it gets complicated
L984[17:42:23] <gigaherz> because item models don't have to be flat
L985[17:42:43] <gigaherz> so "adding a new layer" or "adding a border" may just simply not make sense
L986[17:43:43] <gigaherz> jsut think of block models
L987[17:44:52] <osum4est> but can i render another model in front of the one from the other item?
L988[17:44:56] <gigaherz> yes
L989[17:45:14] <gigaherz> however, it is not as straightforward ;P
L990[17:45:30] <gigaherz> the idea is
L991[17:45:39] <gigaherz> on the handleItemState on the override list
L992[17:45:49] <gigaherz> you can return a slightly different custom IBakedModel
L993[17:45:51] <gigaherz> in this case
L994[17:46:11] <gigaherz> you will want to return a combined set of quads
L995[17:46:13] <gigaherz> from getQuads
L996[17:46:23] <gigaherz> this list would contain quads from both the original item
L997[17:46:26] <gigaherz> and your "extras"
L998[17:46:40] <gigaherz> you can build this item model from within handleItemState
L999[17:46:50] <gigaherz> by calling getquads on the other item's model
L1000[17:47:01] <gigaherz> and combining those quads with your own
L1001[17:47:02] <gigaherz> however
L1002[17:47:10] <gigaherz> you probably want to cache those combined models
L1003[17:47:15] <gigaherz> and not do this every single frame
L1004[17:47:28] <osum4est> ok, sounds doable!
L1005[17:47:32] <gigaherz> mrkirby153: are you calling ModelLoader.setCustomModelResourceLocation?
L1006[17:47:37] <mrkirby153> Do I have to?
L1007[17:47:39] <gigaherz> from PRE-init? or ModelRegistryEvent?
L1008[17:47:40] <gigaherz> yes
L1009[17:47:46] <gigaherz> otherwise there's no item model for your thing
L1010[17:47:48] <osum4est> gigaherz, thank you for all of your help!!!
L1011[17:47:56] <mrkirby153> Why doesn't MC handle that by default anymore?
L1012[17:48:23] <mrkirby153> Also, what would I set the resource location to?
L1013[17:48:24] <gigaherz> mrkirby153: it hasn't done that since 1.8
L1014[17:48:43] <mrkirby153> IT's been a long time since I've made a mod (Someting like 1.6 I think)
L1015[17:48:58] <gigaherz> option 1 (vanilla-style): a resourcelocation where you have a models/item/blockname.json
L1016[17:49:16] <gigaherz> option 2 (forge-style): a resourcelocation where you have a blockstates json
L1017[17:49:45] <mrkirby153> Okay
L1018[17:49:54] <gigaherz> so like, new ModelResourceLocation(yourblock.getRegistryName(), "inventory")
L1019[17:49:55] <gigaherz> or
L1020[17:50:07] <gigaherz> new ModelResourceLocation(yourblock.getRegistryName(), "property1=value1,property2=value2,...")
L1021[17:50:16] <gigaherz> whatever you type in there
L1022[17:50:24] <gigaherz> will correspond to a variant string in your blockstates file
L1023[17:50:47] <mrkirby153> So, if I want the block to look like it does in the world in my inventory (the isometric looking thing) what would I put in my item model? (vanilla one)
L1024[17:51:04] ⇨ Joins: ScottehBoeh (~ScottehBo@95.144.45.222)
L1025[17:51:11] <gigaherz> { "parent": "yourmod:blocks/yourblockname" }
L1026[17:51:22] <gigaherz> assuming that the parent model has
L1027[17:51:29] <mrkirby153> That it?
L1028[17:51:43] <gigaherz> { "parent": "block/block" -- or "cube" or "cube_all" that inherit from block/block
L1029[17:51:58] <gigaherz> yup
L1030[17:52:03] <gigaherz> example:
L1031[17:52:03] <ScottehBoeh> Hello everyone :) I've got a banner tile entity that I want to change color when clicked. Sofar, I've got an integer NBT data saving (a number index for the textures of the banner). Anyone know how I can get my render class for the tile entity to load the tiles nbt data?
L1032[17:52:29] <gigaherz> https://github.com/gigaherz/PackingTape/blob/master/src/main/resources/assets/packingtape/blockstates/packaged_block.json
L1033[17:52:35] <gigaherz> https://github.com/gigaherz/PackingTape/blob/master/src/main/resources/assets/packingtape/models/block/packaged_block.json
L1034[17:52:44] <gigaherz> https://github.com/gigaherz/PackingTape/blob/master/src/main/resources/assets/packingtape/models/item/packaged_block.json
L1035[17:53:34] <mrkirby153> gigaherz, Is it also true that I have to register a block item for my block?
L1036[17:53:41] <gigaherz> that is on top of calling ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(myBlock), 0, new ModelResourceLocation(myBlock.getRegistryName(), "inventory"));
L1037[17:53:50] <gigaherz> mrkirby153: since 1.9.4, yes
L1038[17:53:58] <mrkirby153> Fun
L1039[17:54:07] <mrkirby153> Why was that descision made?
L1040[17:54:13] <gigaherz> GameRegistry.register(new ItemBlock(myBlock).setRegistryName(myblock.getRegisryName());
L1041[17:54:15] <gigaherz> because
L1042[17:54:16] <gigaherz> it's optional
L1043[17:54:21] <gigaherz> and 99.9% of the modders didn't know
L1044[17:54:32] <gigaherz> so everyone ended up with itemblocks for blocks that didn't need them
L1045[17:54:42] <gigaherz> bloating the item table unnecessarily
L1046[17:55:08] <gigaherz> in order to improve the coding practices of modders
L1047[17:55:10] <gigaherz> it was made opt-in
L1048[17:55:15] <mrkirby153> What kind of blocks wouldn't need an itemblock?
L1049[17:55:26] <Zidane> Ones that aren't in the inventory
L1050[17:55:27] <mrkirby153> Ones that you can't obtain?
L1051[17:55:35] <gigaherz> example: doors
L1052[17:55:44] <gigaherz> the door item, does not correspond with the door block
L1053[17:55:48] <gigaherz> there's no "door block"
L1054[17:55:56] <gigaherz> there's the "lower half" and the "upper half"
L1055[17:56:17] <mrkirby153> So my model has the checkered "missing texture" texture instead of looking like my block
L1056[17:56:21] <gigaherz> better example: liquids
L1057[17:56:31] <gigaherz> you don't want an item liquid
L1058[17:56:36] <mrkirby153> https://paste.mrkirby153.tk/qucitoxozu.json That's my blockmodel
L1059[17:56:40] <gigaherz> you want the bucket, and forge has the universal bucket for it
L1060[17:56:47] <gigaherz> mrkirby153: errors in the lod?
L1061[17:56:48] <gigaherz> log*
L1062[17:56:56] <mrkirby153> Oh yea
L1063[17:57:04] <gigaherz> either you didn't call ModelLoader.setCustomModelResourceLocation
L1064[17:57:09] <gigaherz> or you didn't call it from PRE init
L1065[17:57:21] <gigaherz> or you made a typo ;P
L1066[17:57:21] <mrkirby153> One sec
L1067[17:57:26] <gigaherz> the log should explain
L1068[17:57:27] <mrkirby153> I think it was a typo
L1069[17:57:58] *** PaleoCrafter is now known as PaleOff
L1070[17:58:07] <mrkirby153> Also, does Forge play nicely with JRebel?
L1071[17:58:18] <gigaherz> haven't heard of JRebel so no idea ;P
L1072[17:58:35] <gigaherz> oh some plugin for eclipse
L1073[17:58:39] <gigaherz> I favor IDEA ;P
L1074[17:58:48] <gigaherz> ah no wait, it does support intellij
L1075[17:59:08] <gigaherz> hmmm
L1076[17:59:20] <gigaherz> dunno what the advantage is over the normal hotswap
L1077[17:59:24] <mrkirby153> What goes in the "parent" field? Is it "$MODID:block/$BLOCK_NAME"?
L1078[17:59:52] <gigaherz> pretty much
L1079[18:00:02] <gigaherz> modid can be skipped if it's "minecraft"
L1080[18:00:10] <gigaherz> so like
L1081[18:00:15] <gigaherz> "mymod:block/myblock"
L1082[18:00:19] <gigaherz> vs "block/cube_all"
L1083[18:00:49] <gigaherz> minecraft prepends the "models/" internally
L1084[18:01:39] <mrkirby153> Because it's not working as it should
L1085[18:01:49] <gigaherz> what do the logs say?
L1086[18:01:59] <mrkirby153> Nothing
L1087[18:02:10] <gigaherz> do you call ML.setCustomMRL from preinit?
L1088[18:02:22] <osum4est> gigaherz, does it matter if i register the new model loader in preInit, init or postinit?
L1089[18:02:30] <gigaherz> osum4est: yes, it matters
L1090[18:02:32] <gigaherz> it must be preinit
L1091[18:02:36] <gigaherz> otherwise it would be too late
L1092[18:02:45] <gigaherz> since the item model list is processed right before init gets called
L1093[18:03:03] <osum4est> gigaherz, got it, thanks
L1094[18:03:45] <mrkirby153> Do I call ML.setCustomMRL from pre-init always?
L1095[18:04:00] <gigaherz> unless you prefer to use ModelRegistryEvent
L1096[18:04:28] <gigaherz> as I just told osum4est, mc processes the model list before preinit happens
L1097[18:04:36] <mrkirby153> Huh, one of the tutorials I was looking at said call it in init
L1098[18:04:51] <gigaherz> that was probably using ItemModelMesher.whatever
L1099[18:05:00] <gigaherz> which was the ancient way before like, april 2015
L1100[18:05:17] <gigaherz> ever since we got the model loader pipeline
L1101[18:05:25] <gigaherz> it has been required to use preinit
L1102[18:05:41] <mrkirby153> There we go
L1103[18:05:47] <mrkirby153> Now why isn't this documented anywhere?
L1104[18:06:27] <gigaherz> well there's some docs, a bit segregated
L1105[18:06:29] <gigaherz> https://gist.github.com/williewillus/57d7093efa80163e96e0
L1106[18:06:45] <gigaherz> http://mcforge.readthedocs.io/en/latest/blockstates/states/
L1107[18:07:16] <mrkirby153> Okay, I think I got this figured out now
L1108[18:09:59] ⇦ Quits: MoxieGrrl_ (~MoxieGrrl@173-23-172-139.client.mchsi.com) (Ping timeout: 201 seconds)
L1109[18:10:22] ⇨ Joins: williewillus (~williewil@cpe-24-28-24-13.austin.res.rr.com)
L1110[18:11:35] *** MrKickkiller is now known as MrKick|Away
L1111[18:12:06] <ScottehBoeh> Can I get a TE's NBT data in it's Render Class?
L1112[18:12:27] <ScottehBoeh> My TE contains the texture index, I want my Render Class to get the texture index from the TE
L1113[18:13:05] ⇦ Quits: Brokkoli (~Brokkoli@p2E5B1949.dip0.t-ipconnect.de) (Ping timeout: 190 seconds)
L1114[18:13:12] <williewillus> you get the te instance in the renderer :P
L1115[18:13:17] <gigaherz> why the NBT data?
L1116[18:13:18] <gigaherz> it's a TE
L1117[18:13:22] <gigaherz> you get the instance on your TESR
L1118[18:13:35] <gigaherz> just... access the value
L1119[18:14:04] <ScottehBoeh> Ah. yeah I got it
L1120[18:14:07] <ScottehBoeh> :D
L1121[18:17:59] <osum4est> gigaherz, so do i replace my old vanilla json with the blockstates version? and use that json when registering?
L1122[18:18:47] <gigaherz> well if you register with like "mymod:myitem"
L1123[18:18:59] <gigaherz> forge will first look for "models/item/myitem.json"
L1124[18:19:05] <gigaherz> and then "blockstates/myitem.json"
L1125[18:19:14] <gigaherz> so if you remove the item json, and create a blockstates json
L1126[18:20:05] <gigaherz> then you can do like, https://github.com/gigaherz/Everpipe/blob/master/src/main/resources/assets/everpipe/blockstates/block_pipe.json#L1
L1127[18:20:11] <gigaherz> xcept that's for a custom block model
L1128[18:20:17] <gigaherz> so you'd want the custom model in "inventory"
L1129[18:20:18] <gigaherz> ;P
L1130[18:20:47] <ScottehBoeh> Anyone here a fan of LOTR? I'm making LOTR-esc mod
L1131[18:21:31] <ScottehBoeh> I've got a map ready and everything :)
L1132[18:21:32] <ScottehBoeh> http://i.imgur.com/RviwcIG.jpg
L1133[18:22:17] ⇨ Joins: Brokkoli (~Brokkoli@p2E5B1797.dip0.t-ipconnect.de)
L1134[18:22:50] <gigaherz> ScottehBoeh: there was that "old-style" map mod
L1135[18:23:10] <gigaherz> http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292324-antique-atlas
L1136[18:23:12] <gigaherz> sadly not on 1.10
L1137[18:23:32] <osum4est> gigaherz, cool. now you said to put "model":"yourmod:custom/specialitem", into the block states file. what does that reference?
L1138[18:23:49] <gigaherz> that string
L1139[18:23:52] <gigaherz> woudl get translated into
L1140[18:24:07] <gigaherz> "yourmod:models/block/custom/specialitem" (yes with blcok in it, even if it's an item)
L1141[18:24:17] <gigaherz> which you haveto handle in your accepts method
L1142[18:24:39] <osum4est> ok, but it doesn't matter that i dont have an actual model at that location
L1143[18:25:04] <gigaherz> nope -- so long as your ICustomModelLoader catches it
L1144[18:25:14] <osum4est> got it
L1145[18:34:00] <Shambling> how does one reference podzol as a block?
L1146[18:34:26] <Shambling> it seems to be a dirt variant, so I guess I'm asking, how do I place variants of blocks using setBlockState
L1147[18:34:44] <gigaherz> Blocks.DIRT.getDefaultState.withProperty
L1148[18:34:53] <gigaherz> look at the dirt class for what properties are available
L1149[18:35:43] <Shambling> ah ok that makes sense
L1150[18:35:46] <Shambling> thanks gig
L1151[18:35:52] <Shambling> I was almost that far, but I kept getting the wrong fields
L1152[18:38:30] ⇦ Quits: Noppes (~Noppes@ip56530f2e.direct-adsl.nl) (Read error: Connection reset by peer)
L1153[18:41:09] <gigaherz> https://twitter.com/KingLemmingCoFH/status/835604385644306432
L1154[18:41:11] <gigaherz> noyce!
L1155[18:42:24] <osum4est> gig
L1156[18:43:02] <osum4est> gigaherz, what do i want to return in getDefaultState in the IModel?
L1157[18:44:13] <gigaherz> null will do
L1158[18:44:15] <gigaherz> whatever you return there
L1159[18:44:25] <gigaherz> will get given to you in bake
L1160[18:44:37] <gigaherz> note that bake can receive other things
L1161[18:44:43] <gigaherz> such as TRSRTransformations
L1162[18:45:00] <gigaherz> (which is info about rotation/translation/scale specified in the blockstates)
L1163[18:46:11] ⇦ Quits: williewillus (~williewil@cpe-24-28-24-13.austin.res.rr.com) (Quit: Leaving)
L1164[18:47:39] <ScottehBoeh> eyyy http://i.imgur.com/awSHZVQ.png
L1165[18:47:52] <ScottehBoeh> My banners work :) Doesn't save NBT data when I leave.. That's probably an easy fix
L1166[18:49:18] <gigaherz> yo uamde fully custom banners?
L1167[18:55:34] <osum4est> gigaherz, so what do i want to return in get overrides? i've created my own itemoverridelist class that overrides handleItemState and returns the model of "models/block/cobblestone" (for now)
L1168[18:55:56] <gigaherz> just ignore the other methods, you only care about handleItemState
L1169[18:56:26] <osum4est> sorry, i meant in the getOverrides() method of IBakedModel
L1170[18:56:43] <gigaherz> oh, keep a new instance of your custom ItemOverrideList
L1171[18:56:46] <gigaherz> and just return that
L1172[18:57:15] <osum4est> ok, and the List<ItemOverride> that it takes in, can that just be null?
L1173[18:57:28] ⇦ Quits: cpup (~cpup@32.218.113.255) (Ping timeout: 201 seconds)
L1174[18:57:38] ⇨ Joins: cpup (~cpup@32.218.113.255)
L1175[18:57:44] <gigaherz> no, Collections.emptyList
L1176[18:57:46] <gigaherz> otherwise it would crash
L1177[18:57:55] <osum4est> ok
L1178[18:57:55] <gigaherz> look at the implementation of ItemOverrideList and you'll see ;p
L1179[18:58:16] <osum4est> yup that would've been bad haha
L1180[19:00:23] *** amadornes is now known as amadornes[OFF]
L1181[19:00:49] <osum4est> then finally, how do i get the list of bakedquads of the item to return in getquads?
L1182[19:01:16] <osum4est> itemoverridelist.handleitemstate.getquads?
L1183[19:11:33] <gigaherz> no you don't call handleItemState yourself
L1184[19:11:34] <gigaherz> the idea is
L1185[19:11:40] <gigaherz> you have a "main" IBakedModel
L1186[19:11:45] <gigaherz> that only implements getOverrides
L1187[19:12:02] <gigaherz> and then a "real" IBakedModel that implements getQuads
L1188[19:12:27] <gigaherz> the simplest way to handle it is
L1189[19:12:30] <gigaherz> on the handleItemState
L1190[19:12:33] <gigaherz> you do like
L1191[19:12:48] <gigaherz> new RealBakedModel(blahblah.getItemModel(whatever))
L1192[19:13:05] <gigaherz> and then this baked model adds the quads from the given model into an internal list
L1193[19:13:11] <gigaherz> that it can then return from getQuads itself
L1194[19:13:25] <Shambling> wow is that a super convoluted way to place a block of podzol, but it is done
L1195[19:13:31] <Shambling> thanks again gigaherz
L1196[19:14:03] <gigaherz> lol
L1197[19:14:08] <gigaherz> np
L1198[19:14:20] <Shambling> world.setBlockState(blockpos, Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL));
L1199[19:14:38] <Shambling> there has got to be a shorter way of doing that without creating a blockstate and then putting that in the setBlockState
L1200[19:14:51] <gigaherz> nope lol
L1201[19:14:54] <gigaherz> that's how it works XD
L1202[19:15:18] <Shambling> why on earth do they even have that as a dirt type, considering it shares no useful properties with dirt
L1203[19:15:26] <Shambling> i.e. you can't till podzol, so why is it a variant :\
L1204[19:15:38] <Shambling> you can hoe coarse dirt, so at least that makes sense as a variant
L1205[19:16:09] <Shambling> I mean I'm not going to complain about it not being hoeable, as that actually helps my nefarious needs
L1206[19:16:12] <gigaherz> duno, I'd have put it in grass
L1207[19:16:20] <gigaherz> but yeah whatever.
L1208[19:16:32] ⇦ Quits: founderio (~Thunderbi@p200300C4E3D4FE008758CF5275D10682.dip0.t-ipconnect.de) (Ping timeout: 202 seconds)
L1209[19:16:56] ⇨ Joins: founderio (~Thunderbi@pD9E191D8.dip0.t-ipconnect.de)
L1210[19:17:41] <Shambling> my mod has gone a bit darker. Now if you want some free podzol, all you need to do is plant a sapling. 50% of the time you'll randomly get between 0 and 9 podzol around the sapling ;D
L1211[19:17:48] <Shambling> oh and you'll get hit by lightnign and the sapling dies
L1212[19:21:18] <osum4est> gigaherz, so then in the IModel.bake() do i return the "main" or "real" ibakedmodel
L1213[19:21:26] ⇦ Quits: founderio (~Thunderbi@pD9E191D8.dip0.t-ipconnect.de) (Client Quit)
L1214[19:21:42] <gigaherz> osum4est: the main one
L1215[19:22:01] <gigaherz> your item will be "bound" to the main model
L1216[19:22:08] <gigaherz> and then each frame, mc will get the real model from it
L1217[19:26:03] <osum4est> then who calls the real bakedmodel's getquads method? if it's not registered with imodel...
L1218[19:27:41] ⇨ Joins: Doty1154 (~Doty1154@2601:648:8000:134f:28bc:e805:71c7:91ef)
L1219[19:28:19] ⇨ Joins: Naiten (Naiten@81.2.57.46)
L1220[19:30:35] <gigaherz> osum4est: RenderItem does
L1221[19:30:57] <gigaherz> RenderItem#renderItem
L1222[19:31:00] <gigaherz> does
L1223[19:31:05] <gigaherz> IBakedModel ibakedmodel = this.getItemModelWithOverrides(stack, entitylivingbaseIn.world, entitylivingbaseIn);
L1224[19:31:05] <gigaherz> this.renderItemModel(stack, ibakedmodel, transform, leftHanded);
L1225[19:31:11] <gigaherz> which means
L1226[19:31:18] <gigaherz> mc will do
L1227[19:31:41] <gigaherz> getItemModel(your stack) -> getOverrides().handleItemStack(yourstack) -> renderItemModel(returned model) -> getQuads
L1228[19:31:58] <gigaherz> that's why I said the "main" model only needs handleItemStack
L1229[19:32:06] <gigaherz> while the "real" model will have getQuads
L1230[19:32:31] <gigaherz> you return the real model from handleItemState
L1231[19:32:39] <gigaherz> which gets called on your main model
L1232[19:38:16] ⇦ Quits: BerciTheBeast (~BerciTheB@77.111.11.55.ipv4.telemach.net) (Quit: Ta-ta)
L1233[19:41:15] ⇦ Quits: osum4est (~osum4est@c-174-52-155-148.hsd1.ut.comcast.net) (Ping timeout: 201 seconds)
L1234[19:42:02] ⇨ Joins: osum4est (~osum4est@c-174-52-155-148.hsd1.ut.comcast.net)
L1235[19:43:21] <osum4est> gigaherz, how do i get the quads from an itemstack?
L1236[19:43:26] <tterrag> -> only means lambda to me now
L1237[19:43:31] <tterrag> and I used to give instructions like that too
L1238[19:43:31] <tterrag> :P
L1239[19:43:50] <gigaherz> XD
L1240[19:44:00] <gigaherz> osum4est: uhm
L1241[19:44:18] <gigaherz> you call the getItemModel method from wahteveritwas
L1242[19:44:21] <gigaherz> and then from that model
L1243[19:44:23] <gigaherz> you call getQuads
L1244[19:44:29] <tterrag> why would you? just call vanilla methods for rendering
L1245[19:44:35] <tterrag> don't bother with quads manually
L1246[19:44:36] <gigaherz> he's making a custom model
L1247[19:44:49] <gigaherz> that uses another item's model, and adds some extra quads to it
L1248[19:45:43] <tterrag> ah...
L1249[19:46:18] <tterrag> at runtime, or bake time?
L1250[19:47:00] <osum4est> runtime!
L1251[19:49:25] <tterrag> so call getItemModel, wrap that, return it's quads + yours
L1252[19:50:21] <osum4est> sorry.. what do i call getItemModel on?
L1253[19:50:38] <tterrag> the stack
L1254[19:50:55] <tterrag> or, whatever gigaherz said
L1255[19:51:19] <tterrag> point is, get the IBakedModel from the itemstack
L1256[19:51:35] <gigaherz> osum4est: we talked about that earlier XD
L1257[19:52:10] <gigaherz> .getItemModelMesher().getItemModel(itemStack)
L1258[19:52:30] <osum4est> oh... haha
L1259[19:52:45] <gigaherz> that is, Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
L1260[19:52:58] <osum4est> then when calling getQuads can i pass in null for state and side?
L1261[19:53:12] <tterrag> yes, items have neither
L1262[19:57:11] <osum4est> hmmm very helpful strackstrace not telling me where in my code the NPE occurred... just that it happened while rendering my item
L1263[19:58:30] <tterrag> link?
L1264[19:58:59] <gigaherz> no "caused by"?
L1265[19:59:14] <gigaherz> and yeah, pastebin the stacktrace at least ;P
L1266[19:59:23] <osum4est> one sec
L1267[20:01:18] <osum4est> http://pastebin.com/RwxBfwvu
L1268[20:02:17] <tterrag> what do you return from handlePerspective?
L1269[20:03:51] <osum4est> what class is that apart of? i don't think i've overriden it or implemented it anywhere
L1270[20:04:33] <gigaherz> what do you return from getItemCameraTransforms?
L1271[20:05:10] <gigaherz> if you don't implement IPerspectiveAwareModel, you need to return valid getItemCameraTransforms
L1272[20:05:13] <gigaherz> so that may be the reason
L1273[20:05:16] <osum4est> null
L1274[20:05:31] <gigaherz> yeah that's it, then
L1275[20:05:42] <osum4est> so implement iperspectiveawaremodel in both the main and real baked model?
L1276[20:05:55] <gigaherz> only the real one, I think
L1277[20:06:38] <osum4est> then what to return in handlePerspective?
L1278[20:08:15] <gigaherz> well, you'd want the same that the item's model uses
L1279[20:08:18] <gigaherz> so...
L1280[20:08:27] <gigaherz> if the model you get from getItemModel is IPerspectiveAwareModel
L1281[20:08:30] ⇦ Quits: Shambling (~Shambling@24-181-186-74.dhcp.nwtn.ct.charter.com) (Quit: Leaving)
L1282[20:08:31] <gigaherz> forward the calls to that
L1283[20:08:50] <gigaherz> if not, then you'd have to convert from getItemCameraTransforms
L1284[20:09:18] <terribleperson> @Shambling: What sort of nightmare mod are you creating? All I've heard so far is something about mycelium, and planting saplings and then they're struck by lightning and the soil around them ruined.
L1285[20:09:19] *** Darkhax is now known as Darkhax_AFK
L1286[20:09:21] <gigaherz> similarly to how IPerspectiveAwareModel.MapWrapper does it
L1287[20:09:28] <terribleperson> aw.
L1288[20:09:41] <tterrag> don't implement IPerspectiveAwareModel if you don't need it
L1289[20:09:50] <tterrag> also what is this about a "main and real" baked model
L1290[20:09:58] <gigaherz> eh random terms I made up on the spot
L1291[20:09:58] <osum4est> well getItemModel only returns IBakedModel, which does not implement IPerspectiveAwareModel, so should i just forward getItemCameraTransforms to the item model?
L1292[20:10:08] <tterrag> probably
L1293[20:10:15] <gigaherz> while explaining the process
L1294[20:10:27] <osum4est> im assuming do the same for getParticleTexture, isGui3d, and isBuildInRenderer?
L1295[20:10:33] <gigaherz> I had to distinguish between the IBakedModel that gets returned from IModel#bake
L1296[20:10:45] <gigaherz> and the IBakedModel wrapper that gets returned from ItemOverrideList#handleItemStack
L1297[20:10:59] <gigaherz> and it's 3am
L1298[20:11:04] <tterrag> (they can be the same model)
L1299[20:11:08] <gigaherz> so my originality isn't too high
L1300[20:11:10] <tterrag> but in this case, I see what you mean
L1301[20:12:03] <osum4est> WOAH
L1302[20:12:07] <osum4est> IT WORKED
L1303[20:12:38] <osum4est> this is magic
L1304[20:12:55] <osum4est> and you guys are gods
L1305[20:13:15] <gigaherz> lol thx
L1306[20:13:32] <gigaherz> we just spend a lot of time helping others with crazy stuff like this ;P
L1307[20:13:41] <gigaherz> half of the mod things I have done
L1308[20:13:53] <gigaherz> are excuses to learn how to use some modding feature
L1309[20:13:58] <gigaherz> so that I can explain it to others better
L1310[20:14:59] <osum4est> :D and that's why this community is awesome! one last thing, in handleItemState should i be making a new bakedmodel every time it runs? I'm assuming i should probably cache it...
L1311[20:15:14] <gigaherz> you should cache it
L1312[20:15:25] <osum4est> awesome
L1313[20:15:26] <gigaherz> HOW to cache it, that's a whole other topic ;P
L1314[20:15:33] <gigaherz> since you may have multiple showing at once
L1315[20:15:40] <gigaherz> so you'd have to have a cache able to handle that
L1316[20:15:58] <gigaherz> maybe some Map<ItemStack, BakedModelWrapper>
L1317[20:16:13] <gigaherz> but be careful about over-caching
L1318[20:16:46] <gigaherz> maybe Map<IBakedModel, BakedModelWrapper> would be best
L1319[20:16:47] <osum4est> can i not just have one bakedmodelreal and just make a setter for the itemstack? that gets called when handleItemState gets called with a new item?
L1320[20:16:47] ⇦ Quits: ScottehBoeh (~ScottehBo@95.144.45.222) (Read error: Connection reset by peer)
L1321[20:16:57] <gigaherz> that way you avoid duplicating in case multiple itemstacks have the same model
L1322[20:17:08] <gigaherz> well
L1323[20:17:16] <gigaherz> suppose this situation:
L1324[20:17:22] <gigaherz> you have 5 of your item
L1325[20:17:27] <gigaherz> each one with a different state
L1326[20:17:31] <gigaherz> showing a different model
L1327[20:17:48] <gigaherz> if you don't have a cache able to remember those 5 different states
L1328[20:18:00] <gigaherz> you'll be recomputing the quads list every frame, 5 times
L1329[20:18:14] <osum4est> ohh becuase there isn't a different itemoverridelist for each itemstack. theres only one for the whole item?
L1330[20:18:20] <gigaherz> exactly
L1331[20:18:24] <gigaherz> well
L1332[20:18:33] <gigaherz> one for the whole "main" bakedmodel
L1333[20:18:38] <osum4est> right
L1334[20:18:38] <gigaherz> of which there's only one for your Item
L1335[20:18:43] <gigaherz> hence
L1336[20:18:52] <gigaherz> one ItemOverrideList should cache multiple "real" models
L1337[20:18:58] <tterrag> please don't use baked models for keys
L1338[20:19:37] <gigaherz> ideally you'd want to use the ResourceLocation of the model
L1339[20:19:48] <gigaherz> which means you wouldn't be able to call getItemModel
L1340[20:20:37] <gigaherz> but I have no idea how you could possibly obtain the MRL
L1341[20:21:06] <gigaherz> since ItemModelMesher#shapers is private
L1342[20:21:11] <gigaherz> I mean besides reflection
L1343[20:22:01] <osum4est> no but couldnt i call getModelManager().getModel(resource location)
L1344[20:22:13] <gigaherz> yes but you need to obtain that resource location
L1345[20:22:34] <gigaherz> if you look at the implementation of getItemModel
L1346[20:22:34] <osum4est> oh, and theres not a way to get the resource location from the itemstack
L1347[20:22:39] <gigaherz> it does
L1348[20:22:45] <gigaherz> this.shapes.get(item)
L1349[20:22:50] <gigaherz> itemmeshdefinition.getModelLocation(stack)
L1350[20:22:56] <gigaherz> the "shapes" field, isn't public
L1351[20:23:04] <gigaherz> you'd have to use reflection for it
L1352[20:23:06] <gigaherz> it's doable
L1353[20:23:10] <gigaherz> just not pretty
L1354[20:23:29] <gigaherz> !gf ItemModelMesher.shapes
L1355[20:23:36] <gigaherz> !gf ItemModelMesher.shapes 1.10.2
L1356[20:23:42] <gigaherz> oops
L1357[20:23:45] <gigaherz> !gf ItemModelMesher.shapers 1.10.2
L1358[20:24:11] <osum4est> so why would just making a map of <ItemStack, IBakedModel> be bad?
L1359[20:24:28] <gigaherz> yes
L1360[20:24:42] <tterrag> why?
L1361[20:24:48] <tterrag> itemstacks are not map keys
L1362[20:24:54] <tterrag> they do not implement equals or hashcode in any meaningful way
L1363[20:25:07] <gigaherz> because there's no way to know if two itemstacks are equal or not
L1364[20:25:10] <gigaherz> if they share a model or not
L1365[20:25:11] <tterrag> also, a model lookup is not expensive
L1366[20:25:11] <gigaherz> etc
L1367[20:25:23] <osum4est> oh
L1368[20:25:26] <tterrag> you can cache a model->model map as long as you A) use WEAK keys and B) clear on resource reload
L1369[20:25:39] <gigaherz> so... you could use ReflectionHelper.getPrivateValue(ItemModelMesher.class, mesher, "field_178092_c", "shapers")
L1370[20:25:48] <gigaherz> (and cache the result, only call that once ;P)
L1371[20:26:02] <gigaherz> if you choose to go the "ugly" route
L1372[20:26:20] <gigaherz> except for that reflection call, it's the best approach, IMO
L1373[20:26:26] <tterrag> pls no
L1374[20:26:35] <osum4est> lol
L1375[20:26:39] <gigaherz> alternatively, tterrag's suggestion is more practical
L1376[20:26:42] <gigaherz> and doesn't require hacks
L1377[20:27:18] <gigaherz> and yeah I forgot, you want to register a resource manager reload handler
L1378[20:27:25] <gigaherz> to get notified of reloads, so you can wipe your caches
L1379[20:28:14] <osum4est> yet i can implement that in ICustomModelLoader
L1380[20:28:18] <osum4est> yep*
L1381[20:28:52] <osum4est> so what do you mean by a model, model map?
L1382[20:29:31] <gigaherz> a map, that has weakrefs of IBakedModels as keys
L1383[20:29:38] <gigaherz> and your "real" model class as values
L1384[20:30:11] <gigaherz> WeakHashMap would probably help with that
L1385[20:30:26] <osum4est> so the weakrefs of IBakedModels be the models of the itemstack?
L1386[20:30:39] <gigaherz> yup the returned values from getItemModel
L1387[20:30:39] <tterrag> realistically how many of these will exist at once?
L1388[20:30:53] <PitchBright> o/
L1389[20:31:15] <osum4est> got it. tterrag, probably less than 5 per player
L1390[20:31:48] <tterrag> only 5?
L1391[20:32:08] <osum4est> probably
L1392[20:32:14] <gigaherz> osum4est: and how many distinct "original models" would there be in total?
L1393[20:32:26] <osum4est> the number of items in your game
L1394[20:32:35] <gigaherz> okay so in the worst case scenario
L1395[20:32:46] <gigaherz> you could have as many models as items are in the game
L1396[20:32:54] <gigaherz> in the cache
L1397[20:32:58] <osum4est> i suppose so, yes
L1398[20:33:48] <osum4est> hover you can only have 27 in your inventory at once. how often does the resource maanger reload?
L1399[20:34:06] <osum4est> i mean 36
L1400[20:34:14] <gigaherz> whe nyou open the resource packs window and choose a new one
L1401[20:34:18] <gigaherz> or when you use F3+T
L1402[20:34:21] <osum4est> oh
L1403[20:35:00] <osum4est> could i subscribe to an event that fires when you move something out of your inventory, see if it is my item, and remove it from the cache?
L1404[20:35:00] <tterrag> let's back up
L1405[20:35:02] <tterrag> what is this feature?
L1406[20:36:01] <osum4est> basically it is a handheld auto crafter. the item itself hold the items stack of what you are crafting and by the prss of a button you can craft more that go into that itemstack
L1407[20:36:19] <osum4est> if you've played ark, its kind of how it auto crafts things when you run out
L1408[20:36:28] <tterrag> ok
L1409[20:36:31] <tterrag> so why the model madness?
L1410[20:36:46] <osum4est> so when you hold the crafter, you are holding the item it is crafting
L1411[20:37:11] <osum4est> and you can use the item while holding the crafter
L1412[20:37:18] <gigaherz> all the model madness came about when he asked if it was possible to add some overlay to it
L1413[20:37:27] <tterrag> oh
L1414[20:37:33] <tterrag> so when you said 5, you meant 5 crafters
L1415[20:37:38] *** Mumfrey is now known as mumfrey
L1416[20:37:39] <osum4est> yeah
L1417[20:37:56] <tterrag> ok I don't see much need for any complex caching then
L1418[20:38:09] <tterrag> *what* item is being wrapped will change fairly infrequently
L1419[20:38:21] <osum4est> ^ right
L1420[20:38:27] <tterrag> the model you give in the overrides should just be a simple wrapper, no extra logic
L1421[20:38:34] <tterrag> the "original" model would have all the lookup mess
L1422[20:38:43] <gigaherz> doesn't handleItemStack get called per frame?
L1423[20:39:31] <tterrag> sure
L1424[20:39:38] <tterrag> but the wrapper model doesn't even need to have an overrides
L1425[20:39:43] <gigaherz> right
L1426[20:39:47] <osum4est> tterrag, i plan on adding my own quads to it, giving it a border that distguishes the crafter from a regular stack of that item
L1427[20:40:06] <osum4est> doesn't that mean i need the extra logic?
L1428[20:40:15] <gigaherz> no
L1429[20:40:17] <gigaherz> you only need like
L1430[20:40:41] <gigaherz> new ArrayList<>(); list.add(originalModel.getQuads()); list.add(customQuads);
L1431[20:41:04] <gigaherz> and customQuads can be static/singleton
L1432[20:42:33] <osum4est> where would i put that? in the get quads of the "main" bakedmodel?
L1433[20:42:48] <gigaherz> no, in the constructor of the "real" bakedmodel
L1434[20:43:25] <gigaherz> the "main" one only cares about getOverrides
L1435[20:43:28] <gigaherz> it has no other purpose
L1436[20:44:06] <osum4est> oh, right. thats what i was planning on doing
L1437[20:46:01] <osum4est> so in the caching, is there a way to get around calling getItemModel every time? or is it not that bad
L1438[20:46:13] <tterrag> actually, I made a mistake
L1439[20:46:18] <tterrag> the result of getOVerrides is not cached anywhere
L1440[20:46:22] <tterrag> it is called on demand every time
L1441[20:46:31] <tterrag> so yes, you will need some kind of caching before that
L1442[20:47:05] <gigaherz> I'd put the cache inside ItemOverrideList, though
L1443[20:47:11] <gigaherz> he only needs one instance of that class
L1444[20:47:23] <gigaherz> since there will only be one "main" IBakedModel returned by IModel#bake
L1445[20:49:48] <osum4est> heres my current itemovveridelist. is this what you guys meant? https://hastebin.com/azobixuqex.scala
L1446[20:50:05] <tterrag> sure except your cache is null always
L1447[20:50:11] <osum4est> whoops
L1448[20:50:15] <osum4est> besides that haha
L1449[20:50:52] <osum4est> changed map to WeakHashMap and instantiated it
L1450[20:51:09] <gigaherz> hmmm
L1451[20:51:12] <gigaherz> I was thinking about it
L1452[20:51:17] <gigaherz> instead of getItemModel(ItemStack)
L1453[20:51:34] <gigaherz> wouldn't you need getRenderItem().getItemModelWithOverrides(ItemStack, ...
L1454[20:51:51] <gigaherz> since the other item may have its own overrides XD
L1455[20:52:49] <gigaherz> also
L1456[20:52:50] <gigaherz> inecraft.getMinecraft().getRenderItem()
L1457[20:53:02] <gigaherz> Minecraft.getMinecraft().getRenderItem() -- keep this in a field
L1458[20:53:16] <gigaherz> you don't need to fetch that every single frame ;P
L1459[20:53:29] <gigaherz> I mean, not that it matters
L1460[20:53:33] <tterrag> meh
L1461[20:53:38] <tterrag> that's a simple field return
L1462[20:53:46] <tterrag> don't worry about unimportant optimizations now
L1463[20:53:53] <gigaherz> but yeah
L1464[20:53:59] <gigaherz> you should call getRenderItem().getItemModelWithOverrides(
L1465[20:54:09] <gigaherz> instead of the other one
L1466[20:54:24] <osum4est> ok, ill make that change
L1467[20:54:29] <gigaherz> and I'm going to sleep
L1468[20:54:39] <gigaherz> good luck with getting the whole thing to work ;P
L1469[20:54:43] <gigaherz> night
L1470[20:54:47] *** gigaherz is now known as ghz|afk
L1471[20:54:51] <osum4est> alrighty. thank you so much gigaherz!
L1472[20:54:58] <ghz|afk> np, yw
L1473[20:56:19] ⇦ Quits: KGS (~KGS@h-155-4-129-249.na.cust.bahnhof.se) (Ping timeout: 206 seconds)
L1474[20:58:45] ⇦ Quits: quadraxis (~quadraxis@cpc77293-basf12-2-0-cust699.12-3.cable.virginm.net) (Ping timeout: 190 seconds)
L1475[21:01:56] ⇦ Quits: Wastl2 (~Wastl2@x4e34c608.dyn.telefonica.de) (Ping timeout: 180 seconds)
L1476[21:04:51] ⇦ Quits: Bjorguv (~reidboyce@c-73-83-133-41.hsd1.wa.comcast.net) (Quit: Bjorguv)
L1477[21:04:57] ⇨ Joins: Wastl2 (~Wastl2@x4e350ae0.dyn.telefonica.de)
L1478[21:06:26] <terribleperson> Oh, right. I still need to ask about the thing I actually joined this IRC to ask. I'm not really clear on proxies. I understand that you... oh, okay, i think I kinda get it now. you make two proxy classes and pass them to the annotation. When forge starts up, it populates the field with ONE of those, based on where it's running.
L1479[21:07:18] ⇦ Quits: Naiten (Naiten@81.2.57.46) (Read error: Connection reset by peer)
L1480[21:07:30] <terribleperson> but I see some people create an abstract common proxy and have the server and client proxy inherit from it
L1481[21:08:40] <Aurilux> Some do that, yeah. Personally, because its how I first learned it, I make the ClientProxy extend the CommonProxy (server)
L1482[21:08:42] <terribleperson> some people have a proxy interface and have their server and client proxy implement it
L1483[21:09:29] <terribleperson> either way, they have their proxy field be of the parent proxy type, whatever they did
L1484[21:09:34] ⇦ Quits: Gaelan (~Gaelan@98-125-192-55.dyn.centurytel.net) (Quit: Gaelan)
L1485[21:09:39] <Aurilux> Correct
L1486[21:10:03] <terribleperson> so in your case your proxy field is of type CommonProxy, yes?
L1487[21:10:11] <Aurilux> Yes
L1488[21:11:08] ⇨ Joins: Umbraco (~Umbraco@113x37x12x233.ap113.ftth.ucom.ne.jp)
L1489[21:13:25] <terribleperson> Okay. Now, I also see that you usually want the client proxy to be able to do EVERYTHING, because I can't think of very many reasons you'd want code to only be executed on dedicated servers (maybe if you had some tools for server managers that you didn't care about having available to solo players, or if you wanted to make sure people couldn't snoop certain things on dedicated servers)
L1490[21:13:37] <terribleperson> so what approach do you take? what approach do most people take?
L1491[21:13:54] <terribleperson> have things that can be done on servers on the common proxy and handle GUI stuff on the client proxy?
L1492[21:14:06] <Aurilux> Exactly
L1493[21:14:21] <terribleperson> and you just... inherit or implement all the common stuff from the parent proxy?
L1494[21:14:44] <terribleperson> yeah okay that makes sense to me.
L1495[21:14:57] <Aurilux> You'll want to declare all methods in the ServerProxy, but they are just empty if they are client only
L1496[21:15:12] <Aurilux> You'll override them to give them functioanlity in the client proxy
L1497[21:15:20] <terribleperson> yeah okay
L1498[21:15:46] <terribleperson> so uh... anyone here have examples of things that they actually only did on the server proxy and NOT on the client proxy?
L1499[21:16:11] <primetoxinz> commands
L1500[21:16:23] <terribleperson> like for OPs and admins?
L1501[21:16:31] <primetoxinz> wait, no that's in ServerStarting
L1502[21:16:37] <osum4est> tterrag, dont know if you'd know, but when rendering the item stack it doesn't use its variant. (ie. rendering granite renders stone)
L1503[21:16:39] <Aurilux> Yeah, about to say :P
L1504[21:17:16] <Aurilux> I think server only things are very rare. Lemme check through my stuff real quick though
L1505[21:19:23] <Aurilux> Looks like I've never come across a situtation where I needed server only stuff in my proxy
L1506[21:19:58] <terribleperson> okay, cool.
L1507[21:20:31] <primetoxinz> lol been going through mod githubs to see if I can find as used
L1508[21:20:36] <primetoxinz> a*
L1509[21:23:36] <tterrag> osum4est: how are you getting the model?
L1510[21:23:46] <osum4est> tterrag, Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides
L1511[21:23:51] <tterrag> passing in what
L1512[21:24:21] <osum4est> the itemstack to get the renderer of, and the world and entity that are passed into handleItemState
L1513[21:27:33] <tterrag> not sure
L1514[21:27:36] <tterrag> that should handle damage values just fine
L1515[21:28:39] <osum4est> weird. and also items aren't transformed correctly (in wrong position). when i override getItemCameraTransforms, i return the models's getItemCameraTransforms
L1516[21:33:56] ⇦ Quits: TechnicianLP2 (~AndChat59@p4FE562D6.dip0.t-ipconnect.de) (Ping timeout: 180 seconds)
L1517[21:53:11] <terribleperson> i guess having 3 proxy classes makes sense from a naming perspective, at the very least. since if you only do a common proxy class and client proxy class, your common proxy class isn't actually common. At the same time, gigaherz's "IModProxy" approach makes sense to me, since if you have an abstract proxy class that the two ACTUAL proxy classes inherit from, your abstract class isn't actually a proxy either and
L1518[21:53:11] <terribleperson> calling it commonproxy is misleading.
L1519[21:54:16] <terribleperson> so i guess I'll be having 3 proxy classes and calling the abstract one... something. ProxyBase?
L1520[21:56:39] <terribleperson> Hey, arguments for interface base proxy class vs abstract base proxy class?
L1521[21:56:49] <Aurilux> Whatever makes sense to you. Honestly, that is the only benefit to making both proxies extend a common interface (naming). I prefer having the client extend common because its reduces the number of files by one XD
L1522[21:57:10] <Aurilux> Hmmm
L1523[21:57:29] <terribleperson> is it just the standard "abstract classes can implement methods that both the client and server proxy use and then you can call them with super?
L1524[21:58:23] <primetoxinz> ugh for some reason whenever I break point in intellij I lose my mouse!
L1525[21:58:24] ⇦ Parts: primetoxinz (~primetoxi@ip68-107-226-229.hr.hr.cox.net) (Leaving))
L1526[21:58:48] ⇨ Joins: primetoxinz (~primetoxi@ip68-107-226-229.hr.hr.cox.net)
L1527[21:59:03] <Aurilux> Well, first off, if the method applies to both you wouldn't have to call super. They inherit the method functionality by being a 'child'
L1528[22:00:13] <Aurilux> Unless, that is, the method shares most functionality and requires a few changes between them, then you would call super.method() followed by the rest of the code
L1529[22:00:33] <terribleperson> yeah, whereas with interface i guess I'd have to reimplement everything
L1530[22:00:36] <terribleperson> so uh... abstract it is.
L1531[22:02:33] <tterrag> there's many schools of thought on proxy design
L1532[22:02:37] <tterrag> end of the day, it doesn't matter
L1533[22:02:39] <tterrag> do what works
L1534[22:02:43] <Aurilux> ^
L1535[22:02:53] <Aurilux> Then optimize later
L1536[22:03:11] <tterrag> it's not even a matter of optimization
L1537[22:03:22] <tterrag> interface vs 3 classes vs 2 classes
L1538[22:03:24] <tterrag> there's no real difference
L1539[22:03:26] <tterrag> other than preference
L1540[22:04:00] <Aurilux> Oh, I thought you were still speaking of interface vs. abstract class
L1541[22:04:07] <terribleperson> yeah no i was
L1542[22:04:13] <terribleperson> i decided on 3 classes already
L1543[22:04:33] <terribleperson> but yeah I can't form preferences without information, so I was trying to gather the information.
L1544[22:04:36] <tterrag> IMO if you are putting something *common* in a proxy, you're doing it wrong :P
L1545[22:04:57] <terribleperson> yeah that's the impression I got. There is no common proxy. No such thing.
L1546[22:05:06] <terribleperson> it's not a proxy if it's common.
L1547[22:05:32] <terribleperson> but that said
L1548[22:05:58] <Aurilux> Well, if tterrag says so looks like I may have to reconsider my proxy procedures ;P
L1549[22:07:03] <terribleperson> i see a lot of people setting up some init stuff that has to happen either way in common
L1550[22:07:32] <tterrag> but then why is it there at all
L1551[22:07:39] <terribleperson> yeah that's.. i just asked myself that
L1552[22:07:40] <tterrag> it should be outside of the proxy entirely
L1553[22:07:50] <terribleperson> "...well, but if you're going to set up the proxy from the main mod class anyways, why" <- was typign already
L1554[22:08:43] <terribleperson> can just do it before you do the proxy stuff in the main mod class
L1555[22:09:39] <osum4est> tterrag, i fixed the issue with rendering different damage values. i turns out it wasn't a problem with the rendering but with my logic. i made a new ItemStack of the item i wanted, rather than calling itemstack.copy() doh!
L1556[22:09:53] <tterrag> uhh yeah
L1557[22:10:25] <osum4est> still have the issue of items in wrong place, if you have any ideas
L1558[22:10:58] <tterrag> pic?
L1559[22:11:09] <osum4est> yep one second
L1560[22:12:09] <osum4est> http://imgur.com/a/y75hQ
L1561[22:12:22] <osum4est> wrong place, and in some items it seems, no color?
L1562[22:12:36] <tterrag> hm...only the hand is wrong?
L1563[22:13:07] <osum4est> nah it should be pointed forwards a bit. lemme screenshot how it should look
L1564[22:13:34] <osum4est> ok just refresh the imgur page and it should there
L1565[22:13:46] <terribleperson> like... okay, I'm examining McJty's DeepResonance stuff now. in PreInit he... does some stuff, then calls proxy.preInit(the FML event), which... both of the proxy classes call super.preInit(the FML event) before they do anything else.
L1566[22:14:03] ⇨ Joins: AstralSorcerer (~AstralSor@128.151.114.24)
L1567[22:14:21] <terribleperson> So why not move the logic from the proxy base class (there CommonProxy) to the main mod class PreInit?
L1568[22:14:35] <tterrag> that is odd
L1569[22:15:05] <Aurilux> tterrag, going back to proxies, what about handlers? I override the registerHandler method in my client to call super then add client-specific handlers. Is that the way to do it or is there a better way?
L1570[22:15:08] <terribleperson> i guess in that case I'll do in interface
L1571[22:15:13] <terribleperson> an*
L1572[22:15:17] <tterrag> handlers?
L1573[22:15:23] <tterrag> event handlers?
L1574[22:15:26] <Aurilux> Yes
L1575[22:15:35] <tterrag> well if you're me, you just put @Handler on the class
L1576[22:15:36] <tterrag> :P
L1577[22:16:06] <Aurilux> Oh, that's right. Just learned about that today
L1578[22:16:11] <tterrag> hm?
L1579[22:16:16] <terribleperson> ..@Handler?
L1580[22:16:32] <tterrag> it's my own thing
L1581[22:16:35] <tterrag> hence "if you're me"
L1582[22:16:51] <Aurilux> Oh, I thought you were talking about this: @Mod.EventBusSubscriber
L1583[22:16:53] <terribleperson> your own annotation?
L1584[22:16:53] <tterrag> it's not a very pretty thing, but it's very handy https://github.com/SleepyTrousers/EnderCore/blob/master/src/main/java/com/enderio/core/common/Handlers.java
L1585[22:17:03] <tterrag> Aurilux: that annotation is more limited, and was added very recently
L1586[22:17:06] <tterrag> I made ^^ about 2 years ago
L1587[22:17:34] <Aurilux> Got it
L1588[22:17:56] <tterrag> it was much more useful back when FML and Forge had their own event buses
L1589[22:18:03] <tterrag> as it would infer from methods in the class which buses it needed to register to
L1590[22:18:31] <Aurilux> Just took a look at it... that kind of stuff is beyond me at the moment XD
L1591[22:19:22] <terribleperson> so what's it do, grab any method in the class that takes a forge event and set it up as an event handler?
L1592[22:19:49] <Aurilux> Pretty much
L1593[22:20:11] <terribleperson> oh, @tterag: If you use an interface for your proxy base... what do you call it?
L1594[22:20:31] <Aurilux> You still have to use the @Mod.SubscribeEvent on the methods
L1595[22:20:43] ⇨ Joins: PieGuy128 (~PieGuy128@mtrlpq5031w-lp130-01-76-65-43-55.dsl.bell.ca)
L1596[22:20:55] <tterrag> terribleperson: I don't use an interface
L1597[22:21:04] <terribleperson> So you just use.. what, an empty class?
L1598[22:21:12] <tterrag> I use two classes only
L1599[22:21:22] <terribleperson> common and client?
L1600[22:21:29] <tterrag> yup
L1601[22:21:47] <tterrag> common is more or less just for definitions
L1602[22:22:36] <terribleperson> ah, okay. I *was* going to do that but the idea of the server proxy being NAMED CommonProxy bothered me, and the idea of naming it ServerProxy and having ClientProxy inherit from ServerProxy ALSO bothered me.
L1603[22:22:37] <terribleperson> so.
L1604[22:23:24] <tterrag> the number of things that require specifically server-only code is minimal
L1605[22:23:27] <tterrag> near zero, actually
L1606[22:23:40] <terribleperson> yeah I was trying to come up with an example of server-only code bothered me.
L1607[22:23:41] <tterrag> in all of my mods I've never actually had to worry about code that was unsafe on the client
L1608[22:23:42] <terribleperson> earlier*
L1609[22:23:52] <tterrag> so to me, the serverside proxy being called "common" makes more sense
L1610[22:24:10] <tterrag> osum4est: I really have no clue why that would be like that
L1611[22:24:14] <tterrag> though, your color issue is probably separate
L1612[22:24:46] <osum4est> tterrag, and the color issue is only on some items
L1613[22:24:55] <tterrag> osum4est: yes, those with IItemColor's for them
L1614[22:25:03] <tterrag> you probably need to implement your own IItemColor which proxies to the underlying item
L1615[22:25:51] <osum4est> tterrag, where do i set the iitemcolor for the model/when setting quads?
L1616[22:26:05] <tterrag> IitemColor is for an item, not a model
L1617[22:26:18] ⇨ Joins: McJty (~jorrit@94-224-152-81.access.telenet.be)
L1618[22:27:17] <tterrag> Minecraft#getItemColors#registerItemColorHandler
L1619[22:28:56] <osum4est> so then do i have to register a new color handler from the items i'm rendering or do i need to set the color of the quads somehow?
L1620[22:34:28] <tterrag> you need to register a color handler for YOUR item
L1621[22:41:56] ⇦ Quits: Lathanael|Away (~Lathanael@p5496131A.dip0.t-ipconnect.de) (Ping timeout: 180 seconds)
L1622[22:42:03] ⇦ Quits: foxy (~gravityfo@superfox.dyn.ucr.edu) (Read error: Connection reset by peer)
L1623[22:44:35] ⇨ Joins: Lathanael|Away (~Lathanael@p54961292.dip0.t-ipconnect.de)
L1624[22:45:55] <osum4est> tterrag, oooooh ok, cool thanks
L1625[22:48:06] ⇦ Quits: Aurilux (~Aurilux@64-126-82-209.dyn.everestkc.net) (Quit: Leaving)
L1626[22:49:15] ⇦ Quits: Zaggy1024 (~Zaggy1024@71-220-45-151.mpls.qwest.net) (Read error: Connection reset by peer)
L1627[22:49:23] ⇨ Joins: foxy (~gravityfo@superfox.dyn.ucr.edu)
L1628[22:57:43] ⇨ Joins: CoderPuppy (~cpup@32.218.112.32)
L1629[22:59:05] ⇦ Quits: cpup (~cpup@32.218.113.255) (Ping timeout: 190 seconds)
L1630[22:59:45] ⇦ Quits: PieGuy128 (~PieGuy128@mtrlpq5031w-lp130-01-76-65-43-55.dsl.bell.ca) (Remote host closed the connection)
L1631[23:05:56] <osum4est> http://imgur.com/a/VagDD color works :D
L1632[23:07:00] <tterrag> I would question whether your perspective is working at all
L1633[23:07:14] <tterrag> I think for regular items, the in-hand render is the only one with any unique perspective transforms
L1634[23:07:52] ⇦ Quits: johni0702 (johni0702@johni0702.de) (Ping timeout: 189 seconds)
L1635[23:09:20] ⇨ Joins: johni0702 (johni0702@johni0702.de)
L1636[23:17:35] ⇦ Quits: sinkillerj (~sinkiller@nc-67-232-15-221.dhcp.embarqhsd.net) (Quit: またね)
L1637[23:26:17] ⇦ Quits: Kaiyouka (~IdiotNono@c-75-71-231-133.hsd1.co.comcast.net) (Ping timeout: 194 seconds)
L1638[23:28:37] ⇦ Quits: kinggoesgaming (uid23106@id-23106.tooting.irccloud.com) (Quit: Connection closed for inactivity)
L1639[23:38:26] ⇦ Quits: Umbraco (~Umbraco@113x37x12x233.ap113.ftth.ucom.ne.jp) ()
L1640[23:38:40] ⇦ Quits: CoderPuppy (~cpup@32.218.112.32) (Ping timeout: 201 seconds)
L1641[23:39:07] ⇨ Joins: cpup (~cpup@32.218.112.32)
L1642[23:40:13] ⇨ Joins: Bjorguv (~reidboyce@c-73-83-133-41.hsd1.wa.comcast.net)
L1643[23:56:24] <osum4est> whats the sound event for the "pop" when picking up an item?
L1644[23:56:44] <tterrag> I think it is actually called pop
L1645[23:56:49] <tterrag> lemme check
L1646[23:58:23] <tterrag> nope
L1647[23:58:27] <tterrag> entity.item.pickup
<<Prev Next>> Scroll to Top