Git Product home page Git Product logo

minelabs's Introduction

Minelabs

A mod to add physics and chemistry to your life (and Minecraft)

This is the first version of the mod. We use the Fabric toolchain. For more info, visit our website or join our Discord server.

Contributing

New content for the mod is discussed in brainstorm sessions and on Discord. We encourage everyone who wants to contribute to participate in thinking about new and interesting ways to bring science to Minecraft. Concrete ideas and features are organised in Issues. These can be used to communicate and plan what you are working on.

For new developers who don't have much experience with modding, we advise to take a look at the Fabric wiki and send a message in #development on Discord. We would gladly help you get started!

Workflow

  1. Clone the repository.
  2. Request edit access by providing your GitHub handle on the Discord server.
  3. Switch to a new branch for you to work on.
  4. When your feature is finished and adequately tested and document, submit a pull request.

minelabs's People

Contributors

alleeelias avatar bertjorissen avatar billyvanhove avatar brentjebudts avatar cedricleclercq avatar ferriarnus avatar inemegamaxi avatar jensd1 avatar joeydp avatar jorenfa avatar joshuamoelans avatar majaverstraeten avatar maksimkarnaukh avatar maksimkarnaukh02 avatar pablodeputter avatar pixar02 avatar randyparedis avatar robbenooyens avatar robin-dillen avatar sam-roggeman avatar samantatarun avatar smtdm avatar thdaele avatar vanhovebilly avatar zlatkoristic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

minelabs's Issues

particle: add quarks

Add an item for each of the twelve quarks:

upquark (red)
upquark (green)
upquark (blue)

anti upquark (red) ziet er cyaan uit
anti upquark (green) ziet er magenta uit
anti upquark (blue) ziet er geel uit

downquark (red)
downquark (green)
downquark (blue)

anti downquark (red) ziet er cyaan uit
anti downquark (green) ziet er magenta uit
anti downquark (blue) ziet er geel uit

Use the textures from elementary craft
The quarks CANNOT be placed in the world

Particles: add positron

Make the block positron
Use the texture from elementary craft with the cross model
The positron can be placed in the world

Crafting: neutron

Add three recipes to make a neutron:

3 gluons + upquark (red) + downquark (green) + downquark (blue)
3 gluons + upquark (green) + downquark (blue) + downquark (red)
3 gluons + upquark (blue) + downquark (red) + downquark (green)

(bij elementary craft waren er 6 gluonen vereist maar dat zijn er te veel om te minen)

Particles: Add photon

Make the item photon
Use the texture from elementary craft
The photon CANNOT be placed in the world

Particles: add neutrino and antineutrino

Make the blocks neutrino and antineutrino
Use the textures from elementary craft with the cross model
The neutrino and antineutrino can be placed in the world

Scientific Villager: Create new entity

In order to make the villagers blend into the scientific environment, we'll have to create new villagers. As a proof of concept, it's sufficient to create a new villager entity with a custom skin, which will be provided by the art team soon. Meanwhile, you can use the provided skin as a placeholder.

Requirements:

  • Classname: ScientificVillager
  • Directory: entity
  • Should be spawnable

References:

Particle: add gluon

Make the item gluon
Use the texture from elementary craft
The gluon CANNOT be placed in the world

Entropy Creeper: randomly shuffle blocks upon explosion

Rather than exploding and destroying blocks, the entropy creeper causes the blocks within a 5 by 5 by 5 radius to be randomly shuffled.

Make sure to obey the 'doMobGriefing' gamerule (see creeper code for reference).

Take special care not to misplace bedrock or other unmovable blocks (portal blocks for example). Perhaps there is an easy way to avoid this by using the same logic of explosions.

Schrödinger's Cat

One of the most famous analogies for quantum superposition is Schrödinger's Cat. We will add this to minecraft in the form of a box that when opened either contains a live cat or its remains.

Specification

  • Add a new block with tile entity that is similar to a chest. Texture of box to be provided by #27 (you can use a placeholder for now)
  • When opened, the box either spawns an ocelot with a random name of the form [Felix] Schrödinger where Felix is a random cat name. Additionally, the box contains one potion of poison.
  • Otherwise the box doesn't spawn anything and instead contains an empty bottle, some bones and a nametag with the cat name.

Colored fire

Change the color of fire depending on the block it burns on.

  • Copper should burn green
  • More blocks can be added later

Throwable Electrons

As a proof of concept we want to investigate whether throwable electrons, protons and neutrons are intuitive to work with and visually clear to understand. If this mechanic will not be used for building atoms, it can still prove useful for explaining radiation.

Most elementary particles were placeable as blocks in ElementaryCraft. For this idea, we want to remove the block representation and have elementary particles behave more like snowballs. First implement this only for electrons to evaluate whether it is worthwhile to extend this idea further.

Specification

  • When the player right clicks with an electron in hand, it spawns a throwable entity Electron in the direction vector of the player.
  • The Electron flies in a straight line (no drop due to gravity) and does not slow down over time.
  • The Electron despawns after flying for 5 seconds (to be configured).
  • The Electron despawns after colliding with a block (cannot pass through any blocks for now).

Suggested Implemenatation Steps

  • Read up on how to add projectiles with Fabric:
  • Check out other thrown entities and their corresponding items in the Minecraft source code for inspiration.
    • Snowball
    • Eye of ender
    • Ender pearl
    • (Arrow)
  • Add a new throwable entity for the Electron (same logic as base throwable, snowball seems easiest)
  • Add correct textures to thrown Electron
  • Configure the electron item to spawn the entity
  • Change the logic of the thrown electron to go straight and not slow down
  • Make sure the entity despawns after a while
  • Test whether everything works with a separate server and client
  • Submit and document pull request for review
  • Create new issues based on this prototype to refine how it works. For example:
    • Make it so the electron can pass through blocks up until a harness/strength of 2.0f (to be determined)
    • Add a throwable Proton and Neutron (identical to Electron for now)
    • Possible interactions upon collision with blocks or entities (shock, damage, remove grass from dirt?, ...)
    • Think about how coulomb force would work.

Coulomb force

Add the coulomb-force to charged particles.
A first try is made to implement this, but it refreshes the electric field every tick. This can be made more efficient by only changing the field when there is a change in the world.

  • Make a new type of block, chargedBlock, that has the property 'charge' and the 3D-vector 'ElectricField'
  • Upon addition of a charged block, the block looks for all the charged blocks in a certain radius [different from current implementation]
  • Change the ElectricField of each block on addition/removal/displacement of a block [different from current implementation]
  • If the block has a large ElectricField, move the block in the direction of the Coulomb Force
  • Additional: change the behavior of the Coulomb force to a more stochastic manner. For example, if the field allong x and y are of the same magnitude, have 50% chance to move in each direction.
  • Make an animation, that you really see the block shifting from one position to the next.
  • Make an electric-field-sensor. This would be a block with 'outside charge' Q=0. It would only calculate the electric field from the surrounding blocks like it would have charge Q=1, but it won't change the electric fields of the other blocks. This block would appear like an arrow, pointing in the direction of the electric field. The length of the arrow is dependend on the size of the electric field.
  • Try to give 'velocity' to the block, depending on the Coulomb Force. Several ways are possible, wait more ticks to move a block if it has a lower ElectricField, or let the block move further if it has a higher field.
  • Come up with a completely different, more efficient implementation of the coulomb force. The hard part is that the force is modeled in a discrete square 3D grid, with a discrete time step (tick) that varies. Also, try to implement something that is manageable for the server. An idea would be to maintain a list of all the charged blocks for each chunck, such that there isn't need for a sweep of each block with a certain radious.

Also have a look on the Wiki under Coulomb Force.
Current branch: Workshop.
For more information, contact @BertJorissen or via Discord BertJorissen#4688 .

Define the look and feel for flying electrons

For now flying electrons are rendered as the item itself, however this doesn't have to be the case. Some options for customization are:

  • Custom sound when throwing electron (zap sound? Adaptation of lightning strike?)
  • Custom particles when hitting a block (can be same as texture or completely different (sparks?)
  • Custom texture of electron in air

See #17 also

Entropy Creeper: make sure properties are stored in NBT

What happens to explosionRadius and explosion animation when the world gets saved and reloaded?

Do we need to write these properties to NBT? Can a player change them when spawning with a command? Should they be able to?

Dispense Electron: variation or not

Per vanilla Minecraft behaviour, dispensers dispense items with a slight variation in direction (not always straight ahead). Removing this variation is trivial, but do we want this?

Do we want to keep this behaviour (might be useful for PET scan?) or do we want it to fly exactly straight always (particle collider or particle gun?)

Throwable Electron: avoid redirect

As mentioned in the wiki, redirects are error prone when combining multiple mods, as only one mod can redirect a statement. That is why we should use it sparingly.

In this case it is used to change code in a base class (ThrownEntity) to modify the behaviour of a derived class (ElectronEntity). For this situation I would advise either finding a solution with injects (as done with the creeper) or to simply copy the entire tick function and modifying the parts you need in ElectronEntity. This way you can completely avoid modifying the base class and don't risk breaking anything outside of Scicraft. My preference goes to the latter solution, but I am open to discussion.

Entropy Creeper

Though we are still figuring out the best way to bring educative concepts to Minecraft, one of the more random additions from ElementaryCraft can already be ported: the Entropy Mob.

Essentially this mob is simply a re-skinned version of a Creeper (skin available from ElementaryCraft) that, instead of causing an explosion when detonated, causes the blocks around it to be shuffled randomly.

Specification

  • The Entropy Creeper behaves exactly like a Creeper, with the exceptions listed below.
  • When the Entropy Creeper detonates, it randomly swaps the blocks within a cuboid of radius 5 (to be refined).

Suggested Implementation Steps

  • Read up on adding entities with Fabric:
  • Inspect the Minecraft source code of the Creeper
  • Add a new Mob based on the Creeper (as extension or by copying it)
  • Style the new mob with the textures from ElementaryCraft
  • Implement the custom action instead of the explosion
  • Test whether everything works with a separate server and client
  • Submit and document pull request for review
  • #8
    • If the player is in the radius, they also get teleported randomly within a specified range
    • Animate the swapping of blocks (don't move all at the same time, but do some moving over the next x ticks.
    • A cuboid radius is quite structured which goes against the nature of this mob. Change this to a more chaotic shape, similar to that of an explosion.
    • Add a custom sound to the shuffling and perhaps also to replace the 'sizzling' of a Creeper to warm the player.

Proof of concept: Pocket dimension

In order to experiment with the concept of "going into a block" and seeing its molecules, we want to first try making a small dimension.

  • Create a new dimension
  • Create an item that when used brings you to the dimension (don't worry about getting back for now)
  • The dimension is completely empty, except for a 16x16x16 that can contain blocks (is there any way to exploit this to speed up the dimension?)
  • Report on the approximate loading time to enter the dimension (instant, a second or seconds)

Quantumfieldblocks: mineable

The player can mine quantumfieldblocks. The quantumfieldblocks are easy to mine, i.e. the hardness is very low. The quantumfieldblocks don't disappear when they are mined. You can keep on mining from the block

  • From the photon-quantumfieldblock the player gets a photon

  • From the gluon-quantumfieldblock the player gets a gluon

  • From the weak boson-quantumfieldblock the player gets a weak boson

  • From the electron-quantumfieldblock the player gets an electron AND a positron

  • From the upquark-quantumfieldblock the player gets an upquark AND an anti-upquark (that are respectively red and antired, or blue and antiblue, or green and antigreen)

  • From the downquark-quantumfieldblock the player gets a downquark AND an anti-downquark (that are respectively red and antired, or blue and antiblue, or green and antigreen)

  • From the neutrino-quantumfieldblock the player gets a neutrino AND an anti-neutrino

Particle: add weak boson

Make the block weak boson
Use the texture from elementary craft with the cross model
The weak boson can be placed in the world

Scientific Villager: Textures

What are scientific villagers without their typical lab coat? The default villagers are too .. default? So that's why we will also need new villager textures.

Requirements

  • Create at least 3 new villager textures

Crafting: proton

Add three recipes to make a proton:

3 gluons + upquark (red) + upquark (green) + downquark (blue)
3 gluons + upquark (green) + upquark (blue) + downquark (red)
3 gluons + upquark (blue) + upquark (red) + downquark (green)

(bij elementary craft waren er 6 gluonen vereist maar dat zijn er te veel om te minen)

Entropy Creeper: Add sounds

See Discord #art for sounds. I would suggest sizzle4 for the priming and sizzle1b on detonation. We can sync up the shuffles with the pulses maybe.

For this purpose I would shorten the sizzle1b to 3 pulses and try to fit this in 0.5 seconds. Then you can do a shuffle on the first, fifth and tenth tick. Might need to play around with this a bit to give it a good 'feeling'.

Add neutron

Add the block neutron.
Use the texture from elementary craft.
The neutron can be placed in the world

Custom workstation

As a proof of concept, we want to implement a custom basic workbench. This can, later on, be used to easily create a workstation for atoms for example. This workbench will have the texture of a proton block and will open an anvil menu when right-clicked.

Requirements

  • Workstation should have the proton block texture
  • Should be added to the inventory as an item
  • Should open an anvil GUI when right-clicked

Entropy Creeper: Teleport player

When a player is within the affected radius of an exploding entropy creeper, teleport them randomly within the radius as well. Suffocation is allowed.

Entropy Creeper: Spawn naturally

Have this mob spawn naturally in the world. We can also think about specific spawning conditions that make sense later, but for now I suggest to follow the same rules as other hostile mobs.

Crafting: pion

Add three recipes to make a PionPlus

3 gluonen + upquark (red) + anti downquark (red)
3 gluonen + upquark (blue) + anti downquark (blue)
3 gluonen + upquark (green) + anti downquark (green)

Add six recipes to make a PionNull

3 gluonen + upquark (red) + anti upquark (red)
3 gluonen + upquark (blue) + anti upquark (blue)
3 gluonen + upquark (green) + anti upquark (green)
3 gluonen + downquark (red) + anti downquark (red)
3 gluonen + downquark (blue) + anti downquark (blue)
3 gluonen + downquark (green) + anti downquark (green)

Add three recipes to make a PionMinus

3 gluonen + downquark (red) + anti upquark (red)
3 gluonen + downquark (blue) + anti upquark (blue)
3 gluonen + downquark (green) + anti upquark (green)

Schrödinger's Cat: Zombie noises

When the box is unopened, it emits zombie-cat noises sporadically.

For now the zombie noise can be used, perhaps with a higher pitch or combined with ocelot noises (do they make noise?).

Quantumfieldblocks: add blocks

Make a block for a:

gluon-quantumfield
photon-quantumfield
weak boson-quantumfield
electron-quantumfield
neutrino-quantumfield
upquark-quantumfield
downquark-quantumfield

Use the textures of elementary craft

Throwable Electron: Pass through blocks

Electrons should be able to pass through certain blocks. The easiest way to encode this seems to be the resistance property of a block.

  • Find a suitable threshold of resistance and argue why (around which block is the threshold?)
  • Allow electrons to fly through those blocks

Entropy Creeper: Animate the shuffling of blocks

I think it would look better if not all blocks were shuffled at the same time, but rather over a few ticks.

Make it so 20% of the blocks are randomly selected to be swapped to random positions every tick for 5 ticks after the detonation. Feel free to experiment with this idea and try out other tricks to make it look better.

Throwable Proton and Neutron

Make protons and neutrons throwable as well. They can have the same flying behaviour for now, although in the future we will likely want to define different speeds and impact of gravity for example. Keep this in mind.

If applicable, an intermediate class "AtomComponent" can be created for the items and/or entities that need to be made. Perhaps the more physics oriented people also have a better name for this @BertJorissen?

Lingering potion effect for gasses?

The visualization of lingering potions could also be used for gasses. However, gasses will likely also need to move and interact with the world. Is it possible to create a gas that disperses and goes down when possible using the lingering potion effect?

Look into whether this is a feasible option for implementing gasses. Additionally report on whether this solution can scale (many entities required? update lag?) and is flexible to extend with new features and interactions in your opinion.

As an example you can implement mustard gas that disperses and damages entities it comes into contact with.

Potential Extra functionality Entropy Creeper

Refine Entropy Creeper:

  • If the player is in the radius, they also get teleported randomly within a specified range

  • Animate the swapping of blocks (don't move all at the same time, but do some moving over the next x ticks.

  • A cuboid radius is quite structured which goes against the nature of this mob. Change this to a more chaotic shape, similar to that of an explosion.

  • Add a custom sound to the shuffling and perhaps also to replace the 'sizzling' of a Creeper to warm the player.

Add pions

Add a block for each of the three pions:

PionPlus
PionNull
PionMinus

Use the textures from elementary craft.
The pions can be placed in the world.
Note: when the pion is placed in the world, it is decided what it lookq like (one of three textures).

The Box of Schrödinger's Cat

Texture for the box to put our zombie cat in.

For now I suggest we go with the zombie noises and either spawning a live cat or its loot, so no new cat texture is required.

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.