Add Vacuum Blocks #80
No reviewers
Labels
No labels
Area-Assets
Area-Backend
Area-Conduits
Area-Datapacks
Area-Lang
Area-Mod Compat
Area-Parity
Area-Rendering
Good first issue
MC-1.19.2
MC-1.20.1
MC-1.20.4
MC-1.20.6
MC-1.21
MC-1.21.1
Modtoberfest
P-0-High
P-1-Medium
P-2-Low
Status-Awaiting Response
Status-Behind-Flag
Status-Blocked
Status-Cannot Reproduce
Status-Duplicate
Status-Help Wanted
Status-Incomplete Report
Status-Invalid
Status-Needs LTS Backport
Status-Needs Updating
Status-Stale
Status-To Implement
Status-Triage
Status-Wontfix
Status-Wontmerge
Type-Backport
Type-Bug
Type-Documentation
Type-Enhancement
Type-Question
Type-RFC
Type-Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Team-EnderIO/EnderIO#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/vacuum"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Co-authored-by: ferriarnus ferriarnus@users.noreply.github.com
Description
Adds Vacuum Blocks - Vacuum Chest and XP Vacuum blocks
supersedes #22
Todo (Vacuum Chest)
IO configCheck render screen resizeTodo (XP Vacuum)
IO configChecklist:
Looks mostly good from the code, just a few small things to fix up.
@ -10,6 +10,7 @@ import net.minecraft.core.Direction;import net.minecraftforge.client.model.IQuadTransformer;Please undo the changes to the formatting here
Please remove the changes to this file since its just formatting changes. Even if they are correct we can save it for a refactoring commit separately to the whole repo.
@ -0,0 +1,72 @@package com.enderio.machines.common.blockentity;Can you remove this if its not longer relevant
@ -0,0 +1,112 @@package com.enderio.machines.common.blockentity;If this file doesn't already exist, make a common NBTUtils class in base and put it in there.
Go with tank
@ -0,0 +41,4 @@this.rCol = (float)Integer.parseInt(color.substring(4,6), 16) / 255;// Create fluid tank.this.fluidTank = createFluidTank(Integer.MAX_VALUE);Can we make this a configurable value?
@ -0,0 +68,4 @@@Overrideprotected IIOConfig createIOConfig() {return new FixedIOConfig(IOMode.PUSH);Correct me if I am wrong, but did we have a way to configure sides to be push or none in 1.12? I know the gui for side configuration isn't ready but it would be worth making sure the inventory is just accessible rather than actively pushing by default
Please undo the formatting changes for the non-vacuum entries
Also remove the formatting changes for non-vacuum entries here
@ -0,0 +1,125 @@package com.enderio.base.client.particle;Can you change these var's to floats/vecs (for the ones below) since they are simple enough types
@ -0,0 +13,4 @@public static final DeferredRegister<ParticleType<?>> PARTICLE_TYPES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, EnderIO.MODID);public static final RegistryObject<RangeParticleType> RANGE_PARTICLE = PARTICLE_TYPES.register("range_particle", RangeParticleType::new);Is this possible with Registrate? I believe it should be possible with Registrate.simple()
Please rename this file given we aren't calling it "tesseract". Just go with "vacuum_portal" or similar
@ -0,0 +41,4 @@this.rCol = (float)Integer.parseInt(color.substring(4,6), 16) / 255;// Create fluid tank.this.fluidTank = createFluidTank(Integer.MAX_VALUE);Do you mean like configurable through client.toml file ?
@ -0,0 +13,4 @@public static final DeferredRegister<ParticleType<?>> PARTICLE_TYPES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, EnderIO.MODID);public static final RegistryObject<RangeParticleType> RANGE_PARTICLE = PARTICLE_TYPES.register("range_particle", RangeParticleType::new);what would be the value for
ResourceKey<Registry<R>> registryType@ -0,0 +1,72 @@package com.enderio.machines.common.blockentity;@ferriarnus added this. Is this still needed/or to be done ?
@ -0,0 +68,4 @@@Overrideprotected IIOConfig createIOConfig() {return new FixedIOConfig(IOMode.PUSH);In 1.12, Both the vacuum block don't have an option to configure automatic push/pull. However, XP vacuum has a very small internal buffer and thus requires an external storage connected to it. It pushes automatically to a tank next to it. On the other hand, Vacuum chest doesn't push anything automatically.
@ -0,0 +41,4 @@this.rCol = (float)Integer.parseInt(color.substring(4,6), 16) / 255;// Create fluid tank.this.fluidTank = createFluidTank(Integer.MAX_VALUE);Should be configured through the server toml and synced to the client
@ -0,0 +13,4 @@public static final DeferredRegister<ParticleType<?>> PARTICLE_TYPES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, EnderIO.MODID);public static final RegistryObject<RangeParticleType> RANGE_PARTICLE = PARTICLE_TYPES.register("range_particle", RangeParticleType::new);I don't remember currently, might have to experiment and find out
@ -0,0 +41,4 @@this.rCol = (float)Integer.parseInt(color.substring(4,6), 16) / 255;// Create fluid tank.this.fluidTank = createFluidTank(Integer.MAX_VALUE);Done!
@ -0,0 +1,72 @@package com.enderio.machines.common.blockentity;it seems this can go now yeah, probably legacy. It matches the super method
@ -0,0 +68,4 @@@Overrideprotected IIOConfig createIOConfig() {return new FixedIOConfig(IOMode.PUSH);I felt like giving these blocks also control over the sides be a good idea. And as a correction, from what I could see in the 1.12 code, the buffer of the xp vacuum is really large (to the point it may need a nerf).
I had a look in game and it all still worked like a remember it does (and a new range indicator that seems to be doing it's job quiet well, though some angles don't render, but I think this is a mc limit? If that's the reason it should be fine). If no one else has any remarks about the code (I'm really bad at checking code like this). I think it's ready to be merged (after fixing the conflicts and 1 comment).
@ -0,0 +68,4 @@@Overrideprotected IIOConfig createIOConfig() {return new FixedIOConfig(IOMode.PUSH);Should I keep it default or change it ?
Fixed merge conflicts. Waiting for IO widget to complete this PR.
@ -0,0 +13,4 @@import net.minecraft.resources.ResourceLocation;import net.minecraft.world.entity.player.Inventory;public class VacuumChestScreen extends EIOScreen<VacuumChestMenu> {don't use
this.for variables you can access without the prefix@ -0,0 +1,65 @@package com.enderio.machines.client.gui.screen;widgetsv2 isn't used, extract the things you need from there to a seperate texture file
@ -0,0 +1,34 @@package com.enderio.machines.common.menu;use the other Nullable Annotation
No need to remove some characters. We aren't limited to storage
@ -0,0 +15,4 @@import net.minecraft.world.entity.player.Inventory;public class XPVacuumScreen extends EIOScreen<XPVacuumMenu> {@ -0,0 +28,4 @@@Overrideprotected void init() {super.init();addRenderableOnly(new FluidStackStaticWidget(this, getMenu().getBlockEntity()::getFluidTank, leftPos + 27, topPos + 22, 32, 32));looks good to me