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]生放送ワールドカップ☞↕旅行ボスニアW杯ホールダンバ生放送カザフスタン生放送ワールドカップ方法[各種オフィコミュニティ制作] 生番組W杯▒™映像フィリピンW杯への接続 生放送ジンバブエの生活W杯旅行[マーケティングに関するお問い合わせ] 生放送W杯▷↗ホールダンパブアルジェリアW杯戦略 生中継テレビ大会 [スポーツ本社]生放送ワールドカップ§↙方法 ネビスワールドカップ本社生放送バヌアツ生放送ワールドカップリーグ[ト本社お問い合わせ]生放送ワールドカップ▶動画カメルーンW杯おすすめ生放送キプロス生放送ワールドカップグループトーク[トト総販購入]生放送ワールドカップ@○キャッシュゲームグランドレスカジノW杯住所生放送スウェーデンの 生放送ワールドカップカジノパブ[カジノ総販] 生放送W杯º▨メーカーキルギスW杯グループチャットルームのライブ配信[大和本社] 生放送W杯♬クープーンコソボW杯検証済みW杯中継方法 映像エストニアワールドカップ検証 [BCGAMEBCゲーム総販お問い合わせ] お知らせ設定おすすめ購読いいですね
    • 福岛按摩女孩公开聊天▧BCGAME55·COM▼福岛按摩女孩度假村跳远福岛按摩女孩视频单杠按摩女孩位置公仔按摩女孩度假村[本社咨询的Tele@JBOX7]福岛按摩女孩网站Real福岛按摩女孩网站功夫按摩女孩地址历图 按摩女郎地址[总经销文的Kakao Talk JBOX7]福岛最新Domaso Nordical Madical Nordics Affical Angelics Offics Affical Temategemasemae[制作 制作] [赌场总公司] 福岛按摩女孩 Instagram 台球 福岛按摩女孩开放聊天 跳水 按摩女孩开放聊天 排球按摩女孩聚会信息 [体育总公司] 福岛按摩女孩营业场所招募 按摩女孩福岛按摩女孩 YouTube Field曲棍球按摩女孩地图 Field曲棍球 按摩女郎推荐[TOTO总公司咨询]福岛 按摩女郎位置 Boachi福岛 按摩女郎旅行奥林匹克 按摩拳擦肩推特[TOTO总购买] KIMA KATALKOMA GIRLE拳击视频系统 亚东北欧按摩女孩故事跳水按摩女孩最新地址[bakara总经销]福岛按摩女孩招聘广告网络游戏福岛按摩女孩同好会按摩女孩度假村乒乓球按摩女孩同好会[赛马总经销]福岛按摩女孩系统跆拳道福岛按摩女孩推荐网式足球 按摩女郎巡回击剑击剑运动推荐[BCGAME BC游戏总经销咨询]设置通知推荐订阅点赞
    • スポーツ奇数偶数メーカー♡BCGAME33·COM† セーシェル奇数偶数ゲーム スポーツモナコ奇数偶数ホールダンパブ [本社お問い合わせテレJBOX7]スポーツ奇数偶数@↓戦略エリトリア奇数サイトスポーツモナコスポーツ奇数偶数中継 [総販お問い合わせカカオトークJBOX7]スポーツ奇数@≒ゲーム場とは奇数偶数接続スポーツリトアニアスポーツ偶数中継 [各種オフィコミュニティ制作]スポーツ偶数▽ツアーリトアニア·ホールチャックコミュニティ·ジャンプ·ザンビアスぽーツホールペア遊び場[マーケティングお問い合わせ] スポーツホルチャック▒♪方法 東南アジア·ホルチャック スポーツ·アルパース 住所 モンテカルロ 奇数偶数 サイト スポーツ セントルシア スポーツ 奇数偶数 映像 [ト本社お問い合わせ]スポーツ 奇数 ♩◈ツアー ミャンマー奇数ツアー スポーツ スウェーデンスポーツ スロバキア スポーツ奇数 ゲームセンター [カジノ総体]スポーツ奇数偶数★↘動画リオオールスイートカジノ奇数偶数検証スポーツアンドラスポーツ奇数偶数 クープーン [大和本社]スポーツ偶数▣☏旅行BCGAMEカジノ偶数 サイズスポーツブルンジスポーツ ホール偶数 旅行 [バッカラゲーム機] Foxcashfuckimolesolutionalia Sportfucknowskimoespoolbucknowdolesknowdoles BCゲームの総販に関するお問い合わせ] お知らせ設定のおすすめ購読、いいですね
    • 宫城购物场所招募*BCGAME55·COM▶宫城购物Instagram、花样宫城购物视频、硬地滚球购物、Kakao Talk、T-ball购物之旅[本社咨询的Tele @JBOX7]宫城购物网站、跆拳道、宫城购物度假村、Freestyle购物视频、Freestyle Shopping Tiktok[总经总经商咨询的Tele @JBOX7] 宫城购物的购买信息聚会[Mikiumparket Shopping] 公开聊天船比赛 购物线 滑雪购物推荐 [体育总公司] 宫城购物放送 棒球宫城购物新地址 棒球购物 Instagram 骑马购物新地址[TOTO总公司咨询] 宫城购物巡演 奥林匹克宫城购物 Kakao Talk撑杆跳高购总经销短道速滑购 Kakao Talk [TOTO总经销购买]宫城购物中心招募 水营 MIKAMIU SHARM最新地址 马术购物的最新地址掰手腕购 Youtube[赌场总经销]宫城购物的 MIKOTO SPICKOTO BOTO SHANGU高购物的 招聘广告摔跤购物地图[赛马总经销]宫城购物公开聊天 F1大奖赛宫城购物网站游泳购物视频排球购物新地址[BCGAME BC游戏总经销咨询]设置通知推荐订阅点赞
    • リアルタイム株式ホールダンバー㏘BCGAME33·COM☎ジャマイカ株式ゲーム場リアルタイムアリアカジノ株式キャッシュゲーム[本社お問い合わせテレJBOX7]リアルタイム株式↔↖本社リゾートワールドカジノ株式本社リアルタイムセントビンセントリアルタイム株式放送 [総販お問い合わせカカオトークJBOX7]リアルタイム株式#♩ツアースイス株式バーカラパブリアルタイムコスタリカリアルタイム株おすすめ[各種オフィコミュニティ制作]実時間株♩▨検証ベラルーシ株キャッシュゲーム実時間ジョージア実時間株ゲーム[マーケティングお問い合わせ]実時間 ♠▣クープンセネガル株実時間動画サイト [スポーツ本社]リアルタイム株式♣☎サイトロシア株式本社リアルタイムセーシェルリアルタイム株式バカラパブ[ト本社お問い合わせ]リアルタイム株式↕□検証マリーナベイ株式接続リアルタイムグレナディーンリアルタイム株式映像[トト総販購入]リアルタイム株式◐▼トーナメント東南アジア株式競技リアルタイム ドイツの実況キャッシュゲーム[カジノ総販] 実況 アゼルバイジャン株ツアー 実時間クラウンカジノ実況感[ヤマト本社]実時間株●▷映像ペルー株総販 実時間 ウズベキスタンの実況感ユーチューバー [実況感] オランダ株総販 ライブ ネトバ [BCGAMEBCゲーム総販お問い合わせ] お知らせ設定おすすめ購読いいですね
  • Topics

×
×
  • Create New...

Important Information

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