Coder Social home page Coder Social logo

Comments (12)

3TUSK avatar 3TUSK commented on July 26, 2024 2

Minecraft代码(不含FML等硬插进去的成分)分明是没有javadoc然后让别人去猜

回到正题。Item类下有一个专门注册ItemBlock的protected方法,不知道当时那个写protected的人在想什么- -

from fmltutor.

3TUSK avatar 3TUSK commented on July 26, 2024 1

@ustc-zzzz 就不能提一下那个神奇的GameRegistry.<T extends IForgeRegistry<T>>register(T objToReg)吗...

from fmltutor.

3TUSK avatar 3TUSK commented on July 26, 2024 1

... @liach 给他点时间shift

from fmltutor.

EntropyIncreaser avatar EntropyIncreaser commented on July 26, 2024 1

通过getBlockRegistry获得ResourceLocation可以直接block.getRegistryName()来解决

from fmltutor.

liach avatar liach commented on July 26, 2024

方块的注册表是在Block类里面的。或者你可以在注册后保留方块实例,里面再保留个物品实例即可。

from fmltutor.

liach avatar liach commented on July 26, 2024

@3TUSK Unfortunately, 1.8.9 is way too old. The guide should move to minecraft 1.11.

from fmltutor.

CatMe0w avatar CatMe0w commented on July 26, 2024

from fmltutor.

CatMe0w avatar CatMe0w commented on July 26, 2024

from fmltutor.

liach avatar liach commented on July 26, 2024

@CatMe0w minecraft的代码本来就是靠你自己去领悟的。官方文档等待着贡献者呢。javadoc也不全。

from fmltutor.

3TUSK avatar 3TUSK commented on July 26, 2024

@ustc-zzzz 你要是在的话,把这个issue关了吧...

getBlockRegistry() -> Block.REGISTRY

from fmltutor.

liach avatar liach commented on July 26, 2024

应该用ForgeRegistries.BLOCK

from fmltutor.

ustc-zzzz avatar ustc-zzzz commented on July 26, 2024

在6月28号的提交中,已经使用getRegistryName/setRegistryName替代了之前直接在注册时传入参数的注册方式。

from fmltutor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.