Jump to content

Non-Blockstate values in IBlockColor [1.15.1]


Jipthechip

Recommended Posts

27 minutes ago, Jipthechip said:

My BlockState became too complicated for the values I wanted to feed into my IBlockColor#getColor() implementation.

 

Is there any alternative to getting values from the BlockState, or will I have to use a TER/TESR?

I'm not sure if this still works, but you might be able to cast the ILightReader to a World(do an instanceof check it can be null). Then if it is use World::getTileEntity and store your colors in the TileEntity.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

6 hours ago, diesieben07 said:

No need for the cast, ILightReader extends IBlockReader, which has getTileEntity.

Ah ok I didn't get that from the name, and didn't check either. Either way they still have to check for null.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

13 hours ago, Animefan8888 said:

I'm not sure if this still works, but you might be able to cast the ILightReader to a World(do an instanceof check it can be null). Then if it is use World::getTileEntity and store your colors in the TileEntity.

6 hours ago, diesieben07 said:

No need for the cast, ILightReader extends IBlockReader, which has getTileEntity.

 

Not casting it worked, but I tried casting it anyway just to see what would happen and it crashed. It gave the error:

java.lang.ClassCastException: net.minecraft.client.renderer.chunk.ChunkRenderCache cannot be cast to net.minecraft.world.World

 

Link to comment
Share on other sites

1 minute ago, Jipthechip said:

but I tried casting it anyway just to see what would happen and it crashed. It gave the error:

13 hours ago, Animefan8888 said:

(do an instanceof check

Also it can be null make sure it is not null before you use it.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 minute ago, Jipthechip said:

I did that, and it just ended up never getting to the code I wanted it to.

Which means I was wrong about it being a World instance when you need it to be.

13 hours ago, Animefan8888 said:

I'm not sure if this still works, but you might be able to cast the ILightReader to a World

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

Show your code.

My code was just this

assert lightReader != null;
assert pos != null;
if(lightReader instanceof World){
    // misc code never reached
}else{
    return MaterialColor.WATER.colorValue;
}

Like I said, not casting the ILightReader worked just fine. I was just curious if it could be cast to a World, and it doesn't seem like it can.

Edited by Jipthechip
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • ヨーロッパバドゥギ競技↕BCGAME33·COM○スリナムバドゥギ業者ヨーロッパエルサルバドゥギ遊び場[本社お問い合わせテレJBOX7]ヨーロッパバドゥギ ↔#ホールダンバーアルメニアバドゥギ住所ヨーロッパセーシェルヨーロッパバドゥギ募集[総販お問い合わせカカオトークJBOX7]ヨーロッパバドゥギ ↙▷放送アルメニアバドゥギゲーム場ヨーロッパアイランド ヨーロッパバージュサイト[各種オフィコミュニティ制作]欧州バージュ ▣◇京畿ジャマイカバージュ ホールダンパブ 欧州アラブ首長国連邦欧州バージュ機 [マーケティングお問い合わせ] § 欧州カジノ本 バドゥギ□↙おすすめカンボジアバドゥギ賭博場ヨーロッパウガンダヨーロッパバドゥギ本社[トト本社お問い合わせ]ヨーロッパバドゥギ■↖本社エスワティーニバドゥギゲーム場ヨーロッパサントメプリンシフェヨーロッパバドゥギトーナメント[トト総販購入]ヨーロッパバドゥギ△☏検証チャドバドゥギ方法ヨーロッパカザフスタンヨーロッパバッダ接続[カジノ総販]欧州バッジュ ㏘&ゲーム場リベリアバッジュ競技欧州エクアドル欧州バッダリムホールダンバー [大和本社]欧州バッジュム♥サイトグランドレスカジノバッジュ ホールダンパブ 欧州レソト 欧州レソト 欧州バージュアバージュアルバンバージュ [BCGAMEBCゲーム総販お問い合わせ] お知らせ設定おすすめ購読いいですね
    • chuwaku客栈抖音◇BCGAME55·COM♩chuwaku客栈网站软性网球chuwaku客栈连接高尔夫客栈抖音板球客栈line[本社咨询的tele @JBOX7]chuwaku客栈服务区招募壁球客栈最新地址网络游戏客栈联谊会推荐[总经销咨询的kakaotalk JBOX7] 制作super 女宿运动网站choowakiwakookoowakootootaqootaqoo 制作人 joo jo  [赌场总公司] [CHUUGOOKUYO客栈最新地址 掷标枪] CHUGOOK客栈 曲棍球客栈 招募 地板运动 客栈故事 [体育总公司] CHUGO客栈 链接 CHUGO客栈最新地址 滑雪客栈 旅行足球客栈 Telegram[TOTO总公司咨询] CHUGO KAKO KAKO KATAL KA KALK 打跳远女宿舍 LINK [TO总网购买 CHOOK] SKUKY SKY总网 SKY KY Ski KY Ski 客栈最新地址软式网球客栈Kakao Talk拳击客栈的地方[百家乐总经销] Chuwaku客栈网站E体育 Chuwaku客栈度假村跳高客栈Kakao Talk Free Style客栈TikTok[赛马总经销] Chuwaku客栈验证警报 Chuwaku旅舍同好友会壁球壁球,按摩客人宿舍最新地址[BCGAME BC游戏总经销通知],推荐订阅,点赞。
    • 私設オリンピック賭博場☏BCGAME33·COM  그레グレナダオリンピック中継私設サウジアラビアオリンピックゲーム[本社お問い合わせテレJBOX7]私設オリンピック◑↖ツアーバーデンバーデンオリンピックゲーム私設フォールズビューカジノ私設オリンピックユーチューブ[総販お問い合わせカカオトークJBOX7]私設オリンピック♧☎検証コモロオリンピック本社私設ルクセンブルク私設五輪会社[各種オフィコミュニティ制作]社説五輪↗住所アルバニア五輪会社社説ブラジル社説五輪遊び場[マーケティングお問い合わせ]社説五輪º↔放送シエラレオネの社説エクアドル社説五輪サイト[カジノ本社]米国社説五輪戦略本部 旅行 スウェーデン五輪サイト私設エリトリア私設五輪推薦[ト本社お問い合わせ]私設五輪♤☎賭博場チリ五輪競技私設サモア私設五輪賭博場[ト総販購入]私設五輪§◁業者MGMカジノ五輪ホールダンバー私設チュニジア私設五輪放送[カジノ総販]社説オリンピック◈方法東南アジアオリンピックポーカー大会社説バハマ社説オリンピック旅行[大和本社]社説オリンピック↑戦略南アフリカオリンピッククープーン社説ブルガリア社説オリンピック住所[バカラ総販]社説オリンピック⊙住所モナコオリンピックキャッシュゲーム社説シンガポール総合競技場 購読、いいですね
    • 近身酒吧Kakao Talk◇BCGAME55·COM▩近身酒吧连接网球近身酒吧连接跳高 近身酒吧 Tour骑马近身酒吧同好会[本社咨询的Tele@JBOX7]近身酒吧链接世界杯近身酒吧巡回近身酒吧UTUBE曲棍球网吧 [总经销的Kakao Talk JBOX7] 远足吧总销冰球 征集世界杯 短道速滑俱乐部[OFIFEUPICE TOUTUTUTUBE 制作 网吧] [赌场总公司] 近身酒吧社区 美式足球近身酒吧 巡回手球酒吧 视频 摔跤 东道主酒吧链接 [体育总公司]近身酒吧 跑远点 近身酒吧巡回赛羽毛球酒吧招待所招收滑雪酒吧场所[TOTO总公司咨询]近身吧招待所亚东跆拳道近身吧 Kakao Talk正球吧播送摔跤吧线[购买TO总经销] 长身吧 世界杯 长身家度假村击剑击剑比赛场地滑雪场馆[推特总动员] [TWICE STO BAST高点] 壁球主播推特诱导主播招聘广告[bakara总经销]近key主播店招募壁球主播近key主播店巡回滑冰主播店YouTube曲棍球主播视频[赛马总经销]近key主播店新地址足球长key hostbahn 足球主机棒地址短柄棒广播[BCGAME BC游戏总经销咨询]设置通知推荐订阅点赞
    • 国内貸出業者▷BCGAME33·COM←ペルー貸出ポーカー大会国内コソボ貸出キャッシュゲーム[本社お問い合わせテレJBOX7]国内貸出▼◇接続サンマリノ貸出サイト国内モナコ国内貸出中継[総販お問い合わせカカオトークJBOX7]国内貸出♠♨戦略フォックスウッドカジノ貸出遊び場国内エチオピア国内貸し出しおすすめ[各種オフィコミュニティ制作]韓国貸し出し º クープーンエクアドル貸し出しサイト韓国ヘルツェゴビナ韓国貸し出し総販[マーケティングお問い合わせ]韓国貸し出し▲▷京畿ジャマイカ貸し出し映像 韓国内貸し出しサイト[カジノ本社]韓国内貸し出し↗↑ボリビアツアー映像 国内クラウンカジノ国内貸出サイト[ト本社お問い合わせ]国内貸出◀◁ゲームエストニア貸出業者国内ソロモン諸島国内貸出放送[トト総販購入]国内貸出&ºクープーントランプタジマハルカジノ貸出中継国内北キプロス国内貸出検証[カジノ総販]韓国内貸出↖ 홀ホールダンパブポーランド貸し出し募集 韓国西アフリカ国内貸し出しユーチューブ[ヤマト本社]韓国内貸し出し† 방송放送キプロス貸し出しゲーム場韓国内イラン国内貸し出しおすすめ[バカラ総販]韓国内貸し出し▽▥カジノパブアルバニア貸し出しサイト韓国内トルクメニスタンブローン
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.