Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About monkeysHK

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oh that's what I need. Now it worked & thanks again!
  2. How can I get Minecraft's dispatcher?
  3. Hello. I want to register a command class. This is how I did it and doesn't work. private static final CommandDispatcher<CommandSource> dispatcher = new CommandDispatcher<>(); @SubscribeEvent public static void serverStarting(FMLServerStartingEvent event) { ConfigCommand.register(dispatcher); } What is the right way to register the command?
  4. Ok, I tried that a few more ways, but the only way worked is to replace blendColor with the depreciated color4f. (Not sure if that's the best way to go for but that worked) Thank you @ChampionAsh5357 for all the suggestions/help private static final RenderState.TransparencyState TRANSLUCENT_TRANSPARENCY = new RenderState.TransparencyState("translucent_transparency", () -> { RenderSystem.enableBlend(); RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManage
  5. Hi. I tried translucent_transparency. I copied code from it to setup and clear the renderstate. Still doesn't work, texture is not transparent. Am I missing something? minecraft.getTextureManager().bindTexture(TEXTURE_LOC); matrixStack.push(); { RenderSystem.enableBlend(); RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); Ren
  6. It was a really good reference to look at. I am trying to define a RenderState and use their constructor and their setup and clear functions. But it still wouldn't work. private static final RenderState.AlphaState HALF_ALPHA = new RenderState.AlphaState(0.5F); minecraft.getTextureManager().bindTexture(new ResourceLocation("minecraft", "textures/gui/widgets.png")); matrixStack.push(); HALF_ALPHA.setupRenderState(); { matrixStack.translate(instru_pos[currentNbo.ordinal()][0], instru_pos[currentNbo.o
  7. Hello. I am having trouble making a picture render transparent on my Screen and I am not sure what the problem is. It renders correctly but not transparent. Here is my code in MyScreen::render Also I want to know how to remove the effect of RenderSystem afterwards for further renders. TextureManager tm = minecraft.getTextureManager(); ResourceLocation rl = new ResourceLocation("minecraft", "textures/gui/widgets.png"); tm.bindTexture(rl); matrixStack.push(); { RenderSystem.colorMask
  8. That's exactly what I wanted to look at. (It's so obvious and I was dumb) Thanks
  9. Hello. As we can look at the declaration of blocks in Blocks.java, I want to know if forge has a place to store vanilla BlockItem declarations (for each of their vanilla blocks), or where they initialize.
  10. Oh yes that was exactly the problem. Spent a little more time on documentation and figured it out. Thank you so much! Code that works. @Mod.EventBusSubscriber(modid = nbaddons.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class Registration { public static final DeferredRegister<Block> VANILLA_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, "minecraft"); public static RegistryObject<Block> NOTEBLOCK = VANILLA_BLOCKS.register( "note_block", () -> new NBTNoteBlock(AbstractBlock.Properties.create(Material.WOOD).sound(SoundType.W
  11. Oops... I omitted the class because I thought I would not need it for the discussion. Here is the full Registration.java. public static final DeferredRegister<Block> VANILLA_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, "minecraft"); public static RegistryObject<Block> NOTEBLOCK = VANILLA_BLOCKS.register( "note_block", () -> new NBTNoteBlock(AbstractBlock.Properties.create(Material.WOOD).sound(SoundType.WOOD).hardnessAndResistance(0.8F))); public static final DeferredRegister<TileEntityType<?>> TILE_ENTITIES = DeferredRegis
  12. Still getting the same error. New Registration.java public static final DeferredRegister<Block> VANILLA_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, "minecraft"); public static final RegistryObject<Block> NOTEBLOCK = Registration.VANILLA_BLOCKS.register( "note_block", () -> new NBTNoteBlock(AbstractBlock.Properties.create(Material.WOOD).sound(SoundType.WOOD).hardnessAndResistance(0.8F))); public static void register() { VANILLA_BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); } Full Stac
  13. Hello. I have been trying to register my own class NBTNoteBlock to the block registry with key note_block in "minecraft" but I got an error. I don't know what was wrong. It would be appreciated if someone could provide a fix. Code is provided below. Error I got was: [16:41:11] [Render thread/ERROR] [minecraft/Util]: No data fixer registered for note_block [16:41:11] [Render thread/ERROR] [ne.mi.fm.ja.FMLModContainer/]: Exception caught during firing event: Can not register to a locked registry. Modder should use Forge Register methods. First few lines in the main mod
  14. My goal is to add NBT tags on picking up note block (ctrl+middle click in creative mode like for chest containing items, where it will show "+NBT" and will have the items in it) Should I coremod to add a custom tile entity (with nbt values) to the vanilla note block?
  15. Hello. I have been trying to change the behaviour of the note block using mixin. Currently it is expected to send a message in logger when I click the noteblock. Does not work and I am not sure what the problem is. This is some of my code and it'd be appreciated if anyone could point out what's wrong. (I suspect I have to add nbaddons.refmap.json somewhere?) Note: Code is removed because I decided to resort to other methods. Note that this thread provides no answer to the problem mentioned.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.