Everything posted by WOTBLITZ
-
(SOLVED) [1.14.4] Creating Config File
Forge has its own config syntax. But I don't like to use it, I like to use the json syntax.
-
[1.13+] How to move item's slot at client side
What do you mean?
-
[1.13+] How to move item's slot at client side
Use a SimpleChannel. Forge docs: https://mcforge.readthedocs.io/en/1.13.x/networking/simpleimpl/
-
1.14.3 - Failed to run processor
Can you copy the installer log content to pastebin?
-
[1.13+] How to move item's slot at client side
No, the slot is handled in the server. Are you making a client-side only mod? If not create a keybinding and check if it is pressed on the client and then send a packet to tell the server that, that the key has been pressed and don't forget which player pressed the key. On the server get the inventory from the player and move the items around there.
-
{1.12} Launcher won't show up as a profile
You should post your problem on minecraftforum next time. How did you install forge? Remember to change your mc version on your launcher profile.
-
[1.14.3] Generate javadoc
How did do your setup of the mdk?
-
[1.13+] How to move item's slot at client side
You can't. The server says to the client to move items around in an inventory. What exactly do you want to do?
-
1.14.3 - Failed to run processor
Have you installed Minecraft 1.14.3? Forge installer requires the corresponding mc version to be installed.
-
LazyOptional
Somehow my post doesn't display properly. Here is a redo: ^Why (I Almost think you're stupid. No offense) 1. From what I understand, it keeps from returning null without the dev knowing. 2. LazyOptional.of((NonNullSupplier<T>) Optional.fromNullable("Your capability instance here")); 3. Use .orElse in LazyOptional and set null as the argument. If you get null and not a capability instance then the LazyOptional is empty. Took me literally weeks to find the answer for 2. And take a look at my mod source for guidance: https://github.com/WotblitzMC/FEUniversial
-
LazyOptional
^Why? (Almost think you're stupid. No offense) 1. From what I understand, it keeps from returning null without the dev knowing. 2. LazyOptional.of((NonNullSupplier<T>) Optional.fromNullable("your capability instance here")); 3. Use .orElse in LazyOptional and set null as the argument. If you get null and not a capability then the LazyOptional is empty. Took me literally weeks to find the answer for 2. And take at me mod source for guidance: Github
-
[1.13.2]Network warning/error and GuiConatiner problem
Hmm..., You really must learn how to read. First I said my main mod class then I mentioned a getter which means that I am created it on when my mod object gets init! However, I tried to change register the channel st FMLCommonSetupEvent, no difference. Also tried changing how I registered my channel from: NetworkRegistry.newSimpleChannel(new ResourceLocation("feuniversal", channelName), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals); to NetworkRegistry.ChannelBuilder .named(new ResourceLocation("feuniversal", channelName)) .clientAcceptedVersions(PROTOCOL_VERSION::equals) .serverAcceptedVersions(PROTOCOL_VERSION::equals) .networkProtocolVersion(() -> PROTOCOL_VERSION) .simpleChannel(); and still no difference. And this was taken from two different projects at Github.
-
[1.13.2]Network warning/error and GuiConatiner problem
I haven't changed my code apart from my GuiHandler. The problem is that this [04jun2019 20:34:56.138] [Client thread/WARN] [net.minecraft.client.network.NetHandlerPlayClient/]: Unknown custom packed identifier: feuniversal:fenet is being printed whenever I try to send a packet.
-
[1.13.2]Network warning/error and GuiConatiner problem
The SimplChannel is working as the client is being updated.
-
[1.13.2]Network warning/error and GuiConatiner problem
Should I register my SimplChannel at FMLCommonSetupEvent instead?
-
[1.13.2]Network warning/error and GuiConatiner problem
The PacketHandler is just created like this: private PacketHandlerFE network = new PacketHandlerFE("fenet"); //The following is using that instance public PacketHandlerFE getNetwork() { return this.network; } //and private void doSetup(final FMLCommonSetupEvent event) { this.network.registerPackets(); } The getNetwork() getter is only being used to send packets. And thank you for informing me, that I had to write additional GUI data. Could find so much information about the new Gui system.
-
[1.13.2]Network warning/error and GuiConatiner problem
I create the PacketHandlerFE in my main mod class. This where I open it: @Override public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if(!player.isSneaking()) { if(!worldIn.isRemote) { TileEntityProducerBasicDirt tile = (TileEntityProducerBasicDirt) worldIn.getTileEntity(pos); NetworkHooks.openGui((EntityPlayerMP) player, new IInteractionObject() { @Override public ITextComponent getName() { return new TextComponentString(""); } @Override public boolean hasCustomName() { return false; } @Override public ITextComponent getCustomName() { return new TextComponentString(""); } @Override public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new DirtProducerContainer(playerIn, tile); } @Override public String getGuiID() { return FEUniversal.getInstance().dirtProducerID.toString(); } }); } else { return true; } } return super.onBlockActivated(state, worldIn, pos, player, hand, side, hitX, hitY, hitZ); } I can see that "onBlockActivated" is deprecated but I don't what to use instead.
-
[1.13.2]Network warning/error and GuiConatiner problem
Yes, but at the moment I have just one registered: Packet registry: public class PacketHandlerFE { private final String PROTOCOL_VERSION = "1"; private int ID = 0; private final SimpleChannel INSTANCE; public PacketHandlerFE(String channelName) { this.INSTANCE = NetworkRegistry.newSimpleChannel(new ResourceLocation("feuniversal", channelName), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals); } public SimpleChannel getSimpleChannel() { return this.INSTANCE; } public void registerPackets() { this.INSTANCE.registerMessage(ID++, UpdateTileEntityS.class, UpdateTileEntityS::encode, UpdateTileEntityS::decode, UpdateTileEntityS.Handler::handle); } public <MSG> void sendTo(MSG msg, EntityPlayerMP player) { if (!(player instanceof FakePlayer)) { this.INSTANCE.sendTo(msg, player.connection.netManager, NetworkDirection.PLAY_TO_CLIENT); } } /*public void send(PacketTarget target, Object msg) { this.INSTANCE.send(target, msg); }*/ } and GuiHandler: public GuiScreen openGui(FMLPlayMessages.OpenContainer openCon) { BlockPos pos = openCon.getAdditionalData().readBlockPos(); World world = Minecraft.getInstance().world; EntityPlayer player = Minecraft.getInstance().player; if(guiElement.get(openCon.getId()) != null) { return new guiElement.get(openCon.getId()).openGuiContainer(player, world, pos); } else { player.sendMessage(new TextComponentTranslation("error.opengui.null")); return null; } }
-
[1.13.2]Network warning/error and GuiConatiner problem
Have at the moment two problems with my mod: 1. When I try to send a packet this message is being printed: [04jun2019 20:34:56.138] [Client thread/WARN] [net.minecraft.client.network.NetHandlerPlayClient/]: Unknown custom packed identifier: feuniversal:fenet 2. The new way to display a GuiContainer get stuck(no errors are being printed) at this line: BlockPos pos = openCon.getAdditionalData().readBlockPos(); I can print to the console before the line but not after and therefore the GuiConatiner isn't returned.
-
[1.13.2]Getting server instance
At the moment read files from the installation dir.
-
[1.13.2]Getting server instance
I was trying to get the server instance at init but FMLCommonHandler doesn't exist and FMLCommonSetupEvent doesn't give a server instance either. So how do get the instance in 1.13?
-
[1.13.2]Error updating mcp mappings[Closed]
Read the title! The same as original but with different mcp version
-
[1.13.2]Error updating mcp mappings[Closed]
I'm downloading it by changing the default mappings in the build.gradle file. Usually, it should work fine and update the project.
-
[1.13.2]Error updating mcp mappings[Closed]
I tried to update mcp mappings via http://export.mcpbot.bspk.rs/ but I get the same error. Error: Could not download mappings from de.oceanlabs.mcp.
-
Crash when pressing play
Yeah it's something with LiteLoader, but there is a fix remove the LiteLoader jar and edit the forge version json, add { "name": "com.mumfrey:liteloader:1.6.4", "url": "http://dl.liteloader.com/versions/" }, to libraries and add --tweakClass com.mumfrey.liteloader.launch.LiteLoaderTweaker to minecraftArguments before the forge tweakClass. Basically loading and init LiteLoader before forge
IPS spam blocked by CleanTalk.